Wc3 Map Optimizer 3.7b

Status
Not open for further replies.

emjlr3

Change can be a good thing
Reaction score
395
i think that is an awesome idea, atleat jsut to fix basic ones, like point, special effects, groups, and units, I am sure you could do it Vex, you've done so much as it is, seems like your talents are limitless
 

XXXconanXXX

Cocktails anyone?
Reaction score
284
He's talked about that before, and it would cause many problems. It wouldn't be fullproof, and would sometimes remove things it sees as leaks when they might not be leaks at all.
 

emjlr3

Change can be a good thing
Reaction score
395
not if it was foolproof ;)
 

mase

____ ___ ____ __
Reaction score
154
ahh but its close being its version is at 3.7 with many edits.
 

nomadian

Member
Reaction score
9
Hi. I used this program and firstly "removed useless code"
This still opened in Warcraft editor though
So I then tried "Remove as much WE data as possible" but keep "doodad file"
Having done this everytime I open it world editor it crashes, good. But when I click on the map to host the game it crashes as well.
So firstly what did I do wrong?
Secondly, if this doesn't sufficiently map protect, where can I get one that does?
All I'm looking for is stopping new players who only are able to add tomes. I don't want people changing the map till I've upgraded it more.
Thanks in advance.
 

Sargon

New Member
Reaction score
83
nomadian said:
Hi. I used this program and firstly "removed useless code"
This still opened in Warcraft editor though
So I then tried "Remove as much WE data as possible" but keep "doodad file"
Having done this everytime I open it world editor it crashes, good. But when I click on the map to host the game it crashes as well.
So firstly what did I do wrong?
Secondly, if this doesn't sufficiently map protect, where can I get one that does?
All I'm looking for is stopping new players who only are able to add tomes. I don't want people changing the map till I've upgraded it more.
Thanks in advance.

Technically, this isn't a map protector. However, I think that there's a function called "make World Editor Crash" or something like that. That should do what you need.
 

Vexorian

Why no custom sig?
Reaction score
187
It is not supposed to make the game crash.

So what about reading the damn readme? you should have sent me your map by email already.
 

nomadian

Member
Reaction score
9
I read the readme and everything. I think I just did something wrong. It doesn't matter. Fortunately I think my game isn't going to be popular so its ok being open source.
 

Vexorian

Why no custom sig?
Reaction score
187
I don't really care about your map being open source or not, but if a bug happened in your map then it may happen in another map and no combination of optimizer options should make the map crash in game so please help me fix that bug?
 

nomadian

Member
Reaction score
9
sorry I just presumed I did something wrong. Looked in my recycle bin, restored the file which crashed but its 1.25 gb?! for some reason. I can give you the final version of the map if you want but its different to the one that crashed.
 

masda70

New Member
Reaction score
1
I found a strange bug.
I have tested and found out that the following:

return(IsUnitType(unit,UNIT_TYPE_TOWNHALL))

('unit' being anything I'm pretty positive : (GetTriggerUnit(), GetAttacker()...) )

used in a trigger condition function
(
as in the function that should go here:
call TriggerAddCondition(mytrigger,Condition(function mycondition))
)
should not work.

To make it work you need to add "==true", and the trigger actions will run if the condition is met.

If you use something like :
return((mycond1)and(mycond2)and(IsUnitType(unit,UNIT_TYPE_TOWNHALL)))
it might work or not depending on unknown factors.

The problem is that the map optimizer has an option to make the usual condition:

if( not (cond==true) then
return false
endif
return true

more like:
return(cond)
or
return((cond1)and(cond2)....) if there are more conditions.
So basically if you have a map that uses
IsUnitType(unit,UNIT_TYPE_TOWNHALL) in one of the conditions then map optimizer will make it not to work because it will remove the needed "==true".
Obviously it was hard for me to find this out because it doesn't really make sense at all, you can test it if you want but I'm pretty sure you will get the same results as me since I have tried many possible things already.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> So basically if you have a map that uses IsUnitType(unit,UNIT_TYPE_TOWNHALL) in one of the conditions
> then map optimizer will make it not to work because it will remove the needed "== true".


"IF Function() == true THEN return true ELSE return false"
is perfectly equivalent to
"return Function()"

The shorter version is, actually, preferred.
 

Vexorian

Why no custom sig?
Reaction score
187
masda70 said:
I found a strange bug.
I have tested and found out that the following:

return(IsUnitType(unit,UNIT_TYPE_TOWNHALL))

('unit' being anything I'm pretty positive : (GetTriggerUnit(), GetAttacker()...) )

used in a trigger condition function
(
as in the function that should go here:
call TriggerAddCondition(mytrigger,Condition(function mycondition))
)
should not work.

To make it work you need to add "==true", and the trigger actions will run if the condition is met.

If you use something like :
return((mycond1)and(mycond2)and(IsUnitType(unit,UNIT_TYPE_TOWNHALL)))
it might work or not depending on unknown factors.

The problem is that the map optimizer has an option to make the usual condition:

if( not (cond==true) then
return false
endif
return true

more like:
return(cond)
or
return((cond1)and(cond2)....) if there are more conditions.
So basically if you have a map that uses
IsUnitType(unit,UNIT_TYPE_TOWNHALL) in one of the conditions then map optimizer will make it not to work because it will remove the needed "==true".
Obviously it was hard for me to find this out because it doesn't really make sense at all, you can test it if you want but I'm pretty sure you will get the same results as me since I have tried many possible things already.


It is actually a wc3 bug, we (bunch of jass geeks are working with blizzard to make sure it gets fixed.

Anyways the optimizer is supposed to browse for IsUnitType returns and add !=null, if that doesn't happen then it is an optimizer bug, send me your map's original script where the ==true are still getting removed please
 

masda70

New Member
Reaction score
1
function Trig_Backstabbing_Func004C takes nothing returns boolean
if ( not ( IsPlayerAlly(GetOwningPlayer(GetAttackedUnitBJ()), GetOwningPlayer(GetAttacker())) == true ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetAttacker()) != GetOwningPlayer(GetAttackedUnitBJ()) ) ) then
return false
endif
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_TOWNHALL) == true ) ) then
return false
endif
return true
endfunction

function Trig_Backstabbing_Conditions takes nothing returns boolean
if ( not Trig_Backstabbing_Func004C() ) then
return false
endif
return true
endfunction

Those are the 2 functions WC3 makes based on the conditions of a GUI trigger that cause the problem.

After using optimizer, they become:

function Ae takes nothing returns boolean
return(IsPlayerAlly(GetOwningPlayer(GetTriggerUnit()),GetOwningPlayer(GetAttacker())))and(GetOwningPlayer(GetAttacker())!=GetOwningPlayer(GetTriggerUnit()))and(IsUnitType(GetTriggerUnit(),UNIT_TYPE_TOWNHALL))
endfunction
function AE takes nothing returns boolean
return(Ae())
endfunction
 
G

Gidgert

Guest
Just curious but what filter do i check so that this will protect my map from A holes?
 

The Helper

Necromancy Power over 9000
Staff member
Reaction score
1,697
Vexorian emailed me and said he is doing other things besides WC3 Modding now so I am assuming he is no longer supporting this program here. I am going to leave this post up but if you have any questions or problems please email Vexorian as I am assuming he is not checking this thread anymore. Thanks.
 

The Helper

Necromancy Power over 9000
Staff member
Reaction score
1,697
Vexorian is no longer posting at this forum and I don't know if this download is still good so I am no longer supporting it. I suggest checking wc3campaigns for the latest version and information about this program.
 
Status
Not open for further replies.
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top