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

Modding Discussions
Moderated by Alexastor, MosheLevi, Mister SCP

Hop to:    
Welcome! You are not logged in. Please Login or Register.5 replies
Age of Empires III Heaven » Forums » Modding Discussions » Help with modifying AI
Topic Subject:Help with modifying AI
posted 12-17-18 02:24 AM EDT (US)         
Hi all,

I'm trying to modify the Spanish AI so that it only trains Rodeleros and no other military units.

I've made some changes to techtreey, homecityspanish and protoy.

I deleted most of the techs from Age0Spanish, only allowing them to build settlers, Houses, Barracks and rodeleros.

I deleted most of the cards from homecityspanish, only allowing for Rodeleros and villagers to be sent from the Spanish homecity.

I also made changes so that the Spanish Barracks can only train Rodeleros.

When I start a skirmish, The AI seems to build houses, barracks and settlers but no Rodeleros ever appear.

In fact, the AI would never train any infantry from the barracks at all.

My suspicion is this:
-I'm messing up the techtreey so the Spanish AI doesn't know what to do.

-I need to modify the AiMain or another AI related file so the AI only uses Rodeleros.

I know I'm probably royally screwing something up. Can anyone provide some insight into what I need to do?

For context, I'm trying to eventually turn this into a zombie mod. The Spanish will be renamed to The Plague and they will rush you with hordes of low HP zombies.

Any help with this problem is much appreciated. Thank you!
posted 12-21-18 02:03 PM EDT (US)     1 / 5       
Hey, hope you still check this thread.

Have you tried forcing the unit picker to pick rodeleros in aiMain.xs?
posted 12-21-18 09:26 PM EDT (US)     2 / 5       
Faster to start over from nothing.
Just need 6 rules/functions for training settlers, gathering, building houses, barracks, training rodoleros and attacking plus the usual boiler plate stuff.
posted 01-23-19 08:22 PM EDT (US)     3 / 5       
So how exactly do i make the UnitPicker pick rodeleros only?
I've been searching through AiMain.xs but just can't seem to make sense of it.

I'm and old hand at AOE3 modding but new to AI modding.
posted 01-24-19 12:34 PM EDT (US)     4 / 5       
Hmm. I'd suggest you to learn XS language first. AI modding is not just a matter of modifying some lines like in general modding, it requires more reflection and carefulness, and that's why we generally don't do "how to..." things.
til then though, I could show you how to do the things you are attempting to do... As soon as I can (right now I can't).
posted 02-26-19 11:50 AM EDT (US)     5 / 5       
Hello there.

I made a Spanish AI, Helot Major that frequently uses Rodeleros and some Pikemen.

You need the Rodelero, 0.93, etc. in the AIHelotMajorMain.xs. You also need Notepad ++ to view this properly.

Use ctrl-f to find 'Rodelero' once you download my AI script. There you can change from 0.93 to 0.99 or whatever.

In the scenario editor you can use AICommsTrainUnit, and select Rodelero, loop, timer 20 seconds, or use Set Tech Status, equals, Rodeleros Repeat or HCShipRodeleros3, timer, 30 seconds.

It is hard to train just Rodeleros, because most AI scripts choose two or three units to pick from, and this will affect all the other AIs in the script. Mine is set to 3 unit types.

I have given thought to include infinite shipments in the AI Code, but this is also counterbalanced by the fact that the AI will consistently send this infinite shipment rather than use Advanced Arsenal, or Sustainable Agriculture, or not send the shipment until most of the 'expensive' shipments are sent.
You must be logged in to post messages.
Please login or register

Hop to:    

Age of Empires III Heaven | HeavenGames