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 6:24 pm
All times are UTC + 0
Torpedos and Hover Units
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [18 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
AnimalMan
Chem Warrior


Joined: 06 Feb 2018
Location: London, England

PostPosted: Tue Feb 20, 2018 1:28 pm    Post subject:  Torpedos and Hover Units Reply with quote  Mark this post and the followings unread

I am trying to make a torpedo fire from a hovering unit using the amphibious transport locomotor, and I am struggling to get the torpedo working.

I have tried to modify primary fire locations so the torpedo spawns in the correct layer but it doesnt seem to want to work.

I have also tried creating a new torpedo voxel and hva and editing the layerr and isflat in artmd, but to no avail. The torpedo detonates instantly.


Is it possible to give a hover unit a torpedo projectile?

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


Joined: 14 Sep 2006
Location: Limbo

PostPosted: Tue Feb 20, 2018 4:42 pm    Post subject: Reply with quote  Mark this post and the followings unread

You can't use Level=yes as it has special logic to only work on water. Don't use IsFlat either, layer is purely graphical. Instead (after a ton of testing) this should give you the same function:
Code:
[LandTorpedo]
Arm=2
Shadow=no
Image=SUBT
AG=yes
Ranged=yes            ; The following tags are required to keep this proj on course
ProjectileRange=5      ; Keep below 64 or the missile may miss and ignore Ranged=yes
Proximity=yes         ; Mostly so it again doesn't fly off the map
Floater=yes            ; Projectiles do not move vertically, like Level
ROT=20               ; ROT=1 has very undesireable consequences and low can be just as bad, so keep it at 20
CourseLockDuration=35   ; However many frames the projectile can fly at max taking into consideration Acceleration
Acceleration=10         ; Going below 6 stops it from firing straight like Level


I hope that helps.
EDIT: I should explain that a lot of this logic is to correct the numerous problems of Floater=yes and it's tendency to fly off the map...

_________________
"Don't beg for things; Do it yourself or you'll never get anything."

Back to top
View user's profile Send private message Send e-mail YouTube User URL
AnimalMan
Chem Warrior


Joined: 06 Feb 2018
Location: London, England

PostPosted: Tue Feb 20, 2018 6:48 pm    Post subject: Reply with quote  Mark this post and the followings unread

Thanks General, However I tested the code and it did not work. Here is as sceen




I will post the code in case you can idenfity something that contradicts your code.

proj
Code:

[RipTorpedo]
Arm=2
Shadow=no
Image=SUBT
AG=yes
Ranged=yes            ; The following tags are required to keep this proj on course
ProjectileRange=5      ; Keep below 64 or the missile may miss and ignore Ranged=yes
Proximity=yes         ; Mostly so it again doesn't fly off the map
Floater=yes            ; Projectiles do not move vertically, like Level
ROT=20               ; ROT=1 has very undesireable consequences and low can be just as bad, so keep it at 20
CourseLockDuration=35   ; However many frames the projectile can fly at max taking into consideration Acceleration
Acceleration=10         ; Going below 6 stops it from firing straight like Level


weapon
Code:
;Nation Australia
[RiptideTorpedo]
Damage=100
ROF=120
Range=4
Projectile=RipTorpedo
Speed=25 ;18
Report=SubAttack
Warhead=RipSplash
DecloakToFire=no


WH
Code:
[RipSplash]; for units whose missiles are having trouble hitting
CellSpread=.5
PercentAtMax=.8
Wall=yes
Wood=yes
Verses=0%,0%,0%,0%,0%,0%,0%,0%,0%,0%,0%,0%,0%
Conventional=yes
InfDeath=3
AnimList=S_CLSN16,S_CLSN22,S_CLSN30,S_CLSN42,S_CLSN58
ProneDamage=50%
Versus.ShipHeavy=100%
Versus.ShipLight=75%
Versus.NAVALYARD=60%


vehicle code - take not of locomotor
Code:
[Riptide]
;WaterImage=DEST
UIName=Name:Riptide
Name=Landing Craft
Primary=VulcanRip
Secondary=RiptideTorpedo
Prerequisite=GAWEAP
Strength=300
MoveToShroud=yes
Category=Transport
DeployTime=.022
Armor=Light
Turret=no
IsTilter=yes
TechLevel=4
Sight=6
PipScale=Passengers
Speed=6
;;;CanBeach=yes
Naval=no
Weight=1
CrateGoodie=no
Owner=British,French,Germans,Americans,Alliance,Canada,Australia,SouthAfrica
RequiredHouses=Australia
AllowedToStartInMultiplayer=yes
Cost=900
Soylent=900
Points=15
ROT=5
Crusher=no ;gs yes
Passengers=5
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
VoiceSelect=HoverAlliedSelect
VoiceMove=HoverAlliedMove
VoiceAttack=HoverAlliedMove
VoiceFeedback=
DieSound=GenVehicleDie
MoveSound=LandingCraftMoveStart
EnterTransportSound=EnterTransport
LeaveTransportSound=ExitTransport
Maxdebris=3
;;;;;SpeedType=Amphibious
;;;;;Locomotor={4A582741-9839-11d1-B709-00A024DDAFD1}
;;;;;MovementZone=AmphibiousCrusher
;;;Locomotor={2BEA74E1-7CCA-11d3-BE14-00104B62A16C};{4A582741-9839-11d1-B709-00A024DDAFD1}
;;;;SpeedType=FloatBeach
;;;;MovementZone=WaterBeach
SpeedType=Hover
Locomotor={4A582742-9839-11d1-B709-00A024DDAFD1}
;Locomotor={4A582744-9839-11d1-B709-00A024DDAFD1}
MovementZone=Amphibious ; gs AMphibiousDestroyer I can't have a destroyer zone without a weapon!
ThreatPosed=3   ; This value MUST be 0 for all building addons
DamageParticleSystems=SparkSys,SmallGreySSys
SpecialThreatValue=1
ZFudgeColumn=7
ZFudgeTunnel=13
SizeLimit=2
Size=16
TooBigToFitUnderBridge=true
VeteranAbilities=STRONGER,FIREPOWER,SIGHT,FASTER
EliteAbilities=SELF_HEAL,STRONGER,FIREPOWER,ROF
;Bombable=no
Trainable=yes
StupidHunt=yes ;this guy can't handle a hunt command, so he should just run towards the player
Bunkerable=no; Units default to yes, others default to no
Turret=no


[/img]

Back to top
View user's profile Send private message
AnimalMan
Chem Warrior


Joined: 06 Feb 2018
Location: London, England

PostPosted: Tue Feb 20, 2018 6:58 pm    Post subject: Reply with quote  Mark this post and the followings unread

I fixed the issue by removing SUBT and replacing with my already built RIPT code.

here it is to help others

same as BBBLELRG2 ARTMD

Code:
[BBBLELRG2]
Rate=450
Flat=yes
Layer=surface  ; SJM: Lower than ground -- go under ships


Code:
[RIPT]; sub torp
Trailer=BBBLELRG2
Voxel=yes
Flat=yes   ; SJM: Blit with ZGRAD_GROUND.  With luck, missile will appear to go under ships.


I don't  know why.

but it works now. with this identical match of SUBT.


Funny that, now my projectile is invisible :hmm


EDIT


SubT does not like to work, and RipT despite having its own vxl and hva - works correctly - but displays no projectile image or trail.

Back to top
View user's profile Send private message
AnimalMan
Chem Warrior


Joined: 06 Feb 2018
Location: London, England

PostPosted: Tue Feb 20, 2018 7:29 pm    Post subject: Reply with quote  Mark this post and the followings unread

After some more testing I worked out that the problem is coming with the Voxel

Code:

[ript]; sub torp
Image=TORPEDO
Trailer=BBBLELRG
;Voxel=yes
Flat=yes   ; SJM: Blit with ZGRAD_GROUND.  With luck, missile will appear to go under ships.


This code works, but is not using a good Torpedo SHP for the job.

Back to top
View user's profile Send private message
AnimalMan
Chem Warrior


Joined: 06 Feb 2018
Location: London, England

PostPosted: Tue Feb 20, 2018 8:00 pm    Post subject: Reply with quote  Mark this post and the followings unread



more undesireable effects Sad

Back to top
View user's profile Send private message
AnimalMan
Chem Warrior


Joined: 06 Feb 2018
Location: London, England

PostPosted: Tue Feb 20, 2018 8:08 pm    Post subject: Reply with quote  Mark this post and the followings unread

Okay




So after all of that


I have torpedo code where all works but the image Smile (Still get the trail)
Code:

[ript]; sub torp
Image=patriot
Trailer=BBBLELRG
;Voxel=yes
Flat=yes   ; SJM: Blit with ZGRAD_GROUND.  With luck, missile will appear to go under ships.


straight up copy of the Torpedo with new image
Code:
[RipTorpedo]
Arm=2
Shadow=no
;Proximity=yes
Ranged=yes
Image=ript
ROT=12 ;4
AA=no
;AN=yes
AG=yes
;AS=yes
Level=yes


This is good function, torpedos blow up on land, and fire straight lines in the water as the original.

I just need to work out how to put an image on it.

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


Joined: 16 Aug 2006
Location: Germany

PostPosted: Tue Feb 20, 2018 9:05 pm    Post subject: Reply with quote  Mark this post and the followings unread

SHP projectiles work different than VXL projectiles.
SHPs start horizontal
VXL start according to the set FireAngle (though not sure exactly. In TS they can also start vertical)

Test the VXL projectile with a high height on the units *FireFLH value and check the projectile path. It most likely starts flying downwards and thus hits the ground when using a low height on your FireFLH.

Last edited by Lin Kuei Ominae on Tue Feb 20, 2018 9:10 pm; edited 1 time in total

Back to top
View user's profile Send private message
Starkku
Cyborg Commando


Joined: 28 Dec 2007
Location: Finland

PostPosted: Tue Feb 20, 2018 9:08 pm    Post subject: Reply with quote  Mark this post and the followings unread

Lin Kuei Ominae wrote:

VXL start according to the set FireAngle (though not sure exactly. In TS they can also start vertical)


Hardcoded to start vertical/downwards in RA2/YR.

_________________

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID Twitter Channel URL
AnimalMan
Chem Warrior


Joined: 06 Feb 2018
Location: London, England

PostPosted: Wed Feb 21, 2018 2:41 am    Post subject: Reply with quote  Mark this post and the followings unread

Quote:
SHP projectiles work different than VXL projectiles.
SHPs start horizontal
VXL start according to the set FireAngle (though not sure exactly. In TS they can also start vertical)

Test the VXL projectile with a high height on the units *FireFLH value and check the projectile path. It most likely starts flying downwards and thus hits the ground when using a low height on your FireFLH.
Last edited by Lin Kuei Ominae on Yesterday, at 9:10 pm; edited 1 time in total



When primaryfireheight is set to 150 - and there is no projectile image - the trail shows that the projectile is as you said - heading towards the ground gradually.  Switching the voxel on from this height detonates the torpedo as soon as its fired.







and in regards to hardcode - I noticed that changing the damage of my torpedo weapon from 100 - to 75 - changed its " HIT " explosion effect.

Back to top
View user's profile Send private message
AnimalMan
Chem Warrior


Joined: 06 Feb 2018
Location: London, England

PostPosted: Wed Feb 21, 2018 2:47 am    Post subject: Reply with quote  Mark this post and the followings unread

what I am establishing is that -

Voxel Projectiles + Hover Units = No

Yet i still cant get an SHP image to display


Created the Patriot art entry that uses the large (I think unused)  missile graphic found in the base game.
Code:

[PATRIOT]
Trailer=DURASMOKE
;SpawnDelay=2;1
Rotates=yes


Gave the image to my working torpedo version
Code:

[ript]; sub torp
Image=PATRIOT
Trailer=BBBLELRG
;Voxel=yes
Flat=yes   ; SJM: Blit with ZGRAD_GROUND.  With luck, missile will appear to go under ships.
Rotates=yes


But is a no show in game.

Back to top
View user's profile Send private message
AnimalMan
Chem Warrior


Joined: 06 Feb 2018
Location: London, England

PostPosted: Wed Feb 21, 2018 3:32 am    Post subject: Reply with quote  Mark this post and the followings unread



After looking through ares (to find no fix) I did get some ideas of how to do a SHP projectile. And so as you can see - the issue is resolved Smile


Thanks for all the help guys. A lot of interesting routes to go down.




Theres only one thing left to say guys



RipSplash.wav
 Description:
Thanks for the help
 Filesize:  115.29 KB
 Viewed:  3071 Time(s)


Right Click To Download This File



Last edited by AnimalMan on Wed Feb 21, 2018 3:39 am; edited 1 time in total

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


Joined: 14 Sep 2006
Location: Limbo

PostPosted: Wed Feb 21, 2018 3:36 am    Post subject: Reply with quote  Mark this post and the followings unread

I don't know how you're having such an issue, SUBT shows up just fine for me; But yes, Fly and Hover units seem to default to dropping projectiles and FireAngle can't change that. Anything else on the other hand are hardcoded to 50. Westwood just needed more communication between each other...

You can try having a projectile use Splits=yes, Cluster=1, AirburstWeapon=SubTorpedo, but I haven't been able to get it to work, even with FLH at 0,0,-120 to counter Hover.

_________________
"Don't beg for things; Do it yourself or you'll never get anything."

Back to top
View user's profile Send private message Send e-mail YouTube User URL
AnimalMan
Chem Warrior


Joined: 06 Feb 2018
Location: London, England

PostPosted: Wed Feb 21, 2018 3:42 am    Post subject: Reply with quote  Mark this post and the followings unread

Quote:
I don't know how you're having such an issue, SUBT shows up just fine for me


you are certain you are using a hover unit?

Could you please put the entire code of your working version (including dummy unit) that uses vxl projectile for me please Smile


I would love to see it and likely use it




Code:
You can try having a projectile use Splits=yes, Cluster=1, AirburstWeapon=SubTorpedo, but I haven't been able to get it to work, even with FLH at 0,0,-120 to counter Hover.


In what way is it not working? Instant explosion or not performing split and transforming into torpedo?

Back to top
View user's profile Send private message
AnimalMan
Chem Warrior


Joined: 06 Feb 2018
Location: London, England

PostPosted: Wed Feb 21, 2018 4:04 am    Post subject: Reply with quote  Mark this post and the followings unread

Quote:
-120 to counter Hover


-120 to counter hover you say. :hmm

this is the code for the units primary in the screenshot that uses an SHP torpedo projectile and will discharge early using a voxel.

Code:
;Nation Australia
[Riptide]
Cameo=Ripicon
Voxel=yes
UseBuffer=yes
Remapable=yes
;ShadowIndex=2 ;order of voxels got changed
;PrimaryFireFLH=0,0,50
SecondaryFireFLH=150,0,0


notice my weapon is actually a secondary, the primary is to be set to a machine gun later on.

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


Joined: 28 May 2013

PostPosted: Wed Feb 21, 2018 4:29 am    Post subject: Reply with quote  Mark this post and the followings unread

In IDs always use capital letters like RIPT or RIPTIDE.

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


Joined: 14 Sep 2006
Location: Limbo

PostPosted: Wed Feb 21, 2018 4:16 pm    Post subject: Reply with quote  Mark this post and the followings unread

Revision of my code; no I couldn't get Splits to cooperate, but here's an easier way, 1 weapon:
Code:
;Artmd.ini
[SUBTP]; shp sub torp
Trailer=BBBLELRG
Rotates=yes
Flat=yes
Layer=ground

;Rulesmd.ini
[AmphibTorpedo]
Damage=100
ROF=60
Range=9
Projectile=LandTorpedo
ProjectileRange=11
Speed=100
Report=SeawolfAttack
Warhead=APSplash

[LandTorpedo]
Arm=2
Shadow=no
Image=SUBTP
FirersPalette=yes
SubjectToCliffs=yes
SubjectToElevation=no
SubjectToWalls=yes
AG=yes
Ranged=yes
Proximity=yes
Floater=yes
ROT=1
Acceleration=3


But since all you seem to be having now is an image problem, just use the SUBTP as an example for a SHP projectile. I'll even include one.



subtp.shp
 Description:

Download
 Filename:  subtp.shp
 Filesize:  3.37 KB
 Downloaded:  7 Time(s)


_________________
"Don't beg for things; Do it yourself or you'll never get anything."

Back to top
View user's profile Send private message Send e-mail YouTube User URL
AnimalMan
Chem Warrior


Joined: 06 Feb 2018
Location: London, England

PostPosted: Wed Feb 21, 2018 4:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

:O I torpedo SHP, just as I was making my own from scratch. Thank you General. I will keep you posted if and when I start to play with splits and airbursts.

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