Rank System v2.3

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
  • Like
Reactions: Asip
Final update i hope

Whats new:

Lose Rank/EXP when you die
EXP for casting spells
Tweaked leaderboard
Changed writing when promoted
Fully working no bugs.
Will only work for users.
Sound effects for Rank up (Can be changed)
Ranks (More can be added or changed)


For information on how to change how many points are needed just send a pm or for troubleshooting just post ere or pm me.

Yours sincerly,

Evilcrizpy.

Update - V1.5
Fixed the Time the leaderboard takes to display
Redone some changes to the system, may not notice,
Fixed a bug which i encounted
Made it only work for those who are playing "and" are a user

Update - v2.0
Added Chat/Board system
Can now change between the two( Only for the testing map you decide which you want )
Added colours for the names, from 1-8
Working Chat system.

Update - v2.1

-Fixed the rank bug on multiboard
-Fixed the rank bug on chat mode.
-Both triggers active, just type -rank for the game message

Update - V2.2

-Fixed alot of leaks
-Multiboard made with indexing
-Made MUI proof.

Update - V2.3

-Fixed some simple errors
-Added MB_ to all variables
-Fixed a leak

  • Variables
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set totalplayers = (Number of players in (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing))))
      • Trigger - Turn on Refresh Multiboard kill <gen>
      • Trigger - Turn on Refresh Multiboard Spell <gen>
      • Set MB_Index[1] = totalplayers
      • Set MB_Index[2] = totalplayers
      • For each (Integer MB_Index[3]) from 1 to MB_Index[2], do (Actions)
        • Loop - Actions
          • Set MB_Points[MB_Index[3]] = 0
          • Set MB_Level[MB_Index[3]] = 1
          • Set MB_CurrentRank[MB_Index[3]] = 1
      • -------- Ranks --------
      • Set MB_Ranks[1] = Traine
      • Set MB_Ranks[2] = Private
      • Set MB_Ranks[3] = Private I
      • Set MB_Ranks[4] = Private II
      • Set MB_Ranks[5] = Private III
      • Set MB_Ranks[6] = Private First Class
      • Set MB_Ranks[7] = Private First Class I
      • Set MB_Ranks[8] = Private First Class II
      • Set MB_Ranks[9] = Lance Corporal
      • Set MB_Ranks[10] = Lance Corporal I
      • Set MB_Ranks[11] = Lance Corporal II
      • Set MB_Ranks[12] = Corporal
      • Set MB_Ranks[13] = Corporal I
      • Set MB_Ranks[14] = Corporal II
      • Set MB_Ranks[15] = Sergeant
      • Set MB_Ranks[16] = Sergeant I
      • Set MB_Ranks[17] = Sergeant II
      • Set MB_Ranks[18] = Staff Sergeant
      • Set MB_Ranks[19] = Staff Sergeant I
      • Set MB_Ranks[20] = Staff Sergeant II
      • Set MB_Ranks[21] = Warrant Officer
      • Set MB_Ranks[22] = Warrant Officer Class 2
      • Set MB_Ranks[23] = Warrant Officer Class 1
      • -------- Colours --------
      • Set MB_Player_Colors[1] = |c00ff0000
      • Set MB_Player_Colors[2] = |c000000ff
      • Set MB_Player_Colors[3] = |c0000ffff
      • Set MB_Player_Colors[4] = |c00800080
      • Set MB_Player_Colors[5] = |c00ffff00
      • Set MB_Player_Colors[6] = |c00ff8000
      • Set MB_Player_Colors[7] = |c0000ff00
      • Set MB_Player_Colors[8] = |c00ff00ff
      • Game - Display to (All players) the text: Rank System v2.3 - ...
  • Create Multiboard
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Multiboard - Create a multiboard with 4 columns and (totalplayers + 1) rows, titled EXP Table V2.3
      • Set RankBoard = (Last created multiboard)
      • -------- Text Setup --------
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to Name
      • Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to EXP
      • Multiboard - Set the text for (Last created multiboard) item in column 3, row 1 to Level
      • Multiboard - Set the text for (Last created multiboard) item in column 4, row 1 to Rank
      • Multiboard - Set the width for (Last created multiboard) item in column 1, row 1 to 10.00% of the total screen width
      • Multiboard - Set the width for (Last created multiboard) item in column 2, row 1 to 10.00% of the total screen width
      • Multiboard - Set the width for (Last created multiboard) item in column 3, row 1 to 10.00% of the total screen width
      • Multiboard - Set the width for (Last created multiboard) item in column 4, row 1 to 10.00% of the total screen width
      • Multiboard - Set the display style for (Last created multiboard) item in column 1, row 1 to Show text and Hide icons
      • Multiboard - Set the display style for (Last created multiboard) item in column 2, row 1 to Show text and Hide icons
      • Multiboard - Set the display style for (Last created multiboard) item in column 3, row 1 to Show text and Hide icons
      • Multiboard - Set the display style for (Last created multiboard) item in column 4, row 1 to Show text and Hide icons
      • For each (Integer MB_loop) from 1 to totalplayers, do (Actions)
        • Loop - Actions
          • Set MB_TempNumber = (MB_loop + 1)
          • Multiboard - Set the text for (Last created multiboard) item in column 1, row MB_TempNumber to (MB_Player_Colors[MB_loop] + (Name of (Player(MB_loop))))
          • Multiboard - Set the text for (Last created multiboard) item in column 2, row MB_TempNumber to (String(MB_Points[MB_loop]))
          • Multiboard - Set the text for (Last created multiboard) item in column 3, row MB_TempNumber to (String(MB_Level[MB_loop]))
          • Multiboard - Set the text for (Last created multiboard) item in column 4, row MB_TempNumber to MB_Ranks[MB_Level[MB_loop]]
          • Multiboard - Set the width for (Last created multiboard) item in column 1, row MB_TempNumber to 10.00% of the total screen width
          • Multiboard - Set the width for (Last created multiboard) item in column 2, row MB_TempNumber to 10.00% of the total screen width
          • Multiboard - Set the width for (Last created multiboard) item in column 3, row MB_TempNumber to 10.00% of the total screen width
          • Multiboard - Set the width for (Last created multiboard) item in column 4, row MB_TempNumber to 10.00% of the total screen width
          • Multiboard - Set the display style for (Last created multiboard) item in column 1, row MB_TempNumber to Show text and Hide icons
          • Multiboard - Set the display style for (Last created multiboard) item in column 2, row MB_TempNumber to Show text and Hide icons
          • Multiboard - Set the display style for (Last created multiboard) item in column 3, row MB_TempNumber to Show text and Hide icons
          • Multiboard - Set the display style for (Last created multiboard) item in column 4, row MB_TempNumber to Show text and Hide icons
      • -------- Show/Hide --------
      • Multiboard - Hide (Last created multiboard)
      • Multiboard - Show (Last created multiboard)
      • -------- Turn On Triggers/ Run --------
      • Trigger - Turn on Refresh Multiboard kill <gen>
      • Trigger - Turn on Refresh Multiboard Spell <gen>
  • Refresh Multiboard kill
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • For each (Integer MB_Index[3]) from 1 to MB_Index[2], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Owner of (Killing unit)) controller) Equal to User
              • (Owner of (Killing unit)) Equal to (Player(MB_Index[3]))
            • Then - Actions
              • Set MB_Unit[MB_Index[3]] = (Killing unit)
              • Set MB_Point[MB_Index[3]] = (Position of MB_Unit[MB_Index[3]])
              • Floating Text - Create floating text that reads |cff00ff00+1xp|r at MB_Point[MB_Index[3]] with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
              • Floating Text - Set the velocity of (Last created floating text) to 120.00 towards 90.00 degrees
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
              • Floating Text - Change the fading age of (Last created floating text) to 0.40 seconds
              • Set MB_Points[MB_Index[3]] = (MB_Points[MB_Index[3]] + 1)
              • Multiboard - Set the text for RankBoard item in column 2, row (MB_Index[3] + 1) to (String(MB_Points[MB_Index[3]]))
              • Custom script: call RemoveLocation(udg_MB_Point[udg_MB_Index[3]])
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • MB_Points[MB_Index[3]] Equal to ((MB_Level[MB_Index[3]] x 25) x 2)
                • Then - Actions
                  • Set MB_Level[MB_Index[3]] = (MB_Level[MB_Index[3]] + 1)
                  • Set MB_CurrentRank[MB_Index[3]] = (MB_CurrentRank[MB_Index[3]] + 1)
                  • Game - Display to (Player group((Player(MB_Index[3])))) for 5.00 seconds the text: ((((MB_Player_Colors[MB_Index[3]] + (Name of (Player(MB_Index[3])))) + ('s|r + (Name of MB_CastingUnit[MB_Index[3]]))) + |cff00ff00has been promoted to |r) + MB_Ranks[MB_Level[MB_Index[3]]])
                  • Multiboard - Set the text for RankBoard item in column 3, row (MB_Index[3] + 1) to (String(MB_Level[MB_Index[3]]))
                  • Multiboard - Set the text for RankBoard item in column 4, row (MB_Index[3] + 1) to MB_Ranks[MB_CurrentRank[MB_Index[3]]]
                  • Sound - Play GoodJob <gen> at 100.00% volume, attached to (Killing unit)
                • Else - Actions
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Owner of (Dying unit)) controller) Equal to User
                  • (Owner of (Dying unit)) Equal to (Player(MB_Index[3]))
                • Then - Actions
                  • Set MB_Unit[MB_Index[3]] = (Killing unit)
                  • Set MB_Point[MB_Index[3]] = (Position of MB_Unit[MB_Index[3]])
                  • Floating Text - Create floating text that reads |cff00ff00-1xp|r at MB_Point[MB_Index[3]] with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                  • Floating Text - Set the velocity of (Last created floating text) to 120.00 towards 90.00 degrees
                  • Floating Text - Change (Last created floating text): Disable permanence
                  • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
                  • Floating Text - Change the fading age of (Last created floating text) to 0.40 seconds
                  • Set MB_Points[MB_Index[3]] = (MB_Points[MB_Index[3]] - 1)
                  • Multiboard - Set the text for RankBoard item in column 2, row (MB_Index[3] + 1) to (String(MB_Points[MB_Index[3]]))
                  • Custom script: call RemoveLocation(udg_MB_Point[udg_MB_Index[3]])
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • MB_Points[MB_Index[3]] Equal to ((MB_Level[MB_Index[3]] x 25) / MB_Level[MB_Index[3]])
                    • Then - Actions
                      • Set MB_Level[MB_Index[3]] = (MB_Level[MB_Index[3]] - 1)
                      • Set MB_CurrentRank[MB_Index[3]] = (MB_CurrentRank[MB_Index[3]] - 1)
                      • Game - Display to (Player group((Player(MB_Index[3])))) for 5.00 seconds the text: ((((MB_Player_Colors[MB_Index[3]] + (Name of (Player(MB_Index[3])))) + ('s|r + (Name of MB_CastingUnit[MB_Index[3]]))) + |cff00ff00has been demoted to |r) + MB_Ranks[MB_Level[MB_Index[3]]])
                      • Multiboard - Set the text for RankBoard item in column 3, row (MB_Index[3] + 1) to (String(MB_Level[MB_Index[3]]))
                      • Multiboard - Set the text for RankBoard item in column 4, row (MB_Index[3] + 1) to MB_Ranks[MB_CurrentRank[MB_Index[3]]]
                    • Else - Actions
                • Else - Actions
  • Refresh Multiboard Spell
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
    • Actions
      • For each (Integer MB_Index[3]) from 1 to MB_Index[2], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Owner of (Triggering unit)) controller) Equal to User
              • (Owner of (Triggering unit)) Equal to (Player(MB_Index[3]))
            • Then - Actions
              • Set MB_CastingUnit[MB_Index[3]] = (Triggering unit)
              • Set MB_Point2[MB_Index[3]] = (Position of MB_CastingUnit[MB_Index[3]])
              • Floating Text - Create floating text that reads (((|cff00ff00 + +) + (String((Level of (Ability being cast) for MB_CastingUnit[MB_Index[3]])))) + (xp + |r)) at MB_Point2[MB_Index[3]] with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
              • Floating Text - Set the velocity of (Last created floating text) to 120.00 towards 90.00 degrees
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
              • Floating Text - Change the fading age of (Last created floating text) to 0.40 seconds
              • Set MB_Points[MB_Index[3]] = (MB_Points[MB_Index[3]] + (Level of (Ability being cast) for MB_Unit[MB_Index[3]]))
              • Multiboard - Set the text for RankBoard item in column 2, row ((Player number of (Player(MB_Index[3]))) + 1) to (String(MB_Points[MB_Index[3]]))
              • Custom script: call RemoveLocation(udg_MB_Point2[udg_MB_Index[3]])
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • MB_Points[MB_Index[3]] Equal to ((MB_Level[MB_Index[3]] x 25) x 2)
                • Then - Actions
                  • Set MB_Level[MB_Index[3]] = (MB_Level[MB_Index[3]] + 1)
                  • Set MB_CurrentRank[MB_Index[3]] = (MB_CurrentRank[MB_Index[3]] + 1)
                  • Game - Display to (Player group((Player(MB_Index[3])))) for 5.00 seconds the text: ((((MB_Player_Colors[MB_Index[3]] + (Name of (Player(MB_Index[3])))) + ('s|r + (Name of MB_CastingUnit[MB_Index[3]]))) + |cff00ff00has been promoted to |r) + MB_Ranks[MB_Level[MB_Index[3]]])
                  • Multiboard - Set the text for RankBoard item in column 3, row (MB_Index[3] + 1) to (String(MB_Level[MB_Index[3]]))
                  • Multiboard - Set the text for RankBoard item in column 4, row (MB_Index[3] + 1) to MB_Ranks[MB_CurrentRank[MB_Index[3]]]
                  • Sound - Play GoodJob <gen> at 100.00% volume, attached to (Killing unit)
                • Else - Actions
            • Else - Actions
Keywords:
Rank,Military
Contents

Rank System V2.3 (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. To improve readability, performance and map file size in Create Multiboard set "((Player number of (Matching player)) + 1)" to a variable before repeat-referencing it (set it to an...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.



To improve readability, performance and map file size in Create Multiboard set "((Player number of (Matching player)) + 1)" to a variable before repeat-referencing it (set it to an integer at the top of the loop).

Also, do you notice anything silly here?:

(Name of (Player((Player number of (Matching player)))))

This can easily be simplified.

(Player number of (Owner of (Matching unit))) -> there is no matching unit, only matching player.

General efficiency problems in the indexing you have. You shouldn't be incrementing/decrementing arrays during the loop. Arrays are there for static reference, not volatile iterables.


Maker, Rank System v2.3, 5th Sep 2011

Leaks
  • Game - Display to (Player group((Player(MB_Index[3]))))...
 
Level 1
Joined
Jul 18, 2009
Messages
1
Their is a bug ...
-When you kill an unit it says : +1000exp but on the board it says +1exp
So the row should be name "Kills" and not "Exp", you should really fix that.

Suggestions :
-Maybe Add a Sound or/and Effect when the hero gets a new rank, because a little text saying : "Private II" its not very ... entertaining or catchy, you get it ?
-This spells will be confused if their plenty more of heroes from the same player, so maybe you should label your board like : "Red's Hero +*name of hero*" or "player 1's hero + *name of hero*" or "*player name*'s hero + *name of hero*"

Finaly :
For a final comment, beside the few stuff you could change its a nice map ;)
 
Level 14
Joined
Sep 3, 2009
Messages
1,527
it works perfectly fine idk wat everyone is talking about.
and so wat if its simple, some ppl might just need this a simple ranking system in gui thats easily changed.
im using it in my map but i changed it from a multiboard to so when someone types -rank they get their exp, rank, and exp needed for next rank.
If you'd like i can send you the chat based version for you too use some people might like better since it doesnt use up the space of the multiboard.
Simple yet effective GJ
 
Level 1
Joined
Mar 6, 2010
Messages
2
Hmm yes i like it this was what i was looking for .. kinda.. erm but 1 ques how to change how much exp received? isit always 1? can it be changed?:thumbs_up:
 
Level 1
Joined
Aug 26, 2010
Messages
3
Thank you very much for posting this, it was very easy to change around the ranks and implement this into my RPG map

+ Rep, good job and keep up the good work
 
Level 36
Joined
Sep 26, 2009
Messages
8,444
  • Set Points[(Player number of (Owner of (Matching unit)))] = 0
  • Set Level[(Player number of (Owner of (Matching unit)))] = 1
  • Set CurrentRank[(Player number of (Player((Integer A))))] = 1
This will bug. (Player number of (Owner of (Matching unit))) needs to be changed to simply "Integer A".

Also, can you update the screenshot to show the updates?
 
Level 36
Joined
Sep 26, 2009
Messages
8,444
Create Multiboard

Multiboard - Create a multiboard with 4 columns and ((Number of players in (All players controlled by a User player)) + 1) rows, titled EXP Table V2.1

- Leaks

(Last created multiboard)

- That is spammed over and over, just use your variable RankBoard and that would make your trigger run more quickly.

Quote me if I'm wrong, but I believe you can do "0.00 seconds game time" as the event and it will still display

Player Group - Pick every player in (All players controlled by a User player) and do (Actions)

- This leaks a force. You also leak another "pick every player" force right below it. I advise:

  • Set PlayerGroup = (All players matching ((Matching player) controller Equal to User) And ((Matching player) slot status) Equal to Is playing))
  • Player Group - Pick every player in PlayerGroup and do (Actions)
    • Loop - Actions
  • Custom script: call DestroyForce(udg_PlayerGroup)
(Player number of (Matching player)

- Spammed, should be set to an Integer variable at the top of the loop in order to maximize game-time performance.

Refresh Multiboard

Floating Text - Create floating text that reads |cff00ff00+1xp|r at (Position of (Killing unit))

- Leaks

(Player number of (Owner of (Killing unit)))

- Spammed, again, set this one to an integer variable an reference that instead.

Floating Text - Create floating text that reads |cff00ff00-1xp|r at (Position of (Killing unit))

- Leaks

(Dying unit)

- should just be (Triggering unit)

(Player number of (Owner of (Dying unit)))

- is also spammed.

(Last created multiboard)

- You're referencing this here again when you should just be referencing your Multiboard variable.

Display Stats

Game - Display to (Player group((Triggering player)))

- Leaks

Refresh Stats 2

(Casting unit)

- Should just be (Triggering unit)

Floating Text - Create floating text that reads (((|cff00ff00 + +) + (String((Level of (Ability being cast) for (Casting unit))))) + (xp + |r)) at (Position of (Casting unit))

- Leaks

Set CurrentRank[(Player number of (Owner of (Killing unit)))] = (CurrentRank[(Player number of (Owner of (Killing unit)))] + 1)

- There is no (Killing unit) in this event ;)

You're again spamming (Player number of (Owner of (Casting unit))) which should be put into a variable.
 
Top