|
 |
| Author |
Message |
|
Sprouto
|
Posted: 26 Feb, 2012
|
|
Joined: 26 Feb, 2007 Posts: 336 Location: Toronto
|
|
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 |
|
 |
|
Sprouto
|
Posted: 27 Feb, 2012
|
|
Joined: 26 Feb, 2007 Posts: 336 Location: Toronto
|
|
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 |
|
 |
|
jarmen
|
Posted: 01 Mar, 2012
|
|
Joined: 16 Oct, 2011 Posts: 71
|
|
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 |
|
 |
|
brandon007
|
Posted: 01 Mar, 2012
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
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 |
|
 |
|
Sprouto
|
Posted: 01 Mar, 2012
|
|
Joined: 26 Feb, 2007 Posts: 336 Location: Toronto
|
|
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 |
|
 |
|
burnie222
|
Posted: 26 Mar, 2012
|
|
Joined: 21 Jan, 2011 Posts: 335
|
|
| Top |
|
 |
|
Sprouto
|
Posted: 26 Mar, 2012
|
|
Joined: 26 Feb, 2007 Posts: 336 Location: Toronto
|
|
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 |
|
 |
|
brandon007
|
Posted: 26 Mar, 2012
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
If only there was a AI with Custom Faction Support. 
|
|
| Top |
|
 |
|
Sprouto
|
Posted: 27 Mar, 2012
|
|
Joined: 26 Feb, 2007 Posts: 336 Location: Toronto
|
|
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 |
|
 |
|
jarmen
|
Posted: 03 Apr, 2012
|
|
Joined: 16 Oct, 2011 Posts: 71
|
|
sprouto how do you make an ai to do an upgrade using this command? can you tell me the example?
|
|
| Top |
|
 |
|
Sprouto
|
Posted: 03 Apr, 2012
|
|
Joined: 26 Feb, 2007 Posts: 336 Location: Toronto
|
|
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 |
|
 |
|
jarmen
|
Posted: 03 Apr, 2012
|
|
Joined: 16 Oct, 2011 Posts: 71
|
|
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 |
|
 |
|
jarmen
|
Posted: 03 Apr, 2012
|
|
Joined: 16 Oct, 2011 Posts: 71
|
|
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 |
|
 |
|
Sprouto
|
Posted: 03 Apr, 2012
|
|
Joined: 26 Feb, 2007 Posts: 336 Location: Toronto
|
|
As both those questions are outside the scope of this topic, I've answered you in a Private Message.
|
|
| Top |
|
 |
|
jarmen
|
Posted: 03 Apr, 2012
|
|
Joined: 16 Oct, 2011 Posts: 71
|
thanks a lot! 
|
|
| Top |
|
 |
 |
 |
|