Page 1 of 164 12345678910112651101 ... LastLast
Results 1 to 20 of 3262

Thread: IWTE - World editing - (General Discussion)

  1. #1
    wilddog's Avatar Paintedwolves run free
    Join Date
    Jan 2005
    Location
    UK
    Posts
    2,319

    Default IWTE - World editing - (General Discussion)

    Current Version
    Current version is IWTE_v21_11_C from November 22nd 2021.

    http://www.twcenter.net/forums/downl...o=file&id=2741

    Overview of IWTE
    ****************

    IWTE stands for Integrated World Terrain Editor although its functions have expanded considerably past simply being able to edit settlements. It is supplied as an executable only file so no need for extra software downloads or worrying about versions of software. The only other required tools are milkshape (or Blender) and a TGA editor.
    The following list is a quick round up of its capabilities :
    1) Editing of .World, .collision and .animation files - these 3 files are the main settlement files. You can completely change the models, textures, effects, lighting and though its only really a beta version you can create new animations. Its probably the most advanced tool for handling all of this though it requires milkshape to do so.
    2) Editing of other settlement related files eg .worldterrain, pathfinding, vegetation and package files.
    3) Editing the geography.db file directly and easily.
    4) Editing the vegetation.db file directly and easily.
    5) Adding/amending Battlefield vegetation models and generation of vegetation sprites.
    6) It has a basic set of strat map Cas editing functions (for milkshape) which can edit most of the stratmap stationary models e.g. residences, trees, resources etc.
    7) It has a simple painting process editor which supports basic editing of several file types.
    8) It has a texture to DDS and vice versa single or directory file conversion tool built in.
    9) Supports simple editing of the stratmap TGA and HGT files with files shown at correct relative sizes. This also shows a 3d view of the strat map being edited as well as selection of different color schemes for the heights HGT map.
    10) also supports editing all mesh files via interfaces to Blender/Max (eg battle models, siege engines, banners, skydome). Includes animations and multi animations.
    11) Cas editing supported also via interfaces to Blender/Max. Includes animations and multianimations
    12) Battle model editing of mesh and skeletons.
    13) modeldb checking and reformatting including ability to create CSV files and recreate modeldb from them
    14) Rome Remastered map creation - PLEASE USE THE EXAMPLE TASK FILES AND READ THE MAP MAKING TEXT FILE

    Tutorials
    *********

    King Kong has released a tutorial to help guide people. refer to URL
    http://www.twcenter.net/forums/showt...81#post8500981
    Gigantus has converted King Kong's Tutorial to a PDF - KK's manual into PDF

    Leo.civil.uefs IWTE Tutorials
    IWTE - Custom settlements - Step by Step for creating. Most important things you must know.
    IWTE - How to use custom settlements from another mod in yours, both in campaign and custom battles. (Editing .worldpackage files)
    IWTE - Custom settlements - Creating a generic custom settlement (easy step by step procedure)

    Wilddog Tutorials
    IWTE - Editing worldterrain files
    IWTE - Changing Settlement effect lighting



    Makanyane Tutorials and starter kit
    IWTE - starter Kit
    IWTE - Vegetation editing


    Testing support
    xHolyCrusader and Makanyane - many thanks with helping to test some of the new features and bug resolution.


    Version Information
    *****************

    with version 21_11_C
    1) M2 - Fixed initial add of docking positions not saving correctly 11/11
    2) RR - Amended map mesh creation process to reduce size of standard cas tile file as it was breaking limits too easily.
    3) RR - Fix for crash when opening unpacked cas skeleton to obtain scaling value.
    4) RR - Enhanced IWTE to support simpler conversion of cas to dae for objects (ie non units).
    a) Should now handle extraction of settlement objects.
    b) Should now include vertex paint values for the platform_NN_XXXX type meshes (ie as used on Walls, Towers etc)
    5) RTW - New cas model option RTW object animation dae to cas to read an animated object back (the non unit stuff).
    Make sure you pass back animations from 0 to the desired frame. This assumes a 20 fps rate. I any issues please notify.
    6) M2 - moved the worldpkgdesc options from Model files to the Medieval 2 action menu.


    with version 21_11_B - mostly M2 related fixes/tidyups
    1) M2 - Ability to change docking point positions and rotations (should support ladders attacing circular walls)
    2) M2 - Fixed crash when going to edit settlement perimeters (introduced in October)
    3) M2 - Removed creation of textfile when editing a worldpackage or using the old open strat cas button.
    4) M2 - amended a lot of the rotational/direction pointing processes so pointer starts in the correct direction
    5) M2 - When assigning a collision/animation to an object the object should now be displayed in 2d (and 3d if switched on).
    6) RR - Correction to river_a.cas creation to prevent warning messages tied to old OG processes.

    with version 21_11_A - mostly RR/M2 bug fixes.
    1) M2 - bug fix - Texture related crashes tied to processes using the 3d window should all be resolved (affected world viewing, strat models, vegetation).
    2) M2 - Veg Sprite creation switched back on (had to be switched off due to texture crashes).
    3) M2 - pathfinding crash tied to breach pathfinding being outside the new breach boundary resolved.
    4) RR - Map amendments to reduce cas crashes when creating map pieces with more region pixels than RR vanilla (20x20 per piece).
    5) All - Reduced cas related crashes for known unsupported cas files.


    with version 21_10_B - mostly RR map related.
    a) update to the task handling the conversion of the map normals (slightly different parameters to the texconv.exe that is used) to avoid some pixel blocking issues.
    b) amended the dae to cas conversion to generate a *_lod1.cas automatically if it is converting a dae file which has dual weighting.
    (RR lod1 must be single bone weighted only).
    c) bug fix on M2 to no longer lookup settlement textures when displaying the 3d view (this is because its easier to switch between showing effects and shading.


    with version 21_10_A - mostly RR map related.
    0) You HAVE To use the supplied river_A.cas in order to have borders that work.
    IWTE will generate it anyway but its reliant on YOU to put it in the right folder.
    1) This is primarily amending the map mesh creation when modding for RR :
    - The features.tga cliffs are now added which are supported by you adding an appropriate texture (climate related).
    - Rivers have been amended (Which is why you need the river_a.cas).
    - The normal TGA creation now merges texture data with the height map. It will merge a supplied grey scale bump map (or convert one) or default to use the supplied texture maps.
    the bump map should be named the same as the standard TGA but ending '_bump.tga'.
    This allows you to apply a stronger texture to the normal than just relying on the standard texture and its interpretation to grey scale.
    - It will also merge the supplied texture map regardless (only at a lower proportion though).
    - It adds a simplified ridge process.
    - it will boost low and high mountain heights to make up for the lack of high mountain cas data.
    - it will use directional heights when creating the normals (assuming a bottom left to top right height change)
    - it supports a high mountain related texturing by climate (this may get extended on later versions)
    - it does NOT support 4 way split/joins of rivers or rivers that cannot flow (ie single source squares)
    - it has a parameter to affect the TGA height scaling (to boost or decrease heights)
    2) Added additional options for Lz4 extraction/compression to handle single files and subdirectories.
    3) a few minor bug fixes.

    As you probably never read this. You may never know :-)

    with version 21_09_A - mostly M2 related.
    1) Ability to switch selected objects from 'default' to a mainobject and vice versa.
    2) bux fix - Correction to 'mirroring' vertex process particularly for .world files. .
    .world and .anim changes are aligned. (bug introduced earlier this year)
    3) bug fix - scrolling on 2d window using centre key now back working.
    4) Clean up to remove bounding box options as no longer required.

    with version 21_08_B - mostly M2 related and menu tidy ups.
    1) New M2 Add Complex collisions (default). Automatically adds a new collision for any objects marked as default that do not currently have a collision.
    2) bug Fixes for 2D window wheel button - zoom in/out and double click centering.
    3) Slight clean up and rearrangement of top level menu options. IWTE Task file moved to end of list and Renamed an option as Medieval 2.
    Model Files dropdown shows Cas options at top and other options as being M2 related.
    4) Main M2 button selection panel changed to remove the Terrain2 option. Remaining functions were added to Terrain 1 tab.
    5) Medieval 2 main dropdown has new option for settlement editing leads to alternative route for opening the binary files. Modeldb csv conversions also moved to this tab
    6) Rome Remastered dropdown has Geography DB option in it now (its just a direct link and applies for Rome OG as well).


    with version 21_08_A
    1) Amended Rome remastered map creation functionality.
    A) Tile piece 'edge' normals and texture cutoff should now be resolved.
    B) River mesh crash should give position of offending setup position (in map_features.TGA).
    C) if river_mesh or coastline cas exceed test limits then additional cas files are created.
    D) Map tile pieces are now placed in a 'pieces' directory.
    E) matched the river_a.cas file requirements to the 'expected' directions to remove the error messages.
    **PLEASE NOTE THIS DOES MEAN YOU NEED THE NEW descr_aerial_map_tile_models.txt SUPPLIED WITH THIS BUILD**
    F) river bank coloring should now scale in relation to the feature.
    2) Bug fix for line intersections in IWTE which was causing a crash (M2 related)
    3) Fix in IWTE to match skeleton upper/lower name changes (M2 related mostly)
    4) Revised change to handle '##' as 'hh_', '#&' as 'ha_' and '#' as 'h_' identifiers for cas textures. Apparently ? was not accepted by Max




    with version 21_07_B
    1) Minor change to rivers for Rome RR map making.
    2) inclusion of LZ4 directory compression for DDS files
    3) Ability to extract DAE from CAs and vice versa for a directory. Please note only standard cas files are handled ie the ones IWTE can open as single cas models (some cas files will crash this.
    It is meant primarily for converting several dae files back to cas or for the map pieces to dae.)
    4) Some internal changes to IWTE and prevent some crashes partly introduced in recent versions.


    with version 21_07_A
    1) Amended the Rome remastered map creation alot. The basic option under the remastered tab will now generate the river mesh and the rivers_a.cas.
    2) A task process has been setup to support full creation of the map tile pieces, river mesh, coastlines, normals and albedo textures. PLEASE look at the Rome Remastered Map making info.txt provided.
    The options are still being worked on but be warned the actual texture production is SLOW. It is doing a lot of processing to produce them.
    3) A conversion fix for some texture files when converting to dae was put in place. The converter converts & to ?a?_ and # to ?h?_ it converts back to correct it when recreating the cas files.
    4) Bugfixes for older functionality.

    with version 21_05_B
    1) added create map mesh option to Rome remastered action top right.This asks for a directory containing the standard map files (ie world>map>base) to use to generate a mesh map.
    This is a work in progress and does not handle rivers or the river surface, coastline surface yet.
    2) Bug fix on terrain TGA's when nothing was selected.
    3) Amended/corrected the dae to cas process to prevent a crash when loading a dae file with dual weights which did not fit the restrictions of rtw original.
    It now defaults to supporting Rome Remastered as no known mods were using the original cas joint weighting.
    (it currently requires a tag <cas_mesh_format> and value 'rtw' or 'm2' to switch to original rome and M2 handling)



    with version 21_05_A
    1) updated geograph.db functions to support RTW/RTW remastered. Its overlayed on the same template for M2TW (with certain data reduced or blocked as its not present).
    2) Added ability to retain prior sequence of bones for M2TW mesh models (should resolve issue on special bow animation etc getting messed up as original sequence slightly different to returned dae sequence).
    3) added Rome remastered action top right to uncompress a directory of dds files.

    with version 21_04_A
    1) Enhanced the model Files > Cas models options to export and import the Rome/BI/Alexander strat models and unit models. (There are still some earlier cas models not handled eg in the models file). With this option select the cas mesh file and then cancel from the animated cas file (as thee are no 'true' animated cas files similar to the caliban ones for MTW2).
    The files should retain smooth shading where applied (like MTW2) and handles the parent/child bone weighting used by the cas only system. (ie also as used my MTW2 strat models).
    2) Slight amendment to the .world editing which should reduce the total verts whilst avoiding the reflective issue. Its a bit of a compromise as I didn't want to increase vertex counts too much.
    3) New action menu option Model Files > cas models > RTW casmesh/skel/casanim to dae will create a dae file from the 'casmesh.cas' file and the Rome unpacked skeleton and animated.cas files
    4) New action menu option Model Files > cas models > M2TW casmesh/skel/casanim to dae will create a dae file from the 'casmesh.cas' file and the M2TW unpacked skeleton and animated.cas files
    5) New action menu option Model Files > mesh models > unit mesh/skel/casanim to dae will create a dae file from the *.mesh file and the M2TW unpacked skeleton and animated.cas files
    6) Task files are created for the returned dae and they will generate the unpacked animation for rome or the full (ie calliban style) cas files for M2TW.
    7) Bug fix to supply only ascii characters in the dae file (as they are used to set some key info and causing a crash).
    8) switched the directory outs to default to to_dae and from_dae. Its simpler, but be careful not to overwrite files.

    with version 21_03_A
    1) Various bug fixes.
    2) Amended 3d viewer to show effects or shading.
    3) Added shading/effects as a task with parameters (still trying to figure out best combination).

    with version 21_02_A
    1) Bug fix for modeldb. If the modeldb has the dummy record "5 blank 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0" as its first unit this was causing a crash after the file had been read due to the mount type having no mount type name. The file will now be read and then the dummy record will be removed (or any other unit called 'blank'). Please look at the error file and the write outtxt files which are generated to find exact positions of any errors.
    2) Bug fix for milkshape weights used in .world model shading. milkshape uses both an index and weight 100 or all 3 other indexes set to not used but a weight of 0 to mean the same thing (ie 100% weighting to first index).
    3) Bug fix Amended the unique vertex data routines as found a mirroring effect when applied to a vertex mirrored over a single point (issue in tangent routine).
    4) Added simple task routines for dds_to_texture_directory and texture_to_dds_directory. Unlike the dropdown selection this enables you to use <directory_in> and <directory_out> to set the name of the directory to read from and where to write to.
    5) Amendment to task file process as use of double quotes (for names with spaces) was causing an issue if no comment followed.



    with version 21_01_B
    1) Bug fixes on merging multiple mount unit combinations (wrong offset if merge included a full set of bones).
    2) Bug fix for cas models due to introduction of extra parameters.
    3) Change in Siege engine process so that amended animations create the same (i.e. the default) pose values. CA's siege models have different ones which is a pain. eg Catapult and Trebuchet.


    with version 21_01_A
    1) Now added ability to combine mount (horse) with rider and 2 weapons (weapon and shield normally) with multi animations into the collada interface so they can be edited in Blender (and likely 3dsmax).
    2) Added ability to apply the scale factor to the cas skeletons when generating dae and reading back.
    3) Added ability to read modeldb file and do some edit checking, reformatting of linebreaks (to show the structure a bit more clearly) and creation of 3 CSV files which can be seperately edited and reloaded to reform a modeldb file.
    4) bug fixes to help support 3dsmax handling of collada data (world anim effects, fade and skeletons with no mesh assigned).





    with version 20_12_C
    1) Bug fix as siege meshes defaulting to compressed but not set up to handle (they should be non compressed).
    2) Bug fix lodname in 3dsmax returned material names was being extracted incorrectly (included the material prefix).
    3) Creates bonemap xml for siege engines
    4) Bug fix previously dropped position animation if maximum animation position change was zero.


    with version 20_12_B
    1) Bug fix to worldpkgdesc selection and mesh processes as they were crashing due to incorrect naming when selecting.
    2) Added csv options of worldpkgdesc. This extracts files within a directory and all its subdirectories.
    Please be careful the default readback is NOT to update (to prevent any accidental overwrite of vanilla files). It has basic validation only.


    with version 20_12_A (Further enhancements to the collada interface supporting Blender/max)
    1) New control file process has been relaunched as IWTE Task which can be triggered from the top bar of the main IWTE menu.
    Files must end with _task.txt and sytax changed in terms of data-ids used. Often file full path names are requested rather than just the file name as this better supports some of the processes.
    2) The export animated directory function has been removed as we couldn't see any real need for it now.
    3) All mesh formats are now supported (AFAIK) ie skydome, banners, siege, units
    4) As introduced for cas units in the previous version the mesh units (ie battle map models) are now supported with a process to combine multi animations together (provided they have the right skeleton and setup).
    5) A first frame pose position has been introduced to better support editing of the mesh.
    6) An unassigned skeleton process is supported to allow the mesh to be edited without a correct skeleton (ie all skeleton bones default to a simple chain).
    7) Weapon and shield separation is supported for unit meshes with a standard vanilla skeleton. This process uses up to 4 weapon/shield bones but still must be within the 24 bone limit.
    Some models may not be supported through this process due to their setup. The basic assumption in IWTE on bones is the sequence is the standard bones 0 to 19, then upto 4 bones. The last 4 are in sequence : extra bones, then weapon/shield bones.
    Our recommendation is to use weapon bones rather than any extra bones in order to avoid the death animation bug (ie the one that occurs because the skeleton has a different number of non weapon/shield bones to the unit its fighting).



    with version 20_09_A
    1) If a world animinstance compressed file is created that is too large for MTW2 to handle a messgae should pop up to warn it will not work correctly.
    2) Minor shading change setting default animation light for new world anims.
    3) New collada processes to support Cas export/import for strat models/*dae files (single file input for editing mesh and/skeleton).
    4) New collada processes to support Cas export/import for combined strat models and animations (dual input of cas mesh and animation).
    5) Skeleton replacement uses selected cas file to replace skeleton of all cas files within the directory. If a bone is removed it will assign any child bones to next parent up the heirarchy. Vertexes which lose a parent should be reassigned the same way.
    6) New collada process export animated directory. This basically takes a cas mesh and generates a dae file for all the animations in a directory
    7) Text file output and input is generated for the siege export traversable network files.
    8) New collada processes to support siege engine changes. (Requires .mesh file, animation cas and default cas). On import a control file is required which may be changed to be more like the IWTE control process (mentioned below) in later releases.
    9) New IWTE control file process. This is only in its early stages a couple of general processes have been added.
    a) cas_bone_name_change - to rename bones in skeletons
    b) cas_multi_animation - to allow linking and editing of cas mesh and cas animations (not *.mesh files)
    c) dae_cas_multi_animation - to re-input the edited dae file and create amended cas mesh and cas animations.



    Please ensure you back up any files first!


    Thank you's
    ***********


    The tool originated based on information and research from Argantonio and then later by Makanyane and myself as we delved deeper into meanings of each field.

    Also thanks to KnightErrant who's initial code was used as the basis for this tool particularly to understand the initial file layouts.

    A special thanks also for King Kong for his endless testing support and bug finding and of course for the tutorial.
    Last edited by wilddog; November 22, 2021 at 02:00 PM. Reason: new version

  2. #2
    makanyane's Avatar Praeses
    Content Emeritus

    Join Date
    Feb 2006
    Posts
    8,921
    Blog Entries
    1

    Default Re: IWTE - World edditing

    NOTE: A LOT OF THE BELOW POST IS OUT-DATED PLEASE ALSO SEE THE BATTLE MAP MODDING SECTION ON THE WIKI

    STARTER KIT

    I've put a replacement starter kit here: http://www.twcenter.net/forums/downl...o=file&id=3596
    as reported elsewhere the link to KingKong's starter kit is kaput
    My version is different so will not necessarily match everything described in his tutorial.

    The "starter kit for IWTE" download contains files named to be used in place of the existing north_european castle_a - to install it as that unzip folder and place 'castle' folder at
    mod-folder/data/settlements/north_european/castles/castle

    Please do not replace any existing files without making back-up copy of them (or re-name existing files to avoid overwriting).

    I've included copies of the wall and gate animations most likely to be useful; these are the three heights of stone walls, a portculis gate and large and medium swing gates.
    Original post follows;

    For IWTE download link see first post. This tool works as a standalone .exe file and does not need a python installation. It covers various aspects of battlemap building editing including their immediately surrounding terrain.

    It's developed by wilddog from basis of earlier tools provided by KnightErrant, and now provides enhanced features such as the fundamentally important ability to be able to add or delete objects.
    It's released as a beta only at the moment - partly because its still under development, and partly because its not been properly documented yet (which I'm trying to make some effort to address in this post.... that bit's my part of the job)


    some basic info about battlemap building and terrain editing can be found here:
    https://wiki.twcenter.net/index.php?...ildings_-_M2TW
    and in the 'world modified' thread here:
    http://www.twcenter.net/forums/showthread.php?t=166329


    assuming you've understood some bits of that and have worked out at least which files you're meant to be changing.... (if not we're not undertaking to educate anyone from scratch in building editing)


    Finding Complexes

    launch the IWTE 1v2 beta.exe and select the 'world' tab, select the 'Create World Complex TGA' and navigate to the .world file you would like to change.

    The resultant .tga file will be created (eventually) in the same folder as the .world file, if you open that tga in graphics program you'll find plan of existing complexes. Each complex is coloured slightly differently, if you use dropper tool to select colour the 'number' of the green element should tell you which complex it is.

    eg:

    this example shows complex number 12

    you should attempt to keep changed structures in same location as original complexes (or include them in nearest available complex) to avoid having to completely distort the complex bounding box system - its not been proved yet if that causes any major problems but its likely to increase strain on memory / game engine....

    Changing Structures
    Once you've identified the area you want to change go to 'structures' tab or one of the others with 'read binary world file' option and click that and load the .world file you want to eventually change. Select the structures from the complex you want to change and click 'write ms3d file' to create milkshape file of the structure. (if the structure exceeds milkshape limits you'll get error message in dos window - otherwise it'll write .ms3d to same folder as .world file)

    when you open the .ms3d file you'll find the groups are named in a precise way eg:

    the c10s1 in the image indicates its complex 10 structure 1. This element is not required for the write back of the file - its just there to help you to identify components if you start merging files.

    the Eoxx part shows the existing object number within the complex not the whole .world file.... it's done like that to help track changes when you re-imput something, there's some unfortunate peculiarities about the way CA numbered objects that means they can be arranged over several structures within a complex not necessarily consecutively.... if you want to keep existing attributes of an object, e.g. if it has pathfinding entry, it thinks its a tower... it has little flame effect that comes up when its damaged etc... then you need to keep the object number the same when you put .ms3d back into .world file -- otherwise the editor tool will delete the old object and add it back as new one without any attributes or collision volume (most attributes can be added back via text editing but its not an easy process, so please don't accidentally delete things!)

    the g_0 , g_1 section shows the group number within the object. Typical objects have two groups 0 and 1; with 0 being the undamaged version, and 1 the version that shows up if the object is damaged, some objects only have one group (can't be damaged) and some have more, eg, gates and walls which have more transition states.

    If you want to add new objects you should add them after the end of the objects you want to retain like:


    that's retaining objects 7, 10 and 12 from that complex and adding a new single group object and a new paired group object. The naming convention for new objects is
    'new object number' 'any symbol as spacer' 'new group number'
    so the
    2-0
    2-1
    groups are going to form one new object with two groups...

    EDIT: IWTE reads group numbering like this
    fred230gate-x10
    will be read as 'something that isn't Eo so isn't an existing object' 'two hundred and thirty' 'some text/symbols to match' 'ten'
    if next group name says
    blah230gate-x11
    then both groups should end up as damage stages within the same object
    NOTE: because IWTE needs to be able to read/understand and cross match any numbers within that first section of the group name they need to be readable as 2 byte integers i.e. less than 65535..... Do not use very long unbroken numbers like 100000000 as it will attempt to read that as Xmillion and crash whilst writing your file.

    Don't add new groups until the end of the existing objects, editor will treat anything after first new group as also 'new'

    You need to decide if you want objects to go back in as new objects or as existing objects and name them appropriately. You can change shape of something but still call it an existing object if you want to retain its attributes (e.g. game recognises it as a gate or arrow tower, or if it has light / flame effect you want to keep). Obviously do the opposite if you want to get rid of attributes and put object back with 'new' name so its accepted as new object, and old one with its attributes is deleted.

    (beware of deleting all objects before a gap in object numbers, CA had some inspired object numbering sequences that don't run through structures consecutively, deleting objects that cause structures to try and switch order, without deleting the whole structure still causes problems..)


    Deleting Structures
    You can delete most structures with this tool - with one condition: you can't delete the last structure in a complex (the complex numbers need to remain the same) - if you want to entirely 'lose' a complex then just replace the last structure with a 1 triangle 1 group structure with the triangle hidden somewhere under ground level.

    Don't delete the last gate in a wall perimeter area - at least without further amendments to perimeter / .worldpathfinding.... game will decide siege battle is either already won, or un-winnable

    Text Files
    The tool automatically generates a number of .txt files into the same folder the .world file is written to when it reads files or makes changes, these are primarily for de-bugging purposes, and can be safely deleted once you know the process has succeeded. For large .world files the text files are also very large - so please do delete un-needed .txt files regularly (or you'll run out of disc space!)


    The tool also has the function to deliberately write text versions of the binaries for the .world file and the .worldcollision files - buttons for this are on the 'world' tab. This is similar to the 'textrep' function in KnightErrant's original editors. These files can be amended in notepad or similar and converted back to binary if you need to do any manual editing of areas not yet automated by the tool.


    Revised File Names
    When you perform an operation with the tool it will ask you to supply a file name for the revised files to be saved with. For operations which can change the number of objects (like replacing .ms3d's for structures) it will save new versions of the .world file, the .worldcollsion file and the .animinstances file,
    all with the same prefix name you specified. It is recommended that you DO NOT attempt to overwrite the file that you're amending, but supply a new file name. If you undertake repeated operations in the 'structure' tab, the tool will produce a set of binary files for each operation, with a sequence number added to your selected file name. e.g. if you selected file name 'fred' and perform 3 operations you'll end up with files;
    fred.world, fred.worldcollision, fred.animinstances
    fred_1.world, fred_1.worldcollision, fred_1.animinstances
    fred_2.world, fred_2.worldcollision, fred_2.animinstances

    To test files in game rename the last set of .world, .worldcollision and .animinstances files produced (fred_2 in example) to the required name.

    Intermediate files generated by this process (fred & fred_1 in example) can be safely deleted when you know that the final file produced works in game.


    write up of instructions is very WIP, some more will come later but this version of tool is unlikely to be fully documented till its reached more final version.....

  3. #3
    wilddog's Avatar Paintedwolves run free
    Join Date
    Jan 2005
    Location
    UK
    Posts
    2,319

    Default Re: IWTE - World edditing

    Decided to add the bug fixes and enhancements to the first post for ease of updating.
    Last edited by wilddog; March 15, 2010 at 04:32 PM. Reason: updated with more info

  4. #4

    Default Re: IWTE - World edditing

    Quote Originally Posted by wilddog View Post
    Hi
    In order not to cloud too may other threads I thought it may be advisable for people to post questions/issues with the tool here.
    Okay, then I am just popping in.
    I am slowly loosing any last bit of overview about that whole stuff. Apart of the general fact I am not understanding the major things you are talking about, and I wish I would, I am wondering as trivial as it sounds what "useable" thing can an average modder now really accomplish with that tool; can I now create costum cities (more or less properly); whatever? Or are you just teasing me/us by what looks like a progress into that direction?

    I had a look a that tool though. Unfortunately I have not the time nor patient to experiment with it but from KEs tools I understand some of it functions. What really makes me stunned is that we can now remove structures, right. That is great!

    To the point, your recent tuts Wilddog and Makayane as great as they look I believe it is mostly just stuff for the "inner-party", i.e. a layman like me is desperatly lost. To see the instruction you give executed on an example where those tools are practically used with a playable result would imo be a better tut.
    Last edited by Devils_Advocate; January 11, 2010 at 06:13 PM.

  5. #5
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Re: IWTE - World edditing

    What?!

    Major rep!


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

  6. #6
    makanyane's Avatar Praeses
    Content Emeritus

    Join Date
    Feb 2006
    Posts
    8,921
    Blog Entries
    1

    Default Re: IWTE - World edditing

    @ DA
    we've tried to make the point that this is a beta level release and not suited to people who haven't already got a good understanding of the .world type files.

    It's still under development and some functions which you'd currently have to do a lot of in depth text editing to fix, might shortly become automated, so I don't want to waste a lot of time writing them up if they're likely to be out of date by the time I've finished.... For instance the collision tutorial http://www.twcenter.net/forums/showthread.php?t=310750
    just went from a lot of very technical info (that's now in spoilers) to basic instruction for adding collision being to press the 'Add Object Collision' button.



    If all that was holding people back from editing before was not being able to change number of objects / structures etc because of the sequence number problems in the world file, then this should fix it for them.


    A basic thing you could do at the moment is to replace some of the 'decorative' structures, like the blocks of houses in the settlements. That's just a matter of identifying where they are (which existing structures) and replacing the .ms3d's. When you've replaced the .ms3d you'd need to go through and use the 'add object collision' button for each of the objects in your new structure... (so its best if you can do it with fewer objects)

    If you then need to change the pathfinding at ground level you just do it by creating and replacing the pathfinding TGA2 (see the terrain tab)


    what's more complicated at the moment is if you want to change or add walls / towers or gates in shape or position and get on wall pathfinding, arrow firing and gate opening to work.... or if you want to add / change the flame & smoke effects etc... that's doable but at the moment would involve the sort of tutorial you're not going to like

  7. #7

    Default Re: IWTE - World edditing

    Quote Originally Posted by makanyane View Post
    that's doable but at the moment would involve the sort of tutorial you're not going to like
    I agree.
    I guess itīs better to go back on 'lurker' position again.

  8. #8
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Re: IWTE - World edditing

    Quote Originally Posted by makanyane View Post
    If all that was holding people back from editing before was not being able to change number of objects / structures etc because of the sequence number problems in the world file, then this should fix it for them.
    Just to confirm: you have modified KE's original scripts to make them update the number of structures etc? If so that was the major thing holding settlement editing back!


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

  9. #9
    wilddog's Avatar Paintedwolves run free
    Join Date
    Jan 2005
    Location
    UK
    Posts
    2,319

    Default Re: IWTE - World edditing

    Just to confirm: you have modified KE's original scripts to make them update the number of structures etc? If so that was the major thing holding settlement editing back!
    No not quite. The original scripts were the basis and they have been significantly updated. New scripts have been added to handle bounding spheres and animinstances file also.

    The updated scripts had :-
    - the sequence number automated in .world and .worldcollisions (yes there was a simple one there also).
    - it had most of the pads removed (these are extra 2 byte values added on first time usage of something) from the text editing. To avoid people tripping up on those.
    - it recalculates all the object numbers and removes them or adds them as blank entries to .world, worldcollision and animinstances.
    - it handles assignment of textures and recalculates new sequence numbers for those.
    - it handles the recalculation of the header values which go with the sequence number (The issue is the last usage of those in the 6th float tables). Believe me this was a far bigger issue than a resequencing item and there are some cases which may cause it to fallover).
    - it then was developed to handle basic adding and deleting full structures (avoids the max milkshape issue).
    - adding collision entries to the collision tables.

    These are basic simplifications only and aids to text editing. The real work is adding in the pathfinding bit around getting onto walls etc. so there is a lot more to do.
    Last edited by wilddog; January 12, 2010 at 05:32 PM.

  10. #10

    Default Re: IWTE - World edditing

    Impressive....

    I can not open IWTE_1v2_beta .
    A dos window appear but It closes immediately, I can not read that indicates the screen.
    I opened IWTE_1_0 with no problems with phyton
    What happened? What i`m doing wrong?

  11. #11
    wilddog's Avatar Paintedwolves run free
    Join Date
    Jan 2005
    Location
    UK
    Posts
    2,319

    Default Re: IWTE - World edditing

    Impressive....

    I can not open IWTE_1v2_beta .
    A dos window appear but It closes immediately, I can not read that indicates the screen.
    I opened IWTE_1_0 with no problems with phyton
    What happened? What i`m doing wrong?
    Hi it should be a straight .exe which should open. We thought that was easiest way whilst in beta form rather than getting into debates on Python loads (I had enough problem with that).
    You could open via a bat file and call the .exe and then add cmd /k. That should keep the command window open and allow you to see the error message
    On the other hand what are you running on? We built the .exe for windows with XP so it may be compatibility issue.
    Last edited by wilddog; January 12, 2010 at 05:35 PM.

  12. #12

    Default Re: IWTE - World edditing

    Thank Solved ...

    The error was fixed
    Error loading Python DLL : c:\...\_MEI39842\python26.dll ( error code 14001)

    We must install Python 2.6 , IWTE_1v2_beta.exe works on Xp -vista.

    KE tools works on Python 2.5 , its posible some kind of interference ...

  13. #13
    makanyane's Avatar Praeses
    Content Emeritus

    Join Date
    Feb 2006
    Posts
    8,921
    Blog Entries
    1

    Default Re: IWTE - World edditing

    Quote Originally Posted by Argantonio View Post
    Thank Solved ...

    The error was fixed
    Error loading Python DLL : c:\...\_MEI39842\python26.dll ( error code 14001)

    We must install Python 2.6 , IWTE_1v2_beta.exe works on Xp -vista.

    KE tools works on Python 2.5 , its posible some kind of interference ...
    aarghh that's annoying, the point of the .exe is it's meant to have included all the .dll's etc inside it and run independently

    it works on my XP computer that is still using Python 2.5 - and I tested a slightly earlier version of the .exe with Python completely un-installed - didn't try that on this one though as it's time consuming to take python on and off.. "shoot the tester!"

    Wilddog is using 2.6 now, and we noticed that KE had recently released an animation tool that needed 3.0 - that was part of reason for sending as an .exe - it's meant to cope with no / any python!!

    thanks for letting us know what answer was anyway....

  14. #14
    Augustus Lucifer's Avatar Life = Like a beanstalk
    Patrician Citizen

    Join Date
    Aug 2006
    Location
    Mote of Dust
    Posts
    10,725

    Default Re: IWTE - World edditing

    There's another solution which allows you to package critical python components with the tool. It's called cx_Freeze, and it works for Python 2.5/2.6/3.0. I tested it some time ago when I wrote a really simple EDU file swapper by sending it to a teammate who didn't have the python version(3.x) installed, and they were able to run it just fine. It isn't as 'clean' as just an EXE, because it comes with a library and a DLL, but it does the job and you still click the EXE to start it. And it's not like the distro is for players, I doubt any modder who will take on the tool is going to be squeamish about a few files lying around.

    The tool worked for me, but then I have 2.5 and 2.6 and 3.1 installed.
    Last edited by Augustus Lucifer; January 14, 2010 at 01:09 PM.

  15. #15
    makanyane's Avatar Praeses
    Content Emeritus

    Join Date
    Feb 2006
    Posts
    8,921
    Blog Entries
    1

    Default Re: IWTE - World edditing

    Thanks for the idea, we've so far tried with py2exe, pyinstaller (which I think was responsible for exe on download), bbfreeze - which came out at 100mb plus, and we also had short attempt with cx_freeze which also looked like it was coming up on the somewhat large side.... but we might have been missing some adjustments that can be done to refine output.

    Major problem with all of them at the moment is we can't get any of them to compile to include mayavi2 functions, apparently because its packaged as egg with path under enthought. - (there's some advice on web for that.... our egg's aren't zipped and we've tried the revised __init files, but aren't getting anywhere) , Wilddog would like to re-include mayavi2 viewing functions, so that is probably going to be deciding factor on how next version goes out.

    If you know anything about that aspect any advice would be much appreciated.
    Last edited by makanyane; January 14, 2010 at 04:15 PM. Reason: converting to English!

  16. #16
    Augustus Lucifer's Avatar Life = Like a beanstalk
    Patrician Citizen

    Join Date
    Aug 2006
    Location
    Mote of Dust
    Posts
    10,725

    Default Re: IWTE - World edditing

    Hm, I've not worked with Mayavi or the Enthought modules. I can't find much on the distribution of those packages, the only thing I found was this page which makes a small note of 64-bit vs. 32-bit Python. Problem is the nature of programs like cx_Freeze should be that if they work on your computer and the pyc files import properly it should package them into a library properly. Why that wouldn't be the case for enthought packages I'm not sure, unless it has to do with PATH variables on your system which enable you to personally run the files but cx_Freeze doesn't key on them to find other package locations. HMMMMMMM.

  17. #17
    wilddog's Avatar Paintedwolves run free
    Join Date
    Jan 2005
    Location
    UK
    Posts
    2,319

    Default Re: IWTE - World edditing

    Quote Originally Posted by Augustus Lucifer
    Hm, I've not worked with Mayavi or the Enthought modules. I can't find much on the distribution of those packages, the only thing I found was this page which makes a small note of 64-bit vs. 32-bit Python. Problem is the nature of programs like cx_Freeze should be that if they work on your computer and the pyc files import properly it should package them into a library properly. Why that wouldn't be the case for enthought packages I'm not sure, unless it has to do with PATH variables on your system which enable you to personally run the files but cx_Freeze doesn't key on them to find other package locations. HMMMMMMM.
    Hi, I haven't tried the CX Freeze package but after trying now 3 types of packages I got one to work - almost (BBfreeze). That created a 118MB file and still didn't accept the commands to correctly position Mayavi against PYQT4 to allow the windows to shut. Its probably something I can look at on paths but its taking longer to do that than some of the added functionality I'd rather spend time on. Using straight py files its not a problem.

    I originally started off thinking the .exe's would be easier but have since changed my mind

  18. #18
    Gorrrrrn's Avatar Citizen
    Join Date
    Jan 2007
    Location
    here
    Posts
    5,546

    Default Re: IWTE - World edditing

    Have the latest version of this and no Python my hard drive.

    seems to work perfectly well.

    now all I need is that tutorial on how to convert arrow towers into ballista towers on large castles and fortresses for my mod that uses them as preplaced "forts".

    I've looked through the unpacked m2tw files didn't spot anything that told the fortresses where to put ballista (and cannon) towers when they are built.
    Yet it does for the towers when they get upgraded either in descr_strat as part of a starting settlement or as a building upgrade in game.

  19. #19
    makanyane's Avatar Praeses
    Content Emeritus

    Join Date
    Feb 2006
    Posts
    8,921
    Blog Entries
    1

    Default Re: IWTE - World edditing

    @Rosanov
    the problem isn't the where but just the when....
    if you look at the .world files including the fort ones, and find the structures that contain the towers, you'll see that the structure will have sets of groups for each stage 'arrow tower','balista tower', 'cannon tower'. Viewed in ms3d they're all in same place, and fit on same bottom section of tower.

    The table that indexes object attributes in the .world file is table 2 (viewed after binary to text conversion) it looks like this:

    for a tower with the three levels. Number at end of row is the object number - in illustration object number 20 is the arrow tower version, 21 = balista, 22 = canon. The only differences in that table between them are the 111, 79, 79 numbers in column 4. 79 always seems to be used for a tower which is an upgrade.... and in column 6 the 0 4 8 numbers. Those refer to the animstring it uses (but x4) that example means its using the first second and third string

    for the example shown.... if you changed the 0 to 4, you'd get the balista tower animation.... but I think that relates only to what is shown as it collapses, not when it fires.

    Those three stage towers have entry like

    in the 'Game Objects' section - you can see the 20, 21 & 22 object numbers listed there at top of section.... you'll then get 'FlagBase' and series of 'ArrowSlot's which relate to each object. Unfortunately the entries for each object (ie each upgrade level) look exactly the same to me... ie. they're all ArrowSlots you don't get "BalistaSlot"s! So as far as I can tell nothing in that lot is telling it what projectile to use.


    I think the answer has to be outside the .world files.... either .worldpkgdesc as you mentioned in other thread (I assume that didn't work?) or something that would be needed to be specified in descr_strat for the fort entry?

  20. #20
    Gorrrrrn's Avatar Citizen
    Join Date
    Jan 2007
    Location
    here
    Posts
    5,546

    Default Re: IWTE - World edditing

    yes I looked at the world file and could only find arrow towers.

    I found the ballista and cannon tower debugdata files in the unpacked m2tw files.

    not found anything else yet. I'm thinking maybe ballista and cannon towers just replace the top level of the tower structure?

    Haven't tried the tower level approach yet.

    Tx for taking the time to explain.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •