• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

I Keep Hitting the OP Limit!!

Status
Not open for further replies.
Level 29
Joined
Oct 24, 2012
Messages
6,543
colinjames12 you should probably check if you have loops longer than 800 because that is the only op limit i have ever hit when i thought loops can go from 1 to 8191 otherwise you can have ten thousand+++ destructables a lot of preplaced unit etc.

take a look at these pics i went way past the 800 tht u said is op limit i have a pic using jass and gui. it all depends on how many actions r done inside the loop not just the loop number
 

Attachments

  • max loop gui.PNG
    max loop gui.PNG
    79.9 KB · Views: 90
  • max loop.PNG
    max loop.PNG
    143.5 KB · Views: 93
Level 8
Joined
Jul 18, 2010
Messages
332
I have no idea who I should listen to. Have you even searched about op limit before you replied to this thread? The first answer that I found was about variables and arrays and the second one was about the loop thing. For the last time, it's not about loops. When I start my map, the map init doesn't work and I don't have any loops in my map init.

Please stop talking about loops, loops, loops, and loops. This is not about loops. I'm just repeating everything that i'm saying, over and over again like a loop. This is not about loops, this about the actions that runs at map initialization, and again there are no loops involved. If OP limit is not what you call it, then what do you call the act of exceeding the amount of actions available for the map init? I don't care, I just wanna know how to fix it. The answer that I probably want to hear is to reduce you variables and arrays. The problem is that I did this already b4 and it worked but when I add variables again, the problem will persist. I've said this b4 too. I'm planning to add all the variables that I'm gonna need and then when I finish my map, I'm going to delete some useless variables, that will probably work.

Note: I'm pretty sure it's an OP limit problem and i'm hitting the op limit at map init. I really need a definite and sure answer for this problem and not another repeated reply.
 
Level 14
Joined
Jun 27, 2008
Messages
1,325
Having a high amount of variables does not change anything in the map initialization process. Variables are not created during map initialization, the only thing that happens is the assignment of the default values (if not equal to zero), which is the reason why arrays can be expensive (each field has to get its own value assigned).

Long story short: the number of variables you have is not your problem.

If you want to see what exactly happens to your map on map initialization get this tool, open your map with it and extract "war3map.j". As stated before it contains the complete map script including map initialization code. Open it with a random text editor (notepad.exe or whatever you have).
 
Level 8
Joined
Jul 18, 2010
Messages
332
I did it but it just shows the actions that i added on the map init. But does it also include the global declaration of variables, regions, and other stuffs. I rather not post it, it's really long. What should I look at here anyway? The number of things that are done on map init including the global declaration?

Just for clarification, what are the things that are done on map initialization? I only a have a few actions in map init, I think I only have 10.

Edit: I've copied it in notepad++, and I've found out that the things declared at map initialization is more than 8000 lines still not including the 10 actions in map init. Is this bad? I'm sure it's bad, it's more than 8192, and I ain't sure what that number has to do with this.
 
Level 8
Joined
Jul 18, 2010
Messages
332
muzzel and deathismyfriend, I'm sorry but that's not working. The only trigger not working is map init, if I change the event to time elapsed, it works. So 4 d last time, I'm not gonna find the line that makes the trigger stop working.

Muzzel, I need help on your suggestion, the one with the MPQMaster. I've done it but what should I be looking at? Can you read my last comment, I wrote something there.
 
muzzel and deathismyfriend, I'm sorry but that's not working. The only trigger not working is map init, if I change the event to time elapsed, it works. So 4 d last time, I'm not gonna find the line that makes the trigger stop working.
Seriously, how do you expect us to help you if you do not want to listen to us? There's a goddamn reason we are suggesting this.

Besides, if your trigger works with the event changed, this is a 100% proof that your issue has ABSOLUTELY NOTHING to do with the operation limit.

So, for pete's sake: put some damn debug messages in and find out which line in your trigger makes it stop working. Jesus!
 
Last edited:
Level 8
Joined
Jul 18, 2010
Messages
332
I told you that it's not working, none of the lines are causing the problem. So if it's not an op limit, what is it? I told you that it works perfectly when I change the event, but with map init, it doesn't work.

Wait, I thought op limit can have something to do with the things that are loaded in map init which includes actions in map init and a lot more other things.
 
I told you that it's not working, none of the lines are causing the problem.
Put a message at the beginning and the end of the trigger.
If only the first message is displayed, but not the last, it IS a line in your trigger that is causing the issue. If the first message does not even run, then there's something disabling your trigger, or preventing it from being evaluated.
Either way, it's not the op limit.

So if it's not an op limit, what is it? I told you that it works perfectly when I change the event, but with map init, it doesn't work.
Most common case: You use global variables that are not initialized at the moment the trigger fires. I'm almost 99% sure that this is your problem.

Wait, I thought op limit can have something to do with the things that are loaded in map init which includes actions in map init and a lot more other things.
Op-limit is exclusive to your thread. This means that things outside of your trigger do not influence the op-limit of this particular thread in any way. The fact that your trigger runs fine when changing the event indicates that the operation limit is not reached in your trigger, as the amount of operations will be the same, no matter if its done on map init or delayed.

Again: put text messages in an check where the trigger stops executing. If it doesn't even execute, there's something wrong with your map structure or you are disabling your trigger from somewhere else.
 
Level 17
Joined
Apr 27, 2008
Messages
2,455
For arrays this is not true. AFAIK the array size thing is what decides how many values of the array are initialized.

That doesn't matter for array, you just can't have a not initialized index, it will always have the default value, even if it's the very first time you use it.
Try this :

JASS:
local integer array Tab

set Tab[3] = Tab[3] + 1 // valid : 0 + 1 -> 1
call BJDebugMsg( I2S(Tab[3]) )
call BJDebugMsg( I2S(Tab[42]) )
call BJDebugMsg("end")
It will display "1", "0" and "end", no crash of the thread.

EDIT :

Meh, you're talking about the GUI array init loop thing, we have already talked about it in this thread, but still my answer is relevant.
 
Level 8
Joined
Jul 18, 2010
Messages
332
@Wrda by trigger, you mean my map init. Well it's about 10 actions long.

@Troll-Brain are you sure? cause some people are saying that variables with arrays are initialized at map init so they add up the number of things executed at map init. I'm still not sure if variables without arrays are included on this.

And I don't know Jass much. Btw, I have 123 arrays all with 1 array size.
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
10 actions is very short it has to be one of the actions tht is not firing at map init. like posted b4 just put in messages and see what fires and what doesnt. when u find what doesnt trigger paste tht action on here. also it would be a lot easier if u just posted the trigger rather than have everyone guess about what is in ur trigger
 
Level 8
Joined
Jul 18, 2010
Messages
332
@deathismyfriend I really think you're not getting at all. Everyone of them doesn't fire but If i change the event from map init to elapsed game time, itw orks. But I'll just post the trigger here anyway.

  • map init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Cinematic - Apply a filter over 2.00 seconds using Normal blending on texture Black Mask, starting with color (0.00%, 0.00%, 0.00%) and 0.00% transparency and ending with color (100.00%, 100.00%, 100.00%) and 100.00% transparency
      • Game - Set the time of day to 12.00
      • Game - Turn the day/night cycle Off
      • Sound - Set music volume to 0.00%
      • Environment - Create at Region 000 <gen> the weather effect Rays Of Light
      • Environment - Turn (Last created weather effect) On
      • Environment - Create at Region 003 <gen> the weather effect Rays Of Light
      • Environment - Turn (Last created weather effect) On
      • Environment - Create at Region 081 <gen> the weather effect Rays Of Light
      • Environment - Turn (Last created weather effect) On
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
take out the cinematic i dont think u can apply a timer at map init.

also its u who is not getting it if all of the actions work when u change the event then ur problem is tht one of the actions does not work at map init

also note displaying them w the event of time elapsed 0.00 doesnt change anything for ur game except it lets it work
 
Last edited:
Level 8
Joined
Jul 18, 2010
Messages
332
take out the cinematic i dont think u can apply a timer at map init.

I don't get it, is cinematic a timer? It works perfectly b4. I want the screen to be black at first and then it will fade out for effects.

also its u who is not getting it if all of the actions work when u change the event then ur problem is tht one of the actions does not work at map init

I just don't get it all. I changed the event so the actions will work so the problem is definitely the event because that's what I changed. I'm sorry I really don't get your logic.

also note displaying them w the event of time elapsed 0.00 doesnt change anything for ur game except it lets it work

If I remember it right, I think this will cause a little lag at the start of the map so that's why I prefer map init more than this.

And @Wrda, I know that, I don't have any timer, multiboards, and leaderboards unless you're saying that cinematics are timers too like what deathismyfriend is probably saying.
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
And @Wrda, I know that, I don't have any timer, multiboards, and leaderboards unless you're saying that cinematics are timers too like what deathismyfriend is probably saying.

look at the cinematic action u have. it applies a filter over 2 seconds. tht 2 seconds is a timed event which cant be done at map init.

also u will not notice any lag if u use 0.00 seconds for the startup
 
But if you use GUI variables (created from the variable editor i mean) that's just not possible, since they always have a value.
Thats not what I meant.

Even if you use GUI variables, variables can have no initial value.

Take groups for example. If your initial value is "null" and you try to destroy or enum something with the group in the variable (which does not exist at this moment), the trigger will stop running.

@topic: I'll take a wild guess and say there's some other trigger deactivating your init trigger.

Do you have triggers converted to custom text? If so, did you change the name of any of them so that there might be naming issues?
 
Level 8
Joined
Jul 18, 2010
Messages
332
@Xonok That's my point, I don't want the lag to show up that's why I prefer map init over elapsed game time.

@deathismyfriend I'm 100% sure that cinematics aren't timers. I feel like half the things that you have told me are false.

@Zweibelchan I don't have any triggers that are converted to custom text.
I'm 100% sure that nothing is deactivating my map init because like I said when I change the event, it works perfectly fine. So it has something to do with map init. I'm 100% sure that I'm exceeding a limit. If it's not OP limit that you call it, then I'll call it Map initialization limit wherein I've exceeded the amount of things that can be executed or declared at map init. I just need to know what these things are?
 
@Zweibelchan I don't have any triggers that are converted to custom text.
I'm 100% sure that nothing is deactivating my map init because like I said when I change the event, it works perfectly fine. So it has something to do with map init. I'm 100% sure that I'm exceeding a limit. If it's not OP limit that you call it, then I'll call it Map initialization limit wherein I've exceeded the amount of things that can be executed or declared at map init. I just need to know what these things are?
Alright, I give up. You simply refuse to understand, so I don't know why I should still waste my time on this.

People just tend to blame errors caused by themselves on things out of their control, just to be able to point a finger and say "not my fault... blame blizzard!".

But well, one last time: there is no such thing as a "Map initialization limit". There is only the operation limit which does only apply to each thread on its own. And your trigger is way too short to hit the operation limit.
Your problem is somewhere else, take it or leave it.

Besides, are you sure your trigger is not running correctly? Having a fadefilter done on map init might look like it's not working, because the map init event is fired during the loading screen and your filter ends on complete transparency, which means that when the game starts and the lag has settled, the end state is already reached.
Check for the game time. Is it locked to 12?
 
Level 8
Joined
Jul 18, 2010
Messages
332
I check the game time and the filter all the time, that's how I know if the map init is working or not.

It works perfectly before and then someday, it stopped working. I didn't make this thread then but I search about the problem first and the first thing that popped up is OP limit.

But then I asked myself, my map init is so short, why would it hit the OP limit. But then I found out that it's because one of my arrays have a size of 8192 and they said it may hit the op limit. So all I have now is 123 arrays with sizes 1.

I'm following that logic until now that's why I'm ignoring some of the things that people are saying. I've made a thread like this b4 and that was the 1st thing that they suggested to me. I've did that already, it worked, but when I add new variables even if I added only a few, the problem persists.

So that's why I'm keeping this thread alive in case someone gives me a sure solution that is related to my map init and my variable problem.

Don't get mad if I'm slightly ignoring your suggestion but I'm certainly not blaming anybody.
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
I check the game time and the filter all the time, that's how I know if the map init is working or not.

It works perfectly before and then someday, it stopped working. I didn't make this thread then but I search about the problem first and the first thing that popped up is OP limit.

But then I asked myself, my map init is so short, why would it hit the OP limit. But then I found out that it's because one of my arrays have a size of 8192 and they said it may hit the op limit. So all I have now is 123 arrays with sizes 1.

I'm following that logic until now that's why I'm ignoring some of the things that people are saying. I've made a thread like this b4 and that was the 1st thing that they suggested to me. I've did that already, it worked, but when I add new variables even if I added only a few, the problem persists.

So that's why I'm keeping this thread alive in case someone gives me a sure solution that is related to my map init and my variable problem.

Don't get mad if I'm slightly ignoring your suggestion but I'm certainly not blaming anybody.

I guess you should disable all functions in map init and then enable them one by one. Why? Then you see what's causing the problem.

The other way is just moving the events to time elapsed = 0, as that does not necessarily lag. It's exactly like loading time, but a moment later.
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
@Xonok That's my point, I don't want the lag to show up that's why I prefer map init over elapsed game time.

@deathismyfriend I'm 100% sure that cinematics aren't timers. I feel like half the things that you have told me are false.

@Zweibelchan I don't have any triggers that are converted to custom text.
I'm 100% sure that nothing is deactivating my map init because like I said when I change the event, it works perfectly fine. So it has something to do with map init. I'm 100% sure that I'm exceeding a limit. If it's not OP limit that you call it, then I'll call it Map initialization limit wherein I've exceeded the amount of things that can be executed or declared at map init. I just need to know what these things are?

Well good luck finding a solution
 
I tested the map you uploaded earlier and can't even get the map to properly compile with Newgen WE. It's getting stuck on saving the triggers.

However, all I could say after seeing the triggers was "KILL IT WITH FIRE!!". :/
No offense, seriously, but how the fuck did you manage to create a map that takes LONGER to load in the editor than maps with dozens of highly complex systems, 50k+ doodads and 480x480 map size?

With efficient triggering, you could get rid of 95% of your triggers and variables. At some places, you copy and pasted the same trigger 16 times just to make it MPI!
All I can say is... do yourself a favour, read some tutorials about efficient coding and start all over again, please. :/
Keep the terrain and object data, but get rid of the triggers and start it from scratch. It's a MESS!
Even if you manage to find what is blocking your init trigger (I think it's the fadefilter; I checked the wrapper and fadefilters DO use timers), there is no way you can ever complete that map and make it performant enough to be able to actually play it multiplayer, cause there is so many 32 fps timer events that your map will lag like hell.

I'm not trolling you here. I'm dead serious! You will *never* get this map to work in multiplayer like this.

Remove everything, read tutorials and start again. This will not go anywhere, I promise!
 
Level 14
Joined
Jun 27, 2008
Messages
1,325
I'm not trolling you here. I'm dead serious! You will *never* get this map to work in multiplayer like this.

Remove everything, read tutorials and start again. This will not go anywhere, I promise!

yea. Sadly a lot of people start learning GUI and launch extensive projects instead of collecting some experience first. If you spent few days-weeks on learning efficient coding before you started the project, in the long term you would have been much faster (+much better result).

About init triggers: im not sure about this but maybe they all run in the same thread?
 
About init triggers: im not sure about this but maybe they all run in the same thread?
I'm pretty sure they do not. And even if, there is only this one single init trigger he posted with like 10 actions. I'm pretty sure its the fadefilter thing that's to blame here, but I can't test it as I can not get the map to compile, lol.
Pretty sure he is using some outdated vanilla we or the troubling WEU.
 
Level 17
Joined
Jul 17, 2011
Messages
1,864
I tested the map you uploaded earlier and can't even get the map to properly compile with Newgen WE. It's getting stuck on saving the triggers.

However, all I could say after seeing the triggers was "KILL IT WITH FIRE!!". :/
No offense, seriously, but how the fuck did you manage to create a map that takes LONGER to load in the editor than maps with dozens of highly complex systems, 50k+ doodads and 480x480 map size?

With efficient triggering, you could get rid of 95% of your triggers and variables. At some places, you copy and pasted the same trigger 16 times just to make it MPI!
All I can say is... do yourself a favour, read some tutorials about efficient coding and start all over again, please. :/
Keep the terrain and object data, but get rid of the triggers and start it from scratch. It's a MESS!
Even if you manage to find what is blocking your init trigger (I think it's the fadefilter; I checked the wrapper and fadefilters DO use timers), there is no way you can ever complete that map and make it performant enough to be able to actually play it multiplayer, cause there is so many 32 fps timer events that your map will lag like hell.

I'm not trolling you here. I'm dead serious! You will *never* get this map to work in multiplayer like this.

Remove everything, read tutorials and start again. This will not go anywhere, I promise!


THIS IS ALL GUI'S FAULT IT MAKES THINGS MORE COMPLICATED wHAT KIND OF INSANEPERSON MAKES PLAYERS START FROM 1 IN GUI AND 0 IN JASS??????????????????????n
 
THIS IS ALL GUI'S FAULT IT MAKES THINGS MORE COMPLICATED wHAT KIND OF INSANEPERSON MAKES PLAYERS START FROM 1 IN GUI AND 0 IN JASS??????????????????????n
There's good GUI coding and bad GUI coding. Good GUI coding can almost be as efficient as JASS for casual purposes (In case you do not want to do some crazy stuff like Nestharius or Magtheridon).

However, this is a case of very bad GUI coding and it's obviously taking its toll.
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
There's good GUI coding and bad GUI coding. Good GUI coding can almost be as efficient as JASS for casual purposes (In case you do not want to do some crazy stuff like Nestharius or Magtheridon).

However, this is a case of very bad GUI coding and it's obviously taking its toll.

totally wrong. good GUI coding is just a bunch of custom scripts in a gui trigger file :\ the native GUI functions are incredibilly inefficient
 
Level 14
Joined
Jun 27, 2008
Messages
1,325
totally wrong. good GUI coding is just a bunch of custom scripts in a gui trigger file :\ the native GUI functions are incredibilly inefficient

Bullshit.
Most GUI actions are converted into BJ functions with slightly altered argument lists that simply call the native. Thus the GUI code results in a higher amount of function calls compared to the jass equivalent.
The bigger problems are the lack of functions in GUI, you have to use more triggers and GUI Timers are less efficient than Jass timers.

HOWEVER, these things are peanuts compared to what you get when you have massive design flaws. If you have a map written in good, efficient GUI code that laggs, then you have a design fault and writing the same thing in Jass wont make it better.

Why use jass then?
- there are a few things you can do in Jass that GUI cant (Trackables ...)
- there are things that can be done in a nicer way using jass (Timers ...)
- most important: jass is faster to write and easier to manage

About your "good GUI coding is just a bunch of custom scripts": Good GUI Code contains as few customscripts as possible, since customscripts make GUI code unreadable. Keep in mind: performance is not the only criterion for good code, especially when it comes to GUI readability and simplicity are often way more important.
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
Bullshit.
Most GUI actions are converted into BJ functions with slightly altered argument lists that simply call the native. Thus the GUI code results in a higher amount of function calls compared to the jass equivalent.
The bigger problems are the lack of functions in GUI, you have to use more triggers and GUI Timers are less efficient than Jass timers.

HOWEVER, these things are peanuts compared to what you get when you have massive design flaws. If you have a map written in good, efficient GUI code that laggs, then you have a design fault and writing the same thing in Jass wont make it better.

Why use jass then?
- there are a few things you can do in Jass that GUI cant (Trackables ...)
- there are things that can be done in a nicer way using jass (Timers ...)
- most important: jass is faster to write and easier to manage

About your "good GUI coding is just a bunch of custom scripts": Good GUI Code contains as few customscripts as possible, since customscripts make GUI code unreadable. Keep in mind: performance is not the only criterion for good code, especially when it comes to GUI readability and simplicity are often way more important.

Aren't you the person that wants to delete all the brackets from java and call it a new language? o_O

Anyway, im not getting into this argument... besides, JASS is 5x faster to write. (thats fact, not opinion)
 
Level 14
Joined
Jun 27, 2008
Messages
1,325
Aren't you the person that wants to delete all the brackets from java and call it a new language? o_O
I indeed support WurstScript, but i didnt create it.
About the Syntax: you can call it a java ripp-off, but its really just the very basic syntax most general purpose languages use. Using indentions instead of curly brackets isnt new either, ever heard of Python?
I know people are all like "Wurst is like Java", but all that tells me is that they have never seen any programming language other than Java and Jass (and for the record: syntax wise jass is the exotic, Wurst and Java are mainstream).

But what bothers me even more: you dont seem to know the assets of Wurst, all you guys do is bitch about the syntax, so before you start arguing about wurst please read the manual to get a summary of what it does.


Anyway, im not getting into this argument... besides, JASS is 5x faster to write. (thats fact, not opinion)
You stated that Jass has a significantly higher performance than GUI. Either you advance that view and argue with the people who dont (thats the idea of a forum) or you shouldnt post it in the first place. And we never talked about how fast you can write Jass, the discussion was all about its performance in comparison with GUI.
 
totally wrong. good GUI coding is just a bunch of custom scripts in a gui trigger file :\ the native GUI functions are incredibilly inefficient
That's not true. I could write very efficient scripts and spells MUI without using any custom scripts except for removing locations and groups (I simply don't, because vJass is much faster to write and read for me).

It's not about the possibilities of GUI, it's about HOW you use those possibilities. Yes, you can not use locals in GUI and this is probably the most serious flaw of GUI, but since hashtables got available, you can write efficient scripts and spells just with globals and a good management of hashtables.
In fact, most of the time when I'm using locals, I just use them for convenience, not because those variables actually need to be locals.
A skilled coder does not use TriggerSleepActions anyway, so there's almost no reason you'd need locals instead of some global temporary variables except when the trigger runs itself.

A skilled GUIer doesn't even need timers, if it's done correctly.
You can have one global periodic timer event at 32 fps, attaching triggers including all data to this event at will using a trigger array and a hashtable containing the required trigger variables (Which is basicly the T32 concept done manually).

The thing about good GUI coders is (and that's the real reason why there are almost no good GUI coders); when you reached the point where you are able to write efficient, clean and short GUI, you will most likely just switch over to using vJASS, as it's much faster to write.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
In fact, most of the time when I'm using locals, I just use them for convenience, not because those variables actually need to be locals.
A skilled coder does not use TriggerSleepActions anyway, so there's almost no reason you'd need locals instead of some global temporary variables except when the trigger runs itself.

It's a precaution for the possibility that there could be a cycle. Also, since locals target at a narrowed scope, they allow shorter names, thus boosting writing speed and readability.

Anyway, how have you managed to reach the 7th page on this topic?
 
It's a precaution for the possibility that there could be a cycle. Also, since locals target at a narrowed scope, they allow shorter names, thus boosting writing speed and readability.

Anyway, how have you managed to reach the 7th page on this topic?
By having a TO that refuses to listen to people that know better. ;)
 
Status
Not open for further replies.
Top