Page 1 of 1

Tanks to use power?

Posted: Sat Aug 25, 2012 5:53 pm
by salvakiya
I was wondering if there was a way to get a tank to require and consume power?

Posted: Tue Oct 09, 2012 5:30 am
by Proteus
I tried adding RequiresPower to a unit, all it does is prevent them from shooting their weapon if you have low power; they can still move around

Posted: Tue Oct 09, 2012 8:28 pm
by riderr3
Proteus wrote: I tried adding RequiresPower to a unit, all it does is prevent them from shooting their weapon if you have low power; they can still move around
Hmm... what about to create EMP mass weapon effects in OpenRA :)

Posted: Tue Oct 09, 2012 8:41 pm
by tacozmeister
riderr3 wrote:
Proteus wrote: I tried adding RequiresPower to a unit, all it does is prevent them from shooting their weapon if you have low power; they can still move around
Hmm... what about to create EMP mass weapon effects in OpenRA :)
Yes and no. There's no way to cause an EMP without a scripted effect, unless the tank just outright explodes when hit with EMP.

You can make a projectile do "0%" to non-armored units, but 100% to "light" and "heavy", AKA all vehicles. So that would work. But to get an EMP like in the other games which temp disables units, you'd have to change the game's source code to have an instance where, when hit by X projectile, vehicle Y turns into vehicle Z. And after a set amount of time, Z turns back into Y.

Posted: Tue Oct 09, 2012 11:27 pm
by Sleipnir
tacozmeister wrote: you'd have to change the game's source code to have an instance where, when hit by X projectile, vehicle Y turns into vehicle Z. And after a set amount of time, Z turns back into Y.
This is overcomplicating matters. The existing actor disabling code (used by the low power state and manual power down) was written with an eventual EMP effect in mind (to be used by the Ion Cannon in the c&c mod). You can easily add a new IDisable implementation for EMP, and modify the movement code to stop disabled units from moving.

Posted: Wed Oct 10, 2012 1:01 am
by tacozmeister
Sleipnir wrote:
tacozmeister wrote: you'd have to change the game's source code to have an instance where, when hit by X projectile, vehicle Y turns into vehicle Z. And after a set amount of time, Z turns back into Y.
This is overcomplicating matters. The existing actor disabling code (used by the low power state and manual power down) was written with an eventual EMP effect in mind (to be used by the Ion Cannon in the c&c mod). You can easily add a new IDisable implementation for EMP, and modify the movement code to stop disabled units from moving.
Oh! Well. That works too. I don't look ~into~ the code, I just do yaml. Point was: no way to do it with YAML. Was completely unsure, but bottom line it'd involve going into the actual source. Thank you for clarifying :D

Posted: Tue Oct 16, 2012 5:25 am
by salvakiya
actually my idea is to get rid of the use of power completely. Using either Fuel or Influence instead. you would need to capture towns or strategic positions to gain the Fuel/Influence in order to support more tanks and stuff. buildings would no longer require power. they have their own generators XD