Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Multiple custom leaderboards
Multiple custom leaderboards
This topic is locked. You can no longer write replies here.
Jan 3 2009, 6:01 am
By: Norm  

Jan 3 2009, 6:01 am Norm Post #1



Okay, here's the deal. In an upcoming RPG i want to track both EXP and currency with a custom score leaderboard. But i need to know if it's possible to have custom points added to 'experience' sometimes and then added to '$$' other times? If not, is it possible to re-label 'razings' as experience? and use that as a custom? Also, how do i do alternating leaderboard displays?



None.

Jan 3 2009, 6:07 am badcop Post #2



You can use different leaderboards such as control unit at location for different things, though this may be hard to do for your case. And no multiple custom scores isn't possible to my believe.



None.

Jan 3 2009, 6:09 am Vrael Post #3



Yes this is completely possible (if you use razings as your second leaderboard, multiple custom points is not though). In my rpg I'm using Custom for EXP, and Razings as Level. Basically, to alternate it, make a timer, something like this:

Conditions:
Player X has suffered at most 24 deaths of Terran Marker
Switch Y is cleared
Actions:
Display Leaderboard for most Custom. Display Label "Whatever"
Set Switch Y
Preserve Trigger

Conditions:
Player X has suffered at least 25 deaths of Terran Marker
Player X has suffered at most 48 deaths of Terran Marker
Switch Y is set
Actions:
Display Leaderboard for most Razings. Display Label "Whatever2"
Clear Switch Y
Preserve trigger

Conditions:
Player X has suffered at most 47 deaths of Terran Marker
Actions:
Add 1 for Terran Marker
Preserve Trigger

Conditions:
Player X has suffered exactly 48 deaths of Terran Marker
Actions:
Set to 0 for Terran Marker for Player X
Preserve trigger


If you're using hyper triggers, this will alternate the leaderboard every 2 seconds. Every 4 seconds the timer runs up and the cycle starts over.
Note: The switch use is only somthing I add into my triggers so that they don't run every trigger cycle, and only as necessary. I do this to try and keep lag to a minimum, but it isn't necessary for the trigger set.

Post has been edited 1 time(s), last time on Jan 3 2009, 6:10 am by Vrael. Reason: Spell Check + info



None.

Jan 3 2009, 6:10 am badcop Post #4



What are razings exactly?



None.

Jan 3 2009, 6:14 am Vrael Post #5



Razings are building kills.
Depending on the type of map you're using, it may not be good to use this because it'll mess up your leaderboard by 1 every building that gets killed. Unfortunately the alterntes like "control at location" might not work either if you have a map with close to the unit limit or something.

Since you're making an rpg, to ensure building kills don't mess up your persons exp or money, one solution just might be to use a death count like Protoss Beacon for the actual currency/exp, and use razings just for display purposes.

Say I have 5 gold, you make a trigger like so:

Conditions:
Current player has suffered exactly 5 deaths of "Gold Counter"
Current player razings score is at least 6
Actions:
Set score for current player: Razings-->5
preserve trigger


Then copy that trigger a bunch of times for each possible gold value. Unfortunately if you have like, 17000 gold or exp as razings, it could be a problem, or you could use a trigger duplicator. In my case my map only has 50 levels so it was a mere 50 triggers to ensure the leaderboard was accurate. Then again, if someone has 17000 gold and they kill a building they only get +1 gold so maybe it wouldn't matter :D

Post has been edited 1 time(s), last time on Jan 3 2009, 6:18 am by Vrael. Reason: more info



None.

Jan 3 2009, 7:03 am rockz Post #6

ᴄʜᴇᴇsᴇ ɪᴛ!

Multiple custom scores are only possible if you use death counters as a storage area and binary countoffs to transfer the data. If this is what you want, say so, and someone will explain how to do it (or check the wiki).

To switch between leaderboards is simple: run the trigger, wait a little bit (via death count timer please, waits suck) run the other leaderboard trigger, rinse and repeat. If you want currency, why not use minerals/gas? Just show leaderboard for the minerals/gas.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Jan 3 2009, 7:45 am Norm Post #7



Quote from rockz
Multiple custom scores are only possible if you use death counters as a storage area and binary countoffs to transfer the data. If this is what you want, say so, and someone will explain how to do it (or check the wiki).

To switch between leaderboards is simple: run the trigger, wait a little bit (via death count timer please, waits suck) run the other leaderboard trigger, rinse and repeat. If you want currency, why not use minerals/gas? Just show leaderboard for the minerals/gas.

This is not an option for me because my map utilizes Minerals as a unique item used to improve stats and it uses Gas to count as a sort of 'MP/Mana' type thing. Currency is used to purchase items, bribe people, or stay at an inn. And EXP is a custom score to track....... your exp. What I will do is just use custom score as exp, and use buildings score as the currency. I will just have to set the building score to zero at the start of the game so that currency is not effected by buildings that the player has.

Someone said that I could display building leaderboard with the title of 'Cash' or something like that?



None.

Jan 3 2009, 9:37 am Heinermann Post #8

