Login  Register
 



Post new topicReply to topic
 
Author Message
 PostPosted: 26 Feb, 2012 
 

Joined: 26 Feb, 2007
Posts: 336
Location: Toronto
Offline
The Eye of Rhianne would be a great asset to the intelligence gathering tools of the AI and, to that end, I've got the AI building the unit and have written the necessary code to have it draw a location to look at from the intelligence tables. But - now I'm a little stumped. What command needs to be executed to get it to actually execute the view ?

In manual use, there is a 'scry' button which, when triggered, presents the user with a target reticule - 'click' on target area - and boom - viz.

Any help here would be greatly appreciated.


Last edited by Sprouto on 27 Feb, 2012, edited 1 time in total.

Top
 Profile  
 PostPosted: 27 Feb, 2012 
 

Joined: 26 Feb, 2007
Posts: 336
Location: Toronto
Offline
aha....Things I learn as I go along. I had never had to use the IssueScript command before. As always, I thank all those who have come before.

order = { TaskName = "TargetLocation", Location = position }
IssueScript( {unit}, order )


Top
 Profile  
 PostPosted: 01 Mar, 2012 
 

Joined: 16 Oct, 2011
Posts: 71
Offline
i have never been good at modding. sprouto, how do you learn to mod an ai? do you have to learn lua thoroughly first?


Top
 Profile  
 PostPosted: 01 Mar, 2012 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
jarmen wrote:
i have never been good at modding. sprouto, how do you learn to mod an ai? do you have to learn lua thoroughly first?

I never mod the AI, but I would have to say yes. You have to know a lot of Lua first.


Top
 Profile  
 PostPosted: 01 Mar, 2012 
 

Joined: 26 Feb, 2007
Posts: 336
Location: Toronto
Offline
Having been a programmer for over 30 years helped a lot - but don't let that be discouraging - I had no knowledge of Lua when I began looking at the AI.

Learning Lua was relatively quick as it can be rather easy to read and follow, provided the coder writes in a clear manner and makes liberal use of comments (and that's not always the case). To that end, the first step for me was to simply read - and then read some more, inserting comments into the code as I identified what certain things do, or inserting LOG comments so that I could see when certain code was coming into play. Whenever I encountered something that I couldn't figure out, I'd simply put it aside until I discovered other examples of it being used.

In this case, I ended up referring to the ACU upgrades, which are executed thru an IssueScript command.


Top
 Profile  
 PostPosted: 26 Mar, 2012 
 
User avatar

Joined: 21 Jan, 2011
Posts: 335
Offline
so when will you release your ai sprouto. I wanna try it.

_________________
----------------------------------------------------------
Total Mayhem mod for Forged Alliance
Image
http://forums.gaspowered.com/viewtopic.php?f=7&t=51225
http://www.moddb.com/mods/total-mayhem1


Top
 Profile  
 PostPosted: 26 Mar, 2012 
 

Joined: 26 Feb, 2007
Posts: 336
Location: Toronto
Offline
At present, I'm tearing down most of the Experimental code, so that the 'behemoth' experimentals will form with ground platoons and gunship and bomber experimentals will form with their respective platoons. On the surface, that's pretty easy - until you consider what that will do to a platoon when it decides to call for transports - so that's going to need some thought. At present, their fallback behaviour will have them form 'experimental platoons' of up to 4 - but that essentially means the experimentals will sit about until they can form up.

Those experimentals with significant special functions (ie. - Fatboy, Megalith, Atlantis and Czar) need custom behaviours that will support the AI's current plan.

Other than that, I'm still pounding down the performance and memory consumption issues. Those aren't really AI issues - but overall performance increases == better enjoyment.


Top
 Profile  
 PostPosted: 26 Mar, 2012 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
If only there was a AI with Custom Faction Support. :lol:


Top
 Profile  
 PostPosted: 27 Mar, 2012 
 

Joined: 26 Feb, 2007
Posts: 336
Location: Toronto
Offline
It's tough enough just getting the standard units to do some of the unique things they do - or even simple things like fighters escorting bombers in a reliable and predictable fashion - all of it while keeping the economy stable.


Top
 Profile  
 PostPosted: 03 Apr, 2012 
 

Joined: 16 Oct, 2011
Posts: 71
Offline
sprouto how do you make an ai to do an upgrade using this command? can you tell me the example?


Top
 Profile  
 PostPosted: 03 Apr, 2012 
 

Joined: 26 Feb, 2007
Posts: 336
Location: Toronto
Offline
You need to give me a specific example of what unit you wish to have do an upgrade. I ask because buildings use a different method than units like commander or subcommanders. Then I'll gladly point you to the code which does the job.


Top
 Profile  
 PostPosted: 03 Apr, 2012 
 

Joined: 16 Oct, 2011
Posts: 71
Offline
1. i want the aeon ACU to have a resource allocation upgrade.

2. for building, i want a t1 land factory to upgrade to t2.


Top
 Profile  
 PostPosted: 03 Apr, 2012 
 

Joined: 16 Oct, 2011
Posts: 71
Offline
what exactly does this things do?

PlatoonAddFunctions = { {SAI, 'BuildOnce'}, },
PlatoonAddBehaviors = { 'BuildOnceAI' },

if i removed them, ACU and SCU becomes 'inactive', just standing at one place whole day and doing nothing. whats going on?


Top
 Profile  
 PostPosted: 03 Apr, 2012 
 

Joined: 26 Feb, 2007
Posts: 336
Location: Toronto
Offline
As both those questions are outside the scope of this topic, I've answered you in a Private Message.


Top
 Profile  
 PostPosted: 03 Apr, 2012 
 

Joined: 16 Oct, 2011
Posts: 71
Offline
thanks a lot! :D


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic



Quick Tools

Search for:
Jump to:  

© 2002-2010 Gas Powered Games Corp. All Rights Reserved. Gas Powered Games is the exclusive trademark of Gas Powered Games Corp.
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
 
Home| Games | Company | News & Press | Support
  Terms of Use   |    Copyright Information   |    Privacy Policy