You must be logged in to post messages.
Please login or register

AoE/RoR Modding and Discussion
Moderated by Suppiluliuma, PhatFish, Fisk, EpiC_Anonymous, Epd999

Hop to:    
Welcome! You are not logged in. Please Login or Register.117 replies, Sticky
Age of Empires Heaven » Forums » AoE/RoR Modding and Discussion » RockNRoR : mod to improve AI and add various game enhancing features
Bottom
Topic Subject:RockNRoR : mod to improve AI and add various game enhancing features
« Previous Page  1 2 3  Next Page »
chab
Clubman
posted 03-16-15 02:44 PM ET (US)         
Warning: this project is now named RockNRor.
The file is provided in RockNRor ZIP file.
See also RockNRor website for screenshots, etc.

This mod will contain
- Some already existing fixes
- All new fixes that I find
- All new features I can develop for RoR.

Main ideas are:
- Improve AI to make it more challenging
- Add features like get map seed, add new conversion resistances (see the details below)
- Allow more and more possible configuration. Almost all features can be configured to best suit YOUR expectations.
- Potential improvements/features are almost illimited ! Other major enhancements may come in the future.

As it is part of ROR_API system, it only needs minimal changes in original game files. Moreover, these changes are compatible with all other mods that are written for ROR_API. For the first time, a common part of the code might be overloaded by 2 mods at once !

Requirements:
- Windows XP, 7 or later (compatible with linux using wine+winetricks)
- Windows 10 : please see FAQ paragraph
- Microsoft Visual C++ redistributable libraries 2013
- Rise of Rome expansion !

Installation
- Run RockNRoradmin.exe (make sure to use latest version) and use the dedicated menu entry.


Please provide feedback. This is still under heavy development, I hope it is bug-free.


Keys:
Scenario Editor : F1 to switch to "select unit" mode
Scenario Editor : F2 to edit selected unit
Scenario Editor : F3 to open RockNRor menu (edit terrain, triggers, get PER/AI files, etc)
Scenario Editor : F10 to open standard menu


FAQ:
Does it work for 1.0b version or vanilla AoE ?
Yes... But features will be very limited !

How do I set up my own configuration for conversion resistance, custom civilizations or any other stuff ?
Just edit RockNRor.xml / RockNRor_civs.xml...

Can I make sure all RockNRor features work correctly ?
- Open RockNRor.log and check for error messages. It will tell you if a feature could ne be enabled (if CustomizeAOE changes are missing)
- Press F1 in ROR main menu (first screen). If an options screen appears, then RockNRor is working. If AOE help opens, then RockNRor is not working.
- Select a unit and press F2 in game screen. If a popup shows up, then RockNRor is working.

The game is not working well in Windows 10 system
If the game does not run, does not run in full screen, or if RockNRor is not active (see the previous paragraph to see how you can check this), then follow the indications as follows:
copy-paste manually the links, there is a bug with the forums if you click on them
- Install the standard Microsoft Visual C++ redistributable libraries 2013
- If you still have issues, install the updated libraries
- If you still have issues, install the all-in-one libraries found by Phatfish
- If you still have issues, right click on your shortcut or game 'exe' file, open the properties/compatibility, and select the Windows 7 compatibility mode.





