Page 6 of 34 FirstFirst 1234567891011121314151631 ... LastLast
Results 101 to 120 of 689

Thread: How to add a new unit into game

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Moon's Avatar Centenarius
    Join Date
    Oct 2008
    Location
    The dark side
    Posts
    878

    Default Re: How to add a new unit into game

    I can see a couple of potential problems which could or will produce a crash.
    Problem 1
    I believe there is an error in your EDU, use capitals for norse huskarl and no underscore is required in the type line, example below.

    type Norse Huskarl

    Problem 2
    You have given slaves and mercs a Danish_merc_diff.texture, is there such a texture in your mod? or in the vanilla game?. If not, you could use the final danish_slave_diff.texture and the final danish_slave_norm.texture as in the example below.

    7 denmark
    60 unit_models/AttachmentSets/Final Danish_denmark_diff.texture
    60 unit_models/AttachmentSets/Final Danish_denmark_norm.texture 0
    5 slave
    58 unit_models/AttachmentSets/Final Danish_slave_diff.texture
    58 unit_models/AttachmentSets/Final Danish_slave_norm.texture 0
    4 merc
    58 unit_models/AttachmentSets/Final Danish_slave_diff.texture
    58 unit_models/AttachmentSets/Final Danish_slave_norm.texture 0

    I also tested the battle_models.modeldb entries which didn't crash on me so that leads me to suspect a 22 serialization::archive problem, the answer to that is put the unit in the middle of the file, if it works then the fault is probably with the numbers at the top of the file, if it doesn't, then there is something else wrong that hasn't been spotted as yet. Feel free to give an update of your progress.

  2. #2
    Heathen Storm's Avatar Where's my axe?
    Join Date
    Jun 2010
    Location
    Vinland
    Posts
    2,895

    Default Re: How to add a new unit into game

    Quote Originally Posted by Cannonfodder View Post
    I also tested the battle_models.modeldb entries which didn't crash on me so that leads me to suspect a 22 serialization::archive problem, the answer to that is put the unit in the middle of the file, if it works then the fault is probably with the numbers at the top of the file, if it doesn't, then there is something else wrong that hasn't been spotted as yet. Feel free to give an update of your progress.
    AHAHAHAHAHA I GOT IT TO WORK! Moving it actually made it work. WOOHOO! Thank you thank you thank you! Well, thank you all for helping! Now on to editing

    Proud mod leader, modeller and public relations officer of Heiđinn Veđr: Total War


  3. #3
    Moon's Avatar Centenarius
    Join Date
    Oct 2008
    Location
    The dark side
    Posts
    878

    Default Re: How to add a new unit into game

    Well good for you, the only thing left to fix is the 22 serialization::archive problem in the battlemodels file. As i'm a stickler for detail, I would make a copy of the file first, then cut out the unit you put in the middle and paste it at the bottom of the file, if it crashes you will have to keep increasing the serialization number untill you can actually fight a custom battle with them. It all sounds a bit of a chore to do but you will eventually hit on the magic number, you will also be able to add other units at the bottom of the file with the utmost confidence.

  4. #4

    Default Re: How to add a new unit into game

    I was hoping some one here could help me. I'm trying to add this unit but when I put this edu entry in the game fails to load. The game loads fine with the modelsdb entry but the game fails to load unless I remove this entry from the edu. Could one of you take a look and see if you can find something wrong with it?

  5. #5
    irishron's Avatar Cura Palatii
    Moderator Emeritus

    Join Date
    Feb 2005
    Location
    Cirith Ungol
    Posts
    47,023

    Default Re: How to add a new unit into game

    The EDU is has amax limit of 500 entries. If you go to 501, it will ctd with no log error. Many mods have already hit the limit.

  6. #6

    Default Re: How to add a new unit into game

    I don't think that's it because I over wrote the "hunters" unit with this one.

  7. #7
    Moon's Avatar Centenarius
    Join Date
    Oct 2008
    Location
    The dark side
    Posts
    878

    Default Re: How to add a new unit into game

    Remove this red line and it should/might work.

    stat_stl 15

    Edit> Change these entries so it looks like this, make sure there are no extra spaces anywhere.

    armour_ug_levels 1, 2
    armour_ug_models Byzantine_Urban_Militia, Byzantine_Urban_Militia
    Last edited by Moon; July 12, 2010 at 10:53 AM.

  8. #8

    Default Re: How to add a new unit into game

    Deleted the red line, and copy pasted the armour lines to the entry, still no luck. This is frustrating, I had the unit in game and working a week or two ago and I messed up the game trying to add a different one, now that one is working but this one won't. *exasperated sigh* Gonna try rebuilding the unit entry from scratch maybe i messed something up with all the copying and pasting?

  9. #9
    Moon's Avatar Centenarius
    Join Date
    Oct 2008
    Location
    The dark side
    Posts
    878

    Default Re: How to add a new unit into game

    What does the system log say.

  10. #10

    Default Re: How to add a new unit into game

    is this the file you mean?

    I wasn't sure since it mentions all the broken crescent stuff and I haven't played that one for a while.
    Last edited by Iforgot; July 12, 2010 at 01:26 PM. Reason: edit

  11. #11
    Moon's Avatar Centenarius
    Join Date
    Oct 2008
    Location
    The dark side
    Posts
    878

    Default Re: How to add a new unit into game

    If you aren't playing Broken Crescent it's the wrong one. Look in the main Medieval II folder where the medieval2.preference.cfg is, it should be at the bottom or in the LOGS folder.

  12. #12

    Default Re: How to add a new unit into game

    ok this must be it. i added what the log said below the edu entry, I'm gonna dig for that model file even though i don't know when it would have gotten moved or deleted

  13. #13
    Moon's Avatar Centenarius
    Join Date
    Oct 2008
    Location
    The dark side
    Posts
    878

    Default Re: How to add a new unit into game

    The Battle_models file needs increasing, it's highlighted in red, you are adding one unit so in my example it would be 714.

    22 serialization::archive 3 0 0 0 0 713 0 0

  14. #14

    Default Re: How to add a new unit into game

    or wait? would that mean that the modelsdb has some problem? perhaps the number at the top isn't right and its cutting off my entry at the bottom?

  15. #15

    Default Re: How to add a new unit into game

    ok i'll add another number, though i could swear that i did that initially

  16. #16

    Default Re: How to add a new unit into game

    From the log it's clear that this unit type in EDU doesn't have a model entry in BMDB file.

    The problem is the serialization number error.
    Either fix the right value or place the unit model entry in the middle of BMDB file somewhere.

  17. #17

    Default Re: How to add a new unit into game

    It works! Wow now I feel dumb that it was a small thing like that! I really could have sworn I already increased the entry number, Thanks big time for the help and patience Moon and Ishan
    Last edited by Iforgot; July 12, 2010 at 02:11 PM.

  18. #18
    Moon's Avatar Centenarius
    Join Date
    Oct 2008
    Location
    The dark side
    Posts
    878

    Default Re: How to add a new unit into game

    We got there eventually, well done.

  19. #19

    Default Re: How to add a new unit into game

    Quote Originally Posted by Iforgot View Post
    It works! Wow now I feel dumb that it was a small thing like that! I really could have sworn I already increased the entry number, Thanks big time for the help and patience Moon.
    Well the username suits u.
    Anyways i'm glad it worked out for u bro.

  20. #20

    Default Re: How to add a new unit into game

    On to the EDB! at least that one is a little easier to work with! A little off topic but any ideas or help would be great... I had also been trying to change the elephant arquebus's into elephant archers but i could never get rid of the musket firing noise, any thoughts?
    and thanks again
    Last edited by Iforgot; July 12, 2010 at 02:21 PM.

Posting Permissions

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