I’m trying to program the scripts for some computer factions for my upcoming campaign, but I have a couple of major issues that both have to do with gatherers.
I can’t get anybody to build new Lumber or Mining Camps when they find new resources, so they always end up walking absurd distances later in the game to gather resources. The resource-found wood/gold/stone thing doesn’t work for me, and tinkering with the min/max dropoff distances had no effect.
One of the factions is supposed to exclusively focus on gathering food and wood, but after exhausting enough farms, they keep trying to switch to gold or stone if they can find it. This is extremely annoying because even if I set the percentage of stone and gold gathers to 0, they still end up switching to gold at some point and abandon the farms they’re supposed to rebuild, leaving ugly patches of dirt 2 behind and preventing them from tributing the appropriate resources throughout the remainder of the mission.
I just increased the food drop distance and now those villagers are absolutely obsessed with gathering fish. I don’t want to get rid of all the fish on the map, but they keep walking too close to the base and the player’s towers keep whittling them down.
Hello Bassi! Sorry to contact you via replying to an (not directly) related thread, but I cannot seem to have found the option to PM people on this forum for some reasons.
I am Manu La Capuche, a fellow scenario designer, I’ve trying to figure out how to make scripted AIs create “editor-only units” via scripts since months, and I realized you managed to pull that off in the last scenario of the Burgundian campaign, where Compiègne actually creates Heavy Crossbowmen.
Now I am guessing this is done by typing the unit’s unique ID (several digits) as of the unit name in the code line, but I failed to figure all of these units digits. I also cannot extract the AIs at the moment from the last official campaigns for some reasons, so I cannot check out by myself.
Would you be able to tell me more about this?
Thanks for reading and your time, love your work! Cheers!
493 is the ID of the Heavy Crossbowman. What you have to do to make this work is enabling the unit for the respective player in the editor. You have to use triggers for that. There is an effect (Enable Object) for that. In some cases you need to change the traning location as well, there is another effect for that.
I figured this and managed it with the ID for the Genitours. And I am very used to all triggers including enabling objects, or training locations! For all others ‘editor’ units, I used to loop a Replace Unit trigger on a trainable unit, but this would reset the AI’s training amount each time, not ideal!
My main remaining questions would be where can you find each unit’s ID?
Hi bassi,greeting,how can gpv be serperated into aoe2scenarioes?Or the official locked it to prevent the players from looking on it?How can custom campaign I made save it as aoe2campaign.gpv?Looking forward to your reply.