-
Notifications
You must be signed in to change notification settings - Fork 990
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Mechanic] Weapon Warmups / Charge Times #9972
Comments
Actually there's already a way you can do pretty much the same thing, using the outfit "Cromha's Charging Beam Weapon"
category Weapon
weapon
lifetime 1
"burst count" 6000
"burst reload" 500
reload 1 This weapon would be a beam, that can fire every 500 frames, for 6000 frames. You could also change the outfit "Cromha's Charging Particle Weapon"
category Weapon
weapon
lifetime 120
"burst count" 30
"burst reload" 500
reload 10 But it's true that having specific attributes just for that, would be better, but it'd also add more interesting attributes that'd give more possibilities for weapons! Especially for the charging sounds and other stuff like that that're "cosmetic". |
I don't think that would do the same thing. You wouldn't be able to have damage or velocity/lifetime vary with charge rate, nor could you have resource costs apply during the charge time. You also wouldn't be able to have warmup times, as burst reload treats the first firing as though the reload counter has already run down. |
I agree. |
I can already think of a weapon to make. An EMP pulse that radiates in all directions, like a blast, from your ship. The charge would drain your energy but deal a massive amount of ion and scrambling damage. The longer you charge the more damage and/or range. |
Problem Description
Weapons that you can hold the fire key to charge up, then release to fire would be neat. Weapons that need to warm up or charge up before firing are classic in scifi, usually associated with powerful cannons or lasers and whatnot, but there isn't really a way to do them in Endless Sky in a way that 'feels' right. Burst fire can be used to approximate an intermittent firing weapon, but the sense of charging up a weapon with a lot of energy and then releasing it is lost.
With a handful of attributes, we could have weapons like a synchotron cannon that needs to reach a certain charge threshold before it can fire, ionizing your ship the entire time, or a laser that increases in damage the longer you keep its beam firing. Or even a gatling gun that simply needs to warmup before it can fire, but from there can shoot as long as you want it to at a fixed rate of damage.
Related Issue Links
#902
#982
These don't go into too much detail about how a charge shot system would actually work, and I think this proposal has a few attributes in it that would enable much more flexibility.
Desired Solution
A few new attributes that are used to allow this kind of behavior
charge rate
in charge/frame, to set how quickly the weapon charges when the fire key is held downcharge decay
in charge/frame, to set how quickly charge decays if the fire key is released before firingcharging energy/heat/etc
in value/frame and similar attributes for the other "energy" and damage types, applied every frame the fire key is heldcharge threshold
to set the minimum charge needed to fire. Releasing the fire key before this point just causes the charge to decaycharge limit
to set the maximum charge the weapon can storecharge release
(name TBR) if this attribute is present, the weapon automatically fires when thecharge threshold
is reached, even if the fire key is not released. Effectively caps charge to thecharge threshold
for weapons that use it, but also allows for non-single-shot behavior.firing charge
removes this amount of charge when the weapon fires. By default this could be equal to the charge limit, so you'd have to restart charging from 0 every time you fire, but setting this to 0 and usingcharge release
could be used to create a weapon that warms up and then continually fires maybe?charge lifetime
adds this amount multiplied by the charge level to the lifetime of the created projectilecharge velocity
adds this amount multiplied by the charge level to the velocity of the created projectileAll damage types set for this weapon are multiplied by the amount of charge the weapon currently has. So, if you gave a weapon a
charge limit
of 100 and ahull damage
of 1, at its full charge the shot it released would deal 100 hull damage. I've kept lifetime and velocity separate from this, with their own attributes, since I think you might want to uselifetime
andvelocity
as baseline values and have the charge attribute add to them.Of course, we could separate out
charge hull damage
andcharge heat damage
and such to all be independent if we wanted to, but that might not be desirable considering how our damage types system is already very repetitive. Of course, now that I'm actually writing this, this might be the best solution when considering things likepiercing
andpenetration count
, which would similarly benefit from independent scaling with charge level.Some non-mechanical attributes
charge sound
this sound is played during the charging processcharge sound pitch
adjust the pitch of the charge sound by this much every frame - I don't actually understand ES sounds that well so this might be unnecessary if you can play a longer loop as thecharge sound
, but I'm under the impression that sounds are played every frame so a longer loop might not work wellcharge effect
spawns this effect at the weapon hardpoint while charging.Alternative Approaches
One potential problem with this approach is that it's mostly geared towards weapons that you charge up and fire once. With
charge release
andfiring charge
you could potentially create weapons that don't follow this model, like a laser that progressively gets more damaging or a gatling gun that takes a bit to spin up before it fires, but I'm not sure if this is the best way to do thatThis also might not work well with submunitions, since I don't think there would be a way for a submunition to know the charge level of the weapon that created its parent. Of course, that might be possible to do, but I'm not sure if a different approach would be more flexible for working with submunitions.
Additional Context
I want a synchrotron cannon damnit.
The text was updated successfully, but these errors were encountered: