Page 9 of 13 FirstFirst 12345678910111213 LastLast
Results 161 to 180 of 248

Thread: Creating a World - Importing units from another mod

  1. #161

    Default Re: Creating a World - Importing units from another mod

    Sorry for the huge list I didn't know I didn't realize it was this long.

  2. #162
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,126
    Blog Entries
    35

    Default Re: Creating a World - Importing units from another mod

    You can add a spoiler

    Can't see any particular error in there - those are all the false positives based on the faction special settlement. Remove your entry in the EDB and then try again.










  3. #163

    Default Re: Creating a World - Importing units from another mod

    Well that didn't work so I'm just going to give up on the unit and I don't want to bother you with my noobness anymore haha. Thank you again though!

  4. #164

    Default Re: Creating a World - Importing units from another mod

    Actually I'm having one last problem with the game as a whole. It won't let me start a new campaign. It just takes me back to the single player screen. I looked in the log and it said the exact same thing that it said after I tried testing the other unit I tried importing but gave up on.

  5. #165

    Default Re: Creating a World - Importing units from another mod

    Did you check that whatever line you added in EDB hasn't been misplaced, cuting off a building level from it's tree? Or that you didn't delete a bracket or the like? It can happen. What is the 14236 line that your log is pointing? Did you try adding the abandonned unit in the descr_strat and forgot to delete it? Or from descr_mercenaries?

  6. #166
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,126
    Blog Entries
    35

    Default Re: Creating a World - Importing units from another mod

    A crash to menu usually involves an error in descr_strat and is documented in the log. Set your log to trace in the mod's CFG file, it should look like this (path entry might be different, ignore):

    Code:
    [log] 
    to = system.log.txt                    # path and name of log
    level = * trace                        # detailed log
    Then run the game again - the log will be pretty large and requires compressing before uploading (7Zip is freeware). Also include the EDB, EDU and descr_strat files in the compression.










  7. #167

    Default Re: Creating a World - Importing units from another mod

    Quote Originally Posted by selv View Post
    Did you check that whatever line you added in EDB hasn't been misplaced, cuting off a building level from it's tree? Or that you didn't delete a bracket or the like? It can happen. What is the 14236 line that your log is pointing? Did you try adding the abandonned unit in the descr_strat and forgot to delete it? Or from descr_mercenaries?
    It's pointing to the very last line of the EDB and no I never touched those when I was importing my units.

  8. #168

    Default Re: Creating a World - Importing units from another mod

    Quote Originally Posted by Gigantus View Post
    A crash to menu usually involves an error in descr_strat and is documented in the log. Set your log to trace in the mod's CFG file, it should look like this (path entry might be different, ignore):

    Code:
    [log] 
    to = system.log.txt                    # path and name of log
    level = * trace                        # detailed log
    Then run the game again - the log will be pretty large and requires compressing before uploading (7Zip is freeware). Also include the EDB, EDU and descr_strat files in the compression.

    https://www.mediafire.com/file/dncivcjyjbp49j8/files.7z

  9. #169

    Default Re: Creating a World - Importing units from another mod

    My bad I don't know how to properly post a zip file

  10. #170
    AWRA's Avatar Libertus
    Join Date
    Nov 2011
    Location
    Southern PA, USA
    Posts
    97

    Default Re: Creating a World - Importing units from another mod

    Getting back to Middle Earth again with TATW finally after about 5 years away.
    Want to get some Arnor units from MOS and DaC into 3.2 vanilla for my own use.
    Most of these are from the old AUM which from reading that thread didn't quite work with 3.2 vanilla, but problems must have been sorted out to put into MOS and DaC.
    Have read the whole thread and am left with some questions, based reading elsewhere on forum.
    Have worked with and understand EDB, main questions are with modelDB and unit files and how to work with them.


    1. Am assuming if I'm just working between TATW and a submod, I don't need to unpack MTW2 proper files correct?


    2. Reading the tut, if I understand correctly the formatted modelDB file for my mod - 3.2 would the DaC and MOS corresponding files and I'd open them and my 3.2 vanilla file with notepad++.
    However from other readings here on forum left to ask where python comes in here - just to run your checker then? Question rises up from this post:
    http://www.twcenter.net/forums/showt...ment-text-quot


    3. If I understand correctly also deleting cgi.string.bin folder sounds like the delete map.rwm step - have to do it to make your mods stick when you open up for the first time to check your work?


    4. How do you tell if you have a custom animation or custom projectile on your hands at the bottom of the unit file?
    "I threw down my enemy, and he fell from the high place and broke the mountain-side where he smote it in his ruin."

  11. #171

    Default Re: Creating a World - Importing units from another mod

    1, Correct. Unless you need a file not present in your mods versions but with a mod full of new units, it's not likely.

    2, Better I let someone else answer that, didn't really touched modeldb file in a long time.

    3, No. You need to delete the map.rwm only for base folder changes, no need for the rest. About string.bin, you mean the text folder right? I never delete them, they update themself whenever there is a change in the txt files. Only exception is the historic_event string.bin after using geomod.

    4, Same as 2.

  12. #172
    AWRA's Avatar Libertus
    Join Date
    Nov 2011
    Location
    Southern PA, USA
    Posts
    97

    Default Re: Creating a World - Importing units from another mod

    Thanks, selv. Hopefully G. will help out. Very gracious last time pointing to Bare_Geomod to get around the windows security clash with original MTW2.
    "I threw down my enemy, and he fell from the high place and broke the mountain-side where he smote it in his ruin."

  13. #173
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,126
    Blog Entries
    35

    Default Re: Creating a World - Importing units from another mod

    Python comes into play when you use the modeldb checker that is included in the link of the OP - not really required with the simple editing and copy\paste this tutorial involves. Make sure you have the recommended version (see linked tutorial) installed when running the checker.

    Custom animation - rule of thumb: if it hasn't got a M2TW prefix in the name then there is a good chance it's a custom animation. Hence the best way to check if it so when the model causes a crash is to replace the animation with a working one from a similar unit\model, eg missile infantry.

    There should be a complete set of animations available for download in the models tutorial or workshop forum if you want to check that way.










  14. #174
    AWRA's Avatar Libertus
    Join Date
    Nov 2011
    Location
    Southern PA, USA
    Posts
    97

    Default Re: Creating a World - Importing units from another mod

    Thx for the help as always.
    "I threw down my enemy, and he fell from the high place and broke the mountain-side where he smote it in his ruin."

  15. #175
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,126
    Blog Entries
    35

    Default Re: Creating a World - Importing units from another mod











  16. #176
    AWRA's Avatar Libertus
    Join Date
    Nov 2011
    Location
    Southern PA, USA
    Posts
    97

    Default Re: Creating a World - Importing units from another mod

    A little follow-up from further reading your post about making new units.
    http://www.twcenter.net/forums/showt...ew-Units/page2


    1. Is the paired TXT/STRING.BIN file structure in TATW a function of being a mod of Kingdoms and not having to be unpacked as with the base MTW2?


    2. Seems obvious from your comments, that clicking “type” in the folder header and grouping the STRING.BIN folders together and deleting them after editing the corresponding TXT files would be a sound step in modding-checking process even if the new TXT files should regen new STRING.BIN files, agreed?


    3. If need be it looks like STRING.BIN files can be edited with Notepad++ which I have, or am I mistaken?
    "I threw down my enemy, and he fell from the high place and broke the mountain-side where he smote it in his ruin."

  17. #177
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,126
    Blog Entries
    35

    Default Re: Creating a World - Importing units from another mod

    Some basics about TXT\STRING.BIN files:

    1. The TXT files can be edited with a regular Editor, Notepad++ recommended, the original, unpacked game does not have the TXT files
    2. The game uses the TXT files to generate STRING.BIN files provided the date of the TXT file is from a more recent date then the STRING.BIN file or only the TXT file is present
    3. Editing the STRING.BIN files directly with a regular editor is not recommended due to formatting issues (and not required if you have the corresponding TXT files)
    4. STRING.BIN files can be edited (other then the 4 special files) with an editor like BinEditor
    5. The 4 special files are strat, shared, tooltips and battle, they have a different format and the STRING.BIN files for them cannot be generated by the Steam version of the game or the BinEditor.
    6. A TXT set of those 4 files can be found here. All other STRING.BIN files can be easily edited and then saved in TXT and STRING.BIN format with the BinEditor
    Last edited by Gigantus; February 05, 2018 at 12:01 AM.










  18. #178
    AWRA's Avatar Libertus
    Join Date
    Nov 2011
    Location
    Southern PA, USA
    Posts
    97

    Default Re: Creating a World - Importing units from another mod

    Gigantus:

    Thanks for all your help and patience with a modder-in-training like me.
    Learned more in the last several weeks about MTW2/Kingdoms than in all the years I played before combined.
    Suspect your last post will help a lot of people besides myself.

    Regards,
    AWRA
    Last edited by AWRA; February 05, 2018 at 02:00 AM.
    "I threw down my enemy, and he fell from the high place and broke the mountain-side where he smote it in his ruin."

  19. #179
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,126
    Blog Entries
    35

    Default Re: Creating a World - Importing units from another mod











  20. #180
    bphl98's Avatar Libertus
    Join Date
    Apr 2018
    Location
    Barad-dûr, Mordor
    Posts
    64

    Default Re: Creating a World - Importing units from another mod

    Quote Originally Posted by Gigantus View Post
    Preparations


    • Make sure you have permissions to use the units if you intent to publish your mod
    • Have a formatted modelDB file for your mod
    • Determine how many free slots are left in your export_descr_units file. This is easiest via the search function of Notepad++. Open the EDU with Notepad++, press CTLR+F to get the search function and enter 'ownership' into the 'Find what:' slot, click 'Count'. The maximum number of entries is 500, if you have those detailed explanations at the top of your EDU then deduct one from the count.


    Finding your unit files and entries


    • If you can't remember the display name of your unit, simply use the custom battle of that mod by setting it to the faction where you know the unit is in the roster and using the 'Period\All' setting. Search for the unit in the roster and write down the correct spelling of the unit's name.
    • Open data\text\export_units.txt and search for that name - it will look like the example underneath. Note that there are three entries for that unit, all of them need to be transferred to your mod's export_units file, simply copy it to the bottom of your mod's file. You can now change the entry outside the curly brackets if yo wish to change the name and\or description of the unit.

    Code:
    {Dismounted_Archers}Dismounted Archers
    {Dismounted_Archers_descr}Despite preferring to fight on horseback...snip
    {Dismounted_Archers_descr_short}These light mounted...snip

    • Open the mod's EDU and use the coded name to find your unit's entry. Copy the whole entry to the bottom of your EDU. The entry in the soldier line and armour_ug_models line are your battle models (see next step).
    • Open the mod's modelDB file (use Notepad or Notepad++) and search for the battle model's entries, copy the whole entry to the end of your mod's modelDB file, preferably before the last entry. An entry starts at the line with the battle model's name and ends with the long line of numbers, example underneath. Do not forget to increase the model count number in the first line of the modelDB by the number of models you add.

    Code:
    22 serialization::archive 3 0 0 0 0 886 0 0
    Code:
    18 dismounted_archers 
    1 4 
    56 unit_models/_Units/AS_Light/dismounted_archers_lod0.mesh 121 
    56 unit_models/_Units/AS_Light/dismounted_archers_lod1.mesh 900 
    56 unit_models/_Units/AS_Light/dismounted_archers_lod2.mesh 2500 
    56 unit_models/_Units/AS_Light/dismounted_archers_lod3.mesh 6400 
    1 
    7 mongols 
    67 unit_models/_Units/AS_Light/textures/AS_Light_Fancy_mongols.texture 
    66 unit_models/_Units/AS_Light/textures/AS_Light_Fancy_normal.texture 
    51 unit_sprites/mongols_Mongol_Foot_Archers_sprite.spr 
    1 
    7 mongols 
    59 unit_models/AttachmentSets/Final Asian_mongols_diff.texture 
    59 unit_models/AttachmentSets/Final Asian_mongols_norm.texture 0  
    1 
    4 None 
    16 MTW2_Fast_Bowman 
    20 MTW2_Non_Shield_Fast 1 
    19 MTW2_Bowman_Primary 1 
    18 MTW2_Sword_Primary 
    16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
    • Now trace all the listed files (MESH, TEXTURE and SPR) and transfer them to your mod into the correct folders. Create those folders if necessary. Note that the sprite file (SPR) is actually a set of three files - two TEXTURE files and one SPR file with nearly identical names.
    • The last files to transfer are the two unit pictures, you will find them here: ui\units\[faction name]\#coded name and ui\unit_info\[faction name]\coded name_info. Tip: if your unit hasn't got the mercenary_unit ability and all the pictures are the same you may wish to make your life easier (and reduce the size of your mod) by using the unified directory method for unit pictures. Simply add the two marked lines in the example underneath to your EDU entry and create those folders (unified) in the units and unit_info folders and place your pic in there.

    Code:
    ownership        england, slave, france
    era 0            england, france
    era 1            england, france
    era 2            england, france
    ;unit_info        13, 0, 1
    info_pic_dir     unified
    card_pic_dir     unified
    recruit_priority_offset    -12
    • All that is left are the recruitment entries in the export_descr_buildings (EDB) file which is an easy copy\paste operation. You will find those entries by searching for the type entry of your EDU entry, not the coded name entry (dictionary).


    A note about animations and mounts

    You may find that your battle model uses custom animations (see the the bottom part of the modelDB entry) and are left with two options:
    If your mod has no custom animations then simply copy the descr_skeleton file plus the mod's data\animation folder into your mod.
    Else replace the custom animation line with a suitable, already exiting line from your modelDB.

    If you transfer mounts and encounter a custom animation you will have to identify that entry in descr_mounts and copy it, if you do not have a descr_mounts file simply copy the whole file.
    if you don't mind cant you please make video about this cuz I try your tutorial but when I try to play the mod it keep ctd. I am newbie in modding expecially med 2 so maybe I do something wrong but I don't know how to found mistake mistake I make. I can create new unit from medieval 2 without problem but I get ctd when I try importing unit from different mod. if you don't mind please make video tutorial about this cuz I realy cant get what wrong with me ?

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
  •