For my project, I need a way to increase the stats of different units. The increase will always be the same percentage, multiplicatively.
I set up a new research ability. I set up a new upgrade to test it out. I linked them with my building and set up the command card. Button 1 cost/effect, etc.
But 10 upgrades with increased costs were all linked to the same upgrade. So when I went in game to test, it did not start at the first cost I had set up, and purchasing left it on the same cost. What's more, it did not affect the unit (zergling) that it was supposed to. It was designed to multiply the zerglings health by 1.1 per level and the weapon damage of claws by 1.1 per level. And zergling WAS set in the affected unit array.
Basically, what I'm asking, is does anyone know a way to set up a research with increased costs each time it is purchased? And instead of fooling with upgrades for 7-8 different units, can I just have a trigger that detects the upgrade and changes a variable controlling a BUFF being applied to the different units, since it would be a lot easier and is already set up for other purposes in my triggers?
Simplest way I can say it is have an upgrade that costs 20% more each time it's bought and a trigger to increase intMyVariable by 1 each time I buy it?
EDIT: After a hot shower and scrolling through 20 old posts, I may have found what I need. By simply setting one upgrade with an effect that increases it's own cost by a percentage each time it's purchased, and then setting a trigger that detects each time my research (unit) uses the research (ability), I can add one to a global variable that will increase the number of buffs that are added to the correct units upon creation.
(I know that sounds like a dumb workaround, but the units I need upgraded are an ally players, not the users. And it makes more sense IMO that upgrades shouldn't instantly affect units on the other side of the map.)
I will fool around with that as I am able and let you know.
Sweet mother of god, it won't let me simply multiply the cost each time. I would have to add it manually for every level of every upgrade. Maybe I can change the cost in the same trigger that sets my variable...
I hope so. 50+ times 8 unit types times 2 upgrades per unit type... *Bangs head on table*
EDIT: It seems that's a no go. I'm either going to have to completely revamp my economy to let me multiply the upgrade by an integer every time, doubling the cost as opposed to a slow climb, or settle in for 4-6 hours setting all the upgrade levels by hand. FML.
Please, somebody come up with a great idea to help me out.
Yeah the editor is dismally time consuming. No surprise there. 4-6 hours really isn't that bad though I've had workarounds take 10-20 hours for custom stuff. Ah the life of a mapper
That, sir, is a beautiful statement. If I hadn't found a workaround of simply multiplying by 12 and then dividing by 10 to get a 20% increase... Which I still haven't tested...
But if that doesn't work, I will probably fiddle around in xml. At least there the upgrades shouldn't go from 1 to 10-19 to 2 to 20-29....
I got sidetracked fiddling with some math to do with a UI power that I may never even bother to implement. And I came back to ask a question about something completely irrelevant.
I don't know, is it more impolite to spam more threads or to ask side questions within topics? I'll ask, and if it's suggested, I'll remove it from here and add another topic(or research it the hard way.) I want the ability to upgrade my zerglings into swarmlings or raptors. But it's imperative to keep the raptors from having the ability to simply walk in a straight line across the myriad of cliffs. How hard would it be to remove that movement type from them? Would it be easier to copy my zergling and give them the jump attack and actor for the raptor (And of course give them the ever important 2 damage bump)? Or would the fact that they are in attack waves keep them "In Check", movement wise?
Okay, so I have a plethora of questions, but regarding ravagers... Would the Campaign AI that is sending attack waves and doing NOTHING else be smart enough to use their abilities, or do I need to make them autocast it? And balance wise, would it be better for an upgrade to
A)Turn a percentage of roaches from a wave into ravagers?
B)Treat the ravagers as a new unit type with it's own upgrades (damage/health and amount per wave)?
C)Completely trade in the roaches for ravagers as that unit's Unique upgrade (keeping all previous upgrade levels and per wave levels)?
All hail math! For a multiplicative real increase(I.e. percentage) each time you purchase an upgrade, simply set an effect, have it multiply by an integer, then copy paste the effect and change it to divide by an integer. The two Integers, when divided, should equal the Percentage Total you want. Multiply by 5, divide by 4 for a for a 125% total percentage. This will increase the cost of the upgrade by 25% each level.
We'll call the topic solved, but feel free to weigh in on the other stuff.
I set the unit to my custom building and the ability to any ability.
Then I used a series of if then else statements based on the triggering ability to set key variables +1.
If I used the ability to increase the amount of zerglings spawned in each wave, then it set my "Max Zerglings" Global Variable to "Max Zerglings" plus 1.
If I used the ability to increase their stats, it increased a intVariable that controlled how many times a buff was applied to the unit on creation.
EDIT: I did get the upgrade to actually apply properly. My initial problem there was that I had the upgrade level set to 255 instead of the actual max of 100. But I forgot to apply it to starting health, so I had zerglings spawning with 35/1000 health. When I fixed this in the data, I accidently overwrote the upgrade that increased the damage. And I couldn't for the life of me get it to increase the damage again. I'm assuming that actual weapon damage has to be set to an integer, and multiply 5 by 1.1 simply set it to 5.5 Floored again and again.
By simply changing it to apply a buff, you can see the weapons base damage(5) plus how much it has been increased.
For my project, I need a way to increase the stats of different units. The increase will always be the same percentage, multiplicatively.
I set up a new research ability. I set up a new upgrade to test it out. I linked them with my building and set up the command card. Button 1 cost/effect, etc.
But 10 upgrades with increased costs were all linked to the same upgrade. So when I went in game to test, it did not start at the first cost I had set up, and purchasing left it on the same cost. What's more, it did not affect the unit (zergling) that it was supposed to. It was designed to multiply the zerglings health by 1.1 per level and the weapon damage of claws by 1.1 per level. And zergling WAS set in the affected unit array.
Basically, what I'm asking, is does anyone know a way to set up a research with increased costs each time it is purchased? And instead of fooling with upgrades for 7-8 different units, can I just have a trigger that detects the upgrade and changes a variable controlling a BUFF being applied to the different units, since it would be a lot easier and is already set up for other purposes in my triggers?
Simplest way I can say it is have an upgrade that costs 20% more each time it's bought and a trigger to increase intMyVariable by 1 each time I buy it?
EDIT: After a hot shower and scrolling through 20 old posts, I may have found what I need. By simply setting one upgrade with an effect that increases it's own cost by a percentage each time it's purchased, and then setting a trigger that detects each time my research (unit) uses the research (ability), I can add one to a global variable that will increase the number of buffs that are added to the correct units upon creation.
(I know that sounds like a dumb workaround, but the units I need upgraded are an ally players, not the users. And it makes more sense IMO that upgrades shouldn't instantly affect units on the other side of the map.)
I will fool around with that as I am able and let you know.
Sweet mother of god, it won't let me simply multiply the cost each time. I would have to add it manually for every level of every upgrade. Maybe I can change the cost in the same trigger that sets my variable...
I hope so. 50+ times 8 unit types times 2 upgrades per unit type... *Bangs head on table*
EDIT: It seems that's a no go. I'm either going to have to completely revamp my economy to let me multiply the upgrade by an integer every time, doubling the cost as opposed to a slow climb, or settle in for 4-6 hours setting all the upgrade levels by hand. FML.
Please, somebody come up with a great idea to help me out.
@BigDonRob: Go
Yeah the editor is dismally time consuming. No surprise there. 4-6 hours really isn't that bad though I've had workarounds take 10-20 hours for custom stuff. Ah the life of a mapper
<Click Here> To See My Epic Single Player Campaign (LifeForceCampaign.com)
Probably simpler to do with XML mode.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
That, sir, is a beautiful statement. If I hadn't found a workaround of simply multiplying by 12 and then dividing by 10 to get a 20% increase... Which I still haven't tested...
But if that doesn't work, I will probably fiddle around in xml. At least there the upgrades shouldn't go from 1 to 10-19 to 2 to 20-29....
I got sidetracked fiddling with some math to do with a UI power that I may never even bother to implement. And I came back to ask a question about something completely irrelevant.
I don't know, is it more impolite to spam more threads or to ask side questions within topics? I'll ask, and if it's suggested, I'll remove it from here and add another topic(or research it the hard way.) I want the ability to upgrade my zerglings into swarmlings or raptors. But it's imperative to keep the raptors from having the ability to simply walk in a straight line across the myriad of cliffs. How hard would it be to remove that movement type from them? Would it be easier to copy my zergling and give them the jump attack and actor for the raptor (And of course give them the ever important 2 damage bump)? Or would the fact that they are in attack waves keep them "In Check", movement wise?
Okay, so I have a plethora of questions, but regarding ravagers... Would the Campaign AI that is sending attack waves and doing NOTHING else be smart enough to use their abilities, or do I need to make them autocast it? And balance wise, would it be better for an upgrade to
A)Turn a percentage of roaches from a wave into ravagers?
B)Treat the ravagers as a new unit type with it's own upgrades (damage/health and amount per wave)?
C)Completely trade in the roaches for ravagers as that unit's Unique upgrade (keeping all previous upgrade levels and per wave levels)?
All hail math! For a multiplicative real increase(I.e. percentage) each time you purchase an upgrade, simply set an effect, have it multiply by an integer, then copy paste the effect and change it to divide by an integer. The two Integers, when divided, should equal the Percentage Total you want. Multiply by 5, divide by 4 for a for a 125% total percentage. This will increase the cost of the upgrade by 25% each level.
We'll call the topic solved, but feel free to weigh in on the other stuff.
So I take it you used an effect to activate a trigger?
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
I used the event "Unit uses ability".
I set the unit to my custom building and the ability to any ability.
Then I used a series of if then else statements based on the triggering ability to set key variables +1.
If I used the ability to increase the amount of zerglings spawned in each wave, then it set my "Max Zerglings" Global Variable to "Max Zerglings" plus 1.
If I used the ability to increase their stats, it increased a intVariable that controlled how many times a buff was applied to the unit on creation.
EDIT: I did get the upgrade to actually apply properly. My initial problem there was that I had the upgrade level set to 255 instead of the actual max of 100. But I forgot to apply it to starting health, so I had zerglings spawning with 35/1000 health. When I fixed this in the data, I accidently overwrote the upgrade that increased the damage. And I couldn't for the life of me get it to increase the damage again. I'm assuming that actual weapon damage has to be set to an integer, and multiply 5 by 1.1 simply set it to 5.5 Floored again and again.
By simply changing it to apply a buff, you can see the weapons base damage(5) plus how much it has been increased.