Drummin
  • Drummin
  • 100% (Exalted)
  • General Topic Starter
18 years ago
Hello,

I'm attempting to make a map with some slight modifications to AI... Where he builds defenses etc.

I acquired a copy of these AI.scb scripts through a link to another forum provided by Me Myself and Pi.

I've also made a copy of my own from the data file, so I've tried both these copies.

I also made another copy without Named Units to see if that was the problem.

Problem,
Game crashes after playing for ten minutes or so and I can't figure out why. If I play without any of these files, the game plays fine.

PLEASE NOTE, I haven't made any scripting chances to the first two copies.

I'd love to modify the way AI builds on my map.
Any thoughts?

EDIT:
Also,
  • Are you folks adding a copy of the .scb file to your map folder and naming it the same as your map?
  • After editing AI scripts are you exporting a copy to your map folder?

Thanks,
Drummin
Sponsor
Yoshi714
18 years ago
This may not make a difference, but when I first brought those scripts into world builder I unchecked the "Auto Verify" box before importing from what I had read in some other forum. They work for me, and you will enjoy the better defense once you get it right!
Turtling is not a strategy, its a weakness
Drummin
  • Drummin
  • 100% (Exalted)
  • General Topic Starter
18 years ago
Ya Yoshi714,
I know about the Auto Verify.
Thanks though for your suggestion.

Edit:
Well, it seems that the problem stems from plyrcivilian scripts I've made. The scripts worked fine until I added the AI scripts. Seems to related to spawning a money crate. And, it seems to have to do with spawning to or . Not sure just why it's crashing just yet.

In any case,
AI scripts work fine on its own.
My civilian scripts work fine on its own as well.
But when combined, there's a problem.

Thanks for your thoughts.
Yoshi714
18 years ago
Ah, yes I've had the same problem using supply dock refill scripts in combination with the AI scripts, when the docks refil it gets that seriuos error. I had to move all PlyrCivilian scripts to the neutral folder.


No, when I make new scripts I just leave it on that map alone, and export it somewhere safe that I can bring it into another map if I wish, I dont export it to that map folder but I think it does it automatically... My fav script though I just export right into the game directory so its used by default in all my maps that dont have a script already associated with them.

EDIT - One more thing, if youre trying to make the AI better as I am than its helpful to download the AdvancedAI Mod, it does WORLDS to help get you started, I just edit the heck out of it to get it where I want it, but that mod is pretty amazing on its own! And all it is is a script and build list, no changes to any other game files, easy to delete
Turtling is not a strategy, its a weakness
Drummin
  • Drummin
  • 100% (Exalted)
  • General Topic Starter
18 years ago
Thanks Yoshi714,
I'll try moving scripts to the neutral folder and see how that works.
Thanks also for answering my other questions as well!
I'll give it a go and let you know.
Yoshi714
18 years ago
If you need help on AI scripting let me know, I have done a lot with it now after a lil advice from Me Myself and Pi and a few others on here followed by lots and lots and even more lots of testing
Turtling is not a strategy, its a weakness
Drummin
  • Drummin
  • 100% (Exalted)
  • General Topic Starter
18 years ago
Ok, here's where I'm at...
I've added AI scripts to the map I'm making.
I had a plyrcivilian set of scripts to spawn money crates which worked fine until I added AI scripts.
I've tried moving spawning scripts to neutral folder and it doesn't work.
Even the most basic, IF true, spawn unit at waypoint doesn't work in neutral folder.
Anyone dealt with this before?
Yoshi714
18 years ago
tell me what EXACTLY you are doing to spawn the money crates and ill see if it makes mine crash too... and go into your skirmish teams and make sure you dont have any teams besides the regular skirmish teams (all 12 of them) and the plyrcivilian, this shouldnt cause a crash but can def cause issues on game start.

[EDIT] I went ahead and tried this in one of my maps and if i tried to spawn a unit of type at a waypoint it crashed... BUT if i tried spawning an object at a coordinate and elevation it didnt. Now, I have maps that spawn units, but they have always been actual units, like police cars or something, maybe the crate just isnt considered to be eligible for that script.
Turtling is not a strategy, its a weakness
Drummin
  • Drummin
  • 100% (Exalted)
  • General Topic Starter
18 years ago
I've copied some script files over to some test maps so any of you that wish to give this a try can do so without messing up any of your own maps.
One just has crate script, the other also has AI.

Download Attachment: UserPostedImage TestAI_CrateMaps.zip 
189.78 KB
Yoshi714
18 years ago
I gave it a try and I get the same result you did, with the crash if I use the AI scripts as well on your test maps. Ive tried a few different things but cant seem to get anything to work, I know this world builder software is kinda finicky so its no surprise to me that it doesn't want to work. However, since something like this map crate is already map specific, why can't you just make your AI scripts then export them to the data folder for use in all maps and just leave this script in this map by itself? Its a bit more of a pain if you intend to do this on all your maps, but it would work apparently.

I am stumped on the fact that it works if it references the scripts from outside the map but not the ones associated with it. I have a map that I spawn a police car and I put AI scripts in it and it still works fine. I'll let you know if I figure it out, but I'd keep searching the forums.
Turtling is not a strategy, its a weakness
Drummin
  • Drummin
  • 100% (Exalted)
  • General Topic Starter
18 years ago
Thanks Yoshi for all your efforts.
I'm more inclined to make am AI mod that goes with this map than keeping the crates. Wanted both, but as they say, "You can't always get what you want."
On that note, why are the choices so limited for AI building?
Seems you get the choice of front or flank and that's it.
Maybe I missed something
Yoshi714
18 years ago
OK, there are a few ways to have the AI build in CnC

1) Skirmish Only > Build > Build Building
This option will allow you to build any building of theirs, granted they have the ability and prereq's for, but that building must also appear in the AIData.ini file (I can explain that too if you wish). So for every instance that the AI is told to build that building in the scripts there must be another listing of it in the AIData.ini file.
Also in that drop down youll see build on flank and build on front for both any type of building and defensive structures which default as gatlin cannons or patriot missiles. For those options though the building does not have to be in the AIData.ini file, becuase you are telling them right there where to build it.

2) Player > AI > Build near a supply source
This option is the one I use to make the computer player expand. Buildings here do not have to be in the AIData.ini file because again you are telling them where to put right in the script. The computer will build it near a supply pile with atleast xx amount of cash remaining. This one is real handy becuase you can tell the computer, 'if you have 2 supply depots, build a third airfield, 2 more drop zones and 3 patriot missles, and if you have a third supply depot do it all again' and so on. Just be careful how you script anything in this part becuase its easy to accidently make the computer keep building buildings right next to the supplies and building further out with no control and it can be kinda awkward and slow down the game with lots of unnecessary buildings so I try to keep most my scripts specific to how many supply depots he has becuase that typically correlates with how much building space he has as well.
Turtling is not a strategy, its a weakness
CommieDog
18 years ago
There are also "build structure on front" and "build structure on flank" commands you can use if you don't mind having the buildings on the outer edges of the AI's base.
UserPostedImage 
CommieDog: Because someone has to do your dirty work for you