Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Leaderboard display options
Leaderboard display options
Jun 26 2010, 10:50 am
By: Lanthanide  

Jun 26 2010, 10:50 am Lanthanide Post #1



Is it possible for a leaderboard to show the # of a specifc unit owned for each player? Eg Player 1 has 4 marines, P2 has 6 marines, so the leaderboard will show 4 for P1 and 6 for P2?

If this is brain-dead obvious and built-in function for SC, sorry for wasting your time. I'm in the process of shifting flats so don't have SC/Staredit on the computer I am currently using.

If it is possible using EUD leaderboards, details on how to get it to recognise specific units would be great.



None.

Jun 26 2010, 1:43 pm Azrael Post #2



Leaderboard (Control).




Jun 26 2010, 6:00 pm DavidJCobb Post #3



Az, isn't the number of all units a player owns? I think Lan's asking for something more specific (e.x. number of Terran Marines).



None.

Jun 26 2010, 6:02 pm Aristocrat Post #4



Quote from DavidJCobb
Az, isn't the number of all units a player owns? I think Lan's asking for something more specific (e.x. number of Terran Marines).

No, you can set the specific unit that the "Control" leaderboard tracks.



None.

Jun 26 2010, 7:32 pm Azrael Post #5



Quote from DavidJCobb
Az, isn't the number of all units a player owns?
No.




Jun 27 2010, 1:08 am Lanthanide Post #6



Ok, so the next question, is it possible, or how would you, get this display to show the total # of certain types of units?

Eg, player owns 3 assimilators, 1 extractor and 2 refineries, it should show 6 for this number.

Also you can't use Custom score, because that is already in use for another (more important) purpose.



None.

Jun 27 2010, 2:57 am rockz Post #7

ᴄʜᴇᴇsᴇ ɪᴛ!

Quote from Lanthanide
Also you can't use Custom score, because that is already in use for another (more important) purpose.
Show leaderboard kills of UnitID+228 to show leaderboard deaths. Count the number of geysers the player owns and add them all to some DC somewhere, then display the DC on the leaderboard.



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

Jun 27 2010, 3:36 am Azrael Post #8



If you wanted to do it without EUD's for whatever reason, which I'm sure you don't since the method rockz posted really can't be beat here, you have two main methods at your disposal (mainly throwing this out there in case someone checks this thread later trying to find this out, and has no idea what an EUD is/how to use it/doesn't want to use it/doesn't have SCM Draft/etc).

Both of these are flawed, so again, I recommend using the EUD solution already provided.

Method 1: You use Leaderboard (Control) for another unit, such as a Map Revealer, and every trigger cycle you remove all of that unit for the player and create X number of them wherever, where X is equal to the number of Extractors/Assimilators/Refineries you have. Alternatively, you can use Leaderboard (Control at Location), but Map Revealers won't work for this so you'll have to use something else.

Another alternative similar to this one is creating some unit at every Extractor/Assimilator/Refinery, and having it die when the Extractors/Assimilators/Refinery dies. You would just use Leaderboard (Control) for whatever the unit is you place at every gas-collection building. Map Revealers, though they could be used for this, would make it more complicated since you can't remove them at a location.

Flaws: Requires physical units to keep track of the buildings which will present a number of issues in many maps. Due to creating/removing units every cycle, keeping track of enough things this way could potentially cause trigger lag (though unless the whole map is geysers, I don't think this would be an issue in this particular case).

Method 2: You use Leaderboard (Points) and use something other than Custom. Every trigger cycle, you set the score to 0, and then set it to however many Extractors/Assimilators/Refineries you have.

Flaws: The score will randomly increase sometimes when it's supposed to increase normally, such as if you're using the "buildings" score, the score will jump up 50% of the time that you make a building and it will stay that way for a second, even though you're constantly resetting it. The only way this would be reliable is if you used a score that would never go up (like using Kill score in a map where you can never kill anything >_>).

Anyways, EUD answer above is the best one so yes, do that ^^




Jun 27 2010, 6:55 am Lanthanide Post #9



I'm presently doing Method 2 as outlined by Azrael, but want to move to rockz method.

Could you give more details though? So the idea here is that I would find out the UnitID of say Cantina (say 50 for this example), and then what do I type into the trigger in ScmDraft classic trigger editor? Show leaderboard kills of 278?



None.

Jun 27 2010, 7:47 am rockz Post #10

ᴄʜᴇᴇsᴇ ɪᴛ!

Trigger("All players"){
Conditions:
Always();

Actions:
Leader Board Kills("d", "Int:409");
}

//-----------------------------------------------------------------//
for cantina, which is ID 181.

I'd use command to find out how many you have and have 3 triggers for each geyser on the map, each adding 1 constantly to cantina if there exists a geyser building (use command exactly or at least, sorta like kills to cash). Set deaths to 0 at the beginning of each trigger cycle.



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

Jun 27 2010, 10:23 am Lanthanide Post #11



Thanks muchly. It'll be easy to move my current system, as mentioned above, to this new system.

This thread can be locked.



None.

Apr 17 2011, 6:36 am Lanthanide Post #12



Quote from rockz
Actions:
Leader Board Kills("d", "Int:409");
Right, so I implemented this in earlier versions of DSNight, and it worked fine. But now I'm trying to change the map a bit, and as part of that I copied all the triggers out into notepad, made a few changes and put them back in. But now these triggers show this:
Code
Leader Board Kills("\x004 <--- \x007Total gas per team (/18)", "Invalid Unit");

If I replace the "Invalid Unit" bit with "Int:445" or any permutation thereof ("int:445", "INT:445", "Int: 445", Int:445 etc) then I just get it complaining about the string not being a valid unit when I go to compile the trigger.

In the classic trigger editor, it shows as UnitID:228, but when I try and type in UnitID:445, it doesn't accept it.

I can load up older versions of my map and they still show Unit:445 inside the classic trigger editor, but when I go to the text trigger editor it has reverted to "Invalid Unit" as well.

Anyone know what's going on? I downloaded the latest ScmDraft from the thread in mapmaking tools, but that is acting exactly the same as the other version I was using (I suspect it was the same version actually).


Edit: Ok, looks like I fixed it. I entered "ID: 445" into the classic trigger editor and that did it. Still can't do it via the text triggers, though.

Post has been edited 1 time(s), last time on Apr 17 2011, 6:46 am by Lanthanide.



None.

Apr 17 2011, 7:54 am Roy Post #13

An artist's depiction of an Extended Unit Death

If I recall correctly, SCMDraft 2 doesn't support using UnitID in the text trigger editor.




Apr 17 2011, 6:42 pm rockz Post #14

ᴄʜᴇᴇsᴇ ɪᴛ!

It reads as "Int:409" on my version of trigedit, but does not compile properly. Do not use trigedit with extended units. Instead, use classic trigedit, starforge, or use trigedit and hex edit the proper unitID in, using some random unit like cantina or cave-in.

Classic trigedit extended units are:
ID:###



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

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[10:44 pm]
Ultraviolet -- 1337 ejaculator
[10:29 pm]
ejac1337 -- derp
[07:08 pm]
Slyence -- Well shucks ..
[2021-11-26. : 4:02 am]
O)FaRTy1billion[MM] -- Slyence
Slyence shouted: I could've swore I used to have a colored username.
probably, they did get reset at some point
[2021-11-26. : 4:02 am]
Apos -- :wob:
[2021-11-26. : 12:01 am]
UndeadStar -- 🦃 Just saw a new news 🦃
[2021-11-25. : 6:04 pm]
Slyence -- Meme x2
[2021-11-25. : 12:39 pm]
Moose -- meme
[2021-11-25. : 12:25 pm]
Slyence -- I could've swore I used to have a colored username.
[2021-11-24. : 10:56 pm]
RdeRenato -- xd
Please log in to shout.


Members Online: Oh_Man, Roy