1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Lead your forces to battle in the 15th Techtree Contest. The call is yours, commander!
    Dismiss Notice
  4. The reforging of the races is complete. Come see the 14th Techtree Contest Results.
    Dismiss Notice
  5. It's time to choose your horse in the race - the 32nd Modeling Contest Poll is up!
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[Mapping] FAQ for WEHZ

Discussion in '"Graveyard"' started by Chaosy, Jan 20, 2013.

  1. Chaosy

    Chaosy

    Joined:
    Jun 9, 2011
    Messages:
    10,813
    Resources:
    17
    Maps:
    1
    Spells:
    10
    Tutorials:
    6
    Resources:
    17

    FAQ @WEHZ


    By Chaosy


    Introduction


    There are many threads that have been created asking for the same thing this is why I created this tutorial I want to take the most common questions and answer them here.​


    Table of contents







    Why is my icon green?



    When you for example pause the game (f10) the game wants to use a darker version of the icons showing, but then you need two versions of the icon. example
    BTNmegadamagespell.blp
    DISBTNmegadamagespell.blp

    now you got the normal version and the darker version of the icon imported and the game wont show the ugly green icon.​





    How can I modify armor, attack speed, damage, sightrange etc



    Those are impossible to modify with normal GUI actions or JASS functions but there are workarounds.
    The key to this is item abilities they are kind of hidden abilities for your hero since they got no icon, so basically if you want a 20% attack speed increase you can add the gloves of haste item ability to your unit.
    list of useful base abilities:
    attack speed: gloves of haste
    sight range: goblin scope
    armor: item armor bonus (x)
    damage: item damage bonus (x)

    if you are lazy you can just import bonusmod by earth-fury or bonus by Nestharus​




    How can I extend my map bounds to 480?



    For this feature you need to install JNGP (Jass New Gen Pack) and run the editor there and then simply go to "scenario>map and camera bounds"

    to install JNGP you can follow one of the linked tutorial bellow.

    http://www.hiveworkshop.com/forums/...456/how-download-install-confige-jngp-160547/




    How can I increase my hero max level?



    This is really simple and you can do it in the normal editor no need for JNGP, go to "advanced>gameplay constants>check the box who says use custom gameplay constants> then find the field Hero - maximum level"​




    My creeps run back to the spawn very fast how can I modify this?



    you use the same as above, go to "advanced>gameplay constants>check the box who says use custom gameplay constants> then find the field creep return distance and creep guard return time"​




    I don't know a sh*t about jass so can somebody make a GUI save and load system plx?



    I am sad to tell that there are no good GUI save loaaad right now but I can help you to the best you can get.
    1. AceHarts save/load system is GUI but it's a lot of setup right there.
    2. codeless save/load system this is indeed a very good system with a lot of documentation to help you out and got "GUI support" but you need JNGP to use it since the code itself is full VJASS
    3. wait for Radamantus finish his GUI save/load system (if he ever do)​



    My game suddenly freezes/lags



    This is most likely because of triggering leaks in GUI or not declaring locals in JASS. Leaks are data that got to be removed once used else they just remain and take unneeded ram memory, note that a single leak do no harm if it isn't in a super fast loop trigger or something.
    anyway, I will tell you how to fix the most common ones.
    1. point leaks: if you use a point example
    • Actions
    • set MyLocationVariable = (position of triggering unit)
    then when I'm done with whatever I need the point/location for I NEED to remove that with a custom script (jass).
    • Custom script: call RemoveLocation(udg_MyLocationVarable)


    2. unitgroups: those are a little harder because it depends on how you use them. if you use a temporary unitgroup like "pick every unit within 400 of loc" then you simply put
    • Custom script: set bj_wantDestroyGroup = true
    above the unit group
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • -------- I love leaks --------
          • -------- I mean actions here --------


    groups who remain all the time are pointless to remove since that would just cause trouble since you need to re-add the units again after. this is a example which I use in most spell I make.
    • I love leaks
      • Events
        • Time - Every 1.00 seconds of game time
      • Conditions
      • Actions
        • Unit Group - Pick every unit in some_spell_group and do (Actions)
          • Loop - Actions
            • -------- spell code here --------


    3. player groups: to make those not leak you need to put them into a player group variable and then destroy the group with the following script.

    • Untitled Trigger 001
      • Actions
        • Player Group - Pick every player in (All players) and do (Actions)
          • Loop - Actions
            • -------- do stuff here --------
        • Custom script: call DestroyForce(udg_MyPlayerGroupVariable)


    4. Unit Leaks are removed easy and best of all you do not need JASS scripts to fix it, you simply use the add generic timer action as in the example bellow
    • Actions
      • Unit - Create 1 Footman for Player 1 (Red) at Loc facing Default building facing degrees
      • Unit - Order (Last created unit) to Human Sorceress - Polymorph (Triggering unit)
      • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation(udg_loc)


    here we create a dummy unit and order it to cast polymorph

    5. Special effect do also leak these are also JASS free and easy to remove. We use the destroy special effect button.
    • Actions
      • Special Effect - Create a special effect attached to the overhead of (Triggering unit) using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
      • Special Effect - Destroy (Last created special effect)


    This will allow the effect to play its animation once before it's removed.
    But if you want to remove it later you need to store it into a variable and destroy it later.

    For more info about leaks and how to remove them you can visit the following tutorials:
    http://www.hiveworkshop.com/forums/...quick-tutorial-common-triggering-tips-190802/
    http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/




    I can't load some maps! HELP



    A few maps use HQ/HD texture models which forces you to have the highest grafic settings to run the map, just go to options at the main menu and then max everything now you should be able to load the map.
    If that does not work it's most likely your wc3 who is corrupted try reinstalling it in that case.​


    Skin/model is not working! what am I doing wrong?


    This is a major little trick that most modders ask quite fast after downloading a few models the first time. Some models use a texture files (aka .blp files) you NEED to edit the path of those else it will bug.
    1. import every file needed for the model(.mdx + .blp files not readme.txt)
    2. check the readme.txt (if there is any) or visit the site where you downloaded your model there you can see if the texture files uses a special path I have seen a few of those.
    3. if you don't find something there you just remove the wc3imported\ from the path of the .blp files and your model or skin should work fine.
    for skins there is always a special path so make sure you follow step 2.​




    How can I create .txt files via triggers?



    Those of you who ask this have most likely seen it in a RPG who store their load codes like that, I got good news on this point.

    I can tell that I got a script that even a blind donkey could use.

    • easy preload
      • Events
        • Map initialization
      • Conditions
      • Actions
        • Set path = C:\random\
        • Custom script: call PreloadGenStart()
        • Game - Preload -load KEUg-YaNc-rDDq-wQ54-9Zyr-7Wm2-mp5W-YaS2-77HP-4Cg3-aZbP-PxZp-SQs2-hsd-asdasdasda-sdasdasdas-dasdasdas-dasdasdasd-asdasdasd-asdasdasd-asdasdasd-asdasdasd-asdasdasdas-dasdasda-dasdasdas-dasdasda-sdasdasd
        • Custom script: call PreloadGenEnd(udg_path +"test.txt")


    so here you just set the path where you want to store the txt file I used c:\random\ is this case. not that if the folder "random" doesn't exist it creates one automatically.
    then it loads whatever you want and saves it as test.txt

    if you want a better one I suggest heading over to the "file I/O @spell section"​


    Allowing Negative Values


    Negative values can be used in many ways and are actually more useful than you think. A very common use for a negative value is armor removal. By using the Paladin's Devotion aura (or any other armor ability) and then setting the armor gained to a negative value you will decrease the armor of targets effected by the aura/ability.
    To do this you need to click on the tab named "file" inside your world editor, then preferences, then click the general tab, and then check the box named "Allow negative real values in the Object editor". Once that's done hold down shift when you click the value that you want to edit. Then write down a negative value inside the object editor. It is that simple, yet a common question.​


    Final word


    Thanks for reading my tutorial and I hope as many users as possible read this before posting a thread about it.

    also if you got a question that you think would suit here please leave a comment​
     
    Last edited: Nov 23, 2016
  2. twat

    twat

    Joined:
    Jan 4, 2013
    Messages:
    17
    Resources:
    0
    Resources:
    0
    you may want to rethink this a bit psychologically. your target audience is goldfish people who cant be arsed to search the forums before they post a thread. its a blatant case of microwave mentality. so in any FAQ ease of access and smooth formatting plays a central role.

    first problem is finding the thread. if this stays buried beneath piles of different tutorials in a totally different section people arent going to just stumble upon it. either you have a moderator sticky this in WEHZ or it's not going to be more than wasted cyberspace.

    second problem is formatting. any way you slice it it's a big post and scrolling sucks. you need to settle this with a table of contents using [goto] and [point]

    Table of Contents


    and probably separate the Q&A with something like the [table] code.


    Why do we fall?
    So we can learn to pick ourselves up.
    THEN WHO WAS PHONE?
    IT WAS FONE.
    What is love?
    Baby don't hurt me.
     
  3. Chaosy

    Chaosy

    Joined:
    Jun 9, 2011
    Messages:
    10,813
    Resources:
    17
    Maps:
    1
    Spells:
    10
    Tutorials:
    6
    Resources:
    17
    some of these questions are not only for "gold fish" people I belive you can find which ones.
    I have seen quite alot of people with atleast 100 posts asking these things and by that time im sure they have visited the tutorial section. But I get your point.

    and I will see what I can do about the table thingy

    edit: added
     
    Last edited: Jan 20, 2013
  4. Jas.per

    Jas.per

    Joined:
    Mar 28, 2012
    Messages:
    217
    Resources:
    2
    Maps:
    2
    Resources:
    2
  5. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,842
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    undetroyed effects leak
    tnx for mentioning me about the save load.
    the system will take me so much time
     
  6. Chaosy

    Chaosy

    Joined:
    Jun 9, 2011
    Messages:
    10,813
    Resources:
    17
    Maps:
    1
    Spells:
    10
    Tutorials:
    6
    Resources:
    17
    Totally forgott this one :p
    Indeed, I will add unit leak too.
    thanks for your comment
     
  7. Zwiebelchen

    Zwiebelchen

    Joined:
    Sep 17, 2009
    Messages:
    6,872
    Resources:
    12
    Models:
    5
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    JASS:
    4
    Resources:
    12
    There's something wrong in this tutorial about creating the .txt file.

    - Creating a txt file by abusing the preload script does not cause any desyncs in multiplayer. Many maps use it safely without any problems.
    - Creating a txt file does not need local files enabled. Only reading a .txt file does.
     
  8. PurgeandFire

    PurgeandFire

    Code Moderator

    Joined:
    Nov 11, 2006
    Messages:
    7,426
    Resources:
    18
    Icons:
    1
    Spells:
    4
    Tutorials:
    9
    JASS:
    4
    Resources:
    18
    I think twat (lol) makes a good point. Also, the tutorial seems a bit too brief (as in, not enough topics) to be a proper FAQ. Seems a bit randomly pieced together. I might need some people to convince me otherwise. I think these are commonly asked, but I don't know if they warrant a tutorial.

    Also, you have to update in accordance to what Zwieb said.
     
  9. Daffa

    Daffa

    Joined:
    Jan 30, 2013
    Messages:
    8,027
    Resources:
    30
    Packs:
    1
    Maps:
    9
    Spells:
    18
    Tutorials:
    2
    Resources:
    30
    Tutorials could be useful, but hide those triggers in hidden tags.
     
  10. Hell_Master

    Hell_Master

    Joined:
    Nov 29, 2012
    Messages:
    5,506
    Resources:
    4
    Maps:
    3
    Template:
    1
    Resources:
    4
    This looks like a useful tutorial. Everything was explained well and shown well. Way of presenting the tutorial is nice also. Some of the questions are quite easy for me but others are not familiar and you have just answered it.

    I think for me, this deserves an Approval! +3 REP, chaosy, Nice one!

    But I think this should be in WEHZ Section and stickied if you will ask me.
     
  11. Adiktuz

    Adiktuz

    Joined:
    Oct 16, 2008
    Messages:
    9,674
    Resources:
    23
    Models:
    2
    Packs:
    1
    Maps:
    1
    Spells:
    16
    Tutorials:
    1
    JASS:
    2
    Resources:
    23
    very useful I think... btw, apart from set-up (which btw, I believe that all save-load systems has a lot of), AceHart's system also stops working when you save high values or lots of values...
     
  12. Chaosy

    Chaosy

    Joined:
    Jun 9, 2011
    Messages:
    10,813
    Resources:
    17
    Maps:
    1
    Spells:
    10
    Tutorials:
    6
    Resources:
    17
    Seems like this needs a update.
    I will edit it tomarrow I think
     
  13. maddeem

    maddeem

    Joined:
    Jan 1, 2011
    Messages:
    1,298
    Resources:
    5
    Maps:
    2
    Spells:
    3
    Resources:
    5
    I had no idea you could create text files. Thanks for sharing
     
  14. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,842
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    @maddeem
    Hell yeah, I played with it and made 3 systems :D
     
  15. Heinvers

    Heinvers

    Arena Moderator

    Joined:
    May 7, 2010
    Messages:
    8,336
    Resources:
    83
    Models:
    2
    Icons:
    50
    Packs:
    3
    Skins:
    25
    Template:
    3
    Resources:
    83
    That's a good tutorial.
     
  16. Magtheridon96

    Magtheridon96

    Joined:
    Dec 12, 2008
    Messages:
    6,005
    Resources:
    26
    Maps:
    1
    Spells:
    8
    Tutorials:
    7
    JASS:
    10
    Resources:
    26
    I renamed this thread because it looked like it was called "Fag @ wehz"
     
  17. Chaosy

    Chaosy

    Joined:
    Jun 9, 2011
    Messages:
    10,813
    Resources:
    17
    Maps:
    1
    Spells:
    10
    Tutorials:
    6
    Resources:
    17
    hehe, thats. I actually didnt notice that.

    @heinvers
    thanks dude.
     
  18. Chaosy

    Chaosy

    Joined:
    Jun 9, 2011
    Messages:
    10,813
    Resources:
    17
    Maps:
    1
    Spells:
    10
    Tutorials:
    6
    Resources:
    17
    Holy.. I found like 300 spelling mistakes. I am kinda ashamed over the fact that I left it in such a state for so long.
     
  19. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,377
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
    "armor, attack speed, ..."

    Please add link to BonusMod.
    nestharius -> Nestharus

    "Bound to 480" -> "480x480",
    also please link to new JNG

    "save/load"
    Always provide a link when you mentioned a certain submission.

    "leaks"
    Just quickly explain that memory leaks might be the reason for spikes or fps drops, and then link to respective tutorials.
    No need to explain and give examples here how exactly to remove leaks.

    "can't load maps"
    You should make it clear you mean starting the game, and not loading in editor.
    Maybe you also can make a "can't load in editor" part, which says map is probably protected/optimized/ or so.

    "skin /model not working properly"
    Not sure we need this anymore. There are now always explainations how and what to change exactly in the sections.

    Will also think of what point could eventually be useful to add, too.
     
  20. Chaosy

    Chaosy

    Joined:
    Jun 9, 2011
    Messages:
    10,813
    Resources:
    17
    Maps:
    1
    Spells:
    10
    Tutorials:
    6
    Resources:
    17
    Fixed various grammar and spelling mistakes
    Fixed the layout since [box] do not look like it used to on the old hive.
    Linked AceHart's system
    Fixed Nestharus' name.
    Specified that the map loading issues is for ingame only.