Make an upgrade that increases in cost every 3rd level?

Level 9
Joined
Aug 16, 2019
Messages
83
I'm not sure this is possibly since it's actually a pretty simple thing but would it be possible to make an upgade that only increases in cost every X levels? Like it would cost the same level 1-3 then increase in level 4-6 and again for level 7-9 and so on? It's fine if it has to be done through triggers but I can't really think of a way to do it other than using seperate upgrades and even then I'm not how I'd go about removing one and adding another as researchable.
 
Level 29
Joined
Sep 26, 2009
Messages
2,594
I haven't tested this, but perhaps the second option could work like this? Assuming the three upgrades are called TechV1, TechV2 and TechV3, each with 3 levels, you could do this:
  • Map Ini
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player - Set the max research level of TechV2 to 0 for Player 1 (Red)
      • Player - Set the max research level of TechV3 to 0 for Player 1 (Red)
  • Upgrade Finished
    • Events
      • Unit - A unit Finishes an upgrade
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Researched tech-type) Equal to TechV1
          • (Researched tech-type) Equal to TechV2
      • (Current research level of (Researched tech-type) for (Triggering player)) Equal to 3
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Researched tech-type) Equal to TechV1
        • Then - Actions
          • Player - Set the max research level of TechV2 to 3 for (Triggering player)
        • Else - Actions
          • Player - Set the max research level of TechV3 to 3 for (Triggering player)
You would set all three upgrades to your units in object editor, but via map ini trigger you would limit researching of the V2 and V3 ones and enable them after previous version's upgrade reached level 3
 
Level 9
Joined
Aug 16, 2019
Messages
83
I haven't tested this, but perhaps the second option could work like this? Assuming the three upgrades are called TechV1, TechV2 and TechV3, each with 3 levels, you could do this:
  • Map Ini
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player - Set the max research level of TechV2 to 0 for Player 1 (Red)
      • Player - Set the max research level of TechV3 to 0 for Player 1 (Red)
  • Upgrade Finished
    • Events
      • Unit - A unit Finishes an upgrade
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Researched tech-type) Equal to TechV1
          • (Researched tech-type) Equal to TechV2
      • (Current research level of (Researched tech-type) for (Triggering player)) Equal to 3
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Researched tech-type) Equal to TechV1
        • Then - Actions
          • Player - Set the max research level of TechV2 to 3 for (Triggering player)
        • Else - Actions
          • Player - Set the max research level of TechV3 to 3 for (Triggering player)
You would set all three upgrades to your units in object editor, but via map ini trigger you would limit researching of the V2 and V3 ones and enable them after previous version's upgrade reached level 3
Thanks it worked! Though I did have to make the actual upgrades you learn dummy upgrades for a seperate one equal to their combined research count to get the correct numbers to show up for weapons and armor.
 
Top