Upgrade Shops

Dave312

Censored for your safe viewing
Reaction score
269
I am trying to make a neutral shop where a player can purchase upgrades. The problem that I come across is that the upgrade researched is given to the player that owns the shop (the neutral player). Furthermore, the level of the upgrade purchased is dependent upon the current research level for the shop owner. As such if Player 1 buys level 1 of the upgrade, then they won't be able to purchase level 2 until the neutral player has level 1 researched (which will never happen). Additionally it also means that having the cost increase with each level also doesn't work.

So what I'm trying to do is have multi level upgrades purchased from a common shop where the cost of the upgrade increases with each level purchased. Any thoughts on how to get this to work?
 

X-maul

AKA: Demtrod
Reaction score
201
Uhm, I'm not entirely sure I understand what you want, do you mean that the problem is that, when player 1 upgrades, you want the neutral player to upgrade aswell?
Cant you just do that with a trigger?
 

MerrillPhish

Active Member
Reaction score
10
The problem that I come across is that the upgrade researched is given to the player that owns the shop (the neutral player).

I had this problem with my map. I solved it by making an upgrade building for each player... but I am sure you can also solve this problem with triggers. I have seen maps like Special Elite Forces have neutral upgrade buildings so It is possible.

This looks like a good tutorial.
http://www.sc2mapster.com/forums/re...accumulative-and-multiple-upgrade-with-queue/

I'm at work right now but hopefully this will put you in the right direction.
 

MissKerrigan

Active Member
Reaction score
23
I'm not sure if I may meddle into this but I think I know the way to do it

(it's the way I did it once before)


- Share control with the neutral player
- Use the trigger action 'button is pressed'
- Use a condition 'player has resources'
- Let the button disappear by trigger

But if player 1 buys the upgrade, does all players having the upgrade then or just player 1?
 

Dave312

Censored for your safe viewing
Reaction score
269
Uhm, I'm not entirely sure I understand what
you want, do you mean that the problem is that, when player 1 upgrades, you want the neutral player to upgrade aswell?
Cant you just do that with a trigger?
The problem is a little more complicated than that. I can create a single level upgrade and make it purchaseable from a shop without any problems. When purchased, the upgrade will be given to the neutral player (the player that owns the shop) and like you suggested, I can use a trigger to transfer the upgrade to the player that purchased it. However when I make multi-level upgrades, things become a lot more complicated. The main issue that I'm having is that I can't make the upgrade cost dependant on the level being purchased (because the level purchased is always determined for the neutral player, not the player purchasing it.


I had this problem with my map. I solved it by making an upgrade building for each player... but I am sure you can also solve this problem with triggers. I have seen maps like Special Elite Forces have neutral upgrade buildings so It is possible.

This looks like a good tutorial.
http://www.sc2mapster.com/forums/re...accumulative-and-multiple-upgrade-with-queue/

I'm at work right now but hopefully this will put you in the right direction.
I was really trying to avoid having an upgrade building per player. I have some alternative methods to make this work if it really comes down to it but all solutions have some side effects that I am really trying to avoid.

It has been a long time since I have played Special Forces Elite, but it always used to have an upgrade building for each player rather than a common one. I'll have a look and see if I can figure how they did it. Thanks

I'm not sure if I may meddle into this but I think I know the way to do it

(it's the way I did it once before)


- Share control with the neutral player
- Use the trigger action 'button is pressed'
- Use a condition 'player has resources'
- Let the button disappear by trigger

But if player 1 buys the upgrade, does all players having the upgrade then or just player 1?
It would just be player 1 (only the player who purchased it). The problem with your solution is that the cost of the upgrade will not be shown on the button. It would have to be calculated by the player to work out is he/she has enough resources.
 

X-maul

AKA: Demtrod
Reaction score
201
The problem is a little more complicated than that. I can create a single level upgrade and make it purchaseable from a shop without any problems. When purchased, the upgrade will be given to the neutral player (the player that owns the shop) and like you suggested, I can use a trigger to transfer the upgrade to the player that purchased it. However when I make multi-level upgrades, things become a lot more complicated. The main issue that I'm having is that I can't make the upgrade cost dependant on the level being purchased (because the level purchased is always determined for the neutral player, not the player purchasing it.
Couldnt you just have (if we say you want 5 levels of the upgrade) 5 different upgrades. When the level 1 upgrade is researched, the level 2 upgrade will be available, and level 1 will be researched for all players.

I know it's a little complicated work around, but if you only have 5 levels, it might be an easier solution, though it would be nice to know how it's done ;)
 

Dave312

Censored for your safe viewing
Reaction score
269
Players are competing against each other, so having the upgrade researched for all players doesn't really work.

I could make the shop exclusive (only 1 player can shop at a time) which would mean I could change the ownership of the shop the to purchasing player which would solve my issue. However the problem would be that a player could strategically keep a unit near the shop to stop other players from purchasing upgrades/items.

Another alternative would be to make each upgrade level cost the same but vary the upgrades cost over time to keep it in line the the income rate.

I could also make the upgrades purchased from the units command card rather than the shops command card (like Star Battle).

All these alternatives require me to sacrifice in some aspect how I want the system to work. I was just hoping someone might have a different idea about how to get it to work properly.
 

X-maul

AKA: Demtrod
Reaction score
201
Ah okay, I didnt undestand the idea before now.

What I would do, would be to have (if you got 12 players) 12 shops, which are all invisible (not creating an actor) and put them all at the same location, then have 1 placeholder shop (with a shown actor) owned by Neutral. When a player selects the neutral shop, a trigger will select the shop owned by the triggering player.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top