• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Custom Food and Power System

Status
Not open for further replies.
I need a custom food system, which disables food limit. The system also needs to work on units preexisted in the map, unlike most other custom food system. (preferably GUI)


In addition, I also need a Custom Power System (based on Yuri's Revenge variant). In the system, the power is generated by power generators (obviously) and powers the structures of the power generators' owners.

If the power generated is not sufficient to power the base(s) (low power), most defensive structures and all superweapons will malfunction and upgrade and production structures will perform their tasks slower than usual. However, there are still some defensive structures which can function even the power is low.

The custom power system doesn't have a limit, like Yuri's Revenge variant did. Oh, and the custom power system should work on structures preexisted in the map.
 
Level 12
Joined
May 20, 2009
Messages
822
requests belong in request forum.

What if he's asking how to make it? =0

To make the power system, the first thing you need is to index all the buildings you want to require power and then index a value for it that is their power cost. It can be easily set up to index units pre-placed on the map. In fact, you could probably modify the other system to do that.

Next, you add up all the structure's power cost to a players "Power Drain" variable. You also have some structures set up to provide power, of course.

And if "Power Source" < "Power Drain" then do the turn off effects.

But I'm not sure if you can speed up/slow down unit/upgrade production... I think those values are fixed and cannot be changed via trigger and cannot be slowed down or sped up. Only set to a specific % completion.

I would think a similar setup for the Food System, except if a unit starts training and the value "Current Food" > "Food Max" then you cancel the training and display a phony message and sound.
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
What if he's asking how to make it? =0

To make the power system, the first thing you need is to index all the buildings you want to require power and then index a value for it that is their power cost. It can be easily set up to index units pre-placed on the map. In fact, you could probably modify the other system to do that.

Next, you add up all the structure's power cost to a players "Power Drain" variable. You also have some structures set up to provide power, of course.

And if "Power Source" < "Power Drain" then do the turn off effects.

But I'm not sure if you can speed up/slow down unit/upgrade production... I think those values are fixed and cannot be changed via trigger and cannot be slowed down or sped up. Only set to a specific % completion.

I would think a similar setup for the Food System, except if a unit starts training and the value "Current Food" > "Food Max" then you cancel the training and display a phony message and sound.

You can change the units upgrade speed but it is a costly trigger to do many units through triggers.
 
Status
Not open for further replies.
Top