Hi, I wanted to mod the official Nomad game mode to add some more options to it such as an optional starting scout or a treaty period. I know there are advanced game settings but I think the official Nomad mod is better and more popular, too.
Unfortunately I couldn’t find a way to simply open the official Nomad game mode and apply some modifications to it. Instead I had to use the template or create an empty new game mode. I was able to look into the Advanced Game Settings on GitHub but it is a bit overwhelming, unnecessary complex and also not really what I wanted from a technical standpoint since it does some thing quite differently compared to the official Nomad game mode.
Is there a way for me or do I basically have to remake and mirror the entire Nomad game logic? I am super new to AoE4 modding, but quite experienced in modding or programming in general.
I have based my mod so far on the template with examples but it is unfortunately very far from the Standard game mode and thus my best chance at emulating the Nomad game mode win conditions is to try to dissect Advanced Game Settings on GitHub which is unfortunate for reasons described above.
It would be cool if there were more templates to choose from besides royal rumble.
edit: I think I found the solution. It is actually quite simple. For sacred, wonder and conquest win conditions you simply have to import the following scripts:
import("winconditions/religious.scar") -- Support for player winning by holding all sacred sites.
import("winconditions/wonder.scar") -- Support for player winning by defending their wonder.
import("winconditions/conquest.scar") -- Support for landmark victories.
You are wrong, that mod is not really overcomplicated… It just follows much more reasonable and maintainable structure and programming practices then standard scripts…
If you want to have reliably working treaty you will need complex mode that implements own logic for all win conditions. Otherwise it won’t behave correctly…
On your questions how to create a copy of nomad:
Create empty gamemode
in .rdo for wincondition change settings to nomad (thus it will use nomad attributes)
in winconfition scar file import nomad gamemode (as you really dont need to do anything differently)
in .not define all necessary options, which can be again found in the gamemode scripts or compiled .rdo files, but these might be little bit hard to read
A) either add him to tuning pack for each civ
B) borrow script that spawns unit from other mods, which means that you either use existing nomad random spawn script or you will write your own…
give up, that’s my advice… if you feel that AGS is overcomplicated then be prepared that’s exactly what you will need if you want it to work correctly… and even then it will not be perfect… or you can once again take it from the nomad mod… and never get idea of making treaty longer then few minutes (<5) as you will break the game as anyone can e.g. capture sacred site, build wonder during the treaty, if you implement naïve version.
So just ask yourself why ? It’s not really that one version is more popular then other. Most people just don’t bother with the mods…
Well on why the mod behaves differently… well official nomad is trash. It has multiple issues and is completely unsuitable for anything other than 3 vils start, which it itself break as HRE starts with prelate and there you can notice major issue. It has only 3 spawn per player… Also algorithm they use is everything but truly random spawn. All 3 spawn points that player has are on a single circumference and the distance is extremely small… Thus you end up with all villagers very close to each other, instead of the nomad mods or AoE2 nomad where spawn are completely random…
With “unnecessarily complex” I meant that it has way more features than I need for my own version of nomad and thus is too complex to be used as template. When looking at its code I also saw that it was kind of well engineered with lots of helper functions etc which is nice for maintenance and feature development but not so nice if you do not even have a fully developed picture of how AoE4 mods work.
One can clearly see that the dev(s) behind the Advanced Game Settings clearly know what they were doing.
I didn’t know it was possible to change settings in .rdo to nomad. Will try that out once I am working on the mod again.
I have not found a way to import a nomad gamemode in my .scar file but maybe that is connected to the point above?
I also have not yet seen a .not file. So far I have kind of successfully populated my .rdo file with the custom options I wanted to add. So I have all the options I need but they have no functionality so far.
I already worked on the scout and kinda made it work. It was pretty easy given the examples template that spawns a bunch of spearman.
I didn’t know that treaty was such a mess. Generally I just wanted to allow for a treaty time between 0 and 5 minutes so probably most of what you mentioned would not be affected. That’s also a way of how to simplify things. The idea behind treaty is to help noob players to setup their town centers without disruptions and nothing more.
I used to use the Advanced Game Settings to host Nomad FFA games and found it to be nice, however, some things are in my opinion better in the official nomad mode. These are:
The aforementioned spawning locations. Most player like the way the official nomad mod spawns units in a bit closer proximity.
Also starting villagers in the official mod seem to be way less likely to be stuck. I don’t know if this is just a feeling or if devs made some pathing checks to secure that. E.g. test if each villager can properly path to the other villagers and only then spawn it there.
The starting town center costs no resources which has some advantages. E.g. attacking a town center under construction won’t lose resources to build a new one. Obviously starting resources have been adjusted for that.
Since I am talking to an expert here: I had an idea for another option to make the host select the civilizations for all players. The enumerated options are “selected”, “random” and “unique random” where “selected” allows each player to pick their civilization, “random” ignores player civilization selections and overwrites the civilization with a random one and “unique random” is the same as “random” but asserts that each player is assigned a unique civilization. Unfortunately I am not even sure if an option like that is workable since I have never seen it anywhere before. However, it would be a really cool option to diversify the civilizations in a game.
and the options are defined right under it…
data:scar\winconditions\nomad.bin contains all options present in the nomad, but thats compiled file in binary, thus readable only as hexdump
important part is behind the numbers as it contains option keys (I will leave the hexdump as last part of this comment), Some of them are present also in standard_mode.scar or other script files
well and about the script data:scar\gamemodes\standard_mode.scar is used, thus all you need is to replace all imports with single import(“standard_mode.scar”) as your gamemode will want to use eventually custom script (setup part will reference name of your gamemode script)