Results 1 to 11 of 11

Thread: Modding Pike Units - A Question

  1. #1

    Default Modding Pike Units - A Question

    I've got a question about editing pike units in EBII. I want to change all of the pike units in the game to fight with the 'short_pike' as the Illyrian pikemen do (in part because of a personal theory based on a close friend's reports about the recent excavations of the royal tombs at Vergina). I originally just tried changing 'long_pike' to 'short_pike' in export_descr_unit.txt but that didn't have any result when I tested it in a custom battle. Is there some other trick to it, or do I need to do a lot more work with the meshes and all that?

    Thanks in advance.
    . .

  2. #2
    Rafkos's Avatar Senator
    Join Date
    Sep 2013
    Location
    Poland, Dolny Śląsk (Lower Silesia)
    Posts
    1,011

    Default Re: Modding Pike Units - A Question

    I believe weapons are attached directly to unit model, so you will have to download Milkshape 3D, remove old weapon, and import new one from Illyrian pikemen. Also adjust joints if needed, but I think it should keep them when importing.

  3. #3

    Default Re: Modding Pike Units - A Question

    Yep, as Rafkos says, you need to actually change the unit model itself, not merely the underlying stats in the EDU.

  4. #4

    Default Re: Modding Pike Units - A Question

    Quote Originally Posted by Rafkos View Post
    I believe weapons are attached directly to unit model, so you will have to download Milkshape 3D, remove old weapon, and import new one from Illyrian pikemen. Also adjust joints if needed, but I think it should keep them when importing.
    Quote Originally Posted by QuintusSertorius View Post
    Yep, as Rafkos says, you need to actually change the unit model itself, not merely the underlying stats in the EDU.
    Ah. I see. Thank you both. Can anyone point me to a tutorial? I don't know how to do any of this but I'm semi-determined and might be able to figure out how to do it with some help
    . .

  5. #5
    Rafkos's Avatar Senator
    Join Date
    Sep 2013
    Location
    Poland, Dolny Śląsk (Lower Silesia)
    Posts
    1,011

    Default Re: Modding Pike Units - A Question

    Looks like there's a tutorial for adding own weapons to models It may look complicated when you first look at it, but it's not that scary tbh.
    http://www.twcenter.net/forums/showt...default-figure

  6. #6

    Default Re: Modding Pike Units - A Question

    Quote Originally Posted by Rafkos View Post
    Looks like there's a tutorial for adding own weapons to models It may look complicated when you first look at it, but it's not that scary tbh.
    http://www.twcenter.net/forums/showt...default-figure
    Well... there goes my Saturday. I've followed through to step 4 (just borrowing the weapon from the illyrian pikemen and merging it in), but I'm stuck at this part... not being sure how to attach the weapon to the rest of the model. unfortunately that guide isn't quite as clear as how I should do this. if only they'd made a video...

    Here is a shot of my progress and a picture of the results so far in game
    Spoiler Alert, click show to read: 
    Attachment 333197Attachment 333195
    edit: the pictures show two different units but it had the same effect on all of them
    Last edited by Aleksander the Average; December 05, 2015 at 04:04 PM.
    . .

  7. #7
    Rafkos's Avatar Senator
    Join Date
    Sep 2013
    Location
    Poland, Dolny Śląsk (Lower Silesia)
    Posts
    1,011

    Default Re: Modding Pike Units - A Question

    Mesh weighting got removed for some reason, that means all the joints and other parts of the skeleton are not assigned to parts of the body. The best possible way to save weighting and add new weapon is to:
    - open a unit model (the one with desired weapon)
    - select all the parts in Groups tab, except your weapon.
    - delete all selected polygons so there's only your weapon left
    - go to Joints tab and delete everything in there so you will have a clean weapon without any weighting or joints.
    - save as weapon.ms3d
    - open up the unit in which you want to change the weapon
    - delete old weapon in Groups tab
    - go to File > Merge and select weapon.ms3d
    - select your weapon ONLY and go to Joints tab and assign it to one of the listed joints (I don't know which one, probably right hand, you will have to try). To assign it simply click on a joint from the list and below you have Assign button.
    I hope this works

  8. #8

    Default Re: Modding Pike Units - A Question

    Quote Originally Posted by Rafkos View Post
    Mesh weighting got removed for some reason, that means all the joints and other parts of the skeleton are not assigned to parts of the body. The best possible way to save weighting and add new weapon is to:
    - open a unit model (the one with desired weapon)
    - select all the parts in Groups tab, except your weapon.
    - delete all selected polygons so there's only your weapon left
    - go to Joints tab and delete everything in there so you will have a clean weapon without any weighting or joints.
    - save as weapon.ms3d
    - open up the unit in which you want to change the weapon
    - delete old weapon in Groups tab
    - go to File > Merge and select weapon.ms3d
    - select your weapon ONLY and go to Joints tab and assign it to one of the listed joints (I don't know which one, probably right hand, you will have to try). To assign it simply click on a joint from the list and below you have Assign button.
    I hope this works
    Alright... I went through these steps and made sure only to have the new short pikes selected when attaching to the right hand; here's the result.
    Spoiler Alert, click show to read: 
    Attachment 333199 Attachment 333200
    I guess it's a little better... maybe...? am I missing something else? I'll keep trying with a few different joints.

    p.s. here's my export_descr_unit.txt entry.
    Spoiler Alert, click show to read: 
    ; COMMENTS Phalangitai (Hellenistic Phalanx) / Unit ID 321 / Start exp: 0 / Refr rate: 0,044 / Pool cap: 6
    type hellenistic infantry phalangitai
    dictionary hellenistic_infantry_phalangitai
    category infantry
    class spearmen
    voice_type Heavy
    accent East_Greek
    banner faction main_spear
    banner holy crusade
    soldier Phalangitai, 96, 0, 1.7
    officer officer_hellenic_standardbearer
    attributes sea_faring, hide_forest, frighten_mounted, can_withdraw
    move_speed_mod 0.7
    formation 0.93, 1.13, 1.86, 2.03, 10, square, phalanx
    stat_health 1, 3
    stat_pri 3, 0, no, 0, 0, melee, melee_blade, piercing, spear, 75, 1
    stat_pri_attr spear, spear_bonus_12, short_pike
    stat_sec 0, 0, no, 0, 0, no, melee_simple, blunt, none, 0, 1
    stat_sec_attr no
    stat_pri_armour 7, 3, 4, metal
    stat_sec_armour 0, 0, flesh
    stat_heat 4
    stat_ground -3, -2, -5, -5
    stat_mental 5, low, highly_trained
    stat_charge_dist 0
    stat_fire_delay 0
    stat_food 60, 300
    stat_cost 1, 2100, 525, 170, 724, 2100, 6, 525
    stat_stl 9
    armour_ug_levels 0
    armour_ug_models Phalangitai
    ownership f_rome, f_carthage, f_makedonia, f_epeiros, f_kh, f_seleukid, f_ptolemaioi, f_baktria, f_hayasdan, f_pontos, f_parthia, f_aedui, f_arverni, f_casse, f_lusotannan, f_sweboz, f_getai, f_saba, f_saka, f_sauromatae, f_numidia, f_pergamon, f_gandhara, f_lugia, f_bosporan, f_arevaci, f_boii, f_nabatu, slave
    era 0 f_makedonia, f_epeiros, f_seleukid, f_ptolemaioi, f_baktria, f_pontos, f_pergamon
    era 1 f_makedonia, f_epeiros, f_seleukid, f_ptolemaioi, f_baktria, f_pontos, f_pergamon
    era 2 f_rome, f_carthage, f_makedonia, f_epeiros, f_kh, f_seleukid, f_ptolemaioi, f_baktria, f_hayasdan, f_pontos, f_parthia, f_aedui, f_arverni, f_casse, f_lusotannan, f_sweboz, f_getai, f_saba, f_saka, f_sauromatae, f_numidia, f_pergamon, f_gandhara, f_lugia, f_bosporan, f_arevaci, f_boii, f_nabatu
    info_pic_dir f_all
    card_pic_dir f_all
    recruit_priority_offset 90


    And again thank you very much for all this help.
    Last edited by Aleksander the Average; December 06, 2015 at 01:11 PM.
    . .

  9. #9
    Rafkos's Avatar Senator
    Join Date
    Sep 2013
    Location
    Poland, Dolny Śląsk (Lower Silesia)
    Posts
    1,011

    Default Re: Modding Pike Units - A Question

    Everything seems to look just fine, I'm not sure why it happens. This is again related to bones, try to delete the weapon only (on the file you already made) and see if there are no issues.
    @edit
    Maybe you did assign whole unit to this bone? Note that Milkshape selects all polygons by default and you have to go to Edit > Select None and then select the pike and assign it.

  10. #10

    Default Re: Modding Pike Units - A Question

    Oh well. Not sure if i'm cut out for anything more than modifying the text files but i'll keep at it. I'll post here if I figure it out soon.
    . .

  11. #11

    Default Re: Modding Pike Units - A Question

    Quote Originally Posted by Aleksander the Average View Post
    Oh well. Not sure if i'm cut out for anything more than modifying the text files but i'll keep at it. I'll post here if I figure it out soon.
    There's really no need to do much work on that simple thing:
    1. simply import the .mesh file(either converted .ms3d format or directly if you're using johnwhile's import / export scripts for 3ds Max 2010 and higher) into the program, then select the vertices of the front half of the pike and move them backward and that's it.
    2. export the model out of the program back into the game and check, if it works.
    3. the only small issue here is that the pike shaft texture will look squeezed (actually, not a big deal),
    4. but if you want to fix it, import the model back into program and edit the UV's of the pike i.e. in UV editor window move the vertices of one end of the pike's uv's closer to the other end.
    5. and lastly do not forget to do the same thing with _lod1.mesh and _lod2.mesh versions of model.

Posting Permissions

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