Features:
- Handle up to 255 civilizations in ROR instead of 16 (see RockNRor_civs.xml).
- Improved game speed change with +/- buttons. Choose the speed change factor (default 1.25) in XML config or in-game RockNRor menu.
- Dramatically improve defence AI: train relevant units according to attacking units and accoding to player's available units.
- Improve unit targeting so that AI units do not hesitate between several targets (including 2-priest trick).
- Ability to customize number of relics/ruins in random games/deathmatch.
- Replace SNScalingFrequency unit from minutes to seconds (low values will automatically be fixed to prevent issues).
- Improved tactical AI updates:
-- Disable irrelevant limited-retrain units (like clubmen) when starting at iron age or post-iron.
-- Unblock "stuck buildings". It is necessary to wait a moment before doing this or the player will lose all his resources trying to build something that is "instant-killed" by the enemy.
-- Add some useful (available) researches if the player is rich, well developed (for example, wheel when it's not included in player's strategy).
-- TO DO - Disable useless building (governement center) if it is no longer useful (all underlying techs researched, iron age already researched).
-- TO DO - Improve farms management (lower their priority in AI list).
- Set a maximum number of farms in deathmatch games. AI builds too much farms in deathmatch (SNMaxFarms).
- Automatically computes AI's "dislike" values against each player. A player with all relics/ruins/wonder will have more chances to be taken as target.
- Change conversion resistances, like 1.25 for war elephants instead of 1 (customizable in config file).
- Faster town building at game startup in deathmatch using appropriate SN numbers (SNRequiredFirstBuilding, SNInitialExplorationRequired).
- Improve some city plan calculations to prevent villagers from being stuck and improve access to TC (+granary/SP) for farmers/gatherers...
-- Always protect Town center (and granry/storage pit) immediate neighborhood from being built (may occur when using custom city plan configurations)
-- Improve granary location choice (closer from most of the target bushes)
-- Avoid construction of many consecutive buildings in a row that leave no way for living units
- Correctly sets AI control at game startup when using the "ManageAI" feature (allows AI to control your "old" player when changing with gaia cheat code).
- Triggers system
- Enhanced scenario editor
- etc...

Fixes:
- Fix timer bug on fast computers (game freezes in low game speeds).
- Fix stuck AI bug #1: missing unitId in computer players strategy for unfinished buildings.
- Fix stuck AI bug #2: strategy when an unfinished building is destroyed (computer player will no longer get stuck).
- Fix stuck AI bug #3: strategy when a building that is currently training a unit is destroyed (computer player will no longer get stuck).
- Fix stuck AI bug #4: when entering "panic mode", too much irrelevant units are added on top of strategy and AI gets stuck.
- Fix bug with reveal map option in game settings (does not applies correctly to all players). Bug can be observed with FULL_computerPlayer1 or when switching players with gaia cheat code.
- Fix SNRequiredFirstBuilding handling (was not working correctly).

Misc:
- A new button in game menu opens RockNRor options UI.
- Automatically show "F11" information at game startup.
- In scenario editor, F10 opens the menu.
- Display a chat message at game startup to say the plugin is active.

Chat commands:
- Type "t" or "time" in chat box to display system time (as a chat message)
- Type "seed" to get map seed (as a chat message)
- Type "ai" or "AI" in chat box to fix AI control flags after using a "gaia*" cheat code.
- Type "allai" or "allAI" in chat box enable computer-control for ALL players
- Type "hi" to get Hello world, "about" for information about RockNRor.
- Type "timer stats" to get info related to game timer bug.


Troubleshooting:
- You may need to run your editor as admin to edit XML files according to the location you installed the game.
- RockNRor produces a log file named "RockNRor.log" in RockNRor folder in Age of Empires installation directory.
- If the game process does not have necessary rights, the log file might be located in C:\Users\{username}\AppData\Local\VirtualStore\Program Files (x86)\Jeux\Age of Empires
- Make sure the "ROR_API.conf" file contains the lines 'wndmode.dll' and 'RockNRor.dll' (without the quotes and without extra characters on the same line)

[This message has been edited by chab (edited 07-11-2019 @ 08:41 AM).]

AuthorReplies:
chab
Clubman
posted 12-02-18 06:31 AM ET (US)     101 / 117       
that's really nice, thanks for the translation.

There are 2 solutions here
- you can send me the translations file and I include this in my ZIP files... But I won't maintain it !
- you can upload it to the granary, if someone needs Hungarian version, he just downloads the file.

The solution #2 seems better as you can update/maintain it whenever you want, it's not lost or stuck if I'm not responsive. And this way seems consistent with Rocknror's openness.
And if some more people want to contribute and share other translations, they can do the same and simply put the file in the granary.
nrdani
Clubman
posted 12-03-18 06:14 PM ET (US)     102 / 117       
I see your point. I'll give the granary a shot, but first I'll try to make some strings shorter or better explaining where it needs fixing



I'm not sure to what extent can you edit the AI, but I have some ideas how to improve it further (if possible).

1. I noticed that the AI is smarter than before, however it still runs out of resources often. Mostly food and wood.

They ususally have 5-6 villagers, but even when having no food they rather mine gold or stone instead of getting what they really need.

I try sending them a little amount and that usually does the trick.

Would it be possible to constantly fix 2-2 villagers on food and wood? (So they always gather food & wood and the rest goes for gold & stone.)

2. Add more attacks for AI in DM.

Sometimes the computers attacks with 10-20 units every 10 mins while other times it's quiet for hours and their military units are standing in their town or at a random point on the map.

Would it be possible to task more soldiers to attack and more frequent?

3. Cheat option for AI

For moderate, hard and hardest option add a time based resource "help" for AI players. Like every 15 min give them 500 f/w/g and 200 stone and more for harder CPUs. (This feature might not be available to implement, but in AOE2 it significantly increases the AI's chances)
chab
Clubman
posted 12-04-18 12:38 PM ET (US)     103 / 117       
I suppose you're talking about DM situation.
Yes, AI is not programmed to do good in post-DM situations, where some resource is depleted (typically gold in the first place). It won't train villagers to collect resources, will continue attacking towers with a weak army, continue exploring with villagers until it has no more food nor villagers !

In theory, some issues are fixed or at least improved in RockNRor : now AI shouldn't lose its last villagers in stupid exploration, and also AI should gather more relevant resources than before (it's still not perfect though)
For the gathering part, it's clear it's far better in RM games, but in DM I don't exactly know as economy is not the central part of DM games.

I already worked a lot on "military" AI, this part is hard to improved or even customize.
However in DM games, at least in hard levels, in most games, AI players don't remain idle, then tend all to attack you at the same time, even in vanilla game.
Maybe you're playing too large maps, it may have an impact on AI players attitude.

You idea #3 is feasible, actually it's just triggers (that already work). The required development is to allow using some kind of predefined trigger (that would give resources to AI players) in DM games.
nrdani
Clubman
posted 12-09-18 06:53 PM ET (US)     104 / 117       
Yeah, I've forgotten to add I play DM.

I changed initial resources by adding a plus zero to each resource and it's better than ever. The AI can defend their towns for hours and hardly runs out of resources

I've also tried figuring out why some AI players stand idle. No idea yet. Their aggressiveness might be based on what civ the CP is playing.

For instance, I played 4v4 Hit,Egy,Hit,Egy VS Egy,Rome,Mac,Sum DM and only 1 of my Egyptian allies remained idle from the start. (they trained a huge army, but stood idle in town). Then after ca. 3hr of game play they also started attacking the enemy

When the AI is "idle", it groups it's units around 1 building or place in their town. Looks like they are trying to attack their own structures.

I'm not sure if the map size has anything to do with AI behavior as in a 2v2 with "large" map setting, my ally also remained idle after a while.

Is the set control=x feature still under developement? I can only change to gaia. If i type set control=2 nothing happens.
chab
Clubman
posted 12-10-18 12:08 PM ET (US)     105 / 117       
You can type "gaia2", "gaia3", etc, in chat box to view other players' perspective. AI will continue to play normally.

You are right, map size may indirectly impact the fact some players remain "idle". I think the actual reason is, on smaller maps, they have more chances to have enemy towns close to theirs, which makes more chances of finding a reason to attack.

"Looks like they are trying to attack their own structures."
It's a defensive position, but you may notice your AI friends often go "defend" one of your units in your town.

I have not yet managed to fully understand how/why sometimes AI players attack constantly when they shouldn't, and sometimes remain idle when they should attack
It's behaving better than vanilla AOE, but there is still much work to do on this.
nrdani
Clubman
posted 12-14-18 05:19 PM ET (US)     106 / 117       
Some civs look to be more aggressive than others. Eg. Civs with Heavy Catapults can be devastating, especially Hittites, while Egyptians, Minoans, Shang are less likely to have a positive kill-death ratio. I believe it's rather related to their techs however not to their AI not being well planned.

One thing I noticed, which might be a bug is that some civs don't fully upgrade their best units.

1. Babylon sometimes only researches the woodcutting line and the wheel, but no stone mining, so they can never get the Heavy Cat.

2. Carthaginians and Parthus never upgrades to AE, while Persia, Phoenicia does.

I tested both on multiple maps with different options, and it looks the 2. always happens while the 1. happens rarely.

Maybe those civs miss the AE upgrade? If I'm not mistaken, they utilize AE in vanilla ROR.
chab
Clubman
posted 12-15-18 11:26 AM ET (US)     107 / 117       
Babylon does not upgrade to heavy cats because it's not in their DM strategy file.
As for carthaginians, they (always) do upgrade to AE, in both vanilla game or using Rocknror, as long as I know.
Maybe in water maps they don't ? You can check DM strategy files to make sure.
nrdani
Clubman
posted 12-15-18 03:33 PM ET (US)     108 / 117       
You're right, AE is in Carhtage's DM land strategy, but for me they never research in it RockNRor. I included an image. Weird...



In vanilla ROR they do upgrade however

As for Babylon, they seem to have the Heavy Cat upgrade as important in the land DM AI file. When playing against 7 Babylonian CP usually only one miss that upgrade so that's not a big deal.
nrdani
Clubman
posted 12-26-18 07:24 PM ET (US)     109 / 117       
Ok, I seem to have found the problem for Carthage and Parthus not upgrading to AE.

I checked their respective DM AI files and noticed that the AE upgrade is added as:

R125 Armored Elephants 1 101

I commented that line out and replaced it with a line from an AI that correctly upgrades AE. (Persia)

R125 Armored-Elephant 1 101 <-- new line
//R125 Armored Elephants 1 101 <-- commented line

With this adjustment both Carthage and Parthus upgrades to AE correctly.

I don't know why I had this error.
chab
Clubman
posted 12-29-18 08:42 AM ET (US)     110 / 117       
Thank you for the feedback on this, this clearly explains the issue

Either you modified this AI file previously, either a mod you are using did (it's NOT RockNRor as it does not modify AI files), either it's a bug in ROR, and depends on the language you installed.

OR maybe it's a bug in ROR1.0 that was corrected in ROR 1.0a, but I don't htink so as I think that ROR 1.0a only modifies the EXE/dll, not the game files.

In French version, there is no such bug and the original line for carthage is :
R125 Armored-Elephants 1 101

I confirm there should NOT be any whitespace in unit name in AI files.
The name itself is not really important, but it must not use space or such separators.
nrdani
Clubman
posted 12-30-18 06:54 PM ET (US)     111 / 117       
Thanks for the heads up about the space in AI lines. Looks like the Hungarian game is at fault, but luckily I managed to correct it.

Today I built some custom civs and made both land and water DM AI files for them. However it looks like whatever map type I choose, custom civs will use the land DM AI every time. On land maps this isn't a drawback, but on water maps they refuse to build any docks and ships.

I checked the extra civ xml and everything is correct regarding loading water AI for DM. There are also no errors referring to this problem in logs.

Can you help me how to make RockNRor utilize water AI correctly?
chab
Clubman
posted 12-31-18 08:48 AM ET (US)     112 / 117       
You are right, this is an unimplemented part, currently it always uses the "deathmatch_aifile" tag, even for water maps.

As a temporary workaround, if you only play water maps, you can put your "water" AI file in deathmatch_aifile tag.

I will fix this in next release of RockNRor, it's not a big change in the code.

PS: to use *.AI files in Deathmatch games, make sure to disable (enable="0") this in RockNRor.xml config
<strategyAI name="generateAutomaticStrategy" gameType="DM" enable="0"/><!-- Deathmatch -->
nrdani
Clubman
posted 12-31-18 06:49 PM ET (US)     113 / 117       
Nice that you are going to implement that. I'll wait with water maps until that is done

How does the conversion resistance system works?

I've tried finding it in AGE3, but it looks like it's hard-coded. Would it be possible to make a custom civ with let's say conversion resistance 6?

I guess adding the line

"conversionResistance name="customciv" value="6"/><!-- game default=1 --"

to main xml wouldn't work, because RNR couldn't understand the line.
volume
Clubman
posted 01-11-19 04:38 AM ET (US)     114 / 117       
hmm.. perhaps you can make this tool set the age and/or the civilization for gaia just like aok?

also i think you made it where your original player 1 can be controlled by ai when you use the gaia cheat, can you make it where you can switch back to the player or even switch to other players (of course for singleplayer)?
chab
Clubman
posted 01-11-19 11:49 AM ET (US)     115 / 117       
you can switch to any player whenever you want, and enable AI for all players (including your current one) whenever you want.
And of course disable AI for the player you're controlling
chab
Clubman
posted 01-12-19 11:57 AM ET (US)     116 / 117       
@nrdani : yes for long I have searched a good solution to make conversion resistance fully configurable via empires.dat.

Unfortunately I never found a better solution that the first I had, which is to use a custom armor class in "unit armors" to configure unit's conversion resistance.
- it allows to configure specific resistances for every unit/every civ
- it can be modified through technologies and tech trees (which means, we could improve some units' conversion resistance through researches)
- As "armors" are integer values, we have no choice but store a percentage => 100 means 100% so a resistance of 1 (default). 150 means 150% so resistance=1.5 (half more resistant).
- We can use any armor class that is currently unused (other than 0-12). RockNRor will have a setting so you can choose whatever class you want to store conversion resistance.
- For units where you don't set an armor value for that armor class, it will use game default (2 for priests, 8 for chariots, 1 for standard units, etc) => you will only need to set values for units with a custom conversion resistance.
- To avoid issues, it is better to use an armor class between 13 and 255. Negative values (or range 256-32767) should work BUT would not be compatible with technologies/tech tree effects.
- Using armor class 255 is recommended as it's likely noone is using it for actual combat attack/armor classes (people would start with class 13, 14, etc).
- There is a bug in AOE for technologies that SET armor/attack values for a specific attack class. I will fix it with next RockNRor version.
- There is currently a bug in AGE3 that prevents from setting technology effects that update "custom" armor class value. I wrote in AGE3 topic so they can fix the limitation. When they do, we will be able to have techs that change conversion resistance.
- Using an unused armor class grants us there will be no impact on gameplay. It won't affect combat/damage calculation.
- If someone uses your customized empires.dat without RockNRor, of course custom conversion resistance values won't be taken into account, but the game will work normally (custom config does not affect standard game).

[This message has been edited by chab (edited 01-12-2019 @ 11:58 AM).]

chab
Clubman
posted 07-07-19 09:04 AM ET (US)     117 / 117       
Good news, Tapsa said he will fix AGE3 issue that prevents from creating technology effects that modify conversion resistance.
Once we get that fix, conversion resistance will be 100% configurable from AGE3, just like any standard armor.

Another update about Windows 10 issues
- Game not running because of some graphics init error
- Error about missing C++ redistributable
- Game running, but RockNRor plugin is inactive/not working

To check if RockNRor is active, press F1 in main menus (if it opens help then it's inactive, if RockNRor parameters screen opens then it's active), or select a unit and press F2 in game screen (if a popup shows up then RockNRor is active)

Here are the troubleshooting steps you can try to fix those issues
- Install Microsoft Visual C++ 2013 redistributable using the links provided in the first post
- If none of the first 2 (microsoft) links fail, use Phatfish's one.
- If you still have issues when running the game, run it in compatibility mode (I recommend win7, but you may try other versions) and try again.

Note that I'm not sure Phatfish's "all in one" link is still necessary.
Installing the library from this link might do the job, but it's not confirmed.

[This message has been edited by chab (edited 07-11-2019 @ 08:38 AM).]

« Previous Page  1 2 3  Next Page »
You must be logged in to post messages.
Please login or register

Hop to:    

Age of Empires Heaven | HeavenGames