Missiles

Information and discussion for custom maps and mods.
Post Reply
zeroth
Posts: 9
Joined: Wed Nov 28, 2018 3:45 am

Missiles

Post by zeroth »

Hey guys, wondering if anyone can help me with this.

I am trying to make missiles behave better in my mod. Could I get some advice on:

1. Missile acceleration
- is it possible to have missiles launched at a low speed and then accelerating to a maximum speed?
- there's a variable in the missile trait that says acceleration but I have never been able to get it to work.

2. Missile trails
- while we can easily add contrails to a missile, what's the best way to add a missile thruster? It would be cool to have a grey contrail as well as a much shorter yellow contrail/fire effect.

Thanks!

abcdefg30
Posts: 641
Joined: Mon Aug 18, 2014 6:00 pm

Re: Missiles

Post by abcdefg30 »

You can see what you can do with missiles here: https://github.com/OpenRA/OpenRA/wiki/Weapons#missile
Multiple contrails are probably doable by making a custom sequence/artwork.

zeroth
Posts: 9
Joined: Wed Nov 28, 2018 3:45 am

Re: Missiles

Post by zeroth »

thanks for the reply.

Yeah, i've referred to that page, but the acceleration doesn't seem to work!

prawda
Posts: 14
Joined: Thu Nov 15, 2018 1:16 pm

Re: Missiles

Post by prawda »

MinimumLaunchSpeed -0c1 1D World Distance Minimum launch speed in WDist / tick. Defaults to Speed if -1.
MaximumLaunchSpeed -0c1 1D World Distance Maximum launch speed in WDist / tick. Defaults to Speed if -1.
Speed 0c384 1D World Distance Maximum projectile speed in WDist / tick
Acceleration 0c5 1D World Distance Projectile acceleration when propulsion activated.

I think you need to reduce the launch speed if you want to have acceleration. If your maximum and minimum launch speed are set to -1, then the launch speed is equal to speed and there is no acceleration necessary.

zeroth
Posts: 9
Joined: Wed Nov 28, 2018 3:45 am

Re: Missiles

Post by zeroth »

Thanks! I'll give it a shot and report back.

I've had trouble understanding the difference between the min and max launch speed.

I assume the "speed" parameter is the max cruise speed?

zeroth
Posts: 9
Joined: Wed Nov 28, 2018 3:45 am

Re: Missiles

Post by zeroth »

Ok, I got it to work as you have suggested:
- maxlaunchspeed is the "launch speed", defaults to speed if it is -1. As long as this is less than "speed" and more than 0, it will accelerate.
- speed is "max speed"
- acceleration is acceleration.
- minlaunchspeed (can't figure out the function of this, works if I left it at default).

prawda
Posts: 14
Joined: Thu Nov 15, 2018 1:16 pm

Re: Missiles

Post by prawda »

At launch of a missile it is calculated how much turning is necessary to let the missile face the target. If a lot is necessary the missile is launched slower so that it can do the turning faster. If the the facing is fine at launch, it is launched at higher speed. This calculcated speed is then clamped by minlaunchspeed and maxlaunchspeed. This means that a high minlaunchspeed means a missile will fly a big circle to turn around after launch if it is misaligned and a low maxlaunchspeed means a missile has to accelerate after launch.
In most cases this does not matter, because most units have attackfrontal or attackturreted, in both cases the unit or its turret align with targetline before firing... But if you use attackomni or have a target that passes by fast, then it can make a difference.

I wanted to give this additional info much earlier, but my windows auto updated and the browser tab with the half written answer was gone :D

zeroth
Posts: 9
Joined: Wed Nov 28, 2018 3:45 am

Re: Missiles

Post by zeroth »

Ahh interesting info!

I think next I want to experiment something like a missile ejected out before the propulsion fires (like how subs launch ballistic missiles).

Thanks dude!

Post Reply