- Joined
- Apr 8, 2011
- Messages
- 10
Custom Campaign AI not working - Acolyte problem? [SOLVED]
Hi everyone!
It's kind of embarrassing for me to ask this... It seems selfish that I am asking for help after being so inactive in these forums for so long. I'm sorry for that. Anyway, if anyone wants to help me I would be extremely grateful, I could include your name in the Special Thanks credits if you want.
Recently I moved to Dublin, and I got more freetime than in the past, so I decided to resurrect one of my old World Editor projects. I'm not too pro on it, but I know the basics. I think I can say I know more than the basics Anyway, my project consists on a modification of the Human ROC campaign with new races and introducing some of my friends names (they've been asking me to finish it for years xP)
The problems begin when I start handling campaign AI's. Having custom units based on Human and Undead units, I need to create campaign AI scripts (easy to do so by copying files like h04_green.ai inside the campaign files) and start them using triggers.
The custom scripts I previously used for some race based on Orcs (with no workers, only basic attacking units and training buildings with preset properties) worked, but the ones for the Undead army don't work at all.
My theory was that the problems come when using Acolytes and Haunted Gold Mine, as the Gather and Gold Mine abilities might be complicated to call, but I tested the units and I can assure:
· The custom Haunted Gold Mine can be built on normal Gold Mines, as usual. No problem with that.
· The custom Acolytes can harvest gold with the custom Haunted Gold Mine. No problem with that.
· Both the custom Haunted Gold Mine and the custom Acolytes are marked as 'undead'. No problem with that.
I must clarify that the custom Acolytes are new units based on Acolytes, but the custom Haunted Gold Mine is just the usual Haunted Mine modified in the Campaign editor custom data. I tried modifying the usual Acolytes as well but the result was the same: the result is that all custom units stay still and do nothing when game starts and the campaign AI is called. Specially the custom Acolytes don't harvest at all.
Unless I'm missing something, I think the problem is in the AI script, because the units seem to behave correctly when used by a human player (me). Somehow the script can't order any custom unit to do anything, although it is an exact copy of h04_green.ai but stablishing global variables for the custom units and changing the units that are called for them.
If I remember right, I did manage to make the AI work the last time I attempted to work in the project (in 2010 or so, I didn't finish any chapter further than the 6th one), the suicidal waves worked and so on, but I lost all the files, so I don't know where the answer is :/
So, if anyone can throw me some light, I would be very grateful. I've looking for help in the forums and I found a lot of people complaining about custom Haunted Gold Mines not working, but that's not been of any help.
I can provide further information or files, if needed
Thanks for reading
Have a nice November!
Hi everyone!
It's kind of embarrassing for me to ask this... It seems selfish that I am asking for help after being so inactive in these forums for so long. I'm sorry for that. Anyway, if anyone wants to help me I would be extremely grateful, I could include your name in the Special Thanks credits if you want.
Recently I moved to Dublin, and I got more freetime than in the past, so I decided to resurrect one of my old World Editor projects. I'm not too pro on it, but I know the basics. I think I can say I know more than the basics Anyway, my project consists on a modification of the Human ROC campaign with new races and introducing some of my friends names (they've been asking me to finish it for years xP)
The problems begin when I start handling campaign AI's. Having custom units based on Human and Undead units, I need to create campaign AI scripts (easy to do so by copying files like h04_green.ai inside the campaign files) and start them using triggers.
The custom scripts I previously used for some race based on Orcs (with no workers, only basic attacking units and training buildings with preset properties) worked, but the ones for the Undead army don't work at all.
My theory was that the problems come when using Acolytes and Haunted Gold Mine, as the Gather and Gold Mine abilities might be complicated to call, but I tested the units and I can assure:
· The custom Haunted Gold Mine can be built on normal Gold Mines, as usual. No problem with that.
· The custom Acolytes can harvest gold with the custom Haunted Gold Mine. No problem with that.
· Both the custom Haunted Gold Mine and the custom Acolytes are marked as 'undead'. No problem with that.
I must clarify that the custom Acolytes are new units based on Acolytes, but the custom Haunted Gold Mine is just the usual Haunted Mine modified in the Campaign editor custom data. I tried modifying the usual Acolytes as well but the result was the same: the result is that all custom units stay still and do nothing when game starts and the campaign AI is called. Specially the custom Acolytes don't harvest at all.
Unless I'm missing something, I think the problem is in the AI script, because the units seem to behave correctly when used by a human player (me). Somehow the script can't order any custom unit to do anything, although it is an exact copy of h04_green.ai but stablishing global variables for the custom units and changing the units that are called for them.
If I remember right, I did manage to make the AI work the last time I attempted to work in the project (in 2010 or so, I didn't finish any chapter further than the 6th one), the suicidal waves worked and so on, but I lost all the files, so I don't know where the answer is :/
So, if anyone can throw me some light, I would be very grateful. I've looking for help in the forums and I found a lot of people complaining about custom Haunted Gold Mines not working, but that's not been of any help.
I can provide further information or files, if needed
Thanks for reading
Have a nice November!
Last edited: