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 Fri Mar 29, 2024 2:25 am
All times are UTC + 0
Trouble Implementing an immobile deploy-fire unit.-PART 2
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [28 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Lee3y
Disk Thrower


Joined: 09 Feb 2018

PostPosted: Wed May 23, 2018 2:01 pm    Post subject:  Trouble Implementing an immobile deploy-fire unit.-PART 2
Subject description: Part 2 - The Lingering B.S.
Reply with quote  Mark this post and the followings unread

Hello again everyone, I previously posted a topic entitled 'Trouble Implementing an immobile deploy-fire unit.', and thanks largely to the community's help (and namely, cxtian), I managed to implement a unit that could deploy into it's immobile firing form (that is, make use of it's UnloadingClass=vxl), and make use of it's weapon while immobile.

Now the annoying new issue I've noticed; the unit actually still Fires when undeployed, thus not making a difference if it is deployed or not. Can anyone explain why the unit does this, and how to prevent it from firing unless in it's deployed state?

I have set the following tags;

Primary=FakeWeapon --> cxtian provided this in Part 1 (see previous topic), and this was used as the 'targeting' weapon?
Secondary= (it's real weapon)
DeployFireWeapon=1 (the real weapon)
CanPassiveAquire=yes
CanRetaliate=yes
PreventAttackMove=yes
IsSimpleDeployer=yes
DeployFire=yes
OpportunityFire=no (I set this to 'no' so it wouldn't fire on the move, which it shouldn't)
UnloadingClass= (it's deployed-state voxel)

Can anybody see anything wrong with the tags?Are they in any way mis-used here?

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


Joined: 09 Feb 2015

PostPosted: Wed May 23, 2018 6:14 pm    Post subject: Reply with quote  Mark this post and the followings unread

DeployToFire = The vehicle must deploy before it can fire (def=no)?

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

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


Joined: 11 Feb 2016

PostPosted: Wed May 23, 2018 6:20 pm    Post subject:   Reply with quote  Mark this post and the followings unread

#Scrambles fire with the fake weapon when undeployed, that's what I did

_________________

Back to top
View user's profile Send private message Skype Account
Lee3y
Disk Thrower


Joined: 09 Feb 2018

PostPosted: Wed May 23, 2018 7:47 pm    Post subject: Reply with quote  Mark this post and the followings unread

G-E wrote:
DeployToFire = The vehicle must deploy before it can fire (def=no)?


'DeployToFire' - I shall try that, I genuinely didn't know this tag was valid, I will let you know the result tomorrow. Do I add this to my other tags, or does this replace 'DeployFire'? I will most likely attempt both...

Back to top
View user's profile Send private message
Lee3y
Disk Thrower


Joined: 09 Feb 2018

PostPosted: Wed May 23, 2018 7:50 pm    Post subject: Reply with quote  Mark this post and the followings unread

cxtian39 wrote:
#Scrambles fire with the fake weapon when undeployed, that's what I did


Hello again cxtian; as you said, I set the 'fakeweapon' as the primary weapon for the undeployed vehicle, and gave it's real weapon as it's secondary. I wonder, do I just delete the secondary weapon altogether, and set it's real weapon after the 'DeployFireWeapon=' tag line?

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


Joined: 19 Aug 2009
Location: Moscow State University

PostPosted: Wed May 23, 2018 10:07 pm    Post subject: Reply with quote  Mark this post and the followings unread

The siege chopper deploy thing is just like the GI deploy. Before deploy - use primary. After deploy - use secondary.
Maybe other tags can alter this, but I believe that is the default state.

DeployToFire behavior is actually "entering firing state (force fire, command fire or retaliate) forces unit to deploy". "must deploy to fire" is referring to GDI juggernaut, which must deploy into a building before it can fire. That explains the juggernaut mechanism, but not actually how this tag works.
DeployFire behavior is when you deploy it, it fires a weapon specified by DeployFireWeapon

_________________
Tired of grabbing my random SHP conversions? Why not learn to create SHPs for yourself?

Back to top
View user's profile Send private message Send e-mail Visit poster's website Skype Account Yahoo Messenger Account
Lee3y
Disk Thrower


Joined: 09 Feb 2018

PostPosted: Thu May 24, 2018 1:50 pm    Post subject: Reply with quote  Mark this post and the followings unread

kenosis wrote:
The siege chopper deploy thing is just like the GI deploy. Before deploy - use primary. After deploy - use secondary.
Maybe other tags can alter this, but I believe that is the default state.

DeployToFire behavior is actually "entering firing state (force fire, command fire or retaliate) forces unit to deploy". "must deploy to fire" is referring to GDI juggernaut, which must deploy into a building before it can fire. That explains the juggernaut mechanism, but not actually how this tag works.
DeployFire behavior is when you deploy it, it fires a weapon specified by DeployFireWeapon


The new tag has so far Failed!

G-E and cxtian, I first tried just adding 'DeployToFire=yes' to the unit, and then tried with replacing the 'DeployFire=yes' tag with it. On both cases, the unit refused to fire a weapon either in undeployed, or deployed state (even force fire).

Kenosis; thanks for backing up the tag that G-E brought up, it is my intention to create a unit that meets the parameters you just described. At this moment I don't understand why the unit would fire in both forms before, but with the 'DeployToFire=yes' set, it doesn't fire in either deployment mode.

Mystery??? Question  Question

Back to top
View user's profile Send private message
Lee3y
Disk Thrower


Joined: 09 Feb 2018

PostPosted: Thu May 24, 2018 3:20 pm    Post subject: Reply with quote  Mark this post and the followings unread

*** Also, a small update; I've been experimenting with removing other tags, as well as adding and removing tags on the 'deployed' voxel (which I originally gave matching stats to, except UnloadingClass=undeployedvoxel). And most recent test shows that it still doesn't fire, but when I order it to shoot an air target the unit seems to enter into a state where it is constantly switching between the two voxels.

In other words, it looks like it is constantly trying to deploy and then undeploy, and then deploy again...

In my rules I have 2 units listed for this one unit's purpose [deployed unit] and [undeployed unit]. cxtian you mentioned it doesn't matter what stats the deployed voxel has, as only the image is used, so does this mean I can delete the entry for it in rules? I assumed to make 2 units, giving them the same stats so that it 'exists' in the game (and doesn't be invisisble)?

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


Joined: 09 Feb 2015

PostPosted: Thu May 24, 2018 4:59 pm    Post subject: Reply with quote  Mark this post and the followings unread

Is your fake weapon NeverUse= like VirtualScanner?

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

Back to top
View user's profile Send private message
Lee3y
Disk Thrower


Joined: 09 Feb 2018

PostPosted: Thu May 24, 2018 7:06 pm    Post subject: Reply with quote  Mark this post and the followings unread

G-E wrote:
Is your fake weapon NeverUse= like VirtualScanner?


Hi G-E, cxtian advised me to use the fake weapon;

[FakeWeapon]
Damage=0; can attack but deal no damage
ROF=0
Range=-2
Projectile=Invisible
Speed=100
Warhead=FakeWeaponWH
FireOnce=yes
Cursor.Attack=NoMove
Cursor.AttackOutOfRange=NoMove; even I can attack but I rather pretend I can not
OmniFire=yes; no need to turn your turret
[FakeWeaponWH]
Versus=1%,1%,1%,1%,1%,1%,1%,1%,1%,1%,1%;no retaliate, no passive acquire

This is what i've set as the Primary weapon for the undeployed unit, with my real weapon set as secondary. On my 'deployed' unit (although i'm told the stats for this unit don't matter) the same real weapon is set as it's primary weapon. Do you think i need to use NeverUse tag?

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


Joined: 19 Aug 2009
Location: Moscow State University

PostPosted: Fri May 25, 2018 7:55 am    Post subject: Reply with quote  Mark this post and the followings unread

Doesn't matter.
SCHP has everything needed. There is no actual "deployed form unit", only the Image is used in SCHD.


If you are still wasting time on these tags, copy a set of SCHP and SCHD, change image, weapons, movement, build requirements and anything you still want to change.

_________________
Tired of grabbing my random SHP conversions? Why not learn to create SHPs for yourself?

Back to top
View user's profile Send private message Send e-mail Visit poster's website Skype Account Yahoo Messenger Account
cxtian39
Commander


Joined: 11 Feb 2016

PostPosted: Fri May 25, 2018 9:21 am    Post subject: Reply with quote  Mark this post and the followings unread

Hahaha putting DeployToFire=yes on a deploy-to-self unit would just cause infinite loop. Because after deploy it still need to deploy before it can fire, and then it deploy again and again and again and never actually fire.
Not a mystery at all #Tongue
Maybe Verses of 1%'s cause weapon switch, try to change all to 100%, and then say something like Versus.none.Retaliate=no, Versus.none.PassiveAcquire=no, etc
Damfoos just made the building version btw

_________________

Back to top
View user's profile Send private message Skype Account
Lee3y
Disk Thrower


Joined: 09 Feb 2018

PostPosted: Fri May 25, 2018 3:25 pm    Post subject: Reply with quote  Mark this post and the followings unread

kenosis wrote:
Doesn't matter.
SCHP has everything needed. There is no actual "deployed form unit", only the Image is used in SCHD.


If you are still wasting time on these tags, copy a set of SCHP and SCHD, change image, weapons, movement, build requirements and anything you still want to change.


Kenosis, I shall take your advice and let you know how it goes, I will attempt over the weekend when I get a chance.

cxtian, I will after copying the siege chopper as Kenosis suggested, see if the fakeweapon needs to be changed. I know about the SHP version I had a look, but I prefer the voxel for 2 reasons; 1 it can deploy facing any direction, and 2 I would really like to implement a new deployable voxel unit.

Back to top
View user's profile Send private message
Lee3y
Disk Thrower


Joined: 09 Feb 2018

PostPosted: Sat May 26, 2018 3:24 pm    Post subject: Reply with quote  Mark this post and the followings unread

Okay, so following Kenosis' advice I've redone the unit code (which is S-300), using the siege chopper (SCHP AND SCHD).

I'm basically back to where I got before; The unit can deploy and undeploy, and the unit can fire it's main real (secondary) weapon, But it will still fire it's secondary (real) weapon even when undeployed. So it still ignores deployment state.

I will try tomorrow to do something with the fakeweapon as per your advice cxtian, although I'm not sure what. The fakeweapon (primary weapon) currently is:

[FakeWeapon]
Damage=0; can attack but deal no damage
ROF=0
Range=-2
Projectile=Invisible
Speed=100
Warhead=FakeWeaponWH
NeverUse=yes
FireOnce=yes
Cursor.Attack=NoMove
Cursor.AttackOutOfRange=NoMove; even I can attack but I rather pretend I can not
OmniFire=yes; no need to turn your turret

[FakeWeaponWH]
Versus=1%,1%,1%,1%,1%,1%,1%,1%,1%,1%,1%;no retaliate, no passive acquire

I don't know exactly what to do, I will first try setting verses to 100%, and I'm not sure if 'NeverUse=yes' or 'FireOnce=yes' are doing anything here...

Back to top
View user's profile Send private message
Lee3y
Disk Thrower


Joined: 09 Feb 2018

PostPosted: Sun May 27, 2018 6:16 pm    Post subject: Reply with quote  Mark this post and the followings unread

Well guys, after trying everything I could think of, after even trying from scratch using the Siege Chopper as a base I couldn't get anywhere with the problem. The unit still fires in it's undeployed state, just as it would in it's deployed state.

cxtian I tried playing with the verses values on the fake weapon but it didn't work.

The siege chopper doesn't use 'DeployFireWeapon=' or 'DeployToFire=' (but does use 'DeployFire').

I tried using DeployFireWeapon=1, in the hope the unit would deploy and use it's secondary (real) weapon, but it doesn't bother to deploy, it still just fires while undeployed.

If anyone has any ideas, I'd appreciate to hear them?

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


Joined: 11 Feb 2016

PostPosted: Sun May 27, 2018 6:22 pm    Post subject: Reply with quote  Mark this post and the followings unread

You miss my point, the unit DOES fire the fake weapon in undeployed state, but the weapon is invisible so you won't notice that it's fired, and it only fire once. So putting NeverUse is defeating the purpose.

_________________

Back to top
View user's profile Send private message Skype Account
Creator
AA Infantry


Joined: 15 Aug 2017
Location: Somewhere in Viet Nam

PostPosted: Sun May 27, 2018 7:02 pm    Post subject: Reply with quote  Mark this post and the followings unread

I don't know why but I have to set some random sizelimit= if I want the unit to be able to deploy

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


Joined: 19 Aug 2009
Location: Moscow State University

PostPosted: Sun May 27, 2018 7:16 pm    Post subject: Reply with quote  Mark this post and the followings unread

How strange. SCHP will only use the machine gun in flying state. How can it use that cannon?
range=-2 is unlimited range. try some range=0 thing.

_________________
Tired of grabbing my random SHP conversions? Why not learn to create SHPs for yourself?

Back to top
View user's profile Send private message Send e-mail Visit poster's website Skype Account Yahoo Messenger Account
Lee3y
Disk Thrower


Joined: 09 Feb 2018

PostPosted: Mon May 28, 2018 10:13 am    Post subject: Reply with quote  Mark this post and the followings unread

After much more testing, and trying all your ideas, I've had no luck..

cxtian; I removed that tag, it made no difference unfortunately.

Creator; I gave it a random sizelimit (=4), no difference.

Kenosis; I tried playing with the range and warhead values of the fake weapon, but no progress.

I even went back on myself and tried using an older build of the code (not using SCHP as a template), and have tried using DeployFire, DeployFire AND DeployToFire, and just DeployToFire on it's own, while giving it DeployFireWeapon=1 (real weapon).

And to this moment it Still fires while undeployed and deployed; the unit won't deploy on it's own, it has to be ordered to. It won't bother to deploy because it can just fire while deployed still.

I will post the unit's code that I have (most recently) been working on...

Back to top
View user's profile Send private message
Lee3y
Disk Thrower


Joined: 09 Feb 2018

PostPosted: Mon May 28, 2018 10:19 am    Post subject: Reply with quote  Mark this post and the followings unread

[S300]   ; the undeployed, mobile unit
UIName=Name:S300
Name=S-300 Launcher
Image=s300
FireAngle=64
Category=AFV
Prerequisite=NAWEAP,NARADR
Primary=FakeWeapon
Secondary=  ;* (Real Weapon, I made an AA-firing missile weapon, use any AA-only weapon here) *
DeployFireWeapon=1
CanPassiveAquire=yes
CanRetaliate=yes
PreventAttackMove=yes
Strength=600
Armor=light
TechLevel=4
Turret=no
CrateGoodie=no
Sight=15
Speed=3
Owner=Russians,Confederation,Africans,Arabs
Cost=400
Soylent=800
Points=40
ROT=3
AllowedToStartInMultiplayer=yes
Crusher=yes
Crewed=yes
IsSelectableCombatant=yes
LandTargeting=1
NavalTargeting=6
GuardRange=50
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
VoiceSelect=V3Select
VoiceMove=V3Move
VoiceAttack=V3AttackCommand
VoiceFeedback=
DieSound=GenVehicleDie
MoveSound=V3MoveStart
CrushSound=TankCrush
Maxdebris=3
Locomotor={4A582741-9839-11d1-B709-00A024DDAFD1}
MovementZone=Destroyer
ThreatPosed=25
DamageParticleSystems=SparkSys,SmallGreySSys
Weight=3.5
ElitePrimary=FakeWeapon
EliteSecondary= ;* (Real Weapon, I made an AA-firing missile weapon, use any AA-only weapon here) *
IsSimpleDeployer=yes
UnloadingClass=S300D
DeployFire=yes
VeteranAbilities=STRONGER,FIREPOWER,ROF,SIGHT,FASTER
EliteAbilities=SELF_HEAL,STRONGER,FIREPOWER,ROF
AccelerationFactor=0.01
ZFudgeColumn=8
ZFudgeTunnel=13
Size=5
TooBigToFitUnderBridge=true
Bunkerable=no
AntiInfantryValue=0
AntiArmorValue=0
AntiAirValue=100

[S300D]   ; the deployed, immobile unit
UIName=Name:S300
Name=S-300 Launcher
Image=s300d
FireAngle=64
Category=AFV
Prerequisite=NAWEAP,NARADR
Primary=S300Misl
ElitePrimary=S300MislE
CanPassiveAquire=yes
CanRetaliate=yes
PreventAttackMove=yes
Strength=600
Armor=light
TechLevel=-1
Turret=no
CrateGoodie=no
Sight=15
Speed=3
Owner=Russians,Confederation,Africans,Arabs
Cost=400
Soylent=800
Points=40
ROT=3
AllowedToStartInMultiplayer=no
Crusher=yes
Crewed=yes
IsSelectableCombatant=yes
LandTargeting=1
NavalTargeting=6
GuardRange=50
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
VoiceSelect=V3Select
VoiceMove=V3Move
VoiceAttack=V3AttackCommand
VoiceFeedback=
DieSound=GenVehicleDie
MoveSound=V3MoveStart
CrushSound=TankCrush
Maxdebris=3
Locomotor={4A582741-9839-11d1-B709-00A024DDAFD1}
MovementZone=Destroyer
ThreatPosed=25
DamageParticleSystems=SparkSys,SmallGreySSys
Weight=3.5
IsSimpleDeployer=yes
UnloadingClass=S300
VeteranAbilities=STRONGER,FIREPOWER,ROF,SIGHT,FASTER
EliteAbilities=SELF_HEAL,STRONGER,FIREPOWER,ROF
AccelerationFactor=0.01
ZFudgeColumn=8
ZFudgeTunnel=13
Size=5
TooBigToFitUnderBridge=true
Bunkerable=no
AntiInfantryValue=0
AntiArmorValue=0
AntiAirValue=100

[FakeWeapon]
Damage=1; can attack but deal no damage
ROF=0
Range=50
Projectile=Invisible
Speed=100
Warhead=FakeWeaponWH
FireOnce=yes
Cursor.Attack=NoMove
Cursor.AttackOutOfRange=NoMove; even I can attack but I rather pretend I can not
OmniFire=yes; no need to turn your turret

[FakeWeaponWH]
Versus=1%,1%,1%,1%,1%,1%,1%,1%,1%,1%,1%;no retaliate, no passive acquire

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


Joined: 11 Feb 2016

PostPosted: Mon May 28, 2018 10:30 am    Post subject: Reply with quote  Mark this post and the followings unread

Change FakeWeapon's projectile to Invisible3 or Invisible4 or anything AA=yes
Otherwise weapon switches to secondary because primary can not target air

_________________

Back to top
View user's profile Send private message Skype Account
kenosis
Commander


Joined: 19 Aug 2009
Location: Moscow State University

PostPosted: Mon May 28, 2018 9:34 pm    Post subject: Reply with quote  Mark this post and the followings unread

As I know there is no autofire on deploytofire units.

_________________
Tired of grabbing my random SHP conversions? Why not learn to create SHPs for yourself?

Back to top
View user's profile Send private message Send e-mail Visit poster's website Skype Account Yahoo Messenger Account
m7
Commander


Joined: 17 Apr 2009

PostPosted: Mon May 28, 2018 10:42 pm    Post subject: Reply with quote  Mark this post and the followings unread

Sounds like a weapon code issue, but you intentionally hid your secondary weapon. We can't help you if you don't give us all the information.

Back to top
View user's profile Send private message
Lee3y
Disk Thrower


Joined: 09 Feb 2018

PostPosted: Mon May 28, 2018 10:44 pm    Post subject: Reply with quote  Mark this post and the followings unread

cxtian39 wrote:
Change FakeWeapon's projectile to Invisible3 or Invisible4 or anything AA=yes
Otherwise weapon switches to secondary because primary can not target air


Hi cxtian, sadly I tried that today, still the same problem.

Kenosis it would seem it is the case here; using the exact code I posted above, the unit automatically fires at a target using it's secondary (real) weapon. It will also do force fire at an air unit, regardless of whether the unit is deployed or not...

Has anyone gotten this DeployToFire thing to work? I've left the DeployfireWeapon=1 in there but I've tried like I said before using DeployToFire , DeployFire, both, but it didn't seem to make a difference. Although I have just followed cxtian's advice with the fakeweapon's projectile change, so I might go ahead and do that series of tests again and see what happens.  Rolling Eyes

Back to top
View user's profile Send private message
Lee3y
Disk Thrower


Joined: 09 Feb 2018

PostPosted: Mon May 28, 2018 10:49 pm    Post subject: Reply with quote  Mark this post and the followings unread

m7 wrote:
Sounds like a weapon code issue, but you intentionally hid your secondary weapon. We can't help you if you don't give us all the information.


If it helps I'll post that too right now. I didn't post it to begin with because the secondary (intended, real weapon) wasn't the issue, it's the unit. Or at least logically to me.. The unit is seemingly ignoring the tag lines telling it to deploy to fire it's secondary weapon, but the weapon itself works (i even tried a weapon from another unit).

secondary weapon I have chosen, if this helps;

[S300Misl]
Damage=500
ROF=400
Range=50
Burst=2
Projectile=S300Proj
Speed=100
Warhead=MIGWHAA
Report=AegisAttack
TurboBoost=yes
MinimumRange=1
OmniFire=yes
Bright=yes

[S300MislE]
Damage=750
ROF=400
Range=50
Burst=2
Projectile=S300Proj
Speed=100
Warhead=MIGWHAA
Report=AegisAttack
TurboBoost=yes
MinimumRange=1
OmniFire=yes
Bright=yes

[S300Proj]
Arm=1
High=yes
Shadow=no
Proximity=no
Ranged=yes
AA=yes
AG=no
Image=V3ROCKET
ROT=21
SubjectToCliffs=no
SubjectToElevation=no
SubjectToWalls=no

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


Joined: 11 Feb 2016

PostPosted: Tue May 29, 2018 12:25 am    Post subject: Reply with quote  Mark this post and the followings unread

Then the game uses secondary to target air by default. Flip primary and secondary and change DeployFireWeapon to 0

_________________

Back to top
View user's profile Send private message Skype Account
Lee3y
Disk Thrower


Joined: 09 Feb 2018

PostPosted: Wed May 30, 2018 8:09 pm    Post subject: Reply with quote  Mark this post and the followings unread

cxtian39 wrote:
Then the game uses secondary to target air by default. Flip primary and secondary and change DeployFireWeapon to 0


cxtian, sorry for late reply, but Thank You! That did it. I was considering doing it as one of my 'longshot' theories, but you've sped up the process haha

*Thread Resolved*  Very Happy

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


Joined: 11 Feb 2016

PostPosted: Wed May 30, 2018 9:15 pm    Post subject: Reply with quote  Mark this post and the followings unread

Yep
When attacking air target, secondary is the primary and primary is the secondary

Don't know if this relates to the issue that LandTargeting=1 without Secondary cannot target paratroopers

_________________

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