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

Income system v1.2

  • Like
Reactions: Mr.Chaos
Income system v1.2
Created by x-omg-x


I created a system that gives you income eqault to the amount of units you own.
Its very simple but useful.
Information about how to use is included in the map.
It is GUI and should also be MUI and leakless.

If you have any ideas to improve it please post a comment.
If you any bugs/leaks please post a comment.
Give credits if used in your map/campaign.
You are free to edit the system but uploading it is not allowed.

Have fun and enjoy your new income system.


Version 1.0: Uploaded system
Version 1.1: Added options-dialog, added triggers to description
Version 1.2: Fixed leak. Added 'credits'.


  • Settings
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Dialog - Create a dialog button for Settings_Dialog labelled Units
      • Set Button_Dialog[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for Settings_Dialog labelled Food
      • Set Button_Dialog[2] = (Last created dialog Button)
      • Dialog - Create a dialog button for Settings_Dialog labelled Gold
      • Set Button_Dialog[3] = (Last created dialog Button)
      • Dialog - Create a dialog button for Settings_Dialog labelled Structures
      • Set Button_Dialog[4] = (Last created dialog Button)
      • -------- --------
      • Dialog - Change the title of Settings_Dialog to Set income
      • Dialog - Show Settings_Dialog for Player 1 (Red)
      • Trigger - Turn on SettingsChosen <gen>
  • SettingsChosen
    • Events
      • Dialog - A dialog button is clicked for Settings_Dialog
    • Conditions
    • Actions
      • -------- This Function of the Trigger is When the Dialog buttons is Clicked:P --------
      • -------- It makes a Boolean True and The Boolean has mutch to say:P --------
      • Set PlayerForce = (All players controlled by a User player)
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Set CounterPlayer = (Picked player)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Clicked dialog button) Equal to Button_Dialog[1]
            • Then - Actions
              • Set Unit[(Player number of CounterPlayer)] = True
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Clicked dialog button) Equal to Button_Dialog[2]
            • Then - Actions
              • Set Food[(Player number of CounterPlayer)] = True
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Clicked dialog button) Equal to Button_Dialog[3]
            • Then - Actions
              • Set Gold[(Player number of CounterPlayer)] = True
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Clicked dialog button) Equal to Button_Dialog[4]
            • Then - Actions
              • Set Structures[(Player number of CounterPlayer)] = True
            • Else - Actions
          • Trigger - Turn on IncomeTimer <gen>
      • Custom script: call DestroyForce(udg_PlayerForce)
  • IncomeTimer
    • Events
      • Time - Every 30.00 seconds of game time
    • Conditions
    • Actions
      • -------- You can easily change the income timer. Default is 30 seconds. --------
      • -------- --------
      • -------- --------
      • -------- First of all i pick all players --------
      • Set Income_PlayerForce = (All players controlled by a User player)
      • Player Group - Pick every player in Income_PlayerForce and do (Actions)
        • Loop - Actions
          • -------- Here i set the player variable --------
          • Set Player[(Player number of (Picked player))] = (Picked player)
          • -------- Im setting the income --------
          • Set Income[(Player number of (Picked player))] = (Count[(Player number of (Picked player))] x 10)
          • -------- Then i give the player his income --------
          • Player - Add Income[(Player number of (Picked player))] to (Picked player) Current gold
          • -------- And last, i show the income of all players in use --------
          • Game - Display to (All players) for 10.00 seconds the text: ((Name of (Picked player)) + ('s income: + (String(Income[(Player number of (Picked player))]))))
      • Custom script: call DestroyForce(udg_Income_PlayerForce)
  • Counter
    • Events
      • Time - Every 0.47 seconds of game time
    • Conditions
    • Actions
      • -------- Basiccly What this Does is Counting All the Things over and over again to Make the Counter Right:P --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Unit[(Player number of CounterPlayer)] Equal to True
        • Then - Actions
          • Set Count[(Player number of CounterPlayer)] = (Count non-structure units controlled by CounterPlayer (Exclude incomplete units))
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Food[(Player number of CounterPlayer)] Equal to True
            • Then - Actions
              • Set Count[(Player number of CounterPlayer)] = (CounterPlayer Food used)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Gold[(Player number of CounterPlayer)] Equal to True
                • Then - Actions
                  • Set Count[(Player number of CounterPlayer)] = ((CounterPlayer Current gold) / 20)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Structures[(Player number of CounterPlayer)] Equal to True
                    • Then - Actions
                      • Set Count[(Player number of CounterPlayer)] = (Count structures controlled by CounterPlayer (Exclude incomplete structures))
                    • Else - Actions
eleljrk: Found a leak.
Naitsirk: Added a counter.
Aesthetics: Quick-teach in trigger tags


Keywords:
Income, system, gold, unit, units, army, gather, gathered, x-omg-x
Contents

Income system (Map)

Reviews
19:56, 26th Oct 2009 TriggerHappy187: Decent system, leakless from what I can see. There also always seems to be a demand for this kind of system. Approved.

Moderator

M

Moderator

19:56, 26th Oct 2009
TriggerHappy187:

Decent system, leakless from what I can see.

There also always seems to be a demand for this kind of system. Approved.
 
Level 12
Joined
Jun 28, 2008
Messages
688
I made a system similar to this once but it had some additional features which I think you could add, since I never bothered to submit mine and lost the map.

In my income system, players could hold a "town vote" to raise the taxes on their townspeople, thus increasing their income. The vote was a percent chance for yes, percent chance for no. The percent was based on several factors: the current tax rate (higher = more chance for a no) and the number of times the player attempted to raise the tax rate (higher = more chance for a no).

Mine didn't implement number of units, but I suppose you could work that in as sort of an extra military tax rate or something.
 
I made a system similar to this once but it had some additional features which I think you could add, since I never bothered to submit mine and lost the map.

In my income system, players could hold a "town vote" to raise the taxes on their townspeople, thus increasing their income. The vote was a percent chance for yes, percent chance for no. The percent was based on several factors: the current tax rate (higher = more chance for a no) and the number of times the player attempted to raise the tax rate (higher = more chance for a no).

Mine didn't implement number of units, but I suppose you could work that in as sort of an extra military tax rate or something.

Yea as i said in the description, i would have added some more features but i needed some ideas :p
Anyways, your idea sounds nice, but to make it different i could base the income on some other things. Maybe i could base it on current gold and time played or something.
 
Level 10
Joined
Jan 24, 2009
Messages
606
Level 12
Joined
May 21, 2009
Messages
994
Very nice.. this can help many new people on their way learning triggering. I remembered once when i was starting to make maps, i always played Hero Line Wars and i've always wanted to create an income system but i didnt know how to do it. Maybe some new GUI'ers needs it 4/5
 
Level 9
Joined
Aug 27, 2009
Messages
473
The Counter trigger should look more like this:
  • FinsihConstructing
    • Events
      • Unit - A unit Finishes training a unit
      • Unit - A unit Finishes construction
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to < Unit to give income >
    • Actions
      • Set Income[(Player number of (Owner of (Triggering unit)))] = (Income[(Player number of (Owner of (Triggering unit)))] + 1)
Add the IF - THEN - ELSE with the booleans, but dont add them all into ELSE!
And the event should be the one you want, im not sure if its like a Tree Tag or a Slave income, so i just made it look like that.. ;)

You do not need Arrays for the Dialog System, its only 1 time chose, and its no need for beeing MUI.
There is also a few more stuff to do, but you could do this first.. :)
 
