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

Do you want to advertise at Project Perfect Mod. Find out how to do it HERE.

The time now is Sat Jan 28, 2023 2:00 pm
All times are UTC + 0
 Forum index » Modding Central » Red Alert 2 Editing Forum
Can make teleport use ammo ?
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [10 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Catto
Medic


Joined: 05 Dec 2022
Location: Kittstanbul

PostPosted: Mon Dec 05, 2022 12:45 pm    Post subject:  Can make teleport use ammo ?
Subject description: like RA 1 Chrono Tanks
Reply with quote  Mark this post and the followings unread

Idea was to make a tank that will able to teleport when deployed, then immediately turns back into normal traveling unit after teleporting.
In order to limit when it can teleport will only able to deploy when having one ammo, which is reserved to be used for this purpose alone.

I could use some helpful pointers on how exactly this can be achieved.
If there is another way of limiting when it can teleport other than besides using ammo, do also please tell me.

Here is what i have so far:
Code:

; Chrono Phalanx
[PHAL]
UIName=Name:PHAL
Name=Chrono Phalanx
Image=PHAL
Prerequisite=GAWEAP,GAROBO,GATECH
Primary=ChronoMissile
Strength=240
Category=AFV
Armor=heavy
Turret=no
IsTilter=no
TiltsWhenCrushes=no
Crusher=yes
TooBigToFitUnderBridge=true
TechLevel=6
Sight=6
Speed=5
CrateGoodie=no
Owner=British,French,Germans,Americans,Alliance
Cost=1500
Soylent=1500
Points=30
ROT=5
IsSelectableCombatant=yes
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
VoiceSelect=RobotTankSelect
VoiceSelectDeactivated=RobotTankSelectDeactivated
VoiceMove=RobotTankMove
VoiceAttack=RobotTankAttackCommand
VoiceFeedback=
DieSound=RobotTankDie
MoveSound=RobotTankMoveStart
ActivateSound=RobotTankOnline
DeactivateSound=RobotTankOffline
CrushSound=TankCrush
MaxDebris=2
SpeedType=Hover
Locomotor={4A582742-9839-11d1-B709-00A024DDAFD1}
MovementZone=AmphibiousDestroyer
ThreatPosed=45
DamageParticleSystems=SparkSys,SmallGreySSys
VeteranAbilities=STRONGER,FIREPOWER,SIGHT,FASTER
EliteAbilities=SELF_HEAL,STRONGER,FIREPOWER,ROF
Accelerates=false
ImmuneToVeins=yes
Size=4
OpportunityFire=yes
AllowedToStartInMultiplayer=no
ImmuneToPsionics=yes
ImmuneToRadiation=yes
PoweredUnit=no
Trainable=no
;BuildTimeMultiplier=1.3
UIDescription=DESC:PHAL
CameoPriority=17
PoweredBy=GAROBO
PreventAttackMove=yes
MoveToShroud=no
ChronoInSound=ChronoLegionTeleport
ChronoOutSound=ChronoLegionTeleport
; Teleporter=yes
Ammo=1
PipScale=Ammo
; ReloadIncrement=0%
Reload=750 ; 30 seconds
EmptyReload=0 ; no delay, begin immediate
InitialAmmo=1
; need to tie deploy into having Ammo here
; probably will need weapon that fires on deploy, uses up ammo
; Secondary=PhalTeleporter
IsSimpleDeployer=yes
; Convert.Deploy=TELEPHAL

; i suppose this can work
; yepp, checked and it works but need to turn it back after TP
; currently its stuck in teleporter mode after deploying once
[TELEPHAL]:[PHAL]
Image=PHAL
Locomotor={4A582747-9839-11d1-B709-00A024DDAFD1}
AllowedToStartInMultiplayer=no
GroupAs=PHAL
ReversedAs=PHAL
TechLevel=-1

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


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Mon Dec 05, 2022 1:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

I dont think it's possible to implement the same system as the RA1 Chrono tank. You'd have to use some weird workaround to get anything close.

The closest thing that comes to mind would be to give the unit a weapon that spawns a copy of itself & kills the original. It would sort of look like its "teleporting" but you'd get a fresh new unit every time.
_________________



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
Catto
Medic


Joined: 05 Dec 2022
Location: Kittstanbul

PostPosted: Mon Dec 05, 2022 4:00 pm    Post subject: Reply with quote  Mark this post and the followings unread

Huh. Weird.

The main reason i wanted to implement this was as a means of balancing a friggin mlrs capable of teleporting into your base at will.
Suppose i will have to find other means of balancing this idea then, perhaps if i can find a means of making the unit suffer more damage after teleport, coupled with making it take longer to finish teleportation then it might work.

The second reason was a unit with the teleport locomotor will only zip to everywhere, never using normal movement.
The unit as i had in mind was to capable of function in concert with the Robot Tanks as it too would be hovering and robotical.

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


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Mon Dec 05, 2022 4:53 pm    Post subject: Reply with quote  Mark this post and the followings unread

You could make [PHAL] drive around normally & then [TELEPHAL] the teleporting version. The player can then switch between the two options, it wont stop the player from just switching modes & teleporting every were tho. Note that the AI wont be able to switch between the two, so take that into account.

AFAIK Convert.Deploy= overrides DeployFire= so it's not possible to link the two & limit the deploy ability to the ammo count.
_________________



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
Catto
Medic


Joined: 05 Dec 2022
Location: Kittstanbul

PostPosted: Mon Dec 05, 2022 8:22 pm    Post subject: Reply with quote  Mark this post and the followings unread

Hmm, i suppose something like this can be made to work. I will need help however.

Current issues are:
It comes out the Weap having full ammo despite been told to start with no ammo. Also the weapon on deploy didnt use up the Ammo, can guess its because has failed to fire alltogether then.
Upon deploying cannot do anything, i can guess its because the weapon needs to be setup differently.
Im unsure if that is correct code for a weapon that will only auto-fire on self at deploying.

Code:

; Chrono Phalanx
[PHAL]
UIName=Name:PHAL
Name=Chrono Phalanx
Image=PHAL
;Prerequisite=GAWEAP,GAROBO,GATECH
Prerequisite=GAWEAP,GAROBO
Primary=ChronoMissile
Strength=240
Category=AFV
Armor=heavy
Turret=no
IsTilter=no
TiltsWhenCrushes=no
Crusher=yes
TooBigToFitUnderBridge=true
TechLevel=6
Sight=6
Speed=5
CrateGoodie=no
Owner=British,French,Germans,Americans,Alliance
Cost=1500
Soylent=1500
Points=30
ROT=5
IsSelectableCombatant=yes
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
VoiceSelect=RobotTankSelect
VoiceSelectDeactivated=RobotTankSelectDeactivated
VoiceMove=RobotTankMove
VoiceAttack=RobotTankAttackCommand
VoiceFeedback=
DieSound=RobotTankDie
MoveSound=RobotTankMoveStart
ActivateSound=RobotTankOnline
DeactivateSound=RobotTankOffline
CrushSound=TankCrush
MaxDebris=2
SpeedType=Hover
Locomotor={4A582742-9839-11d1-B709-00A024DDAFD1}
MovementZone=AmphibiousDestroyer
ThreatPosed=45
DamageParticleSystems=SparkSys,SmallGreySSys
VeteranAbilities=STRONGER,FIREPOWER,SIGHT,FASTER
EliteAbilities=SELF_HEAL,STRONGER,FIREPOWER,ROF
Accelerates=false
ImmuneToVeins=yes
Size=4
OpportunityFire=yes
AllowedToStartInMultiplayer=no
ImmuneToPsionics=yes
ImmuneToRadiation=yes
PoweredUnit=no
Trainable=no
;BuildTimeMultiplier=1.3
UIDescription=DESC:PHAL
CameoPriority=17
PoweredBy=GAROBO
PreventAttackMove=yes
MoveToShroud=no
ChronoInSound=ChronoLegionTeleport
ChronoOutSound=ChronoLegionTeleport
; Teleporter=yes
Ammo=1
PipScale=Ammo
; ReloadIncrement=0%
Reload=750 ; 30 seconds
EmptyReload=0 ; no delay, begin immediate
; game disrespects given key and spawns with 1 ammo anyways, why ?
InitialAmmo=0 ; has to null because see below
; need to tie deploy into having Ammo here
; weapon that fires on deploy, uses up ammo
Secondary=PhalConverter
DeployFireWeapon=1
DeployFire=yes
IsSimpleDeployer=yes
; Convert.Deploy=TELEPHAL

; i suppose this can work
[TELEPHAL]:[PHAL]
Image=PHAL
Locomotor={4A582747-9839-11d1-B709-00A024DDAFD1}
AllowedToStartInMultiplayer=no
GroupAs=PHAL
ReversedAs=PHAL
TechLevel=-1
; automatically convert back to
; normal version after teleportation
; Convert.Land=PHAL
; Convert.Water=PHAL
; nope, it has to be after TP
WarpInWeapon=PhalConverter2

; actually does not use up Ammo, why ?
[PhalConverter]
Ammo=1
Damage=1
ROF=100
Range=1
Projectile=Invisible
Warhead=DummyWarhead
Speed=999
Converts=true             ; boolean
Converts.From=PHAL       ; list of tehnoTypes
Converts.To=TELEPHAL   ; list of TechnoTypes

[PhalConverter2]
; since Telephal has no Ammo
Ammo=0
Damage=1
ROF=100
Range=1
Projectile=Invisible
Warhead=DummyWarhead
Speed=999
Converts=true
Converts.From=TELEPHAL
Converts.To=PHAL

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


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Tue Dec 06, 2022 8:15 am    Post subject: Reply with quote  Mark this post and the followings unread

EmptyReload= is set to 0 which means it will instantly reload when it has no ammo, set it to 750 or just remove it to make it use Reload= instead.

WarpInWeapon=, Converts=, Converts.From= & Converts.To=
Are not code used by Red Alert 2 or the Ares, Phobos & Kratos expansions, where did you get this code from? If you just made it up yourself then that wont work.

As I said before Convert.Deploy= & DeployFire= can't be linked together. The game can only use one deploy function at a time & will override/ignore any others.
_________________



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
Catto
Medic


Joined: 05 Dec 2022
Location: Kittstanbul

PostPosted: Tue Dec 06, 2022 9:02 am    Post subject: Reply with quote  Mark this post and the followings unread

WarpInWeapon is from here:
https://github.com/Phobos-developers/Phobos/blob/develop/docs/New-or-Enhanced-Logics.md
search for 'Weapons fired on warping in / out'

turns out this batch of
Converts=
Converts.From=
Converts.To=
are from:
https://github.com/Phobos-developers/Phobos/pull/369
so they perhaps arent present yet.
Also i have mistyped them with an s

Convert.Deploy= is ;commented out and not in use.
leftover of previous attempt(s)

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


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Tue Dec 06, 2022 10:35 am    Post subject: Reply with quote  Mark this post and the followings unread

WarpInWeapon= is currently only available in the Pre-release test version of Phobos. Convert= is still being worked on & is only in a specific test branch of Phobos.

You should use the documentation here to see what is in the current stable release of Phobos.
_________________



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
Catto
Medic


Joined: 05 Dec 2022
Location: Kittstanbul

PostPosted: Tue Dec 06, 2022 12:55 pm    Post subject: Reply with quote  Mark this post and the followings unread

Mig Eater wrote:
WarpInWeapon= is currently only available in the Pre-release test version of Phobos. Convert= is still being worked on & is only in a specific test branch of Phobos.

You should use the documentation here to see what is in the current stable release of Phobos.


Ah, thanks. I was looking on the github docs, hence the confusion.
Well, im looking forward to when they get implemented, will give this idea another shot then.

Back to top
View user's profile Send private message
silverwind
Flamethrower


Joined: 11 Jun 2016

PostPosted: Thu Dec 08, 2022 7:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

Btw, if you're looking into balancing a teleporting MLRS, there are other ways to do it that don't involve nerfing teleport. My personal favourite is to give artillery units nerfed ROF and movement by default, and then introduce an auxiliary unit (like a supply wagon) that would boost the nerfed stats via AttachEffect when it's within 6 or so cells. This method has useful side effects that I'm sure you can already imagine.

In your case, going this route would make your MLRS much less deadly after teleportation, as it'd get nerfed without the supply unit which can't teleport with it.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [10 Posts] Mark the topic unread ::  View previous topic :: View next topic
 Forum index » Modding Central » Red Alert 2 Editing Forum
Jump to:  
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.1854s ][ Queries: 11 (0.0108s) ][ Debug on ]