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,701
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,701
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.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top