Level 10
Joined
Jan 24, 2009
Messages
606
Don't I get credits for helping with Trigger tags? :wink:

well.. What i Did was that I removed a leak and i made the Whole thing MPI(which it wasen't) and I Fixed one of the Biggest Bugs that was(That it only counted the Player's stats once in it(this happend when he made the Dialog...)

EDIT:
The Counter trigger should look more like this:
  • FinsihConstructing
    • Events
      • Unit - A unit Finishes training a unit
      • Unit - A unit Finishes construction
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to < Unit to give income >
    • Actions
      • Set Income[(Player number of (Owner of (Triggering unit)))] = (Income[(Player number of (Owner of (Triggering unit)))] + 1)
Add the IF - THEN - ELSE with the booleans, but dont add them all into ELSE!
And the event should be the one you want, im not sure if its like a Tree Tag or a Slave income, so i just made it look like that.. ;)

You do not need Arrays for the Dialog System, its only 1 time chose, and its no need for beeing MUI.
There is also a few more stuff to do, but you could do this first.. :)

The System needs to be MPI to be Aproved... Which u diden't seem to understand.... but basicly The Counter Trigger you have made is... well,it's made in a differant way... but there's Nothing wrong with the one i made!!!!!!! Well... If by "You do not need the Arrays in the Dialog system" mean the Boolean Arrays... it's perfectly needed! And SYSTEMS CAN'T BE MUI!!!!!!!
 
well.. What i Did was that I removed a leak and i made the Whole thing MPI(which it wasen't) and I Fixed one of the Biggest Bugs that was(That it only counted the Player's stats once in it(this happend when he made the Dialog...)

EDIT:

The System needs to be MPI to be Aproved... Which u diden't seem to understand.... but basicly The Counter Trigger you have made is... well,it's made in a differant way... but there's Nothing wrong with the one i made!!!!!!! Well... If by "You do not need the Arrays in the Dialog system" mean the Boolean Arrays... it's perfectly needed! And SYSTEMS CAN'T BE MUI!!!!!!!

Yo. The bug, i allready found it :p Anyways the Dialog dont need to be MPI as it is only used one time. And yes. the booleans is needed..
 

Screamernail

S

Screamernail

i want gold to come out like a captured point in dawn of war. how can i do that?
 
Top