Jump to content


AI Scripting Errors


4 replies to this topic

#1 mcbob

    Casual

  • Member
  • 79 posts

Posted 19 May 2011 - 01:22

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?

#2 VectorIV

    Casual

  • Validating
  • 60 posts
  • Projects: C&C Generals Zero Hour : Enhanced
    Unannounced Red Alert 3 Project

Posted 19 May 2011 - 09:31

View Postmcbob, 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?


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 8|

#3 n5p29

    Lurker

  • Project Leader
  • 1417 posts
  • Projects: NProject Mod, Recolonize, Tidal Wars

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.

#4 mcbob

    Casual

  • Member
  • 79 posts

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.

View Postn5p29, 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.


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 Dutchygamer

    Shyborg Commander

  • Member Test
  • 1899 posts
  • Projects: Frontline Chaos creator and leader, Invasion Confirmed co-leader

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.
Posted Image



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users