Upgrade system tips

Hey everyone, I’d like to as, you all for some tips on how to make an upgrade choicescript code and make work for the stats,

Your support is appreciated,

Yikes, that’s a very broad and difficult question. You would need to show us the code that you’ve written already and then explain what you want to do with it and what you need help with. I don’t think anyone can just give you “an upgrade system” on its own without any further context.


I’ve noticed that you ask a lot of broad questions that people here have a hard time answering. Have you considered messaging a coder and talking to them one on one? It might be helpful to develop that kind of relationship, and there are a lot of us to choose from when it comes to coders


In addition, sometimes just trial and error is the best way to go about this.

I’m definitely not trying to discourage you asking questions, but the only way you’re going to learn is by making those frustrating mistakes…

And having those frustrating mistakes gives us workable code to help give you advice.

Please remember to check the wiki and tutorial, as well as the standard intro pages for CS. In addition, you can go to the …/scenes page of any WIP on DashingDon and get an idea of how other authors have programmed their games.

Everyone wants to help, but it’s really hard to do so with such generalized questions :slight_smile:

Good luck with your game, @Star_saber_studios

“Upgrade” meaning “an upgrade system for a robot game”? I suggest you to make questions more clear so a commenter doesn’t have to guess what did you mean.

Well, I haven’t made any robot games, but I have some suggestions.

  1. Identify which stats your robot should have, and create variables for them.
    For our hypothetical example, let’s create variables for speed and armor, with starting values of 0, since we don’t have a robot yet:
*create speed 0
*create armor 0

When creating our still not upgraded robot, we assign new values for our variables:

How quick and well armored will your robot be?
  #Very quick, but not well-armored.
    *set speed 10
    *set armor 5
  #Well-protected, but slow.
    *set speed 5
    *set armor 10
Ta-da! You've built your robot.
  1. Think of your upgrades types.
    Let’s call our hypothetical upgrades for armor super-armor, super-duper-armor and mega- armor. Assign variables for them (true - robot has the upgrade, false - it has not):
    *create super_armor false
    and so on for other upgrades.
1 Like
  1. Are there any technological trees for upgrades? Do you need certain level to acsess sertain upgrade?
    Upgrages from my hypothetical example have 3 levels: super, super-duper and mega. Let’s create a variable “research”, and make access to upgrades depend on the level of research in your game. For example, a super-duper upgrade needs 50 research, while mega upgrade needs 80.
  2. What else can limit or enable getting upgrades?
    For example, you can let the main character buy upgrades for resources. Create a variable for them.
  3. As the game goes along, you can add events which lead to research or resources growing:
What should I do?
  #Find more resources.
    You spend your day mining asteroids.
    *set resources +20
  #Do some research.
    You spend your day testing new materials.
    *set research +20
  1. Let’s design an upgrade-buying system!
*label buy_upgrades
You can add upgrades now! You have ${resources} resources to spend on them.
  #I want to buy super-upgrades.
    *goto super_upgr
  *if (research >= 50) #I'll buy super-duper upgrades.
    *goto super_duper
  *if (research >= 80) #I want these mega-upgrades!
   *goto mega_upgr
  #I don't want to buy anything.
    *goto end_upgrade

Those *goto commands send you to labels where you buy upgrades, such as:

*label super_upgr
  *selectable_if ((resources >= 100) and (super_armor = false)) #Buy super-armor upgrade for 100 resources. 
    You get super armor! Your armor improves by 20.
    *set armor +20
    *set resources -100
    *set super_armor true
    *goto super_upgr
  *selectable_if ((resources >= 100) and (super_speed = false)) #Buy super-speed upgrade for 100 resources.
    You get super speed! Your speed improves by 20.
    *set speed +20
    *set resources -100
    *set super_speed true
    *goto super_upgr
  #Go back.
    *goto buy_upgrades

What these conditions for *selectable_if in front of an option mean? They mean you can only choose this option if you both have at least 100 resources and don’t have this particular upgrade installed. Otherwise this option will be inactive.

Anyway, I hope that helps.

1 Like