SDE, BWAPI owner, hacker.

You can display deaths in a leaderboard using extended units in leaderboard kills.




Jan 3 2009, 12:13 pm NudeRaider Post #9

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Quote from Heinermann
You can display deaths in a leaderboard using extended units in leaderboard kills.
What? Even I don't know what you're trying to say. Please elaborate.

Vraels Leaderboard triggers totally work (if I haven't overlooked something while skimming them) but there's an easier way:
Rename any unsused unit (e.g. Neutral - Neutral - Cantina) to 'Leaderboard Counter'

Trigger 1: Counter
Comp player
Conditions:

Always
Actions:
Subtract 1 death from 'Leaderboard Counter' of Current Player
Preserve trigger

Trigger 2: Display $$
Comp player
Conditions:

Current Player has suffered exactly 0 deaths of 'Leaderboard Counter'
Actions:
Display Leaderboard "$$"
Set deaths to 64 from 'Leaderboard Counter' of Current Player
Preserve trigger

Trigger 3: Display Custom
Comp player
Conditions:

Current Player has suffered exactly 24 deaths of 'Leaderboard Counter'
Actions:
Display Leaderboard "Custom"
Preserve trigger

This example sets the counter to 64 (= 8 game seconds) and splits it at 24 (= 3 game seconds) which means that the leaderboard shows "$$" for 5 seconds, and "Custom" for 3 seconds. Adjust the values to your liking.

But there would be an alternative better fitting for a RPG, if you're willing to use a Trigger Duplicator. You could place a mineral block in inventory of the players and always set it to the amount of gold he currently has. Unfortunately there's no way except brute-forcing it, but using the program I linked to this should be no problem.




Jan 3 2009, 1:55 pm iCafeMoto Post #10



i once made an EUD play/obs python map where if u clicked on a mineral field, leaderboard would go to greed... if u clicked on a marine, leaderboard would display how many marines the player owned, etc....

u can do something like this if u want to toggle between differnet leadboards. example: click on this building to view experience.. or w/e

edi: i would show u the triggers but im kind of lazy to open up the map at the moment



None.

Jan 3 2009, 2:35 pm NudeRaider Post #11

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Quote from iCafeMoto
i once made an EUD play/obs python map where if u clicked on a mineral field, leaderboard would go to greed... if u clicked on a marine, leaderboard would display how many marines the player owned, etc....

u can do something like this if u want to toggle between differnet leadboards. example: click on this building to view experience.. or w/e

edi: i would show u the triggers but im kind of lazy to open up the map at the moment
In maps like this EUDs are usually a bad choice since the death tables can change every patch, thus making your map useless. Or at least part of it.
It is also too much work to achieve something that simple imo.




Jan 3 2009, 5:21 pm Heinermann Post #12

SDE, BWAPI owner, hacker.

Since Kills table comes before the Deaths table, you can use leaderboard kills of unit 228 to display the deaths of Terran Marine. IDs 229 230 231 and 232 are reserved however. You're open to all of the other unit IDs though. I tested it for unit ID 228 and unit ID 233. To get the unit ID to display deaths, just add 228 to the unit ID value.

Quote
death tables can change
Their location in memory shifts, along with everything else.




Jan 3 2009, 5:32 pm BlackWolf99 Post #13



Vrael had a good solution
much informative and simple xD



None.

Jan 3 2009, 5:35 pm Heinermann Post #14

SDE, BWAPI owner, hacker.

Simple? My method only uses a single action.




Jan 3 2009, 7:18 pm Norm Post #15



It's alright everyone, i made it work for me. I avoided complex EUD ect. and it's just a simple alternating leaderboard. It shows Custom as EXP and Buildings as Currency. It's the perfect solution for my map, thank you for the advice.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[05:25 pm]
NudeRaider -- there he is, right on time! Go UV! :D
[05:24 pm]
lil-Inferno -- poopoo
[05:14 pm]
UndeadStar -- I wonder if that's what happened to me. A returned product (screen) was "officially lost" for a while before being found and refunded. Maybe it would have remained "lost" if I didn't communicate?
[03:36 pm]
NudeRaider -- :lol:
[03:02 am]
Ultraviolet -- I'm gonna send inf to have sex with their moms
[03:02 am]
Ultraviolet -- fuck those motherfuckers
[11:02 pm]
NudeRaider -- PSA: ASUS apparently decided their RMA department needs to "become profitable" and for a while now outright tries to scam customers. They were called out on it a year ago, promised to change, but didn't. https://www.youtube.com/watch?v=7pMrssIrKcY so my recommendation: Stop buying ASUS, and if you already have and need something RMA'd, make sure to not let them bully you into paying.
[2024-5-15. : 3:08 pm]
Oh_Man -- example of wat u mean?
[2024-5-15. : 5:59 am]
NudeRaider -- *is
[2024-5-15. : 5:17 am]
NudeRaider -- despite all its flaws the sound design its fantastic
Please log in to shout.


Members Online: 2oliviae4623to7, NudeRaider, lil-Inferno