• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

how can i create a power plant system

Status
Not open for further replies.
Level 21
Joined
Mar 2, 2010
Messages
3,069
i am working on a race that is going to have power plants and buildings that require power. i also need to add something that display the power and the warcraft 3 resources is all in use. the power meter would be shown to everybody independent of race. i dont need ideas but rather help in order to port my ideas to the game. how can i add a power meter and a power plant system?
 
Last edited:
Level 9
Joined
Nov 24, 2013
Messages
524
You need custom models for the batteries, too. The Mana Drain skill is looking good enough.
 
Level 10
Joined
Aug 30, 2007
Messages
270
maybe you could say more about the system itself? How exaclty you want it to work? (e.g. like the pylons (protoss) in SC1/2? or like the power in LEGO:Rock raiders?) Using Mana is a good idea in any case or giving the powersources a aura that only affects buildings and check if a building has power or not and then affect it with a ability based on the frostwyrms freezing attack, maybe?
Do the building need power for different actions or is it just on/off (has power or not), so a building without power won't do anything at all?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,259
Please specify more clearly what you want the power plant system to do.

Specifically explaining these points.
What is a "power plant" in the context of your requirements? Specifically state if it is a unit, an ability or any kind of mapping with the WC3 engine.
What is a "power meter" in the context of your requirements? Specifically state if it is a multiboard, floating text, any kind of mapping with the WC3 engine. Also state what sort of representation should be used (bar/numeric).
What is "power" in the context of your requirements? Specifically state the mechanics of this value. If it requires transport you will need to specify the transport mechanics that are to be used.

Having studied power systems, creating a true power management system would probably require as much or more work that writing WC3 from scratch. It also is highly performance intensive (a ton of high precision and high order matrix solving) so I doubt JASS is suitable for such a system.

Until you clear up what you are asking no one can help you.
 
Level 10
Joined
Aug 30, 2007
Messages
270
ok, as you PMed me about this some time ago, I'm feeling free here to specify what it is about^^:

what andreasaspenberg wants is to recreate the 'Command and Conquer' Power system. As i never played Cnc i had to look for vids or explanations what it is about. What i got was this (plz correct me if I'm wrong): Energy is a additional resource produced in 'Power Plats' ('PP') (I'm assuming periodically), if a PP is build close to 'Blue Crystals' its power production is somehow increased. Also you can build 'accumulators' next to your PP to further increase the power output.
For this part, i would suggest a periodic trigger that loops through the payers counting the powerplants, then which of those are close to blue crystals and which have accumulators close to them and then calculating the total power gain.

Additionally andreasaspenberg wants to have a power bar to visualise your current amount of power (what means that there is a maximum power capacity(?)). He wants it to be located above the minimap (what IMO is a bad idea, not only hard to make i think but also, unless power is the only recource, why don't just make a multiboard-bar so all resources are in one part of the screen?).
 
Level 16
Joined
Nov 7, 2011
Messages
219
I guess I have a system. It's in GUI. Well afterall, what was the point of making a powerplant model if didn't know how to use it? ;)

*have a couple of variables ready, Power_Power(integer), Power_Drain(integer), and Power_Display(string)
*have a trigger count the amount of powerplants/power-producing-structures and have the whole value finalized via "set variable = (Arithmetic) number of power units x power produced by unit type
*agfdidejnd

Goldman it. Typing a reply while on the phone really causes a lot of problems. I''ll try being online tomorrow on a pc so I can elaborate better.

If possible, I might even show you the one I use in my map.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,259
Such a system could easly represent power in a single unit network. It cannot represent power flow through a network (you could have hundreds of power plants running through a single node). Maps like Power TD place heavy emphasis on bottlenecks, with players having to invest heavily on the right infrastructure to make sure they can get all the power to where it is needed.

In real power system networks there are considerable losses with transmission varying with phase imbalance, line length, frequency and voltage.
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
2 months without OP's reply, I think this became useless topic.

DSG, games are meant to be fun, not physics excersises(making cables shorter, which will mean less energy is lost) and not everything in games must reflect real world behaviour
 
Level 16
Joined
Nov 7, 2011
Messages
219
Aw. What a waste. I wanted to share the system I made.

But these guys do have good points though. Having the power provided by powerplants to be affected by distance does seem better. I mean, where's the logic of about 10+ powerplants powering an entire outpost on the other side of the map. It might even level the gameplay a bit too.
 
Status
Not open for further replies.
Top