I've been working on a basic AI script for Generals, using America as a template.
My first script is supposed to order the AI to build multiple cold fusion reactors and barracks at the start of a skirmish match.
However, in-game. The dozer is inactive and nothing happens at all. The AI though still uses the spy drone special power and isn't completely inert.
I used the Script Debug tool to identify the problem.
Apparently, the cold fusion reactor, titled AmericaPowerPlant as it should be, could not be found in the "Building Template List" and therefore caused the script to malfunction. However, I checked the script numerous times and verified that all the inputs matched up.
Any idea what is causing this?
0
AI Scripting Errors
Started By mcbob, May 19 2011 01:22
4 replies to this topic
#1
Posted 19 May 2011 - 01:22
#2
Posted 19 May 2011 - 09:31
mcbob, on 19 May 2011, 8:22, said:
I've been working on a basic AI script for Generals, using America as a template.
My first script is supposed to order the AI to build multiple cold fusion reactors and barracks at the start of a skirmish match.
However, in-game. The dozer is inactive and nothing happens at all. The AI though still uses the spy drone special power and isn't completely inert.
I used the Script Debug tool to identify the problem.
Apparently, the cold fusion reactor, titled AmericaPowerPlant as it should be, could not be found in the "Building Template List" and therefore caused the script to malfunction. However, I checked the script numerous times and verified that all the inputs matched up.
Any idea what is causing this?
My first script is supposed to order the AI to build multiple cold fusion reactors and barracks at the start of a skirmish match.
However, in-game. The dozer is inactive and nothing happens at all. The AI though still uses the spy drone special power and isn't completely inert.
I used the Script Debug tool to identify the problem.
Apparently, the cold fusion reactor, titled AmericaPowerPlant as it should be, could not be found in the "Building Template List" and therefore caused the script to malfunction. However, I checked the script numerous times and verified that all the inputs matched up.
Any idea what is causing this?
I'm not quite sure, might be the define object list (Really, I'm not sure). If I were you, I'll use the original game script and improve it instead of building a new one from the beginning. If you're still want to do that, the others might came up eventually
#3
Posted 19 May 2011 - 11:15
are you making custom skirmish/multiplayer AI or just AI scripts for missions?
the skirmish AI are saved in the SkirmishScripts.scb. if your AI want to be used in the skirmish/multiplayer, edit that file.
you can't edit skirmish AI for a specific multiplayer map. if you put your own scripts in the map, the AI will not working.
the skirmish AI are saved in the SkirmishScripts.scb. if your AI want to be used in the skirmish/multiplayer, edit that file.
you can't edit skirmish AI for a specific multiplayer map. if you put your own scripts in the map, the AI will not working.
NProject Mod -- Recolonize -- Tidal Wars
#4
Posted 19 May 2011 - 23:28
Quote
I'm not quite sure, might be the define object list (Really, I'm not sure). If I were you, I'll use the original game script and improve it instead of building a new one from the beginning. If you're still want to do that, the others might came up eventually
I checked the define object list. There wasn't anything noticeable. I've also tried using the original scripts and scripts from mods like Shockwave and ROTR to see if they function correctly within my mod. They too have the same problem.
All the scripts, Shockwave, ROTR, the original ZH script, and my custom script all share the same first few codes for the starting AI, which is to construct a power plant and a barracks immediately.
Like mine, the other three are also stuck with the same error: the cold fusion reactor could not be found in the Building Template List.
n5p29, on 19 May 2011, 11:15, said:
are you making custom skirmish/multiplayer AI or just AI scripts for missions?
the skirmish AI are saved in the SkirmishScripts.scb. if your AI want to be used in the skirmish/multiplayer, edit that file.
you can't edit skirmish AI for a specific multiplayer map. if you put your own scripts in the map, the AI will not working.
the skirmish AI are saved in the SkirmishScripts.scb. if your AI want to be used in the skirmish/multiplayer, edit that file.
you can't edit skirmish AI for a specific multiplayer map. if you put your own scripts in the map, the AI will not working.
I am making custom skirmish AI and am indeed editing the SkirmishScripts.scb file.
I've checked AIData.ini for any issues. No issues I've seen so far. I've also checked the entire code of the cold fusion reactor many times. There too are no anomalies.
#5
Posted 20 May 2011 - 16:15
Dozer not moving is most likely because the team that uses a Dozer had it's status set to 'Aggressive' instead of 'Normal'. This is the case with one of the USA General's AI iirc.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users