Hello, basically I gave ability for Raynor to research, and when they are researched, he gains +2 levels for his weapon and armor.
Now, I made these custom "lvl5" icons for his weapon and armor, and I want each of them to appear only when the weapon/armor level is 5.
Meaning 2 things :
- Either make each appear when its corresponding level 5.
- Or make each appear when both the lvl3 + the bonus are researched.
So basically I want to be able to research my bonuses anytime, but if I happen to have researched the lvl3 too, then the icon is automatically turned to my custom one.
Could someone help me do that please ? I'm not sure if I'm really clear, so tell me if you don't understand.
check out default unit weapon upgrades and how they did it with icons. you need 5 upgrades each setting the icon for current lvl (or one upgrade and you 'll do it with triggers)
Thing is, since it's a bonus, I don't get the icon changes in the same order.
Example : let's say I'm lvl 0, I have the green weapon with no glow or anything.
Then I go lvl 1, it's still green and gets the glows.
Then lvl 2 and lvl 3, now it's orange.
And then I use the bonus, I reach lvl 5 and now it's dark red (that's how it's gonna be).
Fine.
But let's say now, I use the bonus after lvl 1. It goes from green to dark red at only lvl 1+2 = 3. Which is not right. Plus if I search the lvl 2, I reach now lvl 4 and it's blue, and reaching lvl 5 by searching lvl 3, it becomes orange.
Which is not right.
What I need is these icons to appear only when the lvl is 5... :/
The bonus should only add 2 to the lvl counter of the unit. Not change the icons (unless you were level 3 and the bonus gives you level 5, then it must give you the icons of course).
Also there's 1 bonus for the attack, and 1 bonus for the armor. They are seperated. So reaching lvl 5 in one should give the custom icon only for this one.
Probably best to do it via triggers, especially since the lvl1-3 upgrades will interfere as you said. Much easier to check multiple conditions and pick a corresponding course of action (i.e. count the total attack bonus in some way and then set the proper icon)
Doing this with data only would probably require some hidden stuff with Validators/Requirements to check each and every cumulative upgrade combination. I don't know of anything other than Upgrades for changing the icons, but they are player-wide, aren't linked to any single unit, and can't internally run validator-based decision trees. So you'd be looking at a hidden Research ability, one hidden dummy upgrade+Requirement per icon, and probably something like a Buff behavior to place the Requirement on if you can't get the research ability to autocast reliably.
I'm not well-versed with triggers, you should probably check the tutorials or the Triggers subforum. The basic setup would be to trigger on something like completion of an upgrade, then iterate through all possible combinations of damage upgrades, then set the weapon icon matching that specific upgrade combination. You probably could have a seperate trigger for each combination, but that very inefficient and you should try finding a better solution.
The data-only version essentially does the same thing, only you need a Requirement to check for the upgrade combination, a hidden dummy upgrade to set the icon, and as I said probably a hidden Buff behavior to act as the "activation trigger".
Research ability: since those can't be autocast you can use one for all icons, just keep adding to the Info+ field
Dummy upgrade: the only effect of this is to set the icon on the unit. Instant, cost-free research, no score award or player alerts or anything.
Requirement: This checks the exact conditions under which you want the icon to be set. You can use "OR" brackets (lvl1+bonus OR lvl3 standard, both give +3 weapon damage in your example)
Issue Order effect, which orders the unit to research the hidden dummy upgrade
Buff behavior: maybe there's a simpler way (autocast would be one for regular abilities), but use this as a "monitor" to check when the upgrade is researched. My go-to method is to use the "Validator - Remove" field and "Effect - Final" for a guaranteed one-off trigger, but you can probably also use the Requirement field with one of the other effect triggers. I don't think you can remove the buff based on a requirement, but in the worst case you can check the Requirement within a Validator and use Remove+Final
The rest is copying that setup over for each additional icon. Also note this setup will only work once (no easy "back to square one" triggers without resetting the upgrades and respawning the unit with the buffs), and unlike your actual upgrade you have to add all the "monitor" buffs to a unit, along with the dummy Research ability.
Ok, right now I'm at the point where I made a regular upgrade (costing nothing, and instantaneous to research), and I put the button (with "X" as a shortcut) on Raynor. So right now, I have to manually do the research by clicking the corresponding upgrade whenever I'm lvl5 (basically, whenever I get a lvl 5 in armor or attack, I press "X" while selecting Raynor, and the icon changes, and while not both my bonus and the lvl3 upgrade are researched, the button doesn't show.
So I think I did the first 3 steps you mention, if I'm not mistaken.
I'm a bit confused about the last 2 though, the "issue order effect", and the "buff behavior".
I'm sorry, I'm not really good with the editor, and since I'm French, the names are not the same. So I'm not really sure where to look for these 2.
"Issue Order" is a type of effect which sends a single command at the target. It's linked to the ability ID and not the button, but otherwise it's essentially "Raynor: press X now". Also works if you don't have a button on the command card, so you can hide the entire setup from the player.
"Buff" is the behavior type that handles pretty much all passive effects on units. Stimpack, Cloak, Chronoboost, all those "passive" special effects. By assigning a Buff to a unit directly you can give that unit type unique passive abilities like the Mothership's Cloaking Field. In this case you just want the buff to "monitor" the unit and activate when the specific upgrade level is reached. Buffs have the same effect-triggering capabilities as Persistent effects, minus position offsets. You want to use one of those to trigger the Issue Order, combined with a condition enforced via Validator or Requirement. Note that the validator fields on buffs trigger their action (disable/remove) if the validator returns FALSE.
A conceptually simple version for one-shot effects is to use the Remove validator field with a validator that's the opposite of your trigger condition, i.e. "NOT have upgrade lvl5". If this is False you DO have lvl5, and the buff will remove itself. Then you use the Effect - Final field to launch the Issue Order. Since I don't know the French names be warned, there are two fields that trigger "upon ending": One is "Expire" and only triggers if you set a timer on the buff and that runs out. The other is "Final" and executes if the buff is removed in pretty much any way, which you want. Banelings should be using the Final field since they explode upon death (death of the unit being another way the buff can be "removed")
Regarding the language barrier I can only suggest you go to Preferences->General and switch to English. I'm German myself but I switched the editor over a long time ago after getting fed up with a few horrible translations ("training" units once was translated as "locomotive" or "pull", and "charge into battle" doesn't use the same word as "electric charge" in German...)
There's a type that transforms Requirements. Probably even called Requirement, and might be used for Marauder Concussive Shells or other upgradable bonus effects.
Remember to put a NOT bracket around your "have lvl5" check, either within the requirement itself or by inverting it with another validator (several types have "invert" options, Combine is one of them)
Also, can Raynor take any other actions while developing the upgrade? The Issue Order effect will either override existing orders or delay the icon change until he is idle, and I'm not sure if you can set Research abilities to Transient (a flag that, when ticked, causes them to activate instantly and bypass the order queue)
I don't understand, it seems to randomly load the icon, for a random one. Like sometimes, I get the lvl5 defense icon when reaching lvl3 attack, then it does nothing there, but gives it to attack...
Sometimes it does nothing at all...
Also I created a "cancel" button, and for no reason whatsoever, it always appears shortcutless, and its name is always button/name/annuleraction and the description is button/tooltip/annuleraction.
In the editor any information is erased, and the name is its ID. Also, it has "(untitled)" next to it
I'm doing my tests on a new map, I just add my dependency, place a few units, and launch the game.
Is it just me or is my editor completely crazy ?? Seriously it makes me lose countless hours. It's not at all the first time it happens. In fact I see my work constantly being erased at a few places, or doubled. Like an upgrade for attack gives +2 instead of +1 because instead of +1, it does +1 twice.
What the heck is going on....
Seriously I create a button, and everything in that button is erased.
Oh, forgot about that sorry. You changed the language settings didn't you? All strings displayed ingame are saved seperately for each language, and if you don't set the other languages (or bulk copy) you will get these "missing string" displays. There are tutorials on how to copy everything over, but that's usually done when the map is ready to be published. Alternatively you could set your game to the same locale as the editor, or, since you only need English settings to find specific fields, create the objects in English, then switch your editor back to French before assigning names/tooltips/hotkeys.
No idea on the double+1, or how that would even trigger, are you sure your dummy upgrades don't give stats and you're using the correct ability keys for the Issue Order?
Regarding the actual problem at hand, leave the monitor buffs non-Hidden for now and check if they're present on the buff bar. If you messed up the validators they might very well all activate immediately, and whichever one is processed last by the game will set its icon.
Hello, basically I gave ability for Raynor to research, and when they are researched, he gains +2 levels for his weapon and armor.
Now, I made these custom "lvl5" icons for his weapon and armor, and I want each of them to appear only when the weapon/armor level is 5.
Meaning 2 things :
- Either make each appear when its corresponding level 5.
- Or make each appear when both the lvl3 + the bonus are researched.
So basically I want to be able to research my bonuses anytime, but if I happen to have researched the lvl3 too, then the icon is automatically turned to my custom one.
Could someone help me do that please ? I'm not sure if I'm really clear, so tell me if you don't understand.
Thanks ! :)
check out default unit weapon upgrades and how they did it with icons. you need 5 upgrades each setting the icon for current lvl (or one upgrade and you 'll do it with triggers)
Thing is, since it's a bonus, I don't get the icon changes in the same order.
Example : let's say I'm lvl 0, I have the green weapon with no glow or anything.
Then I go lvl 1, it's still green and gets the glows.
Then lvl 2 and lvl 3, now it's orange.
And then I use the bonus, I reach lvl 5 and now it's dark red (that's how it's gonna be).
Fine.
But let's say now, I use the bonus after lvl 1. It goes from green to dark red at only lvl 1+2 = 3. Which is not right. Plus if I search the lvl 2, I reach now lvl 4 and it's blue, and reaching lvl 5 by searching lvl 3, it becomes orange.
Which is not right.
What I need is these icons to appear only when the lvl is 5... :/
The bonus should only add 2 to the lvl counter of the unit. Not change the icons (unless you were level 3 and the bonus gives you level 5, then it must give you the icons of course).
Also there's 1 bonus for the attack, and 1 bonus for the armor. They are seperated. So reaching lvl 5 in one should give the custom icon only for this one.
Probably best to do it via triggers, especially since the lvl1-3 upgrades will interfere as you said. Much easier to check multiple conditions and pick a corresponding course of action (i.e. count the total attack bonus in some way and then set the proper icon)
Doing this with data only would probably require some hidden stuff with Validators/Requirements to check each and every cumulative upgrade combination. I don't know of anything other than Upgrades for changing the icons, but they are player-wide, aren't linked to any single unit, and can't internally run validator-based decision trees. So you'd be looking at a hidden Research ability, one hidden dummy upgrade+Requirement per icon, and probably something like a Buff behavior to place the Requirement on if you can't get the research ability to autocast reliably.
@Photoloss: Go
Hum ok so... How exactly could I do that ? '
Thanks for helping btw !
I'm not well-versed with triggers, you should probably check the tutorials or the Triggers subforum. The basic setup would be to trigger on something like completion of an upgrade, then iterate through all possible combinations of damage upgrades, then set the weapon icon matching that specific upgrade combination. You probably could have a seperate trigger for each combination, but that very inefficient and you should try finding a better solution.
The data-only version essentially does the same thing, only you need a Requirement to check for the upgrade combination, a hidden dummy upgrade to set the icon, and as I said probably a hidden Buff behavior to act as the "activation trigger".
@Photoloss: Go
But thing is I'm making a mod, and triggers only work in maps. I think I'd need validators, but I have no idea what to choose or how to do anything :/
For one icon you'll need:
The rest is copying that setup over for each additional icon. Also note this setup will only work once (no easy "back to square one" triggers without resetting the upgrades and respawning the unit with the buffs), and unlike your actual upgrade you have to add all the "monitor" buffs to a unit, along with the dummy Research ability.
@Photoloss: Go
So I'd need to do all 5 of them for it to work ?
@samourai23: Go
Well, yeah, since each dummy upgrade can only set 1 icon, and Upgrades are the only way I know of changing those icons at all.
@Photoloss: Go
Ok, right now I'm at the point where I made a regular upgrade (costing nothing, and instantaneous to research), and I put the button (with "X" as a shortcut) on Raynor. So right now, I have to manually do the research by clicking the corresponding upgrade whenever I'm lvl5 (basically, whenever I get a lvl 5 in armor or attack, I press "X" while selecting Raynor, and the icon changes, and while not both my bonus and the lvl3 upgrade are researched, the button doesn't show.
So I think I did the first 3 steps you mention, if I'm not mistaken.
I'm a bit confused about the last 2 though, the "issue order effect", and the "buff behavior".
I'm sorry, I'm not really good with the editor, and since I'm French, the names are not the same. So I'm not really sure where to look for these 2.
Thanks for your patience though ! :)
"Issue Order" is a type of effect which sends a single command at the target. It's linked to the ability ID and not the button, but otherwise it's essentially "Raynor: press X now". Also works if you don't have a button on the command card, so you can hide the entire setup from the player.
"Buff" is the behavior type that handles pretty much all passive effects on units. Stimpack, Cloak, Chronoboost, all those "passive" special effects. By assigning a Buff to a unit directly you can give that unit type unique passive abilities like the Mothership's Cloaking Field. In this case you just want the buff to "monitor" the unit and activate when the specific upgrade level is reached. Buffs have the same effect-triggering capabilities as Persistent effects, minus position offsets. You want to use one of those to trigger the Issue Order, combined with a condition enforced via Validator or Requirement. Note that the validator fields on buffs trigger their action (disable/remove) if the validator returns FALSE.
A conceptually simple version for one-shot effects is to use the Remove validator field with a validator that's the opposite of your trigger condition, i.e. "NOT have upgrade lvl5". If this is False you DO have lvl5, and the buff will remove itself. Then you use the Effect - Final field to launch the Issue Order. Since I don't know the French names be warned, there are two fields that trigger "upon ending": One is "Expire" and only triggers if you set a timer on the buff and that runs out. The other is "Final" and executes if the buff is removed in pretty much any way, which you want. Banelings should be using the Final field since they explode upon death (death of the unit being another way the buff can be "removed")
Regarding the language barrier I can only suggest you go to Preferences->General and switch to English. I'm German myself but I switched the editor over a long time ago after getting fed up with a few horrible translations ("training" units once was translated as "locomotive" or "pull", and "charge into battle" doesn't use the same word as "electric charge" in German...)
@Photoloss: Go
Alright, I think I'm almost done, I made the "Issue Order" that way :
- in "(Basic) Ability" I put "Engineering bay - search (engineering bay)" => (that's where I put my upgrade)
- in "(Basic) Ability Command" I put "27" because in "Engineering bay - search (engineering bay)" it's at the 27th place.
Then I made a buff behavior in which I set "Effect - Final" as being this effect.
Then I gave the behavior to Raynor.
Only thing left should be the validator.
So what validator type must I make ?
There's a type that transforms Requirements. Probably even called Requirement, and might be used for Marauder Concussive Shells or other upgradable bonus effects.
Remember to put a NOT bracket around your "have lvl5" check, either within the requirement itself or by inverting it with another validator (several types have "invert" options, Combine is one of them)
Also, can Raynor take any other actions while developing the upgrade? The Issue Order effect will either override existing orders or delay the icon change until he is idle, and I'm not sure if you can set Research abilities to Transient (a flag that, when ticked, causes them to activate instantly and bypass the order queue)
@Photoloss: Go
I don't understand, it seems to randomly load the icon, for a random one. Like sometimes, I get the lvl5 defense icon when reaching lvl3 attack, then it does nothing there, but gives it to attack...
Sometimes it does nothing at all...
Also I created a "cancel" button, and for no reason whatsoever, it always appears shortcutless, and its name is always button/name/annuleraction and the description is button/tooltip/annuleraction.
In the editor any information is erased, and the name is its ID. Also, it has "(untitled)" next to it
I'm doing my tests on a new map, I just add my dependency, place a few units, and launch the game.
Is it just me or is my editor completely crazy ?? Seriously it makes me lose countless hours. It's not at all the first time it happens. In fact I see my work constantly being erased at a few places, or doubled. Like an upgrade for attack gives +2 instead of +1 because instead of +1, it does +1 twice.
What the heck is going on....
Seriously I create a button, and everything in that button is erased.
Oh, forgot about that sorry. You changed the language settings didn't you? All strings displayed ingame are saved seperately for each language, and if you don't set the other languages (or bulk copy) you will get these "missing string" displays. There are tutorials on how to copy everything over, but that's usually done when the map is ready to be published. Alternatively you could set your game to the same locale as the editor, or, since you only need English settings to find specific fields, create the objects in English, then switch your editor back to French before assigning names/tooltips/hotkeys.
No idea on the double+1, or how that would even trigger, are you sure your dummy upgrades don't give stats and you're using the correct ability keys for the Issue Order?
Regarding the actual problem at hand, leave the monitor buffs non-Hidden for now and check if they're present on the buff bar. If you messed up the validators they might very well all activate immediately, and whichever one is processed last by the game will set its icon.
@Photoloss: Go
No the double +1 and disappearing stuff happened way before I did that like years ago.
Like, sometimes I do stuff, and randomly it messes up itself...
I recreated the buttons after setting up to french and they now work.
The icon issue still stands though
I don't understand why it gives the wrong upgrade anyway ?