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

4 Resources Using Multiboard

Status
Not open for further replies.
Level 3
Joined
Mar 23, 2006
Messages
33
I. Summary

I've just picked up an old copy of the first Age of Empires game and I am marveled at the complexity of acquiring and managing four different resources.

I realize that Genesis of Empires II (http://epicwar.com/maps/5625/) has accomplished a system with more than the two standard resources.

I think using a multiboard would work the best. This way I could ignore the two standard melee game resources (gold and lumber) and I could use those slots for something else.

Does anyone know how this could work? Could someone provide a script to get me started? All help is appreciated.

III. Harvesting Resources

In Genesis of Empires II a player would use an ability on a resource (iron ore, seaweed, wheat etc.) and an integer would be stored on the multiboard. The game included more than four resources. The problem with this is that you could gather resources anywhere on the map and it would be instantly stored in your multiboard (you would acquire the resources instantaneously) rather than having peasants collecting them and returning them to a Town Hall, or a Lumber Mill.

_____________________________________

The topic has been posted in the Trigger (GUI) Forum: http://www.hiveworkshop.com/forums/showthread.php?t=38958

You can see the images here.
 
Last edited:
Level 3
Joined
Mar 23, 2006
Messages
33
Jass is needed to display unique variables for different players on a multiboard. Got it.

I'm still figuring the multiboard out.

So once you have the variable, where do you put it in the multiboard script (so that it shows up different for each player, depending on what resources they have)?
 
Last edited:
So... Jass is needed to display unique variables for different players on a multiboard.
Jass is needed to show each player their own multiboard.


So once you have the variable, where do you put it in the multiboard script (so that it shows up different for each player, depending on what resources they have)?

First you have to create a Multiboard for each player using a Multiboard Array Variable. Then you add the integers(resources) from each player to their multiboard.
Heres a Example:
  • Example
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- Player 1 --------
      • Multiboard - Create a multiboard with 1 columns and 1 rows, titled Resources
      • Set MB_Resources[1] = (Last created multiboard)
      • Multiboard - Set the text for MB_Resources[1] item in column 1, row 1 to (String(IntWood[(Player number of (Player(1)))]))
      • Multiboard - Hide MB_Resources[1]
      • -------- Player 2 --------
      • Multiboard - Create a multiboard with 1 columns and 1 rows, titled Resources
      • Set MB_Resources[2] = (Last created multiboard)
      • Multiboard - Set the text for MB_Resources[2] item in column 1, row 1 to (String(IntWood[(Player number of (Player(2)))]))
      • Multiboard - Hide MB_Resources[2]
      • -------- etc. --------
Now for showing each player their multiboard:
  • Custom script: if GetLocalPlayer() == Player(0) then
  • Multiboard - Show MB_Resources[1]
  • Custom script: endif
Player(0) means Player 1 it just starts with zero.
 
Level 3
Joined
Mar 23, 2006
Messages
33
Thanks a lot. An example is always great.

Would I just copy what you did for Wood in the multiboard for each resource?

Do I need to make a script for each different resource as well? Such as the following you provided earlier?

Set IntWood[(Player number of (Owner of (Triggering unit)))] = (IntWood[(Player number of (Owner of (Triggering unit)))] + X)

And lastly, is a tree (wood source) a unit that a player owns? Just so I understand you fully.
 
Level 3
Joined
Mar 23, 2006
Messages
33
Chaos Overlord, do you know a way to make four different resources?

Ages of Empires I includes the Gold, Wood, Stone and Food resources.

Send me a private message, or reply in this post. Your help would be great!
 
Status
Not open for further replies.
Top