Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Edit Mineral Count Gathered
Edit Mineral Count Gathered
Aug 11 2009, 4:05 am
By: ODBOD  

Aug 11 2009, 4:05 am ODBOD Post #1



I'm not sure if this is possible or even able to be done (without mods), but I was curious if you were able to edit the mineral count received while mining, and at the same time, edit the starting worker count as well. Because, I was thinking about making a standard game for me and my friends for a LAN party thing, but start it with 8 workers but with a mineral count of 5 instead of the standard 8.

How would I go about doing this?



None.

Aug 11 2009, 4:25 am Kaias Post #2



Quote from ODBOD
I'm not sure if this is possible or even able to be done (without mods), but I was curious if you were able to edit the mineral count received while mining, and at the same time, edit the starting worker count as well. Because, I was thinking about making a standard game for me and my friends for a LAN party thing, but start it with 8 workers but with a mineral count of 5 instead of the standard 8.

How would I go about doing this?
There is no option you can set to change the minerals you get from mining; however with some triggers you can get this effect.

There is a wiki article here for it that you can read- though you might have some trouble understanding all the concepts if you aren't familiar with triggers. I would give the article a shot and see if you can duplicate the effect and if you have any trouble understanding afterward come back here so we can resolve what you don't understand.

You can also give players 8 workers easily using a few simple triggers and one location (of any small to medium size)

Trigger
Players: (all human slots)
Conditions:
Current Player commands at least 1 Terran Command Center
Actions:
Center location labeled "Location 0" on Terran Command Center for Current Player at Anywhere
Create 4 Terran SCVs for Current Player at "Location 0"

And then copy this trigger twice, changing one to the Zerg units (Hatchery and drones) and the other to the Protoss ones (Nexus and Probes) in place of the Terran ones (Command Center and SCV's)

Post has been edited 1 time(s), last time on Aug 11 2009, 4:43 am by Kaias. Reason: Fixed a tag



None.

Aug 11 2009, 7:51 pm ODBOD Post #3



Well, I took thought about that article, and I actually liked the map it provided with the example. The only thing is that, I don't really understand where it completely comes from, because according to the map or something like that, there are a whole bunch of triggers. And I don't see how I could modify all that to fit the 5 mineral return I want to try and get going. Unless I can actually simplify the amount of triggers it uses, or something.

Also, thank you for your reply on the worker count, it works beautifully!



None.

Aug 11 2009, 8:40 pm Kimaru Post #4



I think the article is wrong when it comes to returning previously mined ore. I think it should say "Transfer DC2 into ore and DC1 at a 1:1 ratio", not "Transfer DC3 into..." because the little summary does not match this part.

Anyway it's basically 4 different triggers with a bunch of copies:
Counting previously owned ore
CollapseBox

Counting newly mined ore
CollapseBox

Returning previously owned ore
CollapseBox

Returning newly mined ore
CollapseBox


Then you copy the triggers again, but just find and replace Ore and exchange it for Gas, also use 3 new death counters for gas. (again can be done through notepad's find and replace)

So those are the 4 basic triggers on which this system runs, however, they are not enough to support the system. You must provide double value duplicates of each one, like having the death ratios at 1, 2, 4, 8, 16, 32.... If, for example, you copy the trigger till each one is increased to 2048, then your map will be able to handle someone mining 4095 minerals until the system starts messing up for that player because the triggers can't repeat themselves fast enough before they move on to the next part of the system. Just make the death ratios go up as far as you think someone will mine.



None.

Aug 11 2009, 8:51 pm ODBOD Post #5



Well, it's going to be a standard game. Just, 8 workers, 5 mineral count when they come on by.

However, the thing is, how am I even changing the increments to match the 5 mineral count? I see al of the 1,2,4, etc in the triggers given on that one map, but I don't see how I can change it to 5 easily. Unless, the increments have to be in 5's, rather than 2's.

Plus, after I figure that part out, without those triggers getting the way, how am I able to keep the standard '50 starting minerals' without it being reduced without the triggers affecting it?



None.

Aug 11 2009, 9:34 pm Vrael Post #6



To understand the way this system works, I think you're missing the point of a big part of it. It uses what we refer to as a "binary countoff" to transfer exactly the correct amount of minerals each time. A normal trigger can only subtract a set amount of minerals each trigger cycle, but by using multiple triggers right after one another, we can subtract any number within the range of our triggers. A binary countoff works as follows: Every number can be broken down into powers of 2. 32 for example, is 2^5. 33 is 2^5 + 2^0. 63 is 2^5 + 2^4 + 2^3 + 2^2 + 2^1 + 2^0 (or 32 + 16 + 8 + 4 + 2 + 1). In terms of triggers, we can have 1 trigger to represent every power of 2. If we place a bunch of them right next to each other, then we can subtract or add any number between the number of binary triggers we have (for example, if we had 5 triggers like in the example above, we could add or subtract any number between 1 and 63, since that's the max of 2^5 + 2^4 ... 2^0). More importantly, we can add or subtract them in 1 trigger cycle, so after the last subtraction trigger runs, the values are in the correct death counts.
Here is a better explaination about binary countoffs: http://www.staredit.net/wiki/Binary_Countoffs

We use this binary countoff not to make it so they mine 5 minerals, but to detect IF they've mined the minerals, and how much they've mined. This is done by subtracting all their current minerals, and comparing it to the amount of minerals they had the last time the triggers ran. The difference is how much they've mined.

Once we know how much they've mined, we can give back the amount they had the previous trigger cycle first, then give back only 5/8 minerals of the difference that we've calculated. Hope this helps.

Edit:
Just an overview of the process:
1). Figure out how many minerals the player has (by using binary countoff #1)
2). Copy that number to another death count for storage and use later (using another binary countoff)
3). Subtract the amount they had last trigger cycle from the amount they have now (you guessed it - a binary countoff)
4). Give back the amount they had last trigger cycle (binary countoff again)
5). Give back 5/8 of the difference that we found in step 3. (using a binary countoff again, but this time you have to factor in the 5/8 part)

