Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: A good way to limit upgrades?
A good way to limit upgrades?
Jul 28 2009, 7:19 pm
By: Jiggaboo  

Jul 28 2009, 7:19 pm Jiggaboo Post #1



So I was wondering what a good approach would be for limiting how many times you can upgrade, until "x" happens.
Limiting it via how many minerals you have won't work, because they have multiple uses.

So, one idea I had was..
You can buy "upgraders" for minerals. This would create an "upgrader" in a special location (like an inventory) and when you moved the upgrader onto a location in the inventory, it would give you 1 ore (which would be used to buy the upgrade). Also; when the upgrader moved to the location, it would die, and I could keep track of its death count. So I could use this to limit how many upgrades it does by.. I was thinking triggers would be something like

//Game starts out with Player1 having a 255deathcount of Upgrader
//Lets say you get Upgraders by buying Zealots that cost 100minerals

[CONDITIONS]
[*]Player1 brings at least 1 Upgrader to getGas
[*]Player1's deathcount of Upgrader is less than 255

[ACTIONS]
[*]Kill Upgrader at getGas
[*]Give Player1 1gas
//Now the player can buy the upgrade at the forge or w/e



[CONDITIONS]
[*]Player1 completes IncreaseMaxUpgradeLimitQuest

[ACTIONS]
[*]Subtract 10 deaths from player 1's deathcount of Upgraders





So I think my approach would work ... except that I don't want to have the player have to go through the hassle of moving the Upgrader to the getGas location and having to deal with that whole inventory issue. Would it be possible to do this all behind the scenes?


Sorry for the sloppy / confusing post heh, my thoughts are all over the place



None.

Jul 28 2009, 7:29 pm JaFF Post #2



Or you can give the upgrades unique cost(s) and detect when a player has spent this unique amount of money. That way you'll know how many upgrades a player has made. Once he reaches his limit, remove the upgrade buildings. When the limit is extended or 'x' happens, create the building again.

To detect the amount of money spent, use Binary Countoffs.



None.

Jul 28 2009, 9:04 pm Jack Post #3

>be faceless void >mfw I have no face

I would give the building to a computer instead of remove. It keeps hotkeys. Just a tip,it makes your map more userfriendly.



Red classic.

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

Jul 28 2009, 9:05 pm JaFF Post #4



Quote from name:zany_001
I would give the building to a computer instead of remove. It keeps hotkeys. Just a tip,it makes your map more userfriendly.
Good point.



None.

Jul 28 2009, 9:12 pm poison_us Post #5

Back* from the grave

To me, it makes it less professional--and takes a portion of the map...though there's no real workaround anymore.
Unfortunately, EUD actions are gone so we can't upgrade for the players. :><:




Jul 28 2009, 10:40 pm Jiggaboo Post #6



I can't restrict access to the upgrade buildings. :\
Multiple people access them, and they upgrade at different rates.



None.

Jul 28 2009, 10:48 pm Ashamed Post #7

Hear me Raor!!

I had this issue once in my map, and i did it with some death counters and minerals. What i had was an upgrade area where you had to go in order to upgrade, and when you went in there. You had minerals lets say mineral= health. When you had 100 health and walked in to upgrade it would start subtracting the minerals by 1, and adding to a random DC also. So when your minerals are at 0- your DC is at 100 now. Now the reason why i did this was because in the upgrade area you had a choice of like 6 differnt upgrades, which you got with skill points. So if you did decide to upgrade. It would auto populate the minerals to 1, and then when you had 0 it would subtract on skill point and then give you 1 more mineral. Only if you had another skill point. Then when you walk out of the upgrade area it did the same thing with the DC from before but now it was adding minerals and subtracting the DC. So when you went out you would have 100 minerals.

If you have alot of minerals you can go by bigger chunks also, like if user has at least 100 minerals subtract 100 and add 100 DC, and then you can do like 50,25,10,5,1 and have them all running at the same time. It will go by pretty fast.



None.

Jul 29 2009, 11:22 am JaFF Post #8



Quote from Jiggaboo
I can't restrict access to the upgrade buildings. :\
Multiple people access them, and they upgrade at different rates.
Then the simplest way I see it is to use a unique resource (gas or minerals) as you suggested yourself.



None.

Aug 1 2009, 12:50 am FatalException Post #9



I have to limit upgrades in my map, too, and both minerals and gas are used for other things. Luckily, players should never have more than one gas, so when a player goes into the upgrade area, I just don't allow the players to do the stuff that requires gas, and I set their gas to one. Once they've spent the gas, give the buildings to the computer, change their upgrade deathcount (which could actually just be a switch), and voila, it works.



None.

Aug 1 2009, 7:23 am Hacksaw76 Post #10



If say, a computer player does an upgrade and gives that unit to you, will those same upgrades be on your new unit?
Just wondering, this would be very handy.



None.

Aug 1 2009, 2:11 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

The player receives all techs and non-weapon upgrades if it's not disabled.




Aug 3 2009, 11:00 am Jiggaboo Post #12



Alright, so I finally got around to implementing this, and it turns out to be a very simple system..
..Albeit a hassle to the player, because they have to first go buy a unit, before they can actually buy the upgrade.


~~If anyone wants any additional clarification on how/why/what just post
I first found out how many possible upgrades the player can have in my map.
The magic # I came up with was 2,550. (255 x 10 different types of upgrades)
So I set the players death-count for the Zealot to be 2,540.

Every time the player purchases a Zealot, 2 triggers go down (I wish there were ELSE statements T_T)
1) Player buys a zealot and death count is at most 2549
------>Add 1 gas (used to buy the actual upgrade)
------>Add 1 to the death-count for the Zealot
2)Player buys a zealot and death count is at least 2550
------>Reimburse the player for the cost of the Zealot, and let them know they can't upgrade that far yet.

And of course the event to increase your upgrade level, is simply subtracting from players death-count for the Zealot.

I'm sure I could have managed it a little bit better ... but for the time being, it works.







I also have a few other random questions .. that I don't feel they quite deserve their own thread .. so here I go :P
1) How do I enable units that require tech to be built, without having the tech?
----> Example: Building a Dragoon without actually having a Cybernetics core.
----> I tried messing around with the Tech Settings in SCMDraft but I didn't see any results :\
2) Is there any way to change the title of a unit when you're building it?
----> Example: Building a Zealot inside the Stargate, and have it read something other than "Zealot"
----> I'm going to guess no .. which makes me want to make a Dropship system lol .. because I'm pretty sure it did it there.
3) Is there any way to allow a player to upgrade (weapons/armor/shields etc) levels 2 and 3 without the required tech?
----> My current work-around is just having the player start with a Lv3 upgrade, but .. thats cheating :P




Thanks for the help sen :3



None.

Aug 3 2009, 12:47 pm r00k Post #13



1,2,3 no.
1,3
Make a trigger that creates the building (core) at an unused spot when the player is near the gateway or something else and remove it after, or give it to neutral and back.
Example, but a little long-winded
buy a zealot --> zealots near, create core (& temp archive ???).
buy goon --> remove zealot, create temp archive.
buy dt --> remove goon (& zealot ???)

2.
You can do the buildtime really long, and limit the ressources like you did before with the zealot, when you detect he spends the minerals, make a text message:
"You are building a "Unitname"
Hit ESC to cancel"
Mission Objectives ?

I never did any of this, and its pretty complicated for the Player, but its a possible solution.



None.

Aug 4 2009, 7:42 pm Jiggaboo Post #14



Thanks r00k.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:19 pm]
Vrael -- IM GONNA MANUFACTURE SOME SPORTBALL EQUIPMENT WHERE THE SUN DONT SHINE BOY
[2024-5-02. : 1:35 am]
Ultraviolet -- Vrael
Vrael shouted: NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
Gonna put deez sportballs in your mouth
[2024-5-01. : 1:24 pm]
Vrael -- NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
[2024-4-30. : 5:08 pm]
Oh_Man -- https://youtu.be/lGxUOgfmUCQ
[2024-4-30. : 7:43 am]
NudeRaider -- Vrael
Vrael shouted: if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
Yeah I'm not a big fan of Westernhagen either, Fanta vier much better! But they didn't drop the lyrics that fit the situation. Farty: Ich bin wieder hier; nobody: in meinem Revier; Me: war nie wirklich weg
[2024-4-29. : 6:36 pm]
RIVE -- Nah, I'm still on Orange Box.
[2024-4-29. : 4:36 pm]
Oh_Man -- anyone play Outside the Box yet? it was a fun time
[2024-4-29. : 12:52 pm]
Vrael -- if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
[2024-4-29. : 11:17 am]
Zycorax -- :wob:
[2024-4-27. : 9:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
Please log in to shout.


Members Online: NudeRaider, Roy