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

Is it possible to have fractional food costs?

Status
Not open for further replies.

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,887
It's not possible using the standard Warcraft 3 food system, but you could always create your own system.

You'll need a trigger or triggers that do the following:
Get a unit's Custom Food cost so we know how expensive it is.
Get the player's Custom Food to see if they can afford a unit.

This would tie into the training Events: A unit begins training, A unit cancels training, A unit finishes training

The Custom Food resource would be an Integer array that is tied to each Player using their Player Number.
A unit's Custom Food cost or I should really say a Unit-Type's Custom Food cost could be handled in multiple ways. A Hashtable that links the Unit-Type id to the Cost would make the most sense to me.
 
Last edited:
Level 9
Joined
Mar 2, 2014
Messages
160
Do not forget you can increase maxium food limit in gameplay constants so instead 0,5 out of 100 u can have 1 food out of 200 and it will be same thing I guess.
 
Status
Not open for further replies.
Top