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 Apr 18, 2024 11:37 pm
All times are UTC + 0
DeployToFire and autonomous target acquisition
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [11 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Millennium
Commander


Joined: 09 Mar 2008
Location: Osaka (JP)/Hong Kong/Germany

PostPosted: Sun Feb 15, 2015 4:22 pm    Post subject:  DeployToFire and autonomous target acquisition
Subject description: Can we put this into Research?
Reply with quote  Mark this post and the followings unread

This unit is supposed to be a 'dummy' MCV that the player starts with, but which instantly turns into a ConYard. So, I gave it DeployToFire, a map-range weapon and topped it all off with causing it to "attack" friendly units. In theory, the MCV would react to units on the map (friendly or hostile) instantly when the game starts, attempt to fire on them, instead deploy and turn into the ConYard.
In practice... none of that happens. I can drive around with my MCV until I chose to deploy it manually. Does anyone see any holes or errors in my code?

Inbefore someone mentions it, it is NOT because there is not enough space for it to deploy... it has always spawned in large, clear areas with all friendly units spawning at a distance and I had no problem manually deploying it in the very same spot. So that cannot be the reason.

Code:
; Asian Alliance Mobile Construction Vehicle (Dummy)
[EMCV]
UIName=Name:EMCV
Name=Eastasian Construction Vehicle
Image=NULL
Strength=1000
Category=Support
Armor=heavy
DeploysInto=EGCNST
TechLevel=-1
Sight=8
Speed=4
Owner=Alliance,Alliance2,Alliance3
CrateGoodie=no
Cost=3000
Soylent=3000
Points=60
ROT=5
Crewed=yes
Crusher=yes
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
DeploySound=PlaceBuilding
CrushSound=TankCrush
VoiceFeedback=
VoiceSelect=RobotTankSelect
VoiceSelectDeactivated=RobotTankSelectDeactivated
VoiceMove=RobotTankMove
VoiceAttack=RobotTankAttackCommand
DieSound=GenVehicleDie
ActivateSound=RobotTankOnline
DeactivateSound=RobotTankOffline
MaxDebris=6
Weight=3.5

Locomotor={4A582741-9839-11d1-B709-00A024DDAFD1} ;drive locomotor
MovementZone=Normal

ThreatPosed=0   ; This value MUST be 0 for all building addons
DamageParticleSystems=SparkSys,SmallGreySSys
SpecialThreatValue=1
ZFudgeColumn=12
ZFudgeTunnel=15
Size=6
Trainable=no
Bunkerable=no; Units default to yes, others default to no
OmniCrushResistant=yes; so Crusher can crush Crushable, OmniCrusher trumps Crushable=no, and then OmniCrushResistant trumps OmniCrusher

; AutoDeploy
DeployToFire=yes
Primary=AutoDeployWeapon
GuardRange=255
DefaultToGuardArea=yes
CanPassiveAquire=yes
AttackFriendlies=yes


Here is the weapon:
Code:

; Deploy me!
[AutoDeployWeapon]
Damage=0
Projectile=DummyProjectile
Range=255
Warhead=Super
OmniFire=yes

Last edited by Millennium on Sat Jan 09, 2016 9:51 pm; edited 2 times in total

Back to top
View user's profile Send private message
Mig Eater
Defense Minister


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Sun Feb 15, 2015 4:26 pm    Post subject: Reply with quote  Mark this post and the followings unread

Try Damage=1, I'd recommending using a custom warhead instead of [Super] too.

_________________



Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL Facebook Profile URL Twitter Channel URL
Millennium
Commander


Joined: 09 Mar 2008
Location: Osaka (JP)/Hong Kong/Germany

PostPosted: Sat Jan 09, 2016 2:22 am    Post subject: Reply with quote  Mark this post and the followings unread

Almost a year later, an update to this issue:

It seems DeployToFire entirely prevents units from acquiring targets on their own and these units seemingly cannot be coaxed into attacking on their own by any means (GuardArea, explicit statement of PassiveAquire=yes).

_________________
Mao Zedong wrote:

Our mission, unfinished, may take a thousand years.  

Last edited by Millennium on Sat Jan 09, 2016 10:46 am; edited 1 time in total

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Sat Jan 09, 2016 10:10 am    Post subject: Reply with quote  Mark this post and the followings unread

Do you tried giving EGCNST a dummy weapon?
I think RA2 works a bit different than TS, by looking ahead on the deployed object, if that is actually able to shoot.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Millennium
Commander


Joined: 09 Mar 2008
Location: Osaka (JP)/Hong Kong/Germany

PostPosted: Sat Jan 09, 2016 10:51 am    Post subject: Reply with quote  Mark this post and the followings unread

I did re-test this on a unit which had a weapon on both its vehicle and building form. This unit also was unable to attack on its own. So having a weapon itself is not sufficient to cause DeployToFire units to passively acquire targets.

However, the weapons of the two forms were not identical. It may have been that the the differential characteristics of the weapons would have made the unit consider itself unable to fire once deployed (different Range, Warhead), and so it did not attempt to fire (and hence didn't deploy).

I'm going to test your theory now with a unit which has identical weapons in both vehicle and building form.

Update: Even with identical weapons on both vehicle and building form, units which are DeployToFire will not acquire targets on their own.

By the way, Retaliate works fine.
I will run another test later today with Psychedelic effect on such a unit to see if that will make it acquire targets.

_________________
Mao Zedong wrote:

Our mission, unfinished, may take a thousand years.  

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


Joined: 09 Feb 2015

PostPosted: Sat Jan 09, 2016 1:43 pm    Post subject: Reply with quote  Mark this post and the followings unread

Fraidycat=yes? Smile

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

Back to top
View user's profile Send private message
Millennium
Commander


Joined: 09 Mar 2008
Location: Osaka (JP)/Hong Kong/Germany

PostPosted: Sat Jan 09, 2016 7:00 pm    Post subject: Reply with quote  Mark this post and the followings unread

Finished testing if Berzerk'd units with DeployToFire will acquire targets on their own.

Results are very inconsistent (sometimes they do, sometimes they don't). It appears that these units will acquire targets and deploy accordingly if they are, at the time of being affected with Psychedelic, on a clear cell and not following a Move (and perhaps also Attack) order. If they are following a Move order, they will move abit further (perhaps completing the Move command, at least on short distances), then sit passively.

They also do not deploy when, at the time of being affected by Psychedelic, they are standing on terrain that does not allow them to deploy (whereas non-berzerk'd units with DeployToFire would look for a clear cell nearby, go there, and then deploy, if ordered to attack), and just sit on the spot, doing nothing. I'm not sure if this is because they acquire a target, and then fail to follow up with finding a clear cell to deploy in, or if they fail to acquire a target in the first place.

Results were very inconsistent over the course of testing and most of these results are my non-verified conjecture.

Overall, seems like this may be a case for Ares.

G-E wrote:

Fraidycat=yes? Smile

InfantryType panic sequence tag? I'm not sure where that fits into DeployToFire vehicles, but I will give it a try. Thank you.

_________________
Mao Zedong wrote:

Our mission, unfinished, may take a thousand years.  

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Sat Jan 09, 2016 9:09 pm    Post subject: Reply with quote  Mark this post and the followings unread

wait, are you trying to get it auto-deploy as a starting unit in multiplayer?

For TS a hack was necessary to make the starting units use a different default behaviour. Default is Area Guard, but normal Guard mode is necessary so the AI fires immediately at anything in range with the starting unit.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Millennium
Commander


Joined: 09 Mar 2008
Location: Osaka (JP)/Hong Kong/Germany

PostPosted: Sat Jan 09, 2016 9:53 pm    Post subject: Reply with quote  Mark this post and the followings unread

Updated http://modenc.renegadeprojects.com/DeployToFire with my findings, if anyone wants to add something or take something away.

Also, can a moderator please put this into Research?

Lin Kuei Ominae wrote:
wait, are you trying to get it auto-deploy as a starting unit in multiplayer?
For TS a hack was necessary to make the starting units use a different default behaviour. Default is Area Guard, but normal Guard mode is necessary so the AI fires immediately at anything in range with the starting unit.

Yes, I was trying that with the first unit that I noticed to have this issue, but I have since noticed it with another unit that I intended to auto-deploy upon spawning (even though that unit is not a starter unit). So, both my purposes would benefit from any method that would enable auto-deploying without player control.
By 'hack', do you mean an EXE modification?
RA2 has DefaultToGuardArea, but I see no possibility to make units default to 'Guard' without doing something to the EXE, but perhaps TS is different?

_________________
Mao Zedong wrote:

Our mission, unfinished, may take a thousand years.  

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Sat Jan 09, 2016 10:09 pm    Post subject: Reply with quote  Mark this post and the followings unread

Spawned units also have a hardcoded standard behaviour, which is "harvest".

Your tests only become valid when you build the unit. And then i'm pretty sure the logic works fine and automatically.
So i'm pretty sure your edit to modenc is wrong.

When testing things, do not test special cases and then generalize this for every case.


Millennium wrote:
By 'hack', do you mean an EXE modification?

yes, the default behaviour for starting units and spawned units is hardcoded in the exe.
For TS exist 3 different hacks which can change these. See C&C Executable Modifier.
-AI starting units default behaviour mode
-Human starting units default behaviour mode
-FreeUnit stance

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Millennium
Commander


Joined: 09 Mar 2008
Location: Osaka (JP)/Hong Kong/Germany

PostPosted: Sat Jan 09, 2016 10:22 pm    Post subject: Reply with quote  Mark this post and the followings unread

Lin Kuei Ominae wrote:
Spawned units also have a hardcoded standard behaviour, which is "harvest".

Your tests only become valid when you build the unit. And then i'm pretty sure the logic works fine and automatically.
So i'm pretty sure your edit to modenc is wrong.

Oh sorry. This was a misunderstanding. Smile I meant "spawned" in the more general sense of "being created in a game". Not the particular aircraft- or slave-spawning function of RA2. Besides noticing this issue with a starting unit, the other unit I noticed to have it and to which I here ambiguously referred as "spawned" had been placed via Ares' UnitDelivery SW. I also noticed this issue with a unit produced from the War Factory. Sorry for the ambiguous expression!

_________________
Mao Zedong wrote:

Our mission, unfinished, may take a thousand years.  

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [11 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.1563s ][ Queries: 11 (0.0076s) ][ Debug on ]