View unanswered posts | View active topics It is currently Sat Dec 28, 2024 5:46 pm



Reply to topic  [ 5 posts ] 
 Assigning new AI to old factions? 
Author Message
User avatar

Joined: Fri Jun 25, 2010 12:41 pm
Posts: 20
Location: Blighty
Reply with quote
Post Assigning new AI to old factions?
How do I make it so that older factions (Crobotech, AAL etc) use the new lua AI? An earlier attempt by myself failed miserably, so I would like to know what lines of code need to be added to make it work. Many thanks!


Thu Aug 18, 2011 8:46 pm
Profile

Joined: Sat Feb 03, 2007 7:11 pm
Posts: 1496
Reply with quote
Post Re: Assigning new AI to old factions?
IF THE ACTOR DOES NOT ALREADY HAVE A LUA SCRIPT ATTACHED TO HIM
(As in, there isn't already a line for him that begins with "ScriptPath"):

Somewhere in the .ini under the main actor's definition, add this line:
Code:
   ScriptPath = Base.rte/Actors/AI/HumanAI.lua


And you should be good to go.

If it does, then you'll need to learn how to splice the two .lua files together.


Thu Aug 18, 2011 10:38 pm
Profile WWW
User avatar

Joined: Wed Feb 17, 2010 12:07 am
Posts: 1545
Location: That small peaceful place called Hell.
Reply with quote
Post Re: Assigning new AI to old factions?
The AI Script only has a function create so really that's the only thing you would need to combine with the actors script.


Thu Aug 18, 2011 11:13 pm
Profile
DRL Developer
DRL Developer
User avatar

Joined: Wed Dec 13, 2006 5:27 am
Posts: 3138
Location: A little south and a lot west of Moscow
Reply with quote
Post Re: Assigning new AI to old factions?
It also has an UpdateAI function, actually, so you'd need to copy that, too.


Thu Aug 18, 2011 11:36 pm
Profile WWW
User avatar

Joined: Fri Jun 25, 2010 12:41 pm
Posts: 20
Location: Blighty
Reply with quote
Post Re: Assigning new AI to old factions?
Code:
   ScriptPath = Base.rte/Actors/AI/HumanAI.lua

Well that's the line of code I tried copying across to start with, but CC would crash without leaving a crash dump. The actor in question didn't have a script attached beforehand, so I'm not sure what is going wrong.

Edit: Nvm, it's decided to work now. Cheers anyway!


Fri Aug 19, 2011 10:15 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.030s | 13 Queries | GZIP : Off ]