Post has been edited 2 time(s), last time on Aug 11 2009, 9:42 pm by Vrael.



None.

Aug 13 2009, 7:08 am ODBOD Post #7



Quote from Kimaru
I think the article is wrong when it comes to returning previously mined ore. I think it should say "Transfer DC2 into ore and DC1 at a 1:1 ratio", not "Transfer DC3 into..." because the little summary does not match this part.

Anyway it's basically 4 different triggers with a bunch of copies:
Counting previously owned ore
CollapseBox

Counting newly mined ore
CollapseBox

Returning previously owned ore
CollapseBox

Returning newly mined ore
CollapseBox


Then you copy the triggers again, but just find and replace Ore and exchange it for Gas, also use 3 new death counters for gas. (again can be done through notepad's find and replace)

So those are the 4 basic triggers on which this system runs, however, they are not enough to support the system. You must provide double value duplicates of each one, like having the death ratios at 1, 2, 4, 8, 16, 32.... If, for example, you copy the trigger till each one is increased to 2048, then your map will be able to handle someone mining 4095 minerals until the system starts messing up for that player because the triggers can't repeat themselves fast enough before they move on to the next part of the system. Just make the death ratios go up as far as you think someone will mine.

Add X (5 in your case) Ore for Current Player

After doing that, what ends up happening is that it gets 5, but then subtracts 4, right back to 1. And then it goes up by ones, so I'm probably doing something wrong in this case.



None.

Aug 13 2009, 9:50 am Kimaru Post #8



Oh sorry, for the 4th trigger, try starting it at "suffered 8 deaths of DC3" since you're only gathering 8 at a time. So it would look like this:

Code
Current player has suffered at least 8 deaths of DC3
----------------------------------------------------------------------
Subtract 1 death of DC3 for Current Player
Add 1 death of DC2 for Current Player
Add X (5 in your case) ore for Current Player


So you start it at 8, then go to 16, 32, 64... that should work.



None.

Aug 13 2009, 2:26 pm rockz Post #9

ᴄʜᴇᴇsᴇ ɪᴛ!

Quote from Kimaru
CollapseBox

use
Code
Current Player has suffered at least 64 death of DC3
------------------------------------------------------------
Subtract 64 death of DC3 for Current Player
Add 40 death of DC1 for Current Player
Add 40 Ore for Current Player

Current Player has suffered at least 32 death of DC3
------------------------------------------------------------
Subtract 32 death of DC3 for Current Player
Add 20 death of DC1 for Current Player
Add 20 Ore for Current Player

Current Player has suffered at least 16 death of DC3
------------------------------------------------------------
Subtract 16 death of DC3 for Current Player
Add 10 death of DC1 for Current Player
Add 10 (5 in your case) Ore for Current Player

Current Player has suffered at least 8 death of DC3
------------------------------------------------------------
Subtract 8 death of DC3 for Current Player
Add 5 death of DC1 for Current Player
Add 5 Ore for Current Player


DC1 mirrors your minerals perfectly. Therefore, you have to return the minerals at the same ratio. DC2 is an empty spot where you simply save DC1 temporarily. This is simply to determine how much the player has mined since the last trigger run. DC3 is the place to determine how much you have mined which has NOT been converted. If DC1 and Ore are not identical, then it will go through the process. Make sure you set DC1 to 0 after you have no more ore left, since you will have more DC1 than ore if you spend money.

To prevent the initial money from being converted, you can either pre convert it (give them 80 mins) or add 50 to DC1 at the start with the minerals.



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

Aug 13 2009, 6:12 pm darksnow Post #10



i made a test map for this, and while its mining everythings fine, but after you build/make something, it screws up o.o



None.

Aug 13 2009, 7:07 pm rockz Post #11

ᴄʜᴇᴇsᴇ ɪᴛ!

make sure you set dc1 to zero when it says to.



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

Aug 13 2009, 7:13 pm darksnow Post #12



so it'll be

current player accumulates at most 0 minerals

set deaths for DC1 to 0



None.

Aug 13 2009, 7:20 pm ODBOD Post #13



Quote from rockz
Quote from Kimaru
CollapseBox

use
Code
Current Player has suffered at least 64 death of DC3
------------------------------------------------------------
Subtract 64 death of DC3 for Current Player
Add 40 death of DC1 for Current Player
Add 40 Ore for Current Player

Current Player has suffered at least 32 death of DC3
------------------------------------------------------------
Subtract 32 death of DC3 for Current Player
Add 20 death of DC1 for Current Player
Add 20 Ore for Current Player

Current Player has suffered at least 16 death of DC3
------------------------------------------------------------
Subtract 16 death of DC3 for Current Player
Add 10 death of DC1 for Current Player
Add 10 (5 in your case) Ore for Current Player

Current Player has suffered at least 8 death of DC3
------------------------------------------------------------
Subtract 8 death of DC3 for Current Player
Add 5 death of DC1 for Current Player
Add 5 Ore for Current Player


DC1 mirrors your minerals perfectly. Therefore, you have to return the minerals at the same ratio. DC2 is an empty spot where you simply save DC1 temporarily. This is simply to determine how much the player has mined since the last trigger run. DC3 is the place to determine how much you have mined which has NOT been converted. If DC1 and Ore are not identical, then it will go through the process. Make sure you set DC1 to 0 after you have no more ore left, since you will have more DC1 than ore if you spend money.

To prevent the initial money from being converted, you can either pre convert it (give them 80 mins) or add 50 to DC1 at the start with the minerals.

This did it! Thanks man! I'm sure supply count is editable too, right?



None.

Aug 13 2009, 7:31 pm rockz Post #14

ᴄʜᴇᴇsᴇ ɪᴛ!

how do you want to edit supply count?



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

Aug 13 2009, 7:58 pm ODBOD Post #15



Quote from rockz
how do you want to edit supply count?
I want to make it so that the protoss and zerg get a beginning 10 supply count, just like the terran, rather than the 9 that they start with. Is that even possible to do?



None.

Aug 13 2009, 8:25 pm Jack Post #16

>be faceless void >mfw I have no face

No. However you could make an invincible pylon somewhere, and 6 incincible probes that are constantly ordered to the same spot. This would give the protoss player 16 supply, but only 10 useable supply.



Red classic.

"In short, their absurdities are so extreme that it is painful even to quote them."

Aug 13 2009, 8:42 pm darksnow Post #17



but then when you max out with 200, you wouldn't be able to build any units.
4 supply=1 reaver



None.

Aug 13 2009, 8:46 pm Jack Post #18

>be faceless void >mfw I have no face

Thats normal. Except you would only have 194 supply at the end.

Post has been edited 1 time(s), last time on Aug 13 2009, 8:47 pm by zany_001. Reason: 194*



Red classic.

"In short, their absurdities are so extreme that it is painful even to quote them."

Aug 13 2009, 8:48 pm darksnow Post #19



oh and there's still a problem when i change the minerals you mine, when you build a unit, while its being built, it goes back to 8, then after the unit(probe) is built, it gives 5 again



None.

Aug 13 2009, 9:37 pm l)ark_ssj9kevin Post #20

Just here for the activity... well not really

This might interst you



guy lifting weight (animated smiley):

O-IC
OI-C

"Oh, I see it"


Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[07:32 pm]
Zoan -- I got $2000 bonus. I would like 2000 minerals, please
[2026-4-16. : 4:15 am]
DarkenedFantasies -- you eat lots of beans
[2026-4-16. : 3:46 am]
IskatuMesk -- how do i get gas
[2026-4-15. : 11:43 pm]
Moose -- you don't
[2026-4-15. : 10:06 pm]
Zoan -- how do i get minerals
[2026-4-14. : 11:45 pm]
ClansAreForGays -- Anyone wanna played Skewed StarCraft?
[2026-4-14. : 12:07 am]
Vrael -- NudeRaider
NudeRaider shouted: Vrael ranting still is though
you're a gentleman and a scholar, thank you
[2026-4-13. : 10:07 pm]
NudeRaider -- ya why phone people when you can just write letters
[2026-4-13. : 9:37 pm]
IskatuMesk -- I have never and will never own a phone
[2026-4-13. : 9:15 pm]
NudeRaider -- Vrael ranting still is though
Please log in to shout.


Members Online: anoeth47