Tanks to use power?

is there a way?

Information and discussion for custom maps and mods.
Post Reply
salvakiya
Posts: 36
Joined: Fri Jul 27, 2012 5:26 am

Tanks to use power?

Post by salvakiya »

I was wondering if there was a way to get a tank to require and consume power?

Proteus
Posts: 23
Joined: Wed Jun 08, 2011 2:42 pm

Post 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

User avatar
riderr3
Posts: 98
Joined: Sat Feb 26, 2011 11:26 pm
Location: Camo pillbox
Contact:

Post 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 :)

tacozmeister
Posts: 126
Joined: Tue Jun 26, 2012 3:37 am
Location: St. Louis, MO

Post 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.

User avatar
Sleipnir
Posts: 878
Joined: Wed Apr 10, 2002 11:52 pm
Contact:

Post 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.

tacozmeister
Posts: 126
Joined: Tue Jun 26, 2012 3:37 am
Location: St. Louis, MO

Post 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

salvakiya
Posts: 36
Joined: Fri Jul 27, 2012 5:26 am

Post 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

Post Reply