• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Sudden and random problems with init.

Status
Not open for further replies.
Level 5
Joined
Jul 27, 2008
Messages
87
Hey all. I never really post for help here, I never usually need it - but I've run into a problem when almost finished with the latest version of my map, The Dawn of Battle AoS. I got a lot of feedback and requests to finish the map with an updated version, so I finally said sure, I'll do it.

Well just last night, I noticed my initialization code acting pretty wonky when loading up to test some things, but the strange part is, I haven't touched anything to do with initialization code in about a year and a half, nor have I added any new initialization triggers. I know for a fact a few days ago, the things that are misbehaving were not screwed up, and I know that logically I would expect that none of the things I have changed since then (abilities are pretty much all I've been working on the past month, the initialization was fine a day ago).

So my question is, can the initialization triggers be screwed up by code from another area of the game? The two problems I have noticed (so far) is that A: My random hero selection stopped working (I checked the code, it's all fine just like it was before), and B: My multiboard isn't putting the icons of the heroes on it anymore, just the null green boxes (again, I checked the code thoroughly, it's all fine).

In AoS maps, and especially in complex ones like mine, there are hundreds if not a few thousand triggers for custom abilities, item recipes and other things, hundreds of units, and about 1500 custom abiilties. I could retrace my steps but that could take many days just to cover the changes I made in a day. Does anyone know of any certain things that could have caused a multiboard trigger and a random hero array (or the creation of its random trigger unit) to cease working properly? Everything else works fine, but I refuse to release the map with things broken, so it's going to delay my progress until it's fixed.


Thanks in advance for any responses.


-Never.
 
Level 5
Joined
Jul 27, 2008
Messages
87
Well, nevermind, I guess something (still unknown) was causing my map initialization to screw up ONLY when setting arrays (despite the fact it worked fine for 1.5 years). So I'm just going to put this here in case someone else gets a problem with things behaving strangely out of nowhere - working on custom skill triggers can in some cases, apparently, screw up the "Map initialization" event, at least when assigning integer arrays.

The common link between my multiboard icons and my random hero select were that they both used integer arrays. I set them both to run at .5sec gametime rather than initialization and they work fine. This could save someone from going mad trying to figure out what is wrong in their thousands of lines of code, so I thought I'd post my findings here, in case it ever comes in handy. Phew, thank JESUS.



Edit: Found a new problem, turns out the map works fine in all areas except one - no new triggers can be made; They simply won't work. I've tried to make a couple of custom abilities (I know what I'm doing with those), and pretty simple ones, mind you - but since whatever damaged the initialization trigger, no further trigger adjustments will work. Even a simple addition of adding/removing unit collision to an existing trigger will not have any effect in-game whatsoever. If anyone knows anything about this, I have only one inkling - which is that it may the dreaded "unit bug" with the hero I was working on when these problems began. I have heard that sometimes the editor takes a dump all over itself, and for some unknown reason will cause a unit or ability to "bug", to where it basically causes all kinds of nasty and seemingly random problems to the map. I haven't yet tried deleting said hero and remaking him, but I think I'm going to try that next - I was just wondering if anyone can confirm the validity of this rumor I've heard about units/abilities glitching and causing strange side effects until removed?
 
Last edited:
Level 20
Joined
Jul 6, 2009
Messages
1,885
You're probably exceeding op(eration) limit. I'm not much familiar with this, but as far as i know, executing too many operations at a time causes none of them to work. I suggest you separate your actions in several triggers if you have many actions at initialization. If it doesn't help, execute them in small intervals.
Also make sure that, if you're using GUI, you don't put any big value for "size" field for variables in variable editor. This value defines up to which index are variables initialized with 'Initial Value'. Initializing too many variables can exceed op limit too.
If you need to initialize many variables, just spread it in multiple triggers.
 
Level 5
Joined
Jul 27, 2008
Messages
87
Hey Garfield, thanks for the reply. The tricky bit is, none of what could have caused problems could possibly be with the initialization triggers, since technically now (after changing the last two), I have ONE initialization trigger, the rest are as you suggested, run at intervals/time elapsed.

I'm not familiar with the operation limit either, I couldn't find anything Googling/searching WC sites for info on any type of trigger/function limit etc. My only thought was that maybe I had used the line "a unit starts the effect of an ability" one too many times, or something of that nature? Because I literally hadn't touched any initialization triggers in over a year, nor made any new ones since then. The arrays were both of number 55 to deal with the random selection and again to deal with the icons on the multiboard (I have 55 heroes, thus 55).

I have a hard time believing that the number of triggers in my map, assuming there is no limit to the number of triggers you can have, is NOT the problem, simply because I must have close to 1000 of them between systems, custom abilities, AI pathing, etc. (lol). I just wish I knew why whatever was wrong was causing the initialization triggers to freak out. It isn't doing it anymore, like I mentioned, but now NO new triggers will function properly. Thankfully I only had one of the 55 heroes left to revamp, and he wasn't terribly boring, but I think I have to flat out give up on figuring out the answer with all of the triggers/units/abils in my map, unless someone who IS familiar with this kind of silliness could clue me in. Thanks for your help though, Garfield. +rep to you, good sir. You've taught me a few useful things that could have caused future problems, whether or not they explain my specific issue.
 
Status
Not open for further replies.
Top