Hi there everyone. I've been scripting with jass on warcraft 3 for 5 years now,
making several maps that me and my friends had alot of fun with, Age of Myths
is one of them.
During my experience with my map making, I learned alot, and I'd like to share
that knowledge with you, map makers that mess with jass or gui, so you won't have to
make the same mistakes that I made. I am not comparing my skills to famous known
brilliant jassers and coders like Vexorian/PitzerMike/PipeDream, but I have more experience
when it comes to map bugs, and that's where I'm getting at.
Map making is a bitch, I can tell you that. You should avoid the things I am listing
now, do whatever you want, but I feel I should say this.
Before I start though I want to point out that you should use Vexorian's NewGen Jass
pack, download it from http://wc3campaigns.net/showthread.php?goto=newpost&t=90999
and use it, to avoid lame crashes from the editor for minor coding mistakes and avoid triggeraction leaks for jass users.
Therefore, I will only post here bugs in the game itself, and not with world editor
crashing, since it can be easily avoided by using something else then the usual
world editor.
-----------------------------------------------
(Bug) Using a different buff for a spell that isn't its original buff will most likely
cause crashes in multiplayer gaming.
(Solution) Don't use a Freezing Breath buff on a War Stomp spell for example.
Modify the original buff that War Stomp uses and change whatever you want there.
(Bug) Don't ever try to move nullified lightning effect variables, it will instantly
cause a crash.
(Solution)
Always set a lightning variable to null whenever you finish using it and
destroying it, and use the following function(s) to move them:
(Bug) Using an item ability that has a chance to affect summons/units/heroes, you need to use
an ability to cause that effect. If you use the same chance within the chance, the map will
crash once you get that item.
(Solution) Don't do it Make sure you put an ability and not the chance itself.
(Bug) Moving a unit with SetUnitX and SetUnitY outside the map bounds can cause
crashes.
(Solution) Don't use the original SetUnitX and SetUnitY to move units, use this function
instead to avoid moving the unit outside the map bounds and cause a crash:
(Bug) Boolean Expressions (boolexpr) usually fails ALOT in the map. They will sometimes
cause your conditions to behave in a weird way.
(Solution) Don't use them, use null instead and then in the trigger actions themselves
use an if/then/else comparision.
(Bug) If you use alot of game cache functions, your map will behave in a weird way
and will bug out most timers and functions.
(Solution) Don't use game cache. I learned it the hard way with alot of version
releases. Don't use handle vars. Don't use the return bug (H2I). Don't
use tables. Use GLOBAL VARIABLES. Use Vexorian's Jass New Gen Pack on
www.wc3campaigns.net and then you can declare globals through triggers
and you can avoid triggeraction leaks by declaring them as globals,
something you cant do through GUI's variable making interface.
It's your call, I just recommend what I experienced.
(Bug) Destroying timers is problematic with jass. Using them just caused me trouble. I learned
not to trust that method.
(Solution) If you need a timer that you use constantly, you can declare a global timer,
create it and then just pause/start it whenever you use it, without destroying
it. For spells, I personally used triggers. When destroying them I didn't have
any weird problems. TriggerRegisterTimerEvent does the trick. Also, don't
ever null timers, triggeractions, triggerconditions, or triggers. It will
leak but it's a very minor leak, unnoticable. Again, your call. I'm just
saying from experience.
I recommend reading http://wc3campaigns.net/showthread.php?t=80693 for known
world editor bugs if you're still using it.
MANY MANY of you will not agree with me on several cases here, and I completely understand, but everyone has their own opinions on how to make their map, I just recommend what I think; you should do what you think.
I also want to say that without any offense to Vexorian, I do NOT recommend using
vJass newgen pack's features other then global declerations. Don't use structs
for example; every struct variable you create will be set as a global array. Who needs
an array for every variable? I dont. It just eats up memory. Just make your own
stuff, that's what I think anyways.
Thanks for reading, and I hope I saved you alot of time in your mapmaking.
making several maps that me and my friends had alot of fun with, Age of Myths
is one of them.
During my experience with my map making, I learned alot, and I'd like to share
that knowledge with you, map makers that mess with jass or gui, so you won't have to
make the same mistakes that I made. I am not comparing my skills to famous known
brilliant jassers and coders like Vexorian/PitzerMike/PipeDream, but I have more experience
when it comes to map bugs, and that's where I'm getting at.
Map making is a bitch, I can tell you that. You should avoid the things I am listing
now, do whatever you want, but I feel I should say this.
Before I start though I want to point out that you should use Vexorian's NewGen Jass
pack, download it from http://wc3campaigns.net/showthread.php?goto=newpost&t=90999
and use it, to avoid lame crashes from the editor for minor coding mistakes and avoid triggeraction leaks for jass users.
Therefore, I will only post here bugs in the game itself, and not with world editor
crashing, since it can be easily avoided by using something else then the usual
world editor.
-----------------------------------------------
(Bug) Using a different buff for a spell that isn't its original buff will most likely
cause crashes in multiplayer gaming.
(Solution) Don't use a Freezing Breath buff on a War Stomp spell for example.
Modify the original buff that War Stomp uses and change whatever you want there.
(Bug) Don't ever try to move nullified lightning effect variables, it will instantly
cause a crash.
(Solution)
Always set a lightning variable to null whenever you finish using it and
destroying it, and use the following function(s) to move them:
Code:
function LightningMove takes lightning l, boolean checkvisibility, real x1, real y1, real x2, real y2 returns nothing
if l!=null then
call MoveLightning(l,checkvisibility,x1,y1,x2,y2)
endif
endfunction
Code:
function LightningMoveEx takes lightning l, boolean checkvisibility, real x1, real y1, real z1, real x2, real y2, real z2 returns nothing
if l!=null then
call MoveLightningEx(l,checkvisibility,x1,y1,z1,x2,y2,z2)
endif
endfunction
(Bug) Using an item ability that has a chance to affect summons/units/heroes, you need to use
an ability to cause that effect. If you use the same chance within the chance, the map will
crash once you get that item.
(Solution) Don't do it Make sure you put an ability and not the chance itself.
(Bug) Moving a unit with SetUnitX and SetUnitY outside the map bounds can cause
crashes.
(Solution) Don't use the original SetUnitX and SetUnitY to move units, use this function
instead to avoid moving the unit outside the map bounds and cause a crash:
Code:
function SetUnitXY takes unit u, real x, real y returns nothing
if x<GetRectMaxX(bj_mapInitialPlayableArea) and x>GetRectMinX(bj_mapInitialPlayableArea) and y<GetRectMaxY(bj_mapInitialPlayableArea) and y>GetRectMinY(bj_mapInitialPlayableArea) then
call SetUnitX(u,x)
call SetUnitY(u,y)
endif
endfunction
(Bug) Boolean Expressions (boolexpr) usually fails ALOT in the map. They will sometimes
cause your conditions to behave in a weird way.
(Solution) Don't use them, use null instead and then in the trigger actions themselves
use an if/then/else comparision.
(Bug) If you use alot of game cache functions, your map will behave in a weird way
and will bug out most timers and functions.
(Solution) Don't use game cache. I learned it the hard way with alot of version
releases. Don't use handle vars. Don't use the return bug (H2I). Don't
use tables. Use GLOBAL VARIABLES. Use Vexorian's Jass New Gen Pack on
www.wc3campaigns.net and then you can declare globals through triggers
and you can avoid triggeraction leaks by declaring them as globals,
something you cant do through GUI's variable making interface.
It's your call, I just recommend what I experienced.
(Bug) Destroying timers is problematic with jass. Using them just caused me trouble. I learned
not to trust that method.
(Solution) If you need a timer that you use constantly, you can declare a global timer,
create it and then just pause/start it whenever you use it, without destroying
it. For spells, I personally used triggers. When destroying them I didn't have
any weird problems. TriggerRegisterTimerEvent does the trick. Also, don't
ever null timers, triggeractions, triggerconditions, or triggers. It will
leak but it's a very minor leak, unnoticable. Again, your call. I'm just
saying from experience.
I recommend reading http://wc3campaigns.net/showthread.php?t=80693 for known
world editor bugs if you're still using it.
MANY MANY of you will not agree with me on several cases here, and I completely understand, but everyone has their own opinions on how to make their map, I just recommend what I think; you should do what you think.
I also want to say that without any offense to Vexorian, I do NOT recommend using
vJass newgen pack's features other then global declerations. Don't use structs
for example; every struct variable you create will be set as a global array. Who needs
an array for every variable? I dont. It just eats up memory. Just make your own
stuff, that's what I think anyways.
Thanks for reading, and I hope I saved you alot of time in your mapmaking.