View topic - Modifying CRAIG AI



All times are UTC + 1 hour


Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Modifying CRAIG AI
PostPosted: 27 Jul 2011, 06:50 

Joined: 10 Feb 2011, 03:00
Hey! Hey!

I am trying to use Spring and Spring 1944 to aid in analysing how different people learn when playing real time strategy games.

I have actually have a new side in Spring 1944, and would like to modify CRAIG AI to be able to play using my side. How should I go about doing it?

p/s: I not sure if I am posting at the correct forum, feel free to shift my post =)

Thanks!

Von66341


Top
 Offline Profile  
 
 Post subject: Re: Modifying CRAIG AI
PostPosted: 27 Jul 2011, 10:19 
Moderator
User avatar

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
CRAIG should be fairly side agnostic unless your new side works in a radically different manner to the others... Even then all it does is either:

1. Map profile is present, send units along the waypoints to cap flags then attack base
2. No map profile is present, issue fight command to all attacking units to enemy base


Top
 Offline Profile  
 
 Post subject: Re: Modifying CRAIG AI
PostPosted: 27 Jul 2011, 10:59 

Joined: 10 Feb 2011, 03:00
I have this error message at the moment:
LuaRules::RunCallIn: error = 2, RecvFromSynced, [string "LuaRules/Gadgets/craig/base.lua"]:224: C.R.A.I.G. is not configured properly to play as battalion

How do I add a side that is recongise by CRAIG AI?

At current my CRAIG AI does not move out from the start point, but fire back automatically when attacked.

Thanks!


Top
 Offline Profile  
 
 Post subject: Re: Modifying CRAIG AI
PostPosted: 27 Jul 2011, 11:54 
Moderator
User avatar

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
Ah yes, totally forgot :oops: :

LuaRules/Configs/craig/s44/buildorder.lua
LuaRules/Configs/craig/s44/unitlimits.lua

Should be fairly self explanatory.


Top
 Offline Profile  
 
 Post subject: Re: Modifying CRAIG AI
PostPosted: 27 Jul 2011, 15:06 

Joined: 10 Feb 2011, 03:00
Thanks FLOZi!

I edited buildorder.lua and the error message disappear.
Link to edited buildorder.lua : http://pastebin.com/B40A8YmN

What does line 235 -241 does?
However using my new side my AI still doesn't send units to attack my base. Any ideas why?

Thanks!


Top
 Offline Profile  
 
 Post subject: Re: Modifying CRAIG AI
PostPosted: 27 Jul 2011, 15:38 
Moderator
User avatar

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
There's no entry in gadget.unitBuildOrder for your side... What is the starting unit of your side? Is it a structure or a mobile builder?


Top
 Offline Profile  
 
 Post subject: Re: Modifying CRAIG AI
PostPosted: 27 Jul 2011, 15:47 

Joined: 10 Feb 2011, 03:00
If I do not want my AI to build anything, i leave it blank?
starting unit is a structure.


Top
 Offline Profile  
 
 Post subject: Re: Modifying CRAIG AI
PostPosted: 28 Jul 2011, 13:11 
Moderator
User avatar

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
On a map without waypoints, only newly built units will ever receive orders from CRAIG...


Top
 Offline Profile  
 
 Post subject: Re: Modifying CRAIG AI
PostPosted: 28 Jul 2011, 14:33 

Joined: 10 Feb 2011, 03:00
I manage to create the waypoint file (mapname.lua) for the units to work.

When I play with other side, my waypoint work perfectly.

However, when I play with my side it doesn't work. Hmm...any suggestion why?

Link to the codes I have:
buildorder.lua > http://pastebin.com/A4B11XnA
unitlimit.lua > no change
map3.lua > http://pastebin.com/RsfiH3vZ


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


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® Forum Software © phpBB Group

Site layout created by Roflcopter et al.