So I am sure I'm not the first one to have issues with this, but didn't have a whole lot of luck searching the old forums. Basically what I'm trying to do is find a way to set, modify, and use variables in my data editor, functions would be nice too. Or at least have some kind of intelligent communication between the two.... I know ideally you want to try to keep a lot of stuff in the Data Editor if possible, but I'm finding that to be a stumbling block as I want attacks to be able to miss, get dodged, get blocked, riposted, that sort of thing, and also in the future will want to be able to be able to set stun resistance, spell resistance, possibly with 2-3 different spell types.... I'd also like to be able to always tell what unit killed the hero, as to announce to everyone how they got leg humped by a zergling, pwned by a marine, etcetera. That was one of the features my BW map had that I got a lot of good comments on, loved how each death had unique text.
The only way I can get the two to communicate currently is to use dummy effects in the data editor, then go through some huge case statement based on what effect it was... This is going to become a hell of a problem if I have to use an effect like that every time, suppose I have 10 areas and 5 unique monsters per area, well that is 50 effects right there. Oh but it gets better, to do it on the hero side of things I would have to do one for each dummy effect for each rank of the spell/ability, then a lovely 50 monster case list to decide how they'll react. Now I could probably set this up as functions to keep it a little cleaner w/ some looping, but it seems like I would have to do WAY too much here. Any suggestions would be appreciated on how to get them communicating better.
So I am sure I'm not the first one to have issues with this, but didn't have a whole lot of luck searching the old forums. Basically what I'm trying to do is find a way to set, modify, and use variables in my data editor, functions would be nice too. Or at least have some kind of intelligent communication between the two.... I know ideally you want to try to keep a lot of stuff in the Data Editor if possible, but I'm finding that to be a stumbling block as I want attacks to be able to miss, get dodged, get blocked, riposted, that sort of thing, and also in the future will want to be able to be able to set stun resistance, spell resistance, possibly with 2-3 different spell types.... I'd also like to be able to always tell what unit killed the hero, as to announce to everyone how they got leg humped by a zergling, pwned by a marine, etcetera. That was one of the features my BW map had that I got a lot of good comments on, loved how each death had unique text.
The only way I can get the two to communicate currently is to use dummy effects in the data editor, then go through some huge case statement based on what effect it was... This is going to become a hell of a problem if I have to use an effect like that every time, suppose I have 10 areas and 5 unique monsters per area, well that is 50 effects right there. Oh but it gets better, to do it on the hero side of things I would have to do one for each dummy effect for each rank of the spell/ability, then a lovely 50 monster case list to decide how they'll react. Now I could probably set this up as functions to keep it a little cleaner w/ some looping, but it seems like I would have to do WAY too much here. Any suggestions would be appreciated on how to get them communicating better.
Could you name a specific problem you're wanting to solve, and we'll start from there? It sounds like you need some help figuring out how to incorporate the Data Editor into what you want to do.
Thanks to the way data and triggers both work, communication between the two is not really do-able. Like Khalanil mentioned, what exactly are you trying to do? You may be able to do things completely in triggers instead of data, so communication is not needed.
Rollback Post to RevisionRollBack
Feel free to Send me a PM if you have any questions/concerns!
Well, attempting to be a little more specific here, I want to make damage a little more RPG like. So when a zergling attempts to hit your hero, he has so much accuracy, a minimum and maximum damage, possibly a critical strike chance to do even more damage. So what I'm aiming to do is have him do his hit, then it decides based on his accuracy/min/max damage and your armor/agility/chance to dodge/chance to block/chance to riposte/class/possibly level, what exactly happens. Is of course more I'd like to do with this, but that is as basic as I can make it....
Edit: I fully intend to make some kind of struct of sorts to hold data for heroes and monsters by the way, I know I'll have to do that trigger side.
The only way I can get the two to communicate currently is to use dummy effects in the data editor, then go through some huge case statement based on what effect it was... This is going to become a hell of a problem if I have to use an effect like that every time, suppose I have 10 areas and 5 unique monsters per area, well that is 50 effects right there. Oh but it gets better, to do it on the hero side of things I would have to do one for each dummy effect for each rank of the spell/ability, then a lovely 50 monster case list to decide how they'll react. Now I could probably set this up as functions to keep it a little cleaner w/ some looping, but it seems like I would have to do WAY too much here. Any suggestions would be appreciated on how to get them communicating better.
Yes, the dummy effects route is something I've considered, but seems like I could end up with 20000 dummy effects if I'm not careful. Trying to see if I have other options.
So it would seem I have no choice but to use dummy effects to call triggers. However, it seems to be very adamant about it being one specific effect, won't let me do it for any effect is used for player 1, for example.... On top of that, it would seem the switch statement doesn't even recognize effects as a possible type.
So my fear is this, am I doomed to use 500 different triggers to make this work? It just seems really stupid. Let's say I have 50 unique monsters, and they use.... 2 effects on average. So 100 triggers there.... Then let's say I have 5 heroes, with an average of about 30 effects a piece, so 150 effects, 150 more triggers. Then of course some triggers for revive, hero select, the dialogs, banking, let's say about 20 more triggers there. 270 triggers so far just guesstimating, then let's say I use 50 more effects for bosses, up to 320 triggers. Oh wait, 20 more unique monsters and another class, 70 more effects, up to 390 triggers now. And so on and so forth.......
I am HOPING there is a better solution out there then one trigger for one effect, at least I can refer to variables so different spell levels don't eat up 10 x more triggers, but this seems like a REALLY STUPID way to go about this.... Pardon my caps, just emphasizing my feelings a bit :P
And if there is no other way, what is the official trigger limit here...... Does the array of triggers work just the same as the ugly little white pages I been using, at least I could kind of streamline it then, aside the HORRIBLE process of setting all the array values.
Haha okay I'm done, rant off, just really hoping to see a better way to do this so I can throw something together in the next month or two and start some Alpha testing... Hrrrrmmm crap, still haven't thought of a map name, anyways....
Edit: May have answered my own question, while it may require one specific effect for the event segment, I could give many monsters the same effect, then use a case statement to decide what the unit is, then go from there. I'm still curious to see what others know about this particular subject though.
So I am sure I'm not the first one to have issues with this, but didn't have a whole lot of luck searching the old forums. Basically what I'm trying to do is find a way to set, modify, and use variables in my data editor, functions would be nice too. Or at least have some kind of intelligent communication between the two.... I know ideally you want to try to keep a lot of stuff in the Data Editor if possible, but I'm finding that to be a stumbling block as I want attacks to be able to miss, get dodged, get blocked, riposted, that sort of thing, and also in the future will want to be able to be able to set stun resistance, spell resistance, possibly with 2-3 different spell types.... I'd also like to be able to always tell what unit killed the hero, as to announce to everyone how they got leg humped by a zergling, pwned by a marine, etcetera. That was one of the features my BW map had that I got a lot of good comments on, loved how each death had unique text.
The only way I can get the two to communicate currently is to use dummy effects in the data editor, then go through some huge case statement based on what effect it was... This is going to become a hell of a problem if I have to use an effect like that every time, suppose I have 10 areas and 5 unique monsters per area, well that is 50 effects right there. Oh but it gets better, to do it on the hero side of things I would have to do one for each dummy effect for each rank of the spell/ability, then a lovely 50 monster case list to decide how they'll react. Now I could probably set this up as functions to keep it a little cleaner w/ some looping, but it seems like I would have to do WAY too much here. Any suggestions would be appreciated on how to get them communicating better.
Could you name a specific problem you're wanting to solve, and we'll start from there? It sounds like you need some help figuring out how to incorporate the Data Editor into what you want to do.
@Deadzergling: Go
Thanks to the way data and triggers both work, communication between the two is not really do-able. Like Khalanil mentioned, what exactly are you trying to do? You may be able to do things completely in triggers instead of data, so communication is not needed.
Well, attempting to be a little more specific here, I want to make damage a little more RPG like. So when a zergling attempts to hit your hero, he has so much accuracy, a minimum and maximum damage, possibly a critical strike chance to do even more damage. So what I'm aiming to do is have him do his hit, then it decides based on his accuracy/min/max damage and your armor/agility/chance to dodge/chance to block/chance to riposte/class/possibly level, what exactly happens. Is of course more I'd like to do with this, but that is as basic as I can make it....
Edit: I fully intend to make some kind of struct of sorts to hold data for heroes and monsters by the way, I know I'll have to do that trigger side.
Honestly I think it would be really cool if we could somehow link trigger variables into data fields... I'm dreaming...
Make the effects start a trigger (environment - effect used- event) which does the rest (dodge chance, damage, etc).
That's what I did in my D1 map.
edit:
@onetwo
oh, btw, if you use effects inside the triggers onto units, they are applied instantly... so, that's possible... sort of... at least.
@Ahli634: Go
Yes, the dummy effects route is something I've considered, but seems like I could end up with 20000 dummy effects if I'm not careful. Trying to see if I have other options.
@Deadzergling: Go
So it would seem I have no choice but to use dummy effects to call triggers. However, it seems to be very adamant about it being one specific effect, won't let me do it for any effect is used for player 1, for example.... On top of that, it would seem the switch statement doesn't even recognize effects as a possible type.
So my fear is this, am I doomed to use 500 different triggers to make this work? It just seems really stupid. Let's say I have 50 unique monsters, and they use.... 2 effects on average. So 100 triggers there.... Then let's say I have 5 heroes, with an average of about 30 effects a piece, so 150 effects, 150 more triggers. Then of course some triggers for revive, hero select, the dialogs, banking, let's say about 20 more triggers there. 270 triggers so far just guesstimating, then let's say I use 50 more effects for bosses, up to 320 triggers. Oh wait, 20 more unique monsters and another class, 70 more effects, up to 390 triggers now. And so on and so forth.......
I am HOPING there is a better solution out there then one trigger for one effect, at least I can refer to variables so different spell levels don't eat up 10 x more triggers, but this seems like a REALLY STUPID way to go about this.... Pardon my caps, just emphasizing my feelings a bit :P
And if there is no other way, what is the official trigger limit here...... Does the array of triggers work just the same as the ugly little white pages I been using, at least I could kind of streamline it then, aside the HORRIBLE process of setting all the array values.
Haha okay I'm done, rant off, just really hoping to see a better way to do this so I can throw something together in the next month or two and start some Alpha testing... Hrrrrmmm crap, still haven't thought of a map name, anyways....
Edit: May have answered my own question, while it may require one specific effect for the event segment, I could give many monsters the same effect, then use a case statement to decide what the unit is, then go from there. I'm still curious to see what others know about this particular subject though.