Page 9 of 18 FirstFirst 123456789101112131415161718 LastLast
Results 161 to 180 of 344

Thread: Creating a World – Adding a new Faction

  1. #161
    Foederatus
    Join Date
    Nov 2010
    Location
    Here, which is in the middle of there and there
    Posts
    42

    Default Re: Creating a World – Adding a new Faction

    copied which ones from where?
    There is only an sd and xml file for battle, and only xml files for shared and strategy. I edited the shared and strategy files to add faction.

  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,121
    Blog Entries
    35

    Default Re: Creating a World – Adding a new Faction

    Did the SD files generate again? Meaning: do they have a newer date then the XML files?










  3. #163
    Foederatus
    Join Date
    Nov 2010
    Location
    Here, which is in the middle of there and there
    Posts
    42

    Default Re: Creating a World – Adding a new Faction

    nope, they all have the same date. And there are still no sd files for shared.sd and strategy.sd (they say .sd but are xml files). Im pretty certain I didnt delete the sd files, but they are in the oringal mod. So should I just copy and paste from the original to the new mod?
    Last edited by Mikhail; February 11, 2011 at 08:05 AM.

  4. #164
    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,121
    Blog Entries
    35

    Default Re: Creating a World – Adding a new Faction

    These XML files work the same as the TXT files in the data\text folder: once they are changed they should generate new STRING.BIN (TXT file) and SD files (XML file).
    Meaning, if you have changed a XML file you should be able to delete the SD counterpart which will then regenerate once the game starts. If this is not the case, then something went wrong, eg the <sprites count> or the <texture_pages count> on top has not been increased as required.










  5. #165
    Foederatus
    Join Date
    Nov 2010
    Location
    Here, which is in the middle of there and there
    Posts
    42

    Default Re: Creating a World – Adding a new Faction

    ah! thank you!! I forgot to change the numbers (cforgetting it started at 0)

    After I fixed that problem I started to add units from Broken Crescent mod to the faction I created in my mod. I keep getting this error however:
    Could not find soldier battle model for unit type 'armenian_light_spearmen'.
    I cant seem to find the files containing this info. and the tutorial says in im not interested in fighting battles just leave it.

  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,121
    Blog Entries
    35

    Default Re: Creating a World – Adding a new Faction

    Could not find soldier battle model for unit type 'armenian_light_spearmen'.
    The game is looking for certain battlemodel in the modeldb file. It is the 'soldier' entry in the EDU for that unit that needs be in the modeldb file. Example:

    Code:
    type             Dvor Cavalry
    dictionary       Dvor_Cavalry      ; Dvor Cavalry
    category         cavalry
    class            missile
    voice_type       Heavy
    banner faction   main_cavalry
    banner holy      crusade_cavalry
    soldier          Dvor_Cavalry, 32, 0, 1
    mount            eastern armoured horse
    mount_effect     elephant -4, camel -4










  7. #167
    Foederatus
    Join Date
    Nov 2010
    Location
    Here, which is in the middle of there and there
    Posts
    42

    Default Re: Creating a World – Adding a new Faction

    The battle_models.modeldb file wont open. Wont allow me to extract it or anything. How do I open it to edit it?

  8. #168
    irishron's Avatar Cura Palatii
    Join Date
    Feb 2005
    Location
    Cirith Ungol
    Posts
    47,023

    Default Re: Creating a World – Adding a new Faction

    Use Notepad++.

  9. #169
    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,121
    Blog Entries
    35

    Default Re: Creating a World – Adding a new Faction

    All you have to do, is to get the modeldb file that came with (for) the EDU and copy it it into the data\unit_models folder.










  10. #170
    Foederatus
    Join Date
    Nov 2010
    Location
    Here, which is in the middle of there and there
    Posts
    42

    Default Re: Creating a World – Adding a new Faction

    copy the Broken Crescent modeldb file into my mods data\unit_models folder? And if so, I dont delete the one already there right?

  11. #171
    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,121
    Blog Entries
    35

    Default Re: Creating a World – Adding a new Faction

    If your EDU is from Broken Crescent, then that's the one you need. Make a back up of the old one in case you need it later.










  12. #172
    Foederatus
    Join Date
    Nov 2010
    Location
    Here, which is in the middle of there and there
    Posts
    42

    Default Re: Creating a World – Adding a new Faction

    Well the EDU that I am using is from Stainless Steel, but I added a faction from Broken Crescent to it.
    So Im guessing I need to just DL Notepad++ and edit the modeldb file?

  13. #173

  14. #174
    Foederatus
    Join Date
    Nov 2010
    Location
    Here, which is in the middle of there and there
    Posts
    42

    Default Re: Creating a World – Adding a new Faction

    Downloaded Notepad++
    next question: What parts do I copy and past for the units? I cant tell where the info for one unit begins, and another ends. Im assuming its this:
    42 unit_sprites/normans_Mount_Pony_sprite.spr 0 0 0 1 0 0
    5 Horse
    8 fs_horse 0
    Where horse is the start of the new unit.
    Also, say I gave my new factions unit a pony for a mount. Do I have to add the faction to the pony list?

  15. #175

    Default Re: Creating a World – Adding a new Faction

    BMDB basics first understand them.

    Quote Originally Posted by Ishan View Post
    Although Dwaine nailed the possible best answer to you. I'll try again to explain.
    First thing is you need to understand the modeldb file that is the key file of the game.

    Lets take an example of armored swordsmen entry in the BMDB or modeldb file:-
    Code:
    17 armored_swordsmen
    The first line is the name of the unit and is the one that is written in the armor_ug line in the EDU. This name is 17 characters big (including the “_”). This number is shown before the name. This format is repeated throughout the file: first the length of the line, then the line itself. If the written number is different from the amount of characters in a line then the game will crash at start up. Using the modeldb checker in this case helps.

    Code:
    1 3  
    62 unit_models/_Units/EN_Pplate_Plate/armored_swordsmen_lod0.mesh 121  
    62 unit_models/_Units/EN_Pplate_Plate/armored_swordsmen_lod1.mesh 1225  
    62 unit_models/_Units/EN_Pplate_Plate/armored_swordsmen_lod2.mesh 6400
    The first line in the above code stats that a 1 character string is about to come. Things string (“3”) tells the game how many model lines there are to come. In this example there are 3 model lines. If we take a closer look at the first model line we see that it is 62 characters big, and that it points to a .mesh file. The number 121 represents the distance at which the model is last shown. The game takes the square-root of 121 (or whatever number there is) to calculate the distance. So here the distance in meters is 11 in game meters. Notice that the distance number is not counted with the 62 characters. When you zoom out in the game, it goes to the next model at a distance of 121 which continues to be shown till a distance of 1225, and so on. The reason for this is that the game, like many other games, uses a LoD system. LoD stands for “Level of Detail”: the lower the lod number (lod0) the more faces, or polygons, the model contain. The reason for this system is to optimise the performance. After a distance of 6400 the games does no longer show 3d models, but 2d representations called Sprites which are very light in comparison laying stress on your GPU.

    Code:
    2  
    7 england  
    74 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_england.texture  
    73 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_normal.texture  
    49 unit_sprites/england_Armored_Swordsmen_sprite.spr  
    5 slave  
    73 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_rebels.texture  
    73 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_normal.texture  
    47 unit_sprites/slave_Armored_Swordsmen_sprite.spr
    The first number tells us that now comes two faction entries for the unit’s main textures. The two factions are England and the slaves (rebels). Each of these faction names, as always, have a number in front of them with the length of the string. The texture entries consist of 3 lines:
    • The first line is the “diffuse map”, or simple the ordinary textures.
    • Next up is the normal map.
    • Lastly is the link to the sprites.

    Code:
    2  
    7 england  
    60 unit_models/AttachmentSets/Final Heater_england_diff.texture  
    60 unit_models/AttachmentSets/Final Heater_england_norm.texture 0   
    5 slave  
    58 unit_models/AttachmentSets/Final Heater_slave_diff.texture  
    58 unit_models/AttachmentSets/Final Heater_slave_norm.texture 0
    The next entries concern the attachmentsets. These are textures used mainly for weapons and shields. The lines are built up pretty much the same way as the main texture entries, with a diffuse and a normal map.
    Code:
    1  
    4 None  
    19 MTW2_Slow_Swordsman 0   
    2  
    18 MTW2_Sword_Primary  
    14 fs_test_shield 0  
    16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
    These are the animations used by the unit. They are probably the hardest part of the ModelDB to read. The “4 none” states that the unit doesn’t now use a mount. Next up it says that he uses the slow swordsman animationset and the “fs_test_shield” line says that he uses a shield animation for his off hand.


    Now you are interested in changing textures of this unit so see the red and blue highlighted part red part is the texture faction wise for the figure of the unit while blue about attachments that is sword, shield etc etc.
    So you have to edit those textures types to make a difference. Also you will find that this file is used by many units so if you change the texture it will affect say 5-6 units. To skip this from happening you will save the texture with a different name and then put the info in the modeldb, how?
    Say you changed
    Code:
    74 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_england.texture
    After that rename the file to something else like "mtw2_EN_Pplate_england.texture" to "mtw2_TWC_Pplate_england.texture"
    Now you can see i increased the characters by one and the file name is changed so put them back and increase the count by 1.
    Code:
    75 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_TWC_Pplate_england.texture
    So that's the max i can tell you and now co-relate my post with dwaine's post and it should be crystal clear that is every part about it.
    And if you still don't get it then let me go to Sahara desert first and do this

  16. #176
    Foederatus
    Join Date
    Nov 2010
    Location
    Here, which is in the middle of there and there
    Posts
    42

    Default Re: Creating a World – Adding a new Faction

    hmmm, well I tested this out with a unit, but it still tells me in the log:
    10:48:26.015 [script.err] [error] Script Error in mods/Bare_Geomod/data/export_descr_unit.txt, at line 1823, column 1
    Could not find soldier battle model for unit type 'armenian_nakharar'.
    any suggestions? In the mod I am copying from all the factions are listed under the armenian_nakharar soldier model info. Do I have to add factions from the mod I am editing into the list also?

  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,121
    Blog Entries
    35

    Default Re: Creating a World – Adding a new Faction

    This error means that the model (armenian_nakharar) is not present in the data\unit_models\battle_models.modeldb file (short form = modelDB).

    Or you have forgotten to increase the modelcount number on top of the modeldb file after adding that model:

    22 serialization::archive 3 0 0 0 0 868 0 0
    Last edited by Gigantus; February 20, 2011 at 10:15 AM.










  18. #178

    Default Re: Creating a World – Adding a new Faction

    well, i just decieded to add a second new faction, serbia, and i got this error: "Expected start date of campaign or battle" in my trace log

    EDIT: Solved it,there were a few typing mistakes in the unlockable factions list in descr_start.txt, but i got another one

    the characters in faction in descr_start.txt are these:

    Spoiler Alert, click show to read: 
    character Klaudio Lazarevic, named character, male, leader, age 42, x 238, y 139
    traits Factionleader 1 , GoodCommander 2 , Energetic 1 , PublicFaith 2 , StrategyChivalry 4 , ReligionStarter 1
    ancillaries apothecary
    army
    unit NE Bodyguard exp 1 armour 0 weapon_lvl 0
    unit EE Spear Militia exp 0 armour 0 weapon_lvl 0
    unit EE Spear Militia exp 0 armour 0 weapon_lvl 0
    unit S Peasant Archers exp 0 armour 0 weapon_lvl 0
    unit S Peasant Archers exp 0 armour 0 weapon_lvl 0

    character Kristijan Lazarevic, named character, male, heir age 22, x 183, y 109
    traits LoyaltyStarter 1 , BattleChivalry 3 , GoodCommander 1 , ReligionStarter 1
    army
    unit NE Bodyguard exp 1 armour 0 weapon_lvl 0
    unit EE Spear Militia exp 0 armour 0 weapon_lvl 0
    unit EE Spear Militia exp 0 armour 0 weapon_lvl 0
    unit EE Spear Militia exp 0 armour 0 weapon_lvl 0


    character Agata, princess, female, age 20, x 237, y 139
    traits IAmPrincess 1 , NaturalPrincess 2 , GoodPrincess 1

    character_record Anastasija, female, age 40, alive, never_a_leader
    character_record Branimira, female, age 32, alive, never_a_leader
    character_record Danijel, male, age 4, alive, never_a_leader

    relative Klaudio Lazarevic, Anastasija, Kristijan Lazarevic, end
    relative Kristijan Lazarevic, Branimira, Danijel, end



    and i got this errors:


    Spoiler Alert, click show to read: 
    23:04:29.062 [script.err] [error] Script Error in mods/expanded/data/world/maps/campaign/imperial_campaign/descr_strat.txt, at line 2061, column 13
    couldn't find Klaudio Lazarevic's character_record
    23:04:29.062 [script.err] [error] Script Error in mods/expanded/data/world/maps/campaign/imperial_campaign/descr_strat.txt, at line 2062, column 13
    couldn't find Kristijan Lazarevic's character_record
    23:04:29.062 [script.err] [error] Script Error in mods/expanded/data/world/maps/campaign/imperial_campaign/descr_strat.txt, at line 2065, column 1
    The character record is set as faction heir but is not in the family tree.
    23:04:29.062 [script.err] [error] Script Error in mods/expanded/data/world/maps/campaign/imperial_campaign/descr_strat.txt, at line 2065, column 1
    The character record Agata is neither married, nor has a father. This could mess up the family tree. She needs to be defined as a relative
    23:04:29.063 [script.err] [error] Script Error in mods/expanded/data/world/maps/campaign/imperial_campaign/descr_strat.txt, at line 2065, column 1
    The character record Anastasija is neither married, nor has a father and will be ommited from the game. She needs to be defined as a relative
    23:04:29.063 [script.err] [error] Script Error in mods/expanded/data/world/maps/campaign/imperial_campaign/descr_strat.txt, at line 2065, column 1
    The child character record Danijel has no father and will be ommited from the game. THey need to be defined as a relative
    23:04:29.063 [script.err] [error] Script Error in mods/expanded/data/world/maps/campaign/imperial_campaign/descr_strat.txt, at line 2065, column 1
    The character record Branimira is neither married, nor has a father and will be ommited from the game. She needs to be defined as a relative
    Last edited by removeduser_34528374213; March 18, 2011 at 04:10 PM.

  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,121
    Blog Entries
    35

    Default Re: Creating a World – Adding a new Faction

    Your family tree errors are caused by a domino effect. It appears you gave names that are not defined in data\descr_names and\or data\text\names. 'Relative' lines dependent on those entries will then be shown as errors too. Fix the two errors underneath and the rest should solve itself.

    couldn't find Klaudio Lazarevic's character_record
    couldn't find Kristijan Lazarevic's character_record










  20. #180

    Default Re: Creating a World – Adding a new Faction

    lol, iforgot to add the character names in names.txt and descr_names_lookup.txt, i added only the surnames,bynames and women names. this solved the problem

    now i got some wierd errors


    13:10:09.364 [script.err] [error] Script Error in mods/expanded/data/world/maps/campaign/imperial_campaign/descr_strat.txt, at line 2063, column 1

    The character record Agata is neither married, nor has a father. This could mess up the family tree. She needs to be defined as a relative
    who's agata???

    the line 2063:faction moors, balanced smith

    and another error:

    13:10:28.376 [data.invalid] [error] Insufficient video memory to load requested texture set.

    fo the insufficient video memory error i think the problem is the cas file, becouse i havent created any cas file, becouse i already used the carthege one for romania and i don't have another one for serbia... i tried to use it for both factions, but still same error

    EDIT: the insufficient video memory error solved and the mod works.

    the error was caused becouse the files in models_start/textures were .tga.dds, that means they were dds not tga, .tga was part of the name, so i converted them to tga and now it works perfectly

    i cloned the .cas file and i changed carthage to xxserbia (8 letters each) and i opened it with notepad and i changed the name of the associated # tga.

    unfortunatley, i still got the agata error and i dont have nay agata in this faction
    Last edited by removeduser_34528374213; March 19, 2011 at 07:09 AM.

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
  •