• 🏆 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!

Useful Survival Systems v. 2.0

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
  • Like
Reactions: M0rbid
This system is made specially for survival maps. You can use the system to other stuffs to but anyways if you use or edit the system I would appreciate credits please.

Construct System
When you have enought lumber/stone to create a structure, you can easily go into your backpack and build
the structure you want to, then the building will be built automatically without your unit needing to stand by.
If you don't have enought lumber/stone and trying to build it you will recive a fail message and nothing else will happen.
Iten Pickup System
Picks up items and put them into an invisible backpack that can only contain a specific number of maximum resources. (Stone_MaxCap & Lumber_MaxCap variables)
When your backpack is full, you will not be able to collect more resources and you will recive a fail message.
This system is hard to configure. (I will try to make it easier to configure in another update).
Different ways to show resources
There are three diffrent ways to show the resources. They are as listed below:
1. Use the MPI Multiboard. You can show/hide the multiboard at any time with these following commands.
Show = -showresources or -sr.
Hide = -hideresources or -hr.

2. You can also use the spell "Show Resources" that will calculate the resources you have and show them to you through a In-Game Message.

3. You can use the command "-resources". This command will calculate the resources you have and show them to you through a In-Game Message.

4. When you pick up an resource (Item) there will appear a Floating Text that shows you this: WhatResource: (CurrentResource / MaxCapacity.)
  • Multiboard Create
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- Setting up the Colors of all the players from 1 to 12 --------
      • Set Temp_PlayerColors[1] = |c00FF0303
      • Set Temp_PlayerColors[2] = |c000042FF
      • Set Temp_PlayerColors[3] = |c001CE6B9
      • Set Temp_PlayerColors[4] = |c00540081
      • Set Temp_PlayerColors[5] = |c00FFFC01
      • Set Temp_PlayerColors[6] = |c00fEBA0E
      • Set Temp_PlayerColors[7] = |c0020C000
      • Set Temp_PlayerColors[8] = |c00E55BB0
      • Set Temp_PlayerColors[9] = |c00959697
      • Set Temp_PlayerColors[10] = |c007EBFF1
      • Set Temp_PlayerColors[11] = |c00106246
      • Set Temp_PlayerColors[12] = |c004E2A04
      • -------- ------------------------------------------------------------------------------------------ --------
      • -------- Calculates how many players that is playing. (Not Computers) --------
      • Set Temp_PlayerGroup = (All players controlled by a User player)
      • Set Temp_PlayerCount = (Number of players in Temp_PlayerGroup)
      • -------- ------------------------------------------------------------------------------------------ --------
      • -------- Creating and setting up the Multiboard for another view of the Resources --------
      • Multiboard - Create a multiboard with 5 columns and Temp_PlayerCount rows, titled Resources (Multiboa...
      • Set Temp_Multiboard = (Last created multiboard)
      • For each (Integer A) from 1 to Temp_PlayerCount, do (Actions)
        • Loop - Actions
          • Set Temp_RowCount = (Temp_RowCount + 1)
          • Multiboard - Set the width for Temp_Multiboard item in column 1, row Temp_RowCount to 10.00% of the total screen width
          • Multiboard - Set the width for Temp_Multiboard item in column 2, row Temp_RowCount to 3.00% of the total screen width
          • Multiboard - Set the width for Temp_Multiboard item in column 3, row Temp_RowCount to 3.00% of the total screen width
          • Multiboard - Set the width for Temp_Multiboard item in column 4, row Temp_RowCount to 3.00% of the total screen width
          • Multiboard - Set the width for Temp_Multiboard item in column 5, row Temp_RowCount to 3.00% of the total screen width
          • Multiboard - Set the display style for Temp_Multiboard item in column 1, row Temp_RowCount to Show text and Hide icons
          • Multiboard - Set the display style for Temp_Multiboard item in column 3, row Temp_RowCount to Show text and Hide icons
          • Multiboard - Set the display style for Temp_Multiboard item in column 5, row Temp_RowCount to Show text and Hide icons
          • Multiboard - Set the icon for Temp_Multiboard item in column 2, row Temp_RowCount to ReplaceableTextures\CommandButtons\BTNStoneArchitecture.blp
          • Multiboard - Set the icon for Temp_Multiboard item in column 4, row Temp_RowCount to ReplaceableTextures\CommandButtons\BTNHumanLumberUpgrade1.blp
          • Multiboard - Set the text for Temp_Multiboard item in column 3, row Temp_RowCount to (0/ + (String(Stone_MaxCap)))
          • Multiboard - Set the text for Temp_Multiboard item in column 5, row Temp_RowCount to (0/ + (String(Lumber_MaxCap)))
          • Player Group - Pick every player in Temp_PlayerGroup and do (Actions)
            • Loop - Actions
              • Multiboard - Set the text for Temp_Multiboard item in column 1, row (Player number of (Picked player)) to (Temp_PlayerColors[Temp_RowCount] + ((Name of (Picked player)) + |r))
              • Hashtable - Save Handle OfTemp_Multiboard as 3 of (Key (Picked player)) in Temp_Hashtable
      • Multiboard - Show Temp_Multiboard
      • Custom script: call DestroyForce (udg_Temp_PlayerGroup)
      • Set Temp_RowCount = 0
      • -------- ------------------------------------------------------------------------------------------ --------
  • Multiboard ShowResources
    • Events
      • Player - Player 1 (Red) types a chat message containing -showresources as An exact match
      • Player - Player 2 (Blue) types a chat message containing -showresources as An exact match
      • Player - Player 3 (Teal) types a chat message containing -showresources as An exact match
      • Player - Player 4 (Purple) types a chat message containing -showresources as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -showresources as An exact match
      • Player - Player 6 (Orange) types a chat message containing -showresources as An exact match
      • Player - Player 7 (Green) types a chat message containing -showresources as An exact match
      • Player - Player 8 (Pink) types a chat message containing -showresources as An exact match
      • Player - Player 9 (Gray) types a chat message containing -showresources as An exact match
      • Player - Player 10 (Light Blue) types a chat message containing -showresources as An exact match
      • Player - Player 11 (Dark Green) types a chat message containing -showresources as An exact match
      • Player - Player 12 (Brown) types a chat message containing -showresources as An exact match
      • Player - Player 1 (Red) types a chat message containing -sr as An exact match
      • Player - Player 2 (Blue) types a chat message containing -sr as An exact match
      • Player - Player 3 (Teal) types a chat message containing -sr as An exact match
      • Player - Player 4 (Purple) types a chat message containing -sr as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -sr as An exact match
      • Player - Player 6 (Orange) types a chat message containing -sr as An exact match
      • Player - Player 7 (Green) types a chat message containing -sr as An exact match
      • Player - Player 8 (Pink) types a chat message containing -sr as An exact match
      • Player - Player 9 (Gray) types a chat message containing -sr as An exact match
      • Player - Player 10 (Light Blue) types a chat message containing -sr as An exact match
      • Player - Player 11 (Dark Green) types a chat message containing -sr as An exact match
      • Player - Player 12 (Brown) types a chat message containing -sr as An exact match
    • Conditions
    • Actions
      • -------- Check the Trigger Comment in the top of the Trigger Editor Window! --------
      • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
      • Multiboard - Show (Load 3 of (Key (Triggering player)) in Temp_Hashtable)
      • Custom script: endif
  • Multiboard HideResources
    • Events
      • Player - Player 1 (Red) types a chat message containing -hideresources as An exact match
      • Player - Player 2 (Blue) types a chat message containing -hideresources as An exact match
      • Player - Player 3 (Teal) types a chat message containing -hideresources as An exact match
      • Player - Player 4 (Purple) types a chat message containing -hideresources as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -hideresources as An exact match
      • Player - Player 6 (Orange) types a chat message containing -hideresources as An exact match
      • Player - Player 7 (Green) types a chat message containing -hideresources as An exact match
      • Player - Player 8 (Pink) types a chat message containing -hideresources as An exact match
      • Player - Player 9 (Gray) types a chat message containing -hideresources as An exact match
      • Player - Player 10 (Light Blue) types a chat message containing -hideresources as An exact match
      • Player - Player 11 (Dark Green) types a chat message containing -hideresources as An exact match
      • Player - Player 12 (Brown) types a chat message containing -hideresources as An exact match
      • Player - Player 1 (Red) types a chat message containing -hr as An exact match
      • Player - Player 2 (Blue) types a chat message containing -hr as An exact match
      • Player - Player 3 (Teal) types a chat message containing -hr as An exact match
      • Player - Player 4 (Purple) types a chat message containing -hr as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -hr as An exact match
      • Player - Player 6 (Orange) types a chat message containing -hr as An exact match
      • Player - Player 7 (Green) types a chat message containing -hr as An exact match
      • Player - Player 8 (Pink) types a chat message containing -hr as An exact match
      • Player - Player 9 (Gray) types a chat message containing -hr as An exact match
      • Player - Player 10 (Light Blue) types a chat message containing -hr as An exact match
      • Player - Player 11 (Dark Green) types a chat message containing -hr as An exact match
      • Player - Player 12 (Brown) types a chat message containing -hr as An exact match
    • Conditions
    • Actions
      • -------- Check the Trigger Comment in the top of the Trigger Editor Window! --------
      • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
      • Multiboard - Hide (Load 3 of (Key (Triggering player)) in Temp_Hashtable)
      • Custom script: endif
  • Item Pickup System
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Set Temp_Player = (Player number of (Owner of (Triggering unit)))
      • Set Temp_Multiboard = (Load 3 of (Key (Owner of (Triggering unit))) in Temp_Hashtable)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Stone
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Stone_Integer[Temp_Player] Equal to Stone_MaxCap
            • Then - Actions
              • Hero - Drop (Item being manipulated) from (Triggering unit)
              • Set Temp_PlayerGroup = (All players matching ((Matching player) Equal to (Owner of (Triggering unit))))
              • Game - Display to Temp_PlayerGroup the text: You don't have enou...
              • Custom script: call DestroyForce (udg_Temp_PlayerGroup)
            • Else - Actions
              • -------- Adds the Item to the Backpack and Removing it from inventory. Also Updating all the views of the Resources Systems. --------
              • Item - Remove (Item being manipulated)
              • Set Stone_Integer[Temp_Player] = (Stone_Integer[Temp_Player] + 1)
              • Hashtable - Save Stone_Integer[Temp_Player] as 0 of (Key (Triggering unit)) in Temp_Hashtable
              • Multiboard - Set the text for Temp_Multiboard item in column 3, row Temp_Player to ((String(Stone_Integer[Temp_Player])) + (/ + (String(Stone_MaxCap))))
              • Set Temp_FT = (Load (Key temp_ft) of (Key (Triggering unit)) in Temp_HashtableIf the label is not found, this function returns NULL.)
              • Floating Text - Destroy Temp_FT
              • Floating Text - Create floating text that reads ((|c00ffff00Stone:|r + (|c0000ff00 + (String(Stone_Integer[Temp_Player])))) + (/ + ((String(Stone_MaxCap)) + |r))) above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Change the lifespan of (Last created floating text) to 1.00 seconds
              • Hashtable - Save Handle Of(Last created floating text) as (Key temp_ft) of (Key (Triggering unit)) in Temp_Hashtable
              • -------- ------------------------------------------------------------------------------------------ --------
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item being manipulated)) Equal to Lumber
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Lumber_Integer[Temp_Player] Equal to Lumber_MaxCap
                • Then - Actions
                  • Hero - Drop (Item being manipulated) from (Triggering unit)
                  • Game - Display to Temp_PlayerGroup the text: You don't have enou...
                  • Set Temp_PlayerGroup = (All players matching ((Matching player) Equal to (Owner of (Triggering unit))))
                  • Custom script: call DestroyForce (udg_Temp_PlayerGroup)
                • Else - Actions
                  • -------- Adds the Item to the Backpack and Removing it from inventory. Also Updating all the views of the Resources Systems. --------
                  • Item - Remove (Item being manipulated)
                  • Set Lumber_Integer[Temp_Player] = (Lumber_Integer[Temp_Player] + 1)
                  • Hashtable - Save Lumber_Integer[Temp_Player] as 1 of (Key (Triggering unit)) in Temp_Hashtable
                  • Multiboard - Set the text for Temp_Multiboard item in column 5, row Temp_Player to ((String(Lumber_Integer[Temp_Player])) + (/ + (String(Lumber_MaxCap))))
                  • Set Temp_FT = (Load (Key temp_ft) of (Key (Triggering unit)) in Temp_HashtableIf the label is not found, this function returns NULL.)
                  • Floating Text - Destroy Temp_FT
                  • Floating Text - Create floating text that reads ((|c00ffff00Lumber:|r + (|c0000ff00 + (String(Lumber_Integer[Temp_Player])))) + (/ + ((String(Lumber_MaxCap)) + |r))) above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
                  • Floating Text - Change (Last created floating text): Disable permanence
                  • Floating Text - Change the lifespan of (Last created floating text) to 1.00 seconds
                  • Hashtable - Save Handle Of(Last created floating text) as (Key temp_ft) of (Key (Triggering unit)) in Temp_Hashtable
                  • -------- ------------------------------------------------------------------------------------------ --------
            • Else - Actions
  • Construct System
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Set Temp_Player = (Player number of (Owner of (Triggering unit)))
      • Set Temp_Multiboard = (Load 3 of (Key (Owner of (Triggering unit))) in Temp_Hashtable)
      • -------- COPY THE IF/THEN/ELSE BELOW FOR EACH BUILDING AND PASTE IT IN THE ELSE AT THE BOTTOM OF THIS TRIGGER (LOOK FOR THE ###%%% COMMENT) --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Build Camp Fire
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • Stone_Integer[Temp_Player] Less than 2
                  • Lumber_Integer[Temp_Player] Less than 1
            • Then - Actions
              • -------- If the player doesn't have enought resources for the building, the Construct will be Interrupted and a text message will be showed. --------
              • Set Temp_PlayerGroup = (All players matching ((Matching player) Equal to (Owner of (Triggering unit))))
              • Game - Display to Temp_PlayerGroup the text: You don't have enou...
              • Custom script: call DestroyForce (udg_Temp_PlayerGroup)
              • -------- ------------------------------------------------------------------------------------------ --------
            • Else - Actions
              • -------- If the Player have enought resources the Effect will start. --------
              • -------- The Conditions below checks if the building is the Camp Fire and enought Resources for the Construction. --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Ability being cast) Equal to Build Camp Fire
                  • Stone_Integer[Temp_Player] Greater than or equal to 2
                  • Lumber_Integer[Temp_Player] Greater than or equal to 1
                • Then - Actions
                  • -------- Setting up some variables for the Effect. --------
                  • Set Temp_Loc[1] = (Target point of ability being cast)
                  • Set Temp_Group = (Units within 200.00 of Temp_Loc[1] matching ((Unit-type of (Matching unit)) Not equal to Test Hero))
                  • -------- ------------------------------------------------------------------------------------------ --------
                  • -------- The Condition below checks if the location to build is clear from units. --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Temp_Group is empty) Equal to True
                      • (Terrain pathing at Temp_Loc[1] of type Buildability is off) Equal to False
                    • Then - Actions
                      • -------- Checks if there is any Destructibles nearby. If there are, the building wont be built. --------
                      • Destructible - Pick every destructible within 200.00 of Temp_Loc[1] and do (Actions)
                        • Loop - Actions
                          • Set Temp_Destructibles = (Temp_Destructibles + 1)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Temp_Destructibles Greater than 0
                        • Then - Actions
                          • -------- If the Location is in use, the player gets a text message. --------
                          • Set Temp_PlayerGroup = (All players matching ((Matching player) Equal to (Owner of (Triggering unit))))
                          • Game - Display to Temp_PlayerGroup the text: Unable to build str...
                          • Custom script: call DestroyForce (udg_Temp_PlayerGroup)
                          • -------- ------------------------------------------------------------------------------------------ --------
                          • Set Temp_Destructibles = 0
                        • Else - Actions
                          • -------- Creates the Effect. --------
                          • Unit - Create 1 Dummy unit for (Owner of (Triggering unit)) at Temp_Loc[1] facing Default building facing degrees
                          • Unit - Order (Last created unit) to build a Camp Fire at Temp_Loc[1]
                          • Unit - Turn collision for (Constructed structure) Off
                          • Unit - Add a 21.00 second Generic expiration timer to (Last created unit)
                          • Special Effect - Create a special effect at Temp_Loc[1] using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
                          • Special Effect - Destroy (Last created special effect)
                          • -------- ------------------------------------------------------------------------------------------ --------
                          • -------- Updating the Resources and view Systems --------
                          • Set Lumber_Integer[Temp_Player] = (Lumber_Integer[Temp_Player] - 1)
                          • Set Stone_Integer[Temp_Player] = (Stone_Integer[Temp_Player] - 2)
                          • Multiboard - Set the text for Temp_Multiboard item in column 3, row Temp_Player to ((String(Stone_Integer[Temp_Player])) + (/ + (String(Stone_MaxCap))))
                          • Multiboard - Set the text for Temp_Multiboard item in column 5, row Temp_Player to ((String(Lumber_Integer[Temp_Player])) + (/ + (String(Lumber_MaxCap))))
                          • Hashtable - Save Lumber_Integer[Temp_Player] as 1 of (Key (Triggering unit)) in Temp_Hashtable
                          • Hashtable - Save Stone_Integer[Temp_Player] as 0 of (Key (Triggering unit)) in Temp_Hashtable
                          • -------- ------------------------------------------------------------------------------------------ --------
                          • -------- Cleares the trigger from leaks and other stuffs. --------
                          • Unit - Turn collision for (Constructed structure) On
                          • Custom script: call RemoveLocation (udg_Temp_Loc[1])
                          • Custom script: call RemoveLocation (udg_Temp_Loc[3])
                          • -------- ------------------------------------------------------------------------------------------ --------
                    • Else - Actions
                      • -------- If the Location is in use, the player gets a text message. --------
                      • Set Temp_PlayerGroup = (All players matching ((Matching player) Equal to (Owner of (Triggering unit))))
                      • Game - Display to Temp_PlayerGroup the text: Unable to build str...
                      • Custom script: call DestroyForce (udg_Temp_PlayerGroup)
                      • -------- ------------------------------------------------------------------------------------------ --------
                  • Custom script: call DestroyGroup (udg_Temp_Group)
                • Else - Actions
        • Else - Actions
          • -------- ###%%% --------
          • -------- This above is for the structure Camp Fire. --------
          • -------- There is just to load in more and more for each building or you can create one trigger for each building. --------
          • -------- ##!•••OBSERVE•••## Remember to store all locations into the Temp_Loc variable and remove them, just as in the actions above. --------
  • Resources System
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Show Resources
    • Actions
      • -------- If the Player cast the Show Resources Ability, he will get text messages with information about the Resources. --------
      • Set Temp_PlayerGroup = (All players matching ((Matching player) Equal to (Owner of (Triggering unit))))
      • Game - Display to Temp_PlayerGroup the text: (You currently have : |c0000ff00 + ((String((Load 0 of (Key (Triggering unit)) from Temp_Hashtable))) + (/ + ((String(Stone_MaxCap)) + |r |c00ffff00Stone(s)|r))))
      • Game - Display to Temp_PlayerGroup the text: (You currently have : |c0000ff00 + ((String((Load 1 of (Key (Triggering unit)) from Temp_Hashtable))) + (/ + ((String(Lumber_MaxCap)) + |r |c00ffff00Lumber(s)|r))))
      • Custom script: call DestroyForce (udg_Temp_PlayerGroup)
      • -------- ------------------------------------------------------------------------------------------ --------
  • Killing System
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Test Hero
    • Actions
      • -------- Setting up some important Variables --------
      • Set Temp_Player = (Player number of (Owner of (Triggering unit)))
      • Set Temp_Multiboard = (Load 3 of (Key (Owner of (Triggering unit))) in Temp_Hashtable)
      • Set Temp_Loc[2] = (Position of (Triggering unit))
      • -------- ------------------------------------------------------------------------------------------ --------
      • For each (Integer A) from 1 to Lumber_Integer[Temp_Player], do (Actions)
        • Loop - Actions
          • -------- Places the items on the ground when the unit dies --------
          • Item - Create Lumber at Temp_Loc[2]
          • Item - Change ownership of (Last created item) to (Owner of (Triggering unit)) and Change color
      • For each (Integer A) from 1 to Stone_Integer[Temp_Player], do (Actions)
        • Loop - Actions
          • Item - Create Stone at Temp_Loc[2]
          • Item - Change ownership of (Last created item) to (Owner of (Triggering unit)) and Change color
      • -------- Clearing leaks, Updating Resources variables and Updates the view Resources Systems and also displaying a text message for the player. --------
      • -------- ------------------------------------------------------------------------------------------ --------
      • Custom script: call RemoveLocation (udg_Temp_Loc[2])
      • Set Lumber_Integer[Temp_Player] = 0
      • Set Stone_Integer[Temp_Player] = 0
      • Multiboard - Set the text for Temp_Multiboard item in column 3, row Temp_Player to ((String(Stone_Integer[Temp_Player])) + (/ + (String(Stone_MaxCap))))
      • Multiboard - Set the text for Temp_Multiboard item in column 5, row Temp_Player to ((String(Lumber_Integer[Temp_Player])) + (/ + (String(Lumber_MaxCap))))
      • Hashtable - Save Lumber_Integer[Temp_Player] as 1 of (Key (Triggering unit)) in Temp_Hashtable
      • Hashtable - Save Stone_Integer[Temp_Player] as 0 of (Key (Triggering unit)) in Temp_Hashtable
      • Set Temp_PlayerGroup = (All players matching ((Matching player) Equal to (Owner of (Triggering unit))))
      • Game - Display to Temp_PlayerGroup the text: Oh no! You've dropp...
      • Custom script: call DestroyForce (udg_Temp_PlayerGroup)
      • -------- ------------------------------------------------------------------------------------------ --------
  • Command Resources System
    • Events
      • Player - Player 1 (Red) types a chat message containing -resources as An exact match
      • Player - Player 2 (Blue) types a chat message containing -resources as An exact match
      • Player - Player 3 (Teal) types a chat message containing -resources as An exact match
      • Player - Player 4 (Purple) types a chat message containing -resources as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -resources as An exact match
      • Player - Player 6 (Orange) types a chat message containing -resources as An exact match
      • Player - Player 7 (Green) types a chat message containing -resources as An exact match
      • Player - Player 8 (Pink) types a chat message containing -resources as An exact match
      • Player - Player 9 (Gray) types a chat message containing -resources as An exact match
      • Player - Player 10 (Light Blue) types a chat message containing -resources as An exact match
      • Player - Player 11 (Dark Green) types a chat message containing -resources as An exact match
      • Player - Player 12 (Brown) types a chat message containing -resources as An exact match
    • Conditions
    • Actions
      • -------- When the player writes -resources, the player will get a text message that tells him how much Resources of any kind he have. --------
      • Set Temp_PlayerGroup = (All players matching ((Matching player) Equal to (Owner of (Triggering unit))))
      • Set Command_Group = (Units in (Playable map area))
      • Unit Group - Pick every unit in Command_Group and do (Actions)
        • Loop - Actions
          • Game - Display to Temp_PlayerGroup the text: (You currently have : |c0000ff00 + ((String((Load 0 of (Key (Picked unit)) from Temp_Hashtable))) + /10|r |c00ffff00Stone(s)|r))
          • Game - Display to Temp_PlayerGroup the text: (You currently have : |c0000ff00 + ((String((Load 1 of (Key (Picked unit)) from Temp_Hashtable))) + /10|r |c00ffff00Lumber(s)|r))
      • Custom script: call DestroyForce (udg_Temp_PlayerGroup)
      • Custom script: call DestroyGroup (udg_Command_Group)
      • -------- ------------------------------------------------------------------------------------------ --------


Made by: tjordell
Idea by: tjordell
Helpers: ----

v. 2.0 - [When picking up items, the previous floating text now gets destroyed before creating a new one. Thanks to Aspard for suggestion] - [Removed the unneccesary "set bj_wantDestroyGroup = true" from the Multiboard Create trigger.]

v. 1.9 - [Swapped places on some Actions for more flexibility] - [Added Walkthrough's in the Comments Triggers] - [Removed unneccesary Leak Prevention]

v. 1.8 - [Removed some Player Group leaks] - [Added a JASS code to increase the MPI Multiboard System]

v. 1.7 - [Fixed mayor bugs with Construct System. (This should now work 100%)] - [Added an MPI Multiboard] - [Added Stone & Lumber Max Capacity variables for easier customizing.] - [Fixed Hashtable leak]

v. 1.5 - [Added another viewing of the Resources System (Multiboard)] - [Added some Commands] - [Also, for the Multiboard, added 2 Commands (-showresources/-sr & -hideresources/-hr) that shows/hides the Multiboard] - [Changed name from Construct System to Useful Survival System]

v. 1.4 - [Fixed mayor bug reported by aspard] - [Added new system (Command Resources System (Another way than the ability to show you how much resources you have, reported by aspard))] - [Change title of Quest log to Commands (Now you can see the commands in the Commands log if you've cleared the window from the commands info text message)]

v. 1.3 - [Added one new trigger (Killing Trigger (Drops all items in backpack on death))] - [Added 2 new Commands. (-kill & -revive (Use it to check the new trigger))] - [Fixed some actions in most of the triggers.(Using Hashtables)]

v. 1.2 - [Fixed the spells, reported by Kingz (It looks nicer now)] - [Changed name from Construct & Backpack System to Construct System] - [Added a new Command. (-clear)]

v. 1.1 - [Fixed an Integer Variable. Reported by baassee]

v. 1.0 - [Uploaded!]


Keywords:
system, construct, build, structure, backpack, item, items, tjordell, svenskunganka
Contents

Useful Survival Systems (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. 15:23, 20 Oct, 2012 Magtheridon96: There's some room for improvement: - You can cache things like (Triggering unit) and (Owner of (Triggering unit)) instead of repeating them more than...
Level 11
Joined
Jan 25, 2009
Messages
572
hi all i have problem
i cant import variables spells or spells (all of the maps (triggers - jass)
i need software?

You dont need any software. Open WE, Press File, Press Preferences, Go to the General Tab and check the box "Automatically create unknown variables when pasting trigger data".
So, now, go to the system and press CTRL + C and then open up you'r map and press CTRL + V. Easy as a cake =)
 
Level 1
Joined
Apr 14, 2011
Messages
5
You dont need any software. Open WE, Press File, Press Preferences, Go to the General Tab and check the box "Automatically create unknown variables when pasting trigger data".
So, now, go to the system and press CTRL + C and then open up you'r map and press CTRL + V. Easy as a cake =)

Thanks . for yr help.:grin:
 
Level 15
Joined
Oct 18, 2008
Messages
1,588
Oh well it improved a lot since I visited last time, good job :) Hovewer I can still find a flaw ^^ Ooops or more than one :p

  • For each (Integer A) from 1 to Lumber_Integer[Temp_Player], do (Actions)
    • Loop - Actions
    • -------- Places the items on the ground when the unit dies --------
    • Item - Create Lumber at Temp_Loc[2]
    • Item - Change ownership of (Last created item) to (Owner of (Triggering unit)) and Change color
    • For each (Integer A) from 1 to Stone_Integer[Temp_Player], do (Actions)
    • Loop - Actions
    • Item - Create Stone at Temp_Loc[2]
    • Item - Change ownership of (Last created item) to (Owner of (Triggering unit)) and Change color
    • -------- Clearing leaks, Updating Resources variables and Updates the view Resources Systems and also displaying a text message for the player. --------
Use a generic trigger, using create 1 item of ResourceItem[Integer B] It'll make setting up the system a lot easier

  • Multiboard - Set the text for Temp_Multiboard item in column 3, row Temp_Player to ((String(Stone_Integer[Temp_Player])) + (/ + (String(Stone_MaxCap))))
  • Multiboard - Set the text for Temp_Multiboard item in column 5, row Temp_Player to ((String(Lumber_Integer[Temp_Player])) + (/ + (String(Lumber_MaxCap)))
Use a loop to set this, and use variable arrays instead of resource caps and resources-it'll make your code more dynamic. Make a separate Settings trigger, which runs first then runs all the others :) It should like this: (only a small part of it xD)

Set ResourceName[1] = "Stone"
Set ResourceCap[1] = something
Set ResourceName[2] = "Lumber"
Set ResourceCap[2] = something

  • Game - Display to Temp_PlayerGroup the text: (You currently have : |c0000ff00 + ((String((Load 0 of (Key (Picked unit)) from Temp_Hashtable))) + /10|r |c00ffff00Stone(s)|r))
    • Game - Display to Temp_PlayerGroup the text: (You currently have : |c0000ff00 + ((String((Load 1 of (Key (Picked unit)) from Temp_Hashtable))) + /10|r |c00ffff00Lumber(s)|r))
Same as above, use concentrate string function to make dynamic coloring :p Make a variable "Colorcode[]" and use Colorcode[Integer A]+ResName[Integer A]+"|r"

There are a lot of triggers you have there to apply these on...

Next one the building system:
Use a generic formula, else you have to set the building data copying the trigger always, making a wall of text out of it quickly...
make a hashtable called BuildingData
make one variable array for each resource and load it into the hashtrable
make a variable array for buildings
use the following:

for integer a ---- check resource[a] for player compared to resourceNeed[a] for the specified building

if everything is ok build the specified building

I hope I coudl help making it more efficient, I love spending time with systems :O)
 
Level 11
Joined
Jan 25, 2009
Messages
572
kandaj, Wow! Thats alot of help you gave me there. Although, I didn't quite understand everything fully, but I think I have a clue what you mean. I will make this system alot more efficient because I believe there might be quite a few who is in need of this system(s). Thanks for the help and I'll update this system(s) when I have time and are in mood to do it. +rep ofc! (If you've read my signature ;D)
 
Errr stuff on multiboards should be displayed locally to prevent clutter... Imagine 12 players on that board man, ppl would just leave it closed because it would take up too much space.
Also this is Very inconvenient. It is not configurable at all. You would have to go searching through the triggers to add a new resource.
Not to mention this has been done many many times.

This definitely could use a lot of work and my rating is 3/5 until changes are made.
 
Map Screenshot said:
If you want to use or edit this systems, you MUST give me credits!
Epic sentence. I know someone stealing your systems is bad, but once you love your systems and want to seriously do good programming you mostly end up doing systems for everyone and just say "please give credits!". Honestly, I think it's okay if people use my Inventory System even without credits to me. I just love to see people actually like what I did. Because after all, I am doing this for fun and I don't get money for it.
 
Level 11
Joined
Jan 25, 2009
Messages
572
Epic sentence. I know someone stealing your systems is bad, but once you love your systems and want to seriously do good programming you mostly end up doing systems for everyone and just say "please give credits!". Honestly, I think it's okay if people use my Inventory System even without credits to me. I just love to see people actually like what I did. Because after all, I am doing this for fun and I don't get money for it.

If you'd do some research you'd notice that I changed that in the last update.
 
Level 11
Joined
Jan 25, 2009
Messages
572
So what? The idea remains the same. You aren't doing this for the simple reason of contribute.

I posted this 2 years ago. I've changed my mind.

EDIT: My english was quite bad back then, and I probably didn't even know the word "Appreciate" so I just wrote that in. But I have changed my mind if I didn't want to contribute back then and my sincerest apologies if any of this has insulted or harmed anyone out there.
 
Top