Modifying CRAIG AI

Modifying CRAIG AI

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
Von66341
Posts: 111
Joined: 10 Feb 2011, 03:00

Modifying CRAIG AI

Post by Von66341 »

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
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Modifying CRAIG AI

Post by FLOZi »

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
Von66341
Posts: 111
Joined: 10 Feb 2011, 03:00

Re: Modifying CRAIG AI

Post by Von66341 »

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!
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Modifying CRAIG AI

Post by FLOZi »

Ah yes, totally forgot :oops: :

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

Should be fairly self explanatory.
Von66341
Posts: 111
Joined: 10 Feb 2011, 03:00

Re: Modifying CRAIG AI

Post by Von66341 »

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!
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Modifying CRAIG AI

Post by FLOZi »

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?
Von66341
Posts: 111
Joined: 10 Feb 2011, 03:00

Re: Modifying CRAIG AI

Post by Von66341 »

If I do not want my AI to build anything, i leave it blank?
starting unit is a structure.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Modifying CRAIG AI

Post by FLOZi »

On a map without waypoints, only newly built units will ever receive orders from CRAIG...
Von66341
Posts: 111
Joined: 10 Feb 2011, 03:00

Re: Modifying CRAIG AI

Post by Von66341 »

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
Post Reply

Return to “Game Development”