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

Scenario Design and Modding
Moderated by Suppiluliuma, PhatFish, Fisk, EpiC_Anonymous, Epd999

Hop to:    
Topic Subject: RockNRoR : mod to improve AI and add various game enhancing features
« Previous Page  1 ··· 6 7 8 9  Next Page »
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 !

- 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 !

- 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.

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

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.

- 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...

- 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).

- 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.

- 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)
- If the game won't run, try to run it in Windows 7 compatibility mode

[This message has been edited by chab (edited 07-05-2020 @ 10:36 AM).]

posted 07-31-21 12:38 PM ET (US)     176 / 209  
As far as improving the trigger system goes, the best I think would be to make ROCKNROR triggers work on ROR or a UPATCH version of ROCKNROR, or even AOE DE, because typically AOE players won't be using ROCKNROR, and because I think that UPatch is the best engine for Single Player.

I understand that this might be very hard to do as a programmer.

My guess is that there is probably some way to make this work.

ROCKNROR vs AOE DE tangent: As far as wishes for improvement go in the AOE1 series, I "wish" AOE DE would get fixed so that the Instruction Screens would allow map pictures like in AOE ROR, and that Microsoft would fix their servers so that they didn't crash or drop you. It's a common problem I have there. People complain about a range of other bugs on AOE DE. Personally, I like both AOE ROR and AOE DE. With AOE DE, I personally like the graphics better than AOE ROR overall, although there are a couple little ways that AOE ROR was actually better in graphics, like having a few tree units that AOE DE threw away.

Further, ROCKNROR has important capabilities that AOE DE does not, like placing units next to each other. I actually find it often best to make a map using ROCKNROR so that you can use the ROCKNROR capabilities and then use your scenario to make an AOE DE "version" of it, so that the scenario can be uploaded in both versions. That's what I did with my JOURNEY TO EDESSA scenario.

But... I am thinking that there are currently more AOE1 ROR players than AOE DE players, based partly on how many people I see on the Multiplayer lobbies for each game. Also, my "Journey to Edessa DE" scenario has 9 Downloads here on the Granary, and only 4 Downloads on the official AOE DE Mod website. Journey to Edessa (ROR version) on the Granary was posted about 2 weeks earlier and has 16 Downloads.

[This message has been edited by rakovsky (edited 07-31-2021 @ 12:39 PM).]

posted 08-12-21 06:49 AM ET (US)     177 / 209  
I've mentioned this before: During development of DE I suggested they work with Chab to improve the game further and add capabilities but it was completely ignored (of course, why would they listen to the community has to say?). To my knowledge they never explored other options that were available at the time beyond what Upatch had to offer (remember, DE is build on Upatch). DE could have had RockNRor's features if anyone cared enough (aoe_scout in particular) and should have been a standard. It won't ever happen now though, I'm just very glad RocknRoR's fantastic features like map copy, custom map sizes, terrain control and debugging amongst plenty of others are available for the original game, I cannot imagine designing without them.
posted 08-14-21 10:05 AM ET (US)     178 / 209  
I think that UPatch is the best engine for Single Player.
I really don't get it, maybe a typo ? UPatch is designed for MP (and it's good for that for sure as it gives a standard/common version that is easy to use in MP by everyone), it does not improve SP game (except configuration improvements sur as AI files - which do not require UPatch - and a few actual improvements taken from my work - mainly from Binarypatcher - or a few others' work eg LucTieuPhung)
With UPatch, AI is still as dumb as in AOE, if you destroy its first barracks before it's completed, it won't ever build any (barracks-dependent, which represents many buildings/techs/units) of its city plan (it's just a simple example)

RockNRor includes hundreds of fixes/improvements/features, mostly on SP games aspects (AI improvements, new game modes, etc), all configurable, that anyone can choose to use or not, with the possibility to cherry-pick the features.
RockNRor does not affect any "standard" file from AOE/ROR installation, all custom content is in separate files (use additional DRS files to add or override graphics, choose the path to empires.dat to use, use localization files (text format !!!) instead of struggling to modify the language*.dll files, etc)
As far as improving the trigger system goes, the best I think would be to make ROCKNROR triggers work on ROR or a UPATCH version of ROCKNROR, or even AOE DE, because typically AOE players won't be using ROCKNROR
Like PhatFish said, DE is based on Upatch. As long as UPatch was intentionally designed NOT to be compatible with RockNRor or any 'modding standards', despite it was based on my work on the EXE, there's nothing I can do about it. I did my best to avoid this situation.
AOE_scout asked my for features (and I naively spent a lot of time helping) which I developed without a global vision because he was hiding the true purpose, I took a lot of time developing interfaces to make everyone's work compatible and configurable (eg an extremely simple DLL named ROR_API that offers a standard interface to plug any (executable) mod to ROR), and worked in an open-source perspective.
Result ? AOE_scout turned the features to a secret hard-coded executable whose format is proprietary and incompatible with everything else, so that he has full control and the community can't improve the mod.
In the end, UPatch is exactly as bad as vanilla AOE in the sense that's is a black box and even harder to fix/customize than AOE itself.

Don't forget that AOE_scout got paid for other people's work (as he asked for donations - and did receive both donations and credit for the customization of AOE...), despite he's been violating the conditions of the resources he used to get is mod done (eg usage conditions from binaryPatcher in ~2013-2014, which was the base of all "modern" mods (UPatch, CustomizeAOE, RockNror...))
You are FREE to use my work for any of your program/mod/anything if you respect those conditions:
- Provide clearly a link to this page (and credit).
- Your program/mod/anything must be open source so that it makes the modding community stronger.
posted 08-28-21 06:43 AM ET (US)     179 / 209  
I'll even go as far as to say that DE would not even exist today if it weren't for Chab, LuctieuPhung and a few others. Of course, none of them were even mentioned once in the DE Credits for their contributions or work.

We are not making this up by the way, it is the factual truth of what happened. I know most of you (especially newbies) don't care about this, but really, you should.

Give credit where credit is due, especially if you are using it for profit$.
posted 08-28-21 11:26 PM ET (US)     180 / 209  
+1. Thanks for relating all this. Interesting story.
posted 08-29-21 03:19 PM ET (US)     181 / 209  
There is a lot of sadness and mistreatment in the world, which is why I focus so much on Christianity, like making the "Christian Story" campaign. AOE1 is one of the best games available for playing the foundational period events of Christianity like Josephus' battles and Armageddon. There is the game "The You Testament," but not many others.

Whenever I make a scenario using ROCKNROR, I credit it.

The main advantage of UPATCH for me is the HD graphics. The only thing that comes to mind for me that ROCKNROR can't do for non-ROCKNOROR AOE1 versions is use triggers. The Triggers give AOE1 a major AOE2 feature.

ROCKNROR is very useful, like its copy paste function, its extra hidden units, and putting units on top of each other or regardless of other constraints. I can now place stone roads so that they connect.

I'm not sure whether more gamers play AOE1 CD or AOE1 DE. The current AOE1 CD servers can't host some of my 8 Player maps, whereas AOE1 DE's server has been crash happy for Custom Maps with 6 players.

Since you bring up the issue of failing to acknowledge you, I want to give you consolation. One of AOE1's biggest fan bases is Vietnamese Gamers. Vietnamese Gamers, like much of the Asian Tech community doesn't seem to care much about licensing or copyright compared to Americans. I'm going to guess that AOE1 ROR has such a big fan base among them compared to AOE1 DE because AOE1 ROR is practically free nowadays.

AOE CD series games don't seem to be a big money maker at this point. UPATCH is fortunately free. They should acknowledge Chab in their credits if they have any. Probably AOE1 DE has spawned some money for Microsoft.

I have seen cash tournaments for AOE1 players over the years. They are "pro" level AOE1 gamers. Not many tournament players are going to get payouts though.

MePY made an APPLE MAC AOE2 scenario work on Windows for me that I wanted to play. Afterwards he told me that I could buy him a coffee for it and gave me a link to a page where I could send him money. If I was rich I would. Some Americans are billionaires. More Americans live in trailer homes or have no homes.
posted 08-30-21 10:43 AM ET (US)     182 / 209  
That wasn't directed at you rakovsky, no need to apologize for anything We're happy to have you here keeping this place alive.

Chab, I have sent an e-mail to your aol address, it's related to bugs with RockNRoR.
posted 09-18-21 11:28 AM ET (US)     183 / 209  
The granary has been updated, you can now get RockNRor, including...

- Automatically add "unit definitions" for villagers to GAIA unit (so you can use gaia villagers to gather, build, etc without a game crash)
- Fix a bug when setting up DM/RM games, "random" civ was always picking egyptians (can't remember who raised that issue)
- In "random tech tree" mode, it is now possible to view individual unit bonus when pressing F2 : the unit properties pop-up displays the tech tree bonus applied to it (if any) : e.g. +20% speed
- In "random tech tree" mode, type "civ bonus" in chat box to view the civ bonus for the player you control
- In-game "unit properties" popup now displays the "original" owner for converted units
- option in rocknror.xml to automatically disable CD music when running the game (so the game does not try to access the CD drive)
- Fix a few issues with triggers, raised by PhatFish (thank you), including issues with saved games and issues with "text" trigger parameters
posted 09-22-21 11:29 AM ET (US)     184 / 209  
Can you please tell me if there is a way to change the screensize on ROCKNROR?

Currently, my screensize for ROCKNROR is less than 1/4 of my total Desktop screen, and I recall my ROCKNROR game window being larger in the past. I would like it to make up perhaps 3/4 of my Desktop screen size.

Currently I am running it on a Windows 10 computer and using the Windows XP Svc Pack 3 Compatibility Mode in my Properties Menu for ROCKNROR.

[This message has been edited by rakovsky (edited 09-22-2021 @ 11:30 AM).]

posted 09-22-21 12:07 PM ET (US)     185 / 209  
Do you mean you are in windowed mode, and you would like the window to be larger ?

- Use RockNRorAdmin to change the game resolution : in the menu, File/Change game resolution...

- Make sure to select the maximum game resolution in the game screen (whatever the label, being 1024*768 or an updated label).

The window size directly depends on the game's screen resolution.
And RockNRor's custom resolution applies to the highest resolution (which is 1024*768 by default)
posted 09-25-21 02:10 PM ET (US)     186 / 209  
"Do you mean you are in windowed mode, and you would like the window to be larger?"

Yes. Thanks for your reply, Chab. It looks like picking the 1024 resolution during gameplay fixed this.

[This message has been edited by rakovsky (edited 09-25-2021 @ 02:11 PM).]

posted 09-26-21 08:08 AM ET (US)     187 / 209  
For a better user experience, in next RockNRor version I'll add a treatment that automatically updates the UI label (in Game options popup) "1027*768" into the "real" game screen size (autodetected from SLP graphics)
posted 09-26-21 01:08 PM ET (US)     188 / 209  
ROCKNROR does not really have a window size problem I guess - the problem seemed to be my own mistake in failing to realize that I needed to start a single player match and go into settings and choose the 1024 resolution to make the window size make up 3/4 of the screen. I like the big size that is not full screen for practical purposes when using ROCKNROR because I use ROCKNROR to make scenarios and non-full screen makes it easier to switch between windows, eg. Notepad, Browser, etc.
posted 10-09-21 09:02 AM ET (US)     189 / 209  
posted 11-02-21 05:20 PM ET (US)     190 / 209  
Hi chab, I have been trying to edit the bonus starting resources for the Carthaginians & Palmyrans in the empires.dat file (to match their stats in the current DE version).

However, it seems that the "initialResources" functions in the RockNRor.xml file overrides the bonuses in the empires.dat.

(when the game starts it shows the empires.dat bonus that I made, but as soon as the "Welcome. RockNRor plugin is active" text appears, all the starting resources revert back to their default XML settings)Is there any way I can get over this issue? Thanks in advance!

[This message has been edited by Kanzzer (edited 11-02-2021 @ 05:22 PM).]

posted 11-02-21 05:46 PM ET (US)     191 / 209  
I guess you are using "civilization" tab/initial resources in AGE3 to set up the initial resource values for Carthage and Palmyra.
To be honest I thought these numbers were NOT used by the game and it was hardcoded.
I'll look into it if I have some spare time.

Meanwhile there is a possible workaround that should work.
Instead of using "civilization" tab/initial resources, you can use the tech trees #205 (carthage) and 207 (palmyra) to do it.
- In AGE3 "effects" tab
- For each of those 2 tech trees (205 and 207)
- Add an effect command
- Command type=1 (resource modifier)
- resource=0 (for food)
- I recommend using mode=+/- and set value=the amount to add on top of the 200
- if you want to increase other resources than food, do the same with additional effect commands

It's a bit more complicated but it should work until I improve RockNror (because I'm not sure we can prevent initialResources from applying to all civs)

Thank you for raising this issue -with a clear explanation-
posted 11-02-21 06:30 PM ET (US)     192 / 209  
Thanks chab for the detailed reply. Actually I didn't use the "Civilizations" tab at all. What I did was actually identical to the what you suggested: editing the civs' tech trees in the "Effects" tabs.

After I read your post, however, I did try to edit the starting resources in "Civilization" tab instead to see if it'll work. Unfortunately it still doesn't. As soon as the welcome text shows up at the beginning of the match, the entire bonus is undone right in front of my eyes, exactly like the "Effects" method.

But hey, apparently "Civilization" tab edits do work in-game (well, before the Welcome text undoes them...)

[This message has been edited by Kanzzer (edited 11-02-2021 @ 06:34 PM).]

posted 11-04-21 12:20 PM ET (US)     193 / 209  
Actually, in AOE and ROR, Shang and Palmyra food amount at startup are hardcoded in the EXE (as well as many other things...), that's why I always believed these settings from AGE3 would not work.

There is definitely something to improve about this in RockNror, I hope it won't be too complicated.
posted 11-04-21 02:42 PM ET (US)     194 / 209  
Thanks chab, I'm looking forward to it.

In the meantime I made a pseudo-workaround to this issue: the starting resource bonus will be enabled as soon as the villagers finishes any of the stone age buildings except the House (basically a new "tech", similar to aging up).

It's not as great as having the resources right at the start like they're supposed to in DE, but it's something.
posted 11-21-21 08:40 AM ET (US)     195 / 209  
Hello, it's difficult to find a compromise between using default resource values from AGE3 and apply customization, so the configuration I added is very basic :
- Either you disable "initial resources" feature from RockRNror and use what you configured in empires.dat (+ hardcoded bonuses from ROR will apply)
- Or you use "initial resources" feature from RockNRor, you can use custom values, and hardcoded bonuses from the game won't apply, but empires.dat default resource values won't apply

Please note that empires.dat default resource values only apply to random games with "default" initial resources setting.

To disable this feature in RockNRor, change this flag to "0" in RockNRor.xml
<initialResources enable="1"/>

The new version of RockNRor that supports this flag is already available at the granary (I just updated it).
posted 11-21-21 09:27 PM ET (US)     196 / 209  
Hi, chab! I have great respect for you.
I'm all at sea with a problem:
In the original AOE or ROR, the game will pause for 1-2 seconds when the MIDI is switched, this affects the game experience to some extent.
Is there any way to replace MIDI with MP3?
Please forgive my bad English. Once again, I pay tribute to you.

In addition, I have two new ideas.
1.Can the maximum formation size of 24 be changed? (It's 36 in DE)
2.Can these units use shortcut keys by ctrl+XX: storage Pit, granary, market and government center.
posted 11-22-21 01:18 PM ET (US)     197 / 209  

To avoid MIDI issues, disable the music in the game menu / options : set the music volume to zero.
Then, just use VLC or whatever music player on your Windows desktop to play any music you like (mp3 or other...)

RockNRor already allows to select more than 25 units at once, but it must be configured using "RockNRorAdmin.exe" utility.
- (make sure the game is not currently running...)
- First select the empiresx.exe file (eg with CTRL-R shortcut)
- In the menu, select "Edit game file" (or CTRL-E)
- In the treeview on the left, click on "Selected units"
- Tick the box (enable feature) so that it becomes checked
- When you check the box, it should ask you a new value for the setting (maximum unit that can be selected). Put any value, default is 25, the maximum allowed is 255.

That right, some building do not have shortcut keys. If I have some spare time I'll see if it can be done in RockNRor.

Thank you for the suggestions.
posted 11-22-21 08:17 PM ET (US)     198 / 209  
Thank you, CHAB!

I learned on the Internet that "winmm" can play other formats, but one imperfection is that opening exe will prompt many MCI error dialog boxes

Rocknror is really great. Thank you for your work!
posted 11-26-21 10:04 AM ET (US)     199 / 209  
Hello, CHAB!

I changed the resolution to 1920*1080 with rocknror,

But the small map is in the middle. I changed the "hpos_map" (795) to 1691, but it still didn't solve the problem

Can you help me?
posted 11-26-21 11:52 AM ET (US)     200 / 209  
Your problem occurs because RockNRor automatically detects the screen size from DRS files, and updates the game resolution accordingly
(so you don't even need to patch the EXE file to change the game resolution, placing your DRS files should be sufficient to use a custom screen resolution)

Fortunately this is configurable. In your case, you can disable this feature by changing this flag (autodetect) to false instead of true :
<screenResolution autodetect="true" checkSlpId="50111"/>

Then the game will *really* use what you configured with RockNRorAdmin program (including the modified HPos for the minimap).
« Previous Page  1 ··· 6 7 8 9  Next Page »
Age of Empires Heaven » Forums » Scenario Design and Modding » RockNRoR : mod to improve AI and add various game enhancing features
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Empires Heaven | HeavenGames