Page 1 of 2 12 LastLast
Results 1 to 20 of 28

Thread: IWTE for the complete utter noob

  1. #1
    BURNY26's Avatar loving victoria 2
    Join Date
    Aug 2009
    Posts
    1,202

    Default IWTE for the complete utter noob

    Work in progress ,feel free to comment or nag. Work in progress also means that what has been typed could still contain faults. I will try and fix them ASAP and put up a changelog whenever I edit something that has been posted already.
    Tools
    IWTE tool : http://www.twcenter.net/forums/downl...o=file&id=2741
    KK's tutorial in pdf : http://www.twcenter.net/forums/showt...43#post8619943
    Milkshape : http://chumbalum.swissquake.ch/ms3d/download.html


    IWTE tutorial
    Unpacking

    So the first thing you need to do is to unpack all the data of M2TW by using the unpacker under :
    SEGA\Medieval II Total War\tools\unpacker.
    In case you have the msvcp71.dll and/or msvcr71.dll error you can find them both on
    www.dll-files.com
    You place them according to these instructions ,as found on this link:http://www.dll-files.com/dllindex/dl....shtml?msvcr71
    Extract msvcr71.dll to a location on your computer. We recommend you to unzip it to the directory of the program that is requesting msvcr71.dll.

    If that doesn't work, you will have to extract msvcr71.dll to your system directory. By default, this is:

    C:\Windows\System (Windows 95/98/Me)
    C:\WINNT\System32 (Windows NT/2000)
    C:\Windows\System32 (Windows XP, Vista, 7)
    If you use a 64-bit version of Windows, you should also place msvcr71.dll in C:\Windows\SysWOW64\
    Make sure overwrite any existing files (but make a backup copy of the original file).

    Reboot your computer.
    If the problem still occurs, try the following:
    Open Windows Start menu and select "Run...".

    Type CMD and press Enter (or if you use Windows ME, type COMMAND)).
    Type regsvr32 msvcr71.dll and press Enter.

    You click on the unpack_all.bat found in the SEGA\Medieval II Total War\tools\unpacker folder and let it unpack.A cmd window (small black screen with white letters)will appear and take

    a couple of minutes to unpack everything.

    Terrainediting
    Getting Started

    You should duplicate the settlementsfolder and put it onto your desktop to avoid corrupting your folder by accident.
    Loadup IWTE, go to Terrain 1< Create Terrain.ms3d and locate the proper file. It should have this adress :
    ...SEGA\Medieval II Total War\data\settlements....
    After which you chose which kind of settlement you want to edit. An ms3d file will be made inside this folder.
    Example:
    For the first model I wish to make a village with no walls according to the north european culture:

    An ms3d-file is made:


    If you want to edit the width and length (referred to from now on as X and Z)of the model ,you need to do this only by using the IWTE-tool. Milkshape can only be used to edit the terrain in height (Y-axis). The height can be edited in the IWTE-tool as well.


    Note: I am using the dimensions as displayed in Milkshape ,X =yellow ,Y =blue and Z =red.

    Editing with IWTE

    X and Z axis
    Chose the resize worldterrainbutton:

    Find your terrainfile:



    You will get this:


    Size value X and Y( Y in my post is referred to as Z ,as according to milkshape) can be quite heigh ,but you have to chose odd numbers. Models up till 181*181 can normally be converted into an ms3d-file. If you go even higher ,you will only be able to use the IWTE-tool.

    After that you need to resize your :

    - north_european_village_a.worldpathfinding file
    - north_european_village_a.worldvegetation file

    By clicking the respective buttons under the Terrain 1 tab.


    And selecting the files in the same folder as the modified terrain. Be warned though ,you won't be able to see you have edited the file:


    I have resized the pathfinding and vegetation files at the same time as the resized worldterrain. But it is not noticeable so keep track of what you have done!


    Note :You don't need to resize those files if you have only edited the Y-axis.


    Y-axis

    You can view your terrain by clicking Terrain1 - View Terrain in 2d window (you select the edited terrain) and in the 2d view window to the right you will get your field.
    For learning purposes I made some extremes in my model to show it clearly:
    my model:

    my 2d view window:

    The values it displays in the 2d view window is the height:


    As you can see ,the difference is very clear.

    The values came from this place on the model :


    This 2d view model represents the heightvalues as shown in your model.

    BUT that doesnt necessarily mean that these values are displayed on the battlefield!!!

    For example:

    This is a part of the model:


    This is the exact part from the numbers shown in the 2d view window pic below:



    This is the 2d view window:



    This is the battlefield:


    As you can see ,the result isn't what you had expected . There is another overlooked factor here ,it is called merging and is discussed under the TGA's section of this post.


    You can also edit the height precisly using the IWTE.

    Chose the designated terrain twice and than boxes displayed onabove picture will open. Your terrain will also be loaded into the 2d view windo. You can select now each vertex and edit it very precisly.

    Editing in Milkshape

    As posted above ,it is only possible to edit your created ms3d file according to the Y-axis!
    So if you want to move vertexes vertically be sure to have this checked:

    When you open up the file, the first thing you do is mirror left <-> right.



    In case you have deselected the model by accident ,reselect the entire model (being the faces AND vertexes). So not like this:



    But like this:



    The result differs depending on what you have chosen, with the faces the model will be completely mirrored ,while only selecting the vertexes will invert your result.


    Note: Vertexes are the dots and faces are the triangles including the dots.

    After that you have finished editing your ms3d-file you mirror it again from left to right and you save.

    Than you go to the IWTE tool and select:


    you will be prompted to chose your terrain again and the according ms3d-file you just saved. And voila ,a new terrain file will be created in the same folder . The file will be called:

    - north_european_village_a_ms3d.worldterrain

    TGA's

    The TGA's needed during this procedure are called :
    - north_european_village_a_wtmerge
    - north_european_village_a_wtbase
    The last file will only be present if you are editing an already exisiting settlement, made by CA.
    They can be recreated by :

    Select your terrain and than you will be redirected to here:


    You will find the two files in the same folder as your terrainfolder.

    The
    a_wtbase file is the file which acts as the foundation for your settlement. While the merge file acts as a buffer between your stuff and random generated stuff .
    I will talk about the base file ,while makanyane will speak about the merge file a bit lower on this post.


    GCP means the grayscalecode( because there are several types of gray) that is equal to the 0.0 height on your map. And how much more gray it needs to be ,to have the height increased by 0.1.

    If for example
    THIS kind of gray is = to 0.0 height ,than THIS kind of gray will mean that > 0.0 height.
    The maximum height which can be attained is when the greyscale code reaches 255. Meaning ,it stops being gray and becomes white. So if you want to have an even heigher terrain you will need to change the grayscale increments per height to 2.0 or 1.0 or... BUT you will lose accuracy since you will lose precision ,because the steps will be bigger.
    Another use for the grayscale can be found on the alpha channel map which indicates the amount of merging into the autogenerated environment. The closer you get to 255 =white ,the more it indicates that its true height ,as it is reperesented in the model, will be shown. The more you get to 0 =black , the more it will merge and 'lose' its modelheight.
    An easy to understand example:

    You can clearly see that the middle of the map is represented as the way it was modelled ,while the edges of the map will merge into the autogenerated part of the map to avoid cliff formation.
    Example:
    This is the terrain with a black border on the alphachannel,indicating more merging with the auto generated environment

    This is the version ,where the alphamap is completely white.

    Ive drawn the white line to show where the alpha channel has its use. Normally you would expect to have a cliff ,since there would be NO merging whatsoever! Instead ,we STILL have merging,how is this possible? By any logic the brown line should be perpendicular on the white line!
    Well ,you are right ,it should be. BUT CA has found a way to avoid such cliffs. It created the 'Landscape Merge Mask plane'.
    Quote Originally Posted by makanyane View Post
    am adding some diagrams here to help those new to it understand the effect of the terrain merge factor and also the landscape merge mask plane (if present)

    the red line shows a diagram of a hypothetical terrain profile - the part with buildings is at nominal height above 0 - the edges below 0 - to form a hill effect. The green line shows the shape the battlemap terrain would have formed if the building/terrain wasn't there. The game places the settlement/building terrain so that it's nominal 0 height is at the average height of the battlemap under the terrain area.

    If the terrain didn't have any merge factor applied to the outer vertex points then the result in game would be a cliff edge rising from the end of the red line where the terrain size ends up to the green line. However with a merge factor applied to the outer points so that they blend between 1 and 0 (white to grey on the wtbase.tga alpha) then the amount of effect of the terrain height is multiplied by the merge factor and so as it tends to a merge factor of 0 it blends back in to the battlemap profile, as shown by the dotted lines.


    The effect of having a Landscape Merge Mask plane in the .worldterrain file (as is present in vanilla settlements) is that the 0 level is found from the average of the area under the Landscape Merge Mask size (that is a fixed hard coded size) the landscape merge mask is an entirely flat plane at what the game has determined as the nominal 0 height for the settlement. This plane is represented in the wtmerge.tga produced by the IWTE tool as a 256*256 pixel square. If that was an all white square (i.e. no merging) then you'd get a cliff edge up from where the blue plane ends going up to the green line of the battlemap.
    If the mask is merged off to black, as with vanilla examples, then you get a resultant shape as shown by the dotted lines in the image above.

    The effect of the Landscape Merge Mask plane together with the example terrain is shown below.


    The settlement terrain (red line) still does the same thing, but it now blends with the result of the combination of the Landscape Merge plane and the battlemap.

    NOTE: because the terrain shape is applied over the result of the other two files you'll only actually see an effect from the Landscape Merge Mask plane if the effective* terrain size is smaller than the hardcoded size of the plane, as above we think the plane is equivalent to approx 128 as a terrain size.

    *If the terrain vertexes inside the 128 area of a larger terrain have a low or 0 merge factor then some of the effect of the plane would come through as it will be merging to the result shown in the second pic...

    In case you edit your TGA file ,you press the 'Replace with Terrain TGA' or 'Replace with WT mege TGA' ,depending on what you have edited, and you chose the terrain you wish to correct. Don't forget to save the file as a 32 bit one.


    Testing your custommade terrain

    From having done several tests on several computers with different people , it is safe to say there are multiple ways to make it work and to up your install. It is recommended to use the retrofit and barebones method first!


    So copy your nice and clean M2TW install!

    Barebones method

    Download the barebones mod from this link : http://www.twcenter.net/forums/downl...o=file&id=1615
    Unpack it and copy the following files

    Inside the Medieval 2 folder ,overwrite when necessary. Run the Barebones_cfgfixer.
    Copy th settlements folder from here - D:\SEGA\Medieval II Total War\data\settlements
    and paste it in here - D:\SEGA\Medieval II Total War\mods\barebones\data

    Than paste the edited files inside the correct folder in the barebones folder.


    Run Barebones.bat and run a custom battle. Be sure you chose the corresponding culture and level of settlement!

    Enjoy

    Retrofitmethod

    The exact same procedure as the barebonesmethod. With the exception of the cfgfixer step.

    Vanilla method

    Just paste your files inside D:\SEGA\Medieval II Total War\data\settlements


    Changelog

    Added under Terrainediting:
    - 05/03/12 18h47 GMT
    You should duplicate the settlementsfolder and put it onto your desktop to avoid corrupting your folder by accident.
    - 06/03/12 13h11 GMT
    Added under editing in IWTE X and Z: (The values are a bug in the IWTE-tool and wilddog is working to fix it,no idea of release though.)Models up till 181*181 can normally be converted into an ms3d-file. If you go even higher ,you will only be able to use the IWTE-tool.
    - 10/03/12 23h47 GMT
    Added the TGA section.


    Credits
    For creating this tool
    wilddog

    Argantonio

    KnightErrant

    makanyane


    For creating the manual used to learn this process

    King Kong

    Gigantus


    For their excellent support

    IVIarkI2I

    wilddog

    Eothese

    makanyane
    Last edited by BURNY26; March 09, 2012 at 06:13 PM. Reason: TGA's
    Son of the now supersilly walking MasterBigAb/戦国無双
    IWTE courseIWTE for the complete utter noob


  2. #2
    Alkimachos's Avatar EoR Modeller
    Join Date
    Mar 2010
    Location
    W. Macedonia, Greece/Hellas
    Posts
    5,324

    Default Re: IWTE for the complete utter noob

    WOW! Thank you very very much!

    +rep (when i can)!

    East of Rome Co - Leader / Modeller of Asia ton Barbaron / Ex beta tester of Roma Surrectum

  3. #3
    Polycarpe's Avatar Back into action!
    Join Date
    Feb 2010
    Location
    Quebec, Canada
    Posts
    3,311

    Default Re: IWTE for the complete utter noob

    No shame to be a rookie in this business, great work Burny!

  4. #4
    Lü Bu's Avatar "Mightyest Man Alive"
    Join Date
    May 2008
    Location
    Split,Croatia
    Posts
    5,420

    Default Re: IWTE for the complete utter noob

    thanks for this
    Proud patron of Wlesmana
    Assyria Total War
    Check update thread for new HQ models
    My Workshop™


  5. #5
    Deutschland's Avatar East of Rome Mod Leader
    Join Date
    Apr 2009
    Location
    Leipzig, Germany
    Posts
    2,069

    Default Re: IWTE for the complete utter noob

    Nice I ll look through it soon..

  6. #6
    Eothese's Avatar Author
    Join Date
    Jan 2008
    Location
    UK
    Posts
    3,193

    Default Re: IWTE for the complete utter noob

    One pearl of wisdom I'd like to add, DO NOT work within your modfolder. Find the directory that contains the files you want to work with and copy it to your desktop. Otherwise there will be problems down the line, almost guaranteed.

  7. #7
    BURNY26's Avatar loving victoria 2
    Join Date
    Aug 2009
    Posts
    1,202

    Default Re: IWTE for the complete utter noob

    Quote Originally Posted by Alkimachos View Post
    WOW! Thank you very very much!

    +rep (when i can)!
    Quote Originally Posted by Polycarpe View Post
    No shame to be a rookie in this business, great work Burny!
    Quote Originally Posted by Lü Bu View Post
    thanks for this
    Quote Originally Posted by Deutschland View Post
    Nice I ll look through it soon..


    Quote Originally Posted by Eothese View Post
    One pearl of wisdom I'd like to add, DO NOT work within your modfolder. Find the directory that contains the files you want to work with and copy it to your desktop. Otherwise there will be problems down the line, almost guaranteed.
    Will add to OP ,thx Eothese.
    Son of the now supersilly walking MasterBigAb/戦国無双
    IWTE courseIWTE for the complete utter noob


  8. #8
    makanyane's Avatar Ronin
    Join Date
    Feb 2006
    Posts
    4,695

    Default Re: IWTE for the complete utter noob

    Well done for starting this and good advice from Eothese (& basically make sure you keep a couple of older versions of all of your stuff as it progresses in case you do ever manage to overwrite the latest one with something that doesn't work...)

    as I was struggling slightly to explain the difference between terrain merge factors and the landscape merge mask that is present in vanilla settlement terrains I added some diagrams here;
    http://www.twcenter.net/forums/showt...6#post11133666
    feel free to borrow any of those if it helps.... but as you're going for beginners version it may be best just to deal with terrain and it's merge factor, that will anyway explain the bit about some of the terrain changes not showing up in battlemap.

    btw, the terrain merge factor also effects whether the tree positions in the .worldvegetation file are used instead of the ones that would normally be on the battlemap, or not.

  9. #9
    Polycarpe's Avatar Back into action!
    Join Date
    Feb 2010
    Location
    Quebec, Canada
    Posts
    3,311

    Default Re: IWTE for the complete utter noob

    I'm wondering about this how much it is difficult the aspect of playing with only existing stuff, as for example adding a vanilla castle inside a large city or making large towers where you could put men on the top?

  10. #10
    Eothese's Avatar Author
    Join Date
    Jan 2008
    Location
    UK
    Posts
    3,193

    Default Re: IWTE for the complete utter noob

    Quote Originally Posted by Polycarpe View Post
    I'm wondering about this how much it is difficult the aspect of playing with only existing stuff, as for example adding a vanilla castle inside a large city or making large towers where you could put men on the top?
    Both are possible, 1st would take a massive amount of work though, as even a small settlement contains dozens or even hundreds of structures etc, which would have to be added to the city once you've made enough room. 2nd is pretty straight forward though and has already been done...

  11. #11
    BURNY26's Avatar loving victoria 2
    Join Date
    Aug 2009
    Posts
    1,202

    Default Re: IWTE for the complete utter noob

    Ill add the information concerning TGA's and merging tomorrow. Stay tuned!
    Son of the now supersilly walking MasterBigAb/戦国無双
    IWTE courseIWTE for the complete utter noob


  12. #12
    BURNY26's Avatar loving victoria 2
    Join Date
    Aug 2009
    Posts
    1,202

    Default Re: IWTE for the complete utter noob

    Updated with TGA's.
    Son of the now supersilly walking MasterBigAb/戦国無双
    IWTE courseIWTE for the complete utter noob


  13. #13
    ♔Lord Hay♔'s Avatar Kabe difendā
    Join Date
    Mar 2012
    Location
    Finland
    Posts
    44

    Default Re: IWTE for the complete utter noob

    thanks from these Burny

  14. #14
    BURNY26's Avatar loving victoria 2
    Join Date
    Aug 2009
    Posts
    1,202

    Default Re: IWTE for the complete utter noob

    Son of the now supersilly walking MasterBigAb/戦国無双
    IWTE courseIWTE for the complete utter noob


  15. #15
    Red_Devil's Avatar Supai
    Join Date
    May 2010
    Posts
    349

    Default Re: IWTE for the complete utter noob

    Thank you so much for this tutorial burny.
    I was a bit confused, thinking you had to first do milkshape then TGA (stupid I know... now), but I successfully managed to edit a terrain and add structures in-game.
    thank you again.

    I would point out the fact that (I think) you did not talk about the merge distance tool in the resize .worldterrain. It is pretty simple to understand, but I had to look for it for some time, not understanding what happened to my terrain IG because some mountains on the side were flattened far in the edited part. (if you understand my english

  16. #16
    BURNY26's Avatar loving victoria 2
    Join Date
    Aug 2009
    Posts
    1,202

    Default Re: IWTE for the complete utter noob

    Quote Originally Posted by Red_Devil View Post
    Thank you so much for this tutorial burny.
    I was a bit confused, thinking you had to first do milkshape then TGA (stupid I know... now), but I successfully managed to edit a terrain and add structures in-game.
    thank you again.

    I would point out the fact that (I think) you did not talk about the merge distance tool in the resize .worldterrain. It is pretty simple to understand, but I had to look for it for some time, not understanding what happened to my terrain IG because some mountains on the side were flattened far in the edited part. (if you understand my english
    Thx for positive comment (though feedback is as much appreciated) , it is possible that I skipped it . Maybe I didnt see it or I forgot. Since its been a while I made this , I cant remember.

    Maybe ill look into it this weekend to update the stuff.
    Son of the now supersilly walking MasterBigAb/戦国無双
    IWTE courseIWTE for the complete utter noob


  17. #17
    Red_Devil's Avatar Supai
    Join Date
    May 2010
    Posts
    349

    Default Re: IWTE for the complete utter noob

    no problemo.

    just wondering, I've added a few structures with the IWTE, and of course the textures are not adapted to the models I made. How can I UV map those buildings? with the IWTE, milkshape or another tool I am not aware of? is there any tutorial about this, because KKs tutorial which is very complete (but complicated for the noob that I am ) only talks anout importing the .textures in the world...

  18. #18
    BURNY26's Avatar loving victoria 2
    Join Date
    Aug 2009
    Posts
    1,202

    Default Re: IWTE for the complete utter noob

    Son of the now supersilly walking MasterBigAb/戦国無双
    IWTE courseIWTE for the complete utter noob


  19. #19
    Red_Devil's Avatar Supai
    Join Date
    May 2010
    Posts
    349

    Default Re: IWTE for the complete utter noob

    grazie BURNY, you rock

    so the 3D models will keep the coordinates of the textures once the corresponding .texture files have been added in the IWTE...
    i just need to map the textures in Milkshape with some jpegs or other, convert them to .textures, then import them and the associated model. is that it?
    thanks for your help.

  20. #20
    BURNY26's Avatar loving victoria 2
    Join Date
    Aug 2009
    Posts
    1,202

    Default Re: IWTE for the complete utter noob

    Id suggest you practice on some normal models first. Som units ,so you can check if it works out as you want . Good Luck

    http://www.twcenter.net/forums/showthread.php?t=412456
    Son of the now supersilly walking MasterBigAb/戦国無双
    IWTE courseIWTE for the complete utter noob


Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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