Results 1 to 8 of 8

Thread: Adding an existing unit to another faction

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    magraev's Avatar Biarchus
    Join Date
    Oct 2004
    Location
    Denmark
    Posts
    616

    Icon5 Adding an existing unit to another faction

    This question must have been asked before, but all I can find are links to topics that are no longer active.

    So I need help from you guys.

    I'm playing Lusted's TE, but advice from vanilla would probably work for TE too. I would like to add a unit from the scythian roster to the bactrian one. I would like bactria to get an axeman unit - the story being that they are mercenaries from the steppes, used to assault walls and on the flanks of the phalanx.

    So what do I do? I figure I should make a new unit, with a new name, copying the scythian one, rather than just making the scythian one available to bactria also. I might add a greek officer, to show that these barbarians are under civilized control. I'll probably also make them more expensive, and maybe give them a point or two of armor. If it's a lot easier to just make the existing scythian unit available I'll do that.

    I know I have to change descr_strat_buildings, but I have plenty experience with that so no worries there.

    What I do worry about, is how I go about making sure that I get the right icons and descriptions for the axemen? And what else do I have to do.

  2. #2

    Default Re: Adding an existing unit to another faction

    Using vanilla RTW scythian axeman as example:


    export_descr_unit: Copy the scythian unit's entry, rename it (just the first line) and change the owner from scythia to baktria (whatever internal name baktria uses in TE)

    Spoiler Alert, click show to read: 
    Code:
    type             warband axe scythian baktria
    dictionary       warband_axe_scythian      ; Axemen
    category         infantry
    class            heavy
    voice_type       Light_1
    soldier          warband_axe_scythia, 40, 0, 1.2
    officer          barb_standard
    officer          greek_standard
    attributes       sea_faring, hide_improved_forest, warcry
    formation        1.2, 1.2, 2.4, 2.4, 4, square
    stat_health      1, 0
    stat_pri         11, 5, no, 0, 0, melee, blade, piercing, axe, 25 ,1
    stat_pri_attr    no
    stat_sec         0, 0, no, 0, 0, no, no, no, none, 25 ,1
    stat_sec_attr    no
    stat_pri_armour  5, 4, 2, leather
    stat_sec_armour  0, 0, flesh
    stat_heat        2
    stat_ground      2, -2, 3, 2
    stat_mental      8, impetuous, untrained
    stat_charge_dist 40
    stat_fire_delay  0
    stat_food        60, 300
    stat_cost        1, 520, 180, 50, 70, 450
    ownership        baktria ; not really baktria, replace with baktria's internal name in TE


    descr_model_battle: Add copies of the existing texture and sprite lines, but change the new lines' faction name with baktria's internal name, both for the soldier model AND the model of the officer you added.
    Spoiler Alert, click show to read: 
    Code:
    type                warband_axe_scythia
    skeleton            fs_swordsman
    indiv_range            40
    texture                scythia, data/models_unit/textures/unit_barb_warband_scythia_.tga
    texture                baktria, data/models_unit/textures/unit_barb_warband_scythia_.tga
    model_flexi_m        data/models_unit/unit_barb_warband_scythia_axe_high.cas, 8
    model_flexi_m        data/models_unit/unit_barb_warband_scythia_axe_med.cas, 15
    model_flexi            data/models_unit/unit_barb_warband_scythia_axe_low.cas, 30
    model_flexi            data/models_unit/unit_barb_warband_scythia_axe_lowest.cas, max
    model_sprite        scythia, 60.0, data/sprites/scythia_warband_axe_scythia_sprite.spr
    model_sprite        baktria, 60.0, data/sprites/scythia_warband_axe_scythia_sprite.spr
    model_tri            400, 0.5f, 0.5f, 0.5f
    Code:
    type                greek_standard
    skeleton            fs_standard_bearer
    indiv_range            40
    texture                macedon, data/models_unit/textures/officer_greek_standard_macedon.tga
    texture                seleucid, data/models_unit/textures/officer_greek_standard_seleucid.tga
    texture                greek_cities, data/models_unit/textures/officer_greek_standard_greece.tga
    texture                thrace, data/models_unit/textures/officer_greek_standard_thrace.tga
    texture                baktria, data/models_unit/textures/officer_greek_standard_thrace.tga
    model_flexi_m        data/models_unit/officer_greek_standard_400.cas, 8
    model_flexi_m        data/models_unit/officer_greek_standard_300.cas, 15
    model_flexi            data/models_unit/officer_greek_standard_200.cas, 30
    model_flexi            data/models_unit/officer_greek_standard_100.cas, 40
    model_flexi            data/models_unit/officer_greek_standard_70.cas, max
    model_sprite        60.0, data/sprites/roman_legionary_cohort_ii_sprite.spr
    model_sprite        seleucid, 60.0, data/sprites/seleucid_roman_legionary_cohort_ii_sprite.spr
    model_sprite        macedon, 60.0, data/sprites/romans_senate_roman_legionary_cohort_ii_sprite.spr
    model_sprite        greek_cities, 60.0, data/sprites/romans_scipii_roman_legionary_cohort_ii_sprite.spr
    model_sprite        thrace, 60.0, data/sprites/romans_brutii_roman_legionary_cohort_ii_sprite.spr
    model_sprite       baktria, 60.0, data/sprites/romans_brutii_roman_legionary_cohort_ii_sprite.spr
    model_tri            400, 0.5f, 0.5f, 0.5


    If you keep the dictionary_tag of the EDU entry the same, then the unit description will remain the same. If you change it, you will have to add corresponding entries to text/export_units.txt.

    You will then have to copy the unit's UI cards from data/UI/unit_info/scythia and data/UI/units/scythia into data/UI/unit_info/baktria and data/UI/units/baktria respectively (where baktria = baktria's actual internal name in TE)

  3. #3
    magraev's Avatar Biarchus
    Join Date
    Oct 2004
    Location
    Denmark
    Posts
    616

    Default Re: Adding an existing unit to another faction

    Thank you very much!

    I'll go home and try this as soon as possible.

    In TE Bactria already has a officer-model, so I don't assume I have to change anything there - just use the same line as the other unit with an officer uses.

    I can understand that it would be easier to keep the same description. I think I'll go with that for now, and maybe tinker with that later.

    PS: I've just read your excellent guide to the EDU - thanks for that too

    /M

  4. #4
    Kylan271's Avatar Domesticus
    Join Date
    Jul 2007
    Location
    Vietnam
    Posts
    2,232

    Default Re: Adding an existing unit to another faction

    Lol I am surprised I forgot the Scythian unit,as trying to find axeman to replace Alexander bactrian models I was using in Baktria campaign. Thanks for this pointer.


  5. #5
    magraev's Avatar Biarchus
    Join Date
    Oct 2004
    Location
    Denmark
    Posts
    616

    Default Re: Adding an existing unit to another faction

    heh no problem with the pointer.

    I did all the above, but unfortunately in TE there are no unit descriptions at data/ui/unit_info or data/ui/units (I even did a search - nowhere in the data library). They must be somewhere - but I can't figure it out atm. Maybe I should ask at the TE forums?

    EDIT: I just had a thought - do I have to unpack something? That must be it! I wonder if that is possible with a mod without screwing everything up?
    Last edited by magraev; September 01, 2009 at 12:49 PM. Reason: An inspiration

  6. #6

    Default Re: Adding an existing unit to another faction

    The descriptions are in text/export_units.txt

    In UI/unit_info and UI/units are the large and small unit cards respectively. If you can't find them there, then the UI folder is packed and you need to unpack it to edit the files (data/packs).

  7. #7
    magraev's Avatar Biarchus
    Join Date
    Oct 2004
    Location
    Denmark
    Posts
    616

    Default Re: Adding an existing unit to another faction

    I'm working on getting the data files unpacked now. A bit of a bother for such a small change, but I've become stubborn now! I'll let you know if/when I get it to work.

    Maybe I'll just wait for Kylan271's project to be finished and install that instead...

    Update: I did get it to work, and scythian axemen are now fighting for Bactria! A bit of a bother though. All TE-files are kept in a patch_1.pak, so I had to rename one of the other pak-files, and then make a copy of patch_1 and rename it to on of the other original pak-names (otherwise it wouldn't unpack). After unpacking I had to delete the renamed copy, change the name of the original pak back and then manually make the directories to put the two files in. It works just fine though.

    I'm impressed at you guys helpfulness - thanks again.
    Last edited by magraev; September 03, 2009 at 01:30 AM. Reason: Final status

  8. #8

    Default Re: Adding an existing unit to another faction

    The good news magraev is unpacking is a one-time thing. Once you've unpacked everything, you are free to go into Rome's files whenever you want to change something.
    IBRR Fanatic

Posting Permissions

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