Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Thu Mar 28, 2024 5:47 pm
All times are UTC + 0
FreeUnit AI questions
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [5 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Bugjuice
GDI Hacker


Joined: 31 Aug 2013

PostPosted: Fri Jan 06, 2017 3:46 pm    Post subject:  FreeUnit AI questions Reply with quote  Mark this post and the followings unread

Good day.

I have some questions regarding the FreeUnit logic, I've uses this to spawn an attack vehicle instead of a harvester unit, and the unit will not attack even when attacked, unless you manually command and move them.

Now there is a problem with AI controlled player as they would build the buiding and completely ignored the free unit, the free unit would just sit there doing nothing even when attacked Laughing

Here is what I was trying to achieve, I would like the freeunit regarded as a crate goodie unit, which AI would treat them as a crate goodie unit and use that specific AI script.. don't know much about this ai script but I can see ai controlled crate goodie unit will always return to their base and defend when attacked.

Also one thing, I've tried the chronowarp to teleport the freeunit from AI side, then after that AI can control them which put them in guard mode.

Is there anything I should try in rulesmd before looking at the very complex aimd as I never touch them before. Or it is an impossible task?

Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Fri Jan 06, 2017 4:13 pm    Post subject: Reply with quote  Mark this post and the followings unread

DefaultToGuardArea=yes could be useful in this case, but ultimately you'll have to make AI scripts use that unit.

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Bugjuice
GDI Hacker


Joined: 31 Aug 2013

PostPosted: Sun Jan 08, 2017 3:04 am    Post subject: Reply with quote  Mark this post and the followings unread

G-E wrote:
DefaultToGuardArea=yes could be useful in this case, but ultimately you'll have to make AI scripts use that unit.

Have been looking at the aimd editing guide and... it was too complex for me #Crazy

Anyway I've found a workaround by accident, the AI will somehow recognize a cloaking=yes unit, so I just clone a few existing unit and give them the ability to cloak, and assign them as FreeUnit, so now the AI will use the FreeUnit to guard their base when attacked. Must be some default base defense script, they will always sit in the base.

But then this is only for the ai controlled player, but for human player, be it cloaked or not, I still have to manually move the unit to "wake" them up.. else they would just sit there and wouldn't retaliate against enemy in it's weapon range.

Back to top
View user's profile Send private message
TAK02
General


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Sun Jan 08, 2017 10:59 am    Post subject: Reply with quote  Mark this post and the followings unread

Funnily enough, this bug doesn't exist for harvies. Then again, maybe Westwood did some hardcoding to fix this, but only for harvesters

_________________
One and only developer of the Command & Conquer Dune "C&C D" mod.
m7 wrote:
I tend to release things I create so that assets are never lost to hard drive problems, accidental deletion, or me having to pretend to care about rippers taking things from my project when it is done. #Tongue

Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID YouTube User URL Twitter Channel URL Skype Account
Bugjuice
GDI Hacker


Joined: 31 Aug 2013

PostPosted: Mon Jan 09, 2017 2:39 am    Post subject: Reply with quote  Mark this post and the followings unread

TAK02 wrote:
Funnily enough, this bug doesn't exist for harvies. Then again, maybe Westwood did some hardcoding to fix this, but only for harvesters

Yeah, I think the free unit logic supposedly only work for unit that has a harvester tag, as I could remember somewhere I've read the harvester has a default guard range of 255.. but then you can use the FreeUnit=? to spawn whatever vehicle you want next to the building..

As for the ai editing, so far I only learned to change the number and type of vehicle ai will create, attack what sort of stuff, such as harvester or specific building etc.. need more time to understand the rest of the stuff. Laughing

Also I've notices one thing after ai build the building that gives a free unit that have cloaking ability, when the cloaked unit appear it would first reveal itself then after a split second it become conceal and ai will immediately command the unit to "scatter" away from the spawn spot. I think this is due to the ai thinks that it is a naval unit as the cloaking logic only used for naval unit in RA/YR, so they somehow recognized it and it is how the naval yard spawn unit, how they appear aside etc.

Btw, adding the harvester=yes tag to the unit will fix this problem, but then I have to add ; infront of "oreminerunderattack" in evamd to disable the harvester under attack warning voice message since it is getting a little bit annoying Laughing , but you will still be getting the harvester position in minimap...

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [5 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
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 vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.1373s ][ Queries: 11 (0.0076s) ][ Debug on ]