010 Editor Scripts and Templates

Sign in to follow this  

A collection of Sweetscape 010 editor based binary templates and scripts which are aimed to modify World of Warcraft files or automate other tasks useful for WoW Modding. 

Information for script users script users:

Spoiler

In order to use those files you need Sweetscape 010 editor. Most scripts require binary templates for WoW files which can be also downloaded here. Those binary templates should be placed into your documents folder in Sweetsape directory after you install the editor. Scripts can be executed on a file using CMD, editor GUI (F7). For more information read 010 editor FAQ (F1).

If the script is not working, gives you errors or works in a wrong way, make sure to notify its author. It will save others from using improperly made software and possibly ruining their works as well as helping the author to trace a problem and fix it.

 

 Information for script/template developers:

Spoiler

We have a special tutorial dedicated to script writing which can be found here. It can give you the basic understanding of how 010 editor scripting works. For more detailed information use Sweetscape's website and internal FAQ in the editor (F1).

Please always keep the standard way of formatting your scripts (leave and fill the pre-made description template which is inserted into every new script file by the editor). It helps us to keep scripts structured, bound to their creator and properly versioned. 

If possible and required try to include both GUI and CMD versions of the script. CMD versions should come with a .bat file to run them.

If your presupposes some complicated steps while working with it, please tell the user how to do it by supplying a readme file and posting the usage into file description.

If you have a new version of the script, please don't reupload it. Use our versioning system, so old version will still be accessible.

When using template variables, please use templates that are available on our community. It is important because they are slightly different from the ones we used to have before. If you have a unique template or a modifyed version of an existing one, please upload it and notify us somehow. 

If you are helping to debug a script or pointing to something in it which requires code pasting, please don't paste any snippets directly in comments. Using pastebin.com or similar websites is the best way. You can use direct posting for some really small snippets, though.

For complicated scripts that are doing many data operations please include DisableUndo() function for the sake of speed increasing.

 

20 files

  1. M2 Flip Script for 010 Editor

    Script that I created for another purpose, but later remembered about right-hand/left-hand items where Blizz uses a flag now to flip the right-hand item into left-hand, useful to create the missing left-hand m2, with this you can create that missing model. It makes use of Alastor's template (included), the script should run pretty fast, use the .bat file included for batch running the script.
     
    What this script flips right now are, vertices, collisions, animations, particles, events and attachments, it won't flip ribbons for example, if anyone needs the script to flip that also, or something else I missed, comment, and I'll gladly update the script.
     
    How to use:
    1 - Place everything in the .rar file inside a folder, wherever it is.
    2 - Put all the M2 you want to turn 180º in the folder of the script or subfolders.
    3 - Run the .bat file
    4 - Done!
     
    Going on from that, rename the file to have _left on its name for example, and do all the DBC work you need to do to have the right-hand model and the left-hand model.

    112 downloads

    13 comments

    Updated

  2. .M2 Template by Alastor

    M2 Template used by 010 Editor to read the binary file M2 which is a fundamental part of 3D models used by World of Warcraft this template was released somewhere in 2010 or 2012 and since then nobody worked on it the template had around 28kb of size when I picked it up and started adding more features added more lists and improved its overall capabilities and speed template is now at 218kb as of 23.11.2022 when I started the template had around 1438 lines of code now its roughly at 2868 but this estimation is not a real and proper indication of anything since I have drasticaly decreased number of lines of code in some way in the old template calling for optimization and then I have also added tons new lines in a wake of improval in all ways I could think of 
    Required version of the 010 Editor is v13.0.0+
    template wont work on 010 Editor with lower versions than 12.0.0 because of Inline functions

     Attention! Sweetscape (the company that made 010 Editor) approved my template to their online repository from now on I will not upload new versions here that often or at all I will focus on pushing the updated online template repository hosted by Sweetscape




    Features:
    • Remastered the Texture_Combiner Structure from the ugly Alt_mapping look that it had
    • New C3Vector struc used for BoundingBox Animation Block
     • Added new argument for inline read function of attachments to show attachment ID 
    • Read function for materials to show flag and blend 
    • Particle have now added new flags  and conditions for filepathing
    • Anim/Keybone/Attachment Lookups now have names +more read functions to bones and some other adjustmens to updated list of animations 
    • Inline function to rotations in bone block and better reading of some subanimvalues
    • Inline function for M2Tracks of bones eg: how many keyframes and timestamps is in the said block without need to collapse it 
    • Multiversion M2 loading (Tested on 3.3.5 / 6.0.1 / 7.0.1 / 8.0.1 / 9.0.1 / 9.2.0 / 9.2.5 / 10.0.0)
    • MD21 Chunk + other Chunks including TXID reading etc 
    • Improved block reading with added conditions and checks to avoide empty structure generations fastening the load times
    • Added functions with Read and Write reading properties mostly notable for C3Vectors 
    • Renamed most of the variables and types to proper names like Materials
    • Substructures for C3Vectors now contains properly XYZ named values not val0 val1 val2 like before 
    • Main Blocks are now colored to visibly show the chunks of data in the hex preview 
    • Added lots of undefined binary flags to numerous places lol bone flags / anim flags / global sequcnes flags that were not mapped at all in previous version
    • Added commends to some parts of the blocks to better describe what the data mean
    • Named lots of previously unknown strucutres after the lastest data from wowdev.wiki
    • Better described Camera block
    • Added more enum types where possible like texture types or added new animations entries
    • + Some other edits that I surely just forgot 


    830 downloads

    9 comments

    Updated

  3. M2 Resize script for 010 Editor

    Resizing script for 010 editor with attached M2Template that its using
    script is unoptimized and will run for a long time on complex models that has more than 100 bones and lots of animation sequences (model with 150 bones and 140 animations took me 25 mins)

    232 downloads

    1 comment

    Submitted

  4. script ADTModelUIDRecalc.1sc

    Purpose: Recalculates all the model UIDs in given ADTs from a specified directory including its subfolders. It can start counting UIDs from the last max UID, which can be calculated with: ADTMaxModelUIDCalculator.1sc. Highly recommended to be used on the map before its release.
    Usage: Prerss F7 to run the script and select the directory. After the process is finished the last used UID will be displayed in the message box and copied to your system clipboard.
    CMD version: Not available, not planned.
    Requires: WoWADT.bt
    In order to run any of my scripts you need a new version of 010 editor binary templates which can be downloaded here.
    Produces model duplication on borders of ADTs! Duplicates can be removed using Noggit.
     

    78 downloads

    0 comments

    Updated

  5. Fixes Render batches BOX under MOBA in group WMO

    This script is fixing the "unknown_box" (name that it has on wiki) which is responsible for wmos render batches culling which can cause batches to disappear if the box contains incorrect values this scrip iterates thru values in MOVT and uses min max indices to insert them into MOBA batches to fix the box

    30 downloads

    0 comments

    Updated

  6. release 010 Editor binary templates [Script essentials]

    This pack contains some 010 editor binary templates that are able to work with WMO, ADT, M2, SKIN, WDT, WDL, MDX and BLP files. Some of the versions are edited by me and neither of my scripts will work without them. 

    1,854 downloads

    5 comments

    Updated

  7. Adt WoD/MoP/Cata to Legion Script

    Credits and descriptions in the post quoted.
    Adt Converter to Legion.rar

    74 downloads

    0 comments

    Submitted

  8. WotLK to Cata/MoP/WoD Model Converter

    This script for 010editor converts Wrath of the Lich King .M2 and .SKIN files to Cataclysm, Mists of Pandaria and Warlords of Draenor.
    Supports:
    -Cameras.
    -Particles.
    -Animation flags.
    -Projected shadows.
    -Transparency flags.
    -Blend mode overrides.
    Also includes:
    -Batch file converter.
    -Shadow remover script.
    -Sequence flag remover script.
    -Skin template for 010editor with shadow batches added.
    DOWNLOAD
    Some notes and technical information:
    -make sure you are working on "OVR" mode before running the script.
    Projected shadows
    As you may know, projected shadows are stored inside the .skin file since Cataclysm. This script creates shadows for all texture units, including those with additive materials.
    If you want to remove the shadows from a specific geoset, just open the skin file with 010editor, run the skin template included inside the tools folder and delete the texture batch corresponing to that mesh.
    If you want to remove ALL shadows from a model, just use the "Cataclysm Shadow Remover" included in the tools folder (it's useful for stuff like fire or lights, that are not supposed to cast a shadow).

    As you can see, the glow, which is a billboarded square with addivite renderflag, is casting a shadow and the game can't handle shadows with additive materials. To remove it I selected its shadow batch, deleted it and reduced the shadow batch count by 1 in 010editor.
    More info in this video:
    Flying mount animations
    In WotLK, mounts use swimming animations for flying. Since Cataclysm, however, there are separate ids for swimming and flying since flying mounts can now be used as ground mounts and therefore swim.
    But, if a mount model doesn't have fly animations, the game will use its swimming animations. That's why this script doesn't duplicate them. It's not necessary. WotLK flying mounts should still work perfectly in Cata, MoP and WoD.
    Reflections
    This script doesn't convert reflections since there is no exact way to know when a texture unit is used for a reflection, glow, etc. So you must do it by hand.
    Just open your skin file, convert it to Cata+, go to the texunit with the reflection and change its shader to "144". Here is an example using "Creature\Murloc\Murloc00.skin":

    You can change the "texunit" and "texunit2" fields to "0" but it's optional since those fields are unused since Cataclysm, but just in case.
    Animation sequence flags
    Sequence flags are 128 digits bigger since Cataclysm. Without these flags some animation frames loop when they shouldn't and sequences don't blend correctly. This script fixes that problem and gives smoothness to the animations.
    If you want to remove the extra flags for some reason, just run the "Cataclysm Sequence Flag Remover" script included in the tools folder

    407 downloads

    7 comments

    Updated

  9. PHYS template (MoP and WoD)

    This template for 010 editor allows you to modify PHYS files from Mists of Pandaria and Warlords of Draenor.
    DOWNLOAD
    Some notes and technical information:
    How to load a PHYS file in-game
    Change your model globalflags to 32 (or 160 if your model casts shadows as well):

    The bones with physics must have flag 1024:

    Bone coordinates
    Bones with physics will take their position coordinates from the phys file and ignore the position given in the m2.
    Position is set in the WELJ, SHOJ or SPHJ chunks.
    Bone hierarchy
    Bones with physics will not be affected by the rotation, scaling and translation of the parent bones unless they are added as an attachment.

    As you can see in the image above, the gourds with physics are not affected by the m2 animation and will only move if their coordinate in the world changes.
    This is why Blizzard makes separate m2 files for parts with physics. Exampe:
    creature/fishmount/fishmount.m2 (base model without physics)
    creature/fishmount/fishmount_wiskersleft.m2 (left wisker with physics)
    creature/fishmount/fishmount_wiskersright.m2 (right wisker with physics)

    The wiskers from the fish mount are in different m2 files, attached server-side as a vehicle accessory. You can also add them as spells or items. If the whiskers were part of the base model, they will just be floating next to the head, since they would not be affected by the parent bone movement.
    It's not necessary to separate meshes with physics if your model is static (i.e. helmets, weapons, shoulder pads, etc.).
    However you can add physics to a bone, and animate all the bones connected to it.
    (Since 7.1 models with physics don't have to be separated - See http://www.wowhead.com/item=143829 as an example)
    Difference between MoP and WoD
    The Phys file structure is the same for MoP and WoD.
    However, the only thing I noticed is that in MoP physics are more sensitive and the shapes feel lighter.

    68 downloads

    1 comment

    Updated

  10. .skel template

    Thanks to schlumpf for the help
    .skel template for Legion, that's all, have fun

    196 downloads

    12 comments

    Submitted

  11. WMOv16 to WMOv17 Converter

    Converts WMOv16 files to the newer WMOv17 format. WMOv16 is used from build 0.6.0 3592 to 0.8.0 3734. The script can detect by itself if the file is a root or a group file.
    Missing features:
    Currently does not fix MLIQ chunk (coordinates system changed or something)

    69 downloads

    0 comments

    Updated

  12. M2CollisionCloner

    Purpose: Clones collision from one .m2 model to another. Useful for making trees or similar objects that do not require collision identical to geometry. For example, make two versions of a tree model. One with leaves and one without leaves. Export all models to M2 using OBJtoM2 or any other existing converter/exporter and run the script. Also works for creating invisible walls and other collision things.
    Usage: Prerss F7 to run the script and select the source and destination file. Done.
    CMD version: Not available, not planned.
    Requires: "basics.h" and "M2TemplateLight.bt" (included in the release).
    In order to run any of my scripts you need a new version of 010 editor binary templates which can be downloaded here.
     

    115 downloads

    0 comments

    Updated

  13. ADTOffsetRemover.1sc

    Purpose: Removes Z offsets of MCNKs in given ADT files. It does not add their values to actual heightmap data, so this can be used only for fixing offset-related bugs after the usage of tools like OBJtoADT or similar ones that work with heightmap data but does not pay attention to MCNK Z offset.
    Usage: Prerss F7 to run the script and select the ADT files to process.
    CMD version: To come.
    Requires: WoWADT.bt
    In order to run any of my scripts you need a new version of 010 editor binary templates which can be downloaded here.
     

    41 downloads

    0 comments

    Submitted

  14. script ADTMaxModelUIDCalculator.1sc

    Purpose: Calculates the heighest model UID from the given ADTs in the specified directory. Also processes files in subfolders.
    Usage: Prerss F7 to run the script and select the directory. The resulted value will be displayed in the message box and copied to your system clipboard.
    CMD version: Not available, not planned.
    Requires: WoWADT.bt
    In order to run any of my scripts you need a new version of 010 editor binary templates which can be downloaded here.
     

    42 downloads

    0 comments

    Submitted

  15. script WMOVertexShadingFlagEnabler

    Purpose: Enables vertex shading (MOCV) in WoW .wmo model by setting an appropraite flag.
    Usage: Prerss F7 to run the script. Select group WMO files..
    CMD version: Not available, not planned.
    Requires: WoWWMO.bt
    In order to run any of my scripts you need a new version of 010 editor binary templates which can be downloaded here.
     

    39 downloads

    0 comments

    Submitted

  16. script ADTHeightModifier

    Purpose: Moves terrain and models along the Z-axis. Comes in handy when you need to merge two pieces of maps that have very big height difference.
    Usage: Prerss F7 to run the script. Enter the modifier value (negative or positive). Select ADTs files you want to raise or lower.
    CMD version: Not available, not planned.
    Requires: WoWADT.bt
    In order to run any of my scripts you need a new version of 010 editor binary templates which can be downloaded here.
     

    80 downloads

    1 comment

    Updated

  17. script ADT_MFBOEditor

    Purpose: Edits MFBO data in ADT and sets it to given values. By default it is configured for removing MFBO related bugs. Though, values can be changed however you like.
    Usage: Run the script. Select files you want to edit. If you need some special MFBO data, change values in lines: 36 and 43.
    CMD version: Not available, coming soon.
    Requires: WoWADT.bt
    In order to run any of my scripts you need a new version of 010 editor binary templates which can be downloaded here.
     

    65 downloads

    0 comments

    Updated

  18. WMONightGlowAdder

    Purpose: Modifies specified materials in a WMO to glow at night. Used for window and lantern textures mostly.
    Usage: Prerss F7 to run the script. Select root WMO files you want to modify. The script with show you windows with texture names. If the texture is meant to be lightened click "Yes", if the texture is meant to stay the same click "No" and if you want to stop the process click "Cancel". Note: all the data that has already been modifed will be saved when you cancel, the script just won't go futher.
    CMD version: Not available, not planned.
    Requires: WoWWMO.bt
    In order to run any of my scripts you need a new version of 010 editor binary templates which can be downloaded here.
     

    68 downloads

    0 comments

    Updated

  19. tools PhilipTNG Converters

    Hey Community!

    I check out my tool files and found something usefull things who are not here on this page. Hope you can need them!

    The following files include:
    wmo-converter-rebuild_003_distro
    wmo-converter-rebuild_004_distro
    wmo-converter-rebuild_005_distro -> .wmos from WoD -> TBC http://pastebin.com/SU9K03Gz
    PTNG_LKM2_to_TBCM2_Beta_008p
    PTNG_WoD_Map_ADT_DownPorter_Tool

    Greets

    262 downloads

    0 comments

    Submitted

  20. LK m2 to Cata/MoP/WoD/Legion

    010 scripts to convert m2's from WotLK to Cata and higher.
    Not working:
    Cameras
    Particles
    Shadows (maybe)

    466 downloads

    3 comments

    Updated

Sign in to follow this