Posted this on B.net forums. If ANYONE is looking on how to get upgrades up to a certain level with a change in cost, IE Upgrade 1 is 5 Minerals, but upgrade 2 costs 10 minerals, please look at my triggers! They work perfectly!
Alright, first off you need an integer set to the price you want the upgrade to start at, for instance I used 5 as my starting price (Going to up it to 20 start here in a sec.)
Keep in mind I'm still messing with the triggers so that people can see how much it currently costs for the upgrade.
There are 4 Triggers in total as of right now.
Variable 1 = 5 <Integer>
Trigger 1:
Event - Cyber-Core is selected by player 1
Action - Display button 1 with text "Upgrade Infantry Weapons" at left of screen with offset (50,0) (Run Trigger 2 when button is clicked)
- Display "The cost of upgrades increase with every purchase." For (Player Group (1)) in Chat Area
- Display "Cost of Infantry Upgrade:" for (Player Group (1)) in Chat Area
- Display (Convert Integer to Text)(Variable 1)) for (Player Group (1)) in Chat Area
- Dialog - Show Button 1
- Stop All Instances of Current Trigger
Trigger 2:
Condition - (Returns whether triggering player has at least (Variable 1(Minerals)) and (0(Gas)) == True
Actions - Modify triggering player's Minerals: Subtract Variable 1
- Tech Tree Add 1 to Terran Infantry Weapons upgrade for Triggering Player
- Set Variable 1 = (Variable 1 + 5) Comment: This increases the integer by 5 with each purchase.
- Clear all messages for (Player Group(1))
- Run Trigger 5 (Don't wait)
- Stop All Instances (Current Trigger)
Trigger 3:
Events - Cyber-Core is Deselected by Player 1
Actions - Hide Button 1
- Clear all messages for (Player Group (1))
- Stop all instances (Current Trigger)
Trigger 4:
Actions - Display "The cost of upgrades increase with every purchase." For (Player Group (1)) in Chat Area
- Display "Cost of Infantry Upgrade:" for (Player Group (1)) in Chat Area
- Display (Convert Integer to Text)(Variable 1)) for (Player Group (1)) in Chat Area
I'm a freaking genius. :D
Also, if you need any help please post what you exactly want to do and I'll help you out.
Ability data of the "Talent" type (most upgrades are this type) has an "Effects" field that lists specific data references and how the upgrade modifies them. In most cases, it references weapons and effects (changing their icon/number and increasing damage) or referencing units (increasing their armor and the icon/number of their armor). Some of them reference other unit data such as movement speed.
However, this field is extremely versatile. You can add data references to a wide variety of objects, including abilities. This allows you to easily change the cost, cooldown, or other attributes of an ability. Technically, upgrades are learned through abilities (when you click the "Research Infantry Weapons" button, that is using an ability). Multiple research items just happen to be lumped into one ability with several "sub-commands" (in the same way that Build and Train abilities work). It's a little frustrating, because you have to figure out which of the sub-commands corresponds to the research you want to modify, scroll through the entries in the data reference field (which contains up to 29 possible research buttons and doesn't indicate which ones are used). However, assuming you pick the correct one, you can modify the cost of an upgrade.
The only possible issue is that if you queue the upgrade several times (or queue it in seperate places), you may not actually end up paying the cost (you pay when you queue it, and if the previous level hasn't finished to modify the cost, you may be able to "cheat" the system). You can easily work around this by only allowing one to be queued at a time (Set it's requirements so that it only shows when it is not currently queued).
You can use this method to modify the upgrade time too, by the way, so if I have an upgrade with several levels and I want it to take longer, I can just have the upgrade modify it's own timer. The only issue is that these modifications have to be linear (but that's true of all modifications made by a multi-level upgrade).
I tested this and it worked out just fine. I had an upgrade that modified it's own cost, and even modified the cost of another upgrade.
Just as a random note to anyone reading, weapon and armor upgrades in the game data are not technically multi-level upgrades. They are separate, distinct upgrades, that just happen to have one another as requirements. In fact, I don't think any of the default upgrades in the game utilize more than 1 level. However, the amount of things you can do with upgrades is huge. The data editor is extremely versatile.
Can you please explain the process in getting a simple Infantry Weapon Upgrade to have 100 Levels with accumulating cost... I'm slightly confused on this process. I was looking through the Data editor for 6 hours and wasn't able to find a system that worked like I needed it to.
Learned a lot from this thread. I always thought the reason i wasn't picking up the editor is because it's just beta and a bit clunky, this reaffirms that.
Sherubii, he kinda just explained that, but a step by step tutorial would be ridiculously tedious and probably not worth it for the reasons he just explained. There's a lot of guesswork involved with getting this stuff to work. Probably best to just do things with triggers for now if you understand it, the data editor will likely be receiving updates in the future to resolve issues people are having with it.
Wow... Alright, so I had a bit too much wine when I read Masters post..lol
Now that I'm sobered up and actually read it logically, I understood where it was coming from, and I can understand why it's difficult to explain.
But, I have good news, I've figured out how to find out which Research folder is equal to which research you want, unless it's just a coincidence...
Anyways, back to what I was saying,
Under the Ability Commands Research Tree, you'll notice that there are 30 total research commands. Well, those upgrades that you have access to are matched to the command number.
If that was confusing to read let me put it simply:
Infantry Weapon 3 is located under command line 5, so you would go to the Data Reference table and scroll down to folder 5, this is the sheet you need to edit to get the effect for Infantry Weapon 3...
I've finally figured it out, and in the process has ruined 16 Hours of work and *Counts* 16 separate triggers... And that was just for player 1. T_T
Going to finish up the editing of the upgrades and go ahead and go cry myself to sleep.... Lol
Posted this on B.net forums. If ANYONE is looking on how to get upgrades up to a certain level with a change in cost, IE Upgrade 1 is 5 Minerals, but upgrade 2 costs 10 minerals, please look at my triggers! They work perfectly!
Alright, first off you need an integer set to the price you want the upgrade to start at, for instance I used 5 as my starting price (Going to up it to 20 start here in a sec.)
Keep in mind I'm still messing with the triggers so that people can see how much it currently costs for the upgrade.
There are 4 Triggers in total as of right now.
Variable 1 = 5 <Integer>
Trigger 1:
Event - Cyber-Core is selected by player 1 Action - Display button 1 with text "Upgrade Infantry Weapons" at left of screen with offset (50,0) (Run Trigger 2 when button is clicked) - Display "The cost of upgrades increase with every purchase." For (Player Group (1)) in Chat Area - Display "Cost of Infantry Upgrade:" for (Player Group (1)) in Chat Area - Display (Convert Integer to Text)(Variable 1)) for (Player Group (1)) in Chat Area - Dialog - Show Button 1 - Stop All Instances of Current Trigger
Trigger 2:
Condition - (Returns whether triggering player has at least (Variable 1(Minerals)) and (0(Gas)) == True Actions - Modify triggering player's Minerals: Subtract Variable 1 - Tech Tree Add 1 to Terran Infantry Weapons upgrade for Triggering Player - Set Variable 1 = (Variable 1 + 5) Comment: This increases the integer by 5 with each purchase. - Clear all messages for (Player Group(1)) - Run Trigger 5 (Don't wait) - Stop All Instances (Current Trigger)
Trigger 3:
Events - Cyber-Core is Deselected by Player 1 Actions - Hide Button 1 - Clear all messages for (Player Group (1)) - Stop all instances (Current Trigger)
Trigger 4:
Actions - Display "The cost of upgrades increase with every purchase." For (Player Group (1)) in Chat Area - Display "Cost of Infantry Upgrade:" for (Player Group (1)) in Chat Area - Display (Convert Integer to Text)(Variable 1)) for (Player Group (1)) in Chat Area
I'm a freaking genius. :D
Also, if you need any help please post what you exactly want to do and I'll help you out.
@Sherubii: Go
That seems a little confusing.
This can already be done in the data editor anyway. Upgrades can affect the cost of abilities (including Research abilities).
Explain? Lol
Ability data of the "Talent" type (most upgrades are this type) has an "Effects" field that lists specific data references and how the upgrade modifies them. In most cases, it references weapons and effects (changing their icon/number and increasing damage) or referencing units (increasing their armor and the icon/number of their armor). Some of them reference other unit data such as movement speed.
However, this field is extremely versatile. You can add data references to a wide variety of objects, including abilities. This allows you to easily change the cost, cooldown, or other attributes of an ability. Technically, upgrades are learned through abilities (when you click the "Research Infantry Weapons" button, that is using an ability). Multiple research items just happen to be lumped into one ability with several "sub-commands" (in the same way that Build and Train abilities work). It's a little frustrating, because you have to figure out which of the sub-commands corresponds to the research you want to modify, scroll through the entries in the data reference field (which contains up to 29 possible research buttons and doesn't indicate which ones are used). However, assuming you pick the correct one, you can modify the cost of an upgrade.
The only possible issue is that if you queue the upgrade several times (or queue it in seperate places), you may not actually end up paying the cost (you pay when you queue it, and if the previous level hasn't finished to modify the cost, you may be able to "cheat" the system). You can easily work around this by only allowing one to be queued at a time (Set it's requirements so that it only shows when it is not currently queued).
You can use this method to modify the upgrade time too, by the way, so if I have an upgrade with several levels and I want it to take longer, I can just have the upgrade modify it's own timer. The only issue is that these modifications have to be linear (but that's true of all modifications made by a multi-level upgrade).
I tested this and it worked out just fine. I had an upgrade that modified it's own cost, and even modified the cost of another upgrade.
Just as a random note to anyone reading, weapon and armor upgrades in the game data are not technically multi-level upgrades. They are separate, distinct upgrades, that just happen to have one another as requirements. In fact, I don't think any of the default upgrades in the game utilize more than 1 level. However, the amount of things you can do with upgrades is huge. The data editor is extremely versatile.
@Sherubii: Go
I don't really see any point in doing this. As MasterDinadan said, you can just use the data editor.
@ Master
Can you please explain the process in getting a simple Infantry Weapon Upgrade to have 100 Levels with accumulating cost... I'm slightly confused on this process. I was looking through the Data editor for 6 hours and wasn't able to find a system that worked like I needed it to.
Learned a lot from this thread. I always thought the reason i wasn't picking up the editor is because it's just beta and a bit clunky, this reaffirms that.
Sherubii, he kinda just explained that, but a step by step tutorial would be ridiculously tedious and probably not worth it for the reasons he just explained. There's a lot of guesswork involved with getting this stuff to work. Probably best to just do things with triggers for now if you understand it, the data editor will likely be receiving updates in the future to resolve issues people are having with it.
@crazyfingers619: Go
Wow... Alright, so I had a bit too much wine when I read Masters post..lol
Now that I'm sobered up and actually read it logically, I understood where it was coming from, and I can understand why it's difficult to explain.
But, I have good news, I've figured out how to find out which Research folder is equal to which research you want, unless it's just a coincidence...
Anyways, back to what I was saying,
Under the Ability Commands Research Tree, you'll notice that there are 30 total research commands. Well, those upgrades that you have access to are matched to the command number.
If that was confusing to read let me put it simply:
Infantry Weapon 3 is located under command line 5, so you would go to the Data Reference table and scroll down to folder 5, this is the sheet you need to edit to get the effect for Infantry Weapon 3...
I've finally figured it out, and in the process has ruined 16 Hours of work and *Counts* 16 separate triggers... And that was just for player 1. T_T
Going to finish up the editing of the upgrades and go ahead and go cry myself to sleep.... Lol