Results 1 to 11 of 11

Thread: Adding a new unit

  1. #1
    Evil Overlord Member Kaidonni's Avatar
    Join Date
    Dec 2005
    Location
    If I told you, I'd have to kill you. England.
    Posts
    340

    Default Adding a new unit

    Okay, as some of you may know, I've been modding the game so I can play as the ERE Rebels. With a great deal of help from Maley Jacek, that has been a roaring success. Now, however, I'm intending to run it alongside meqon's game enhancement mod (the one that cuts all recruitment times to 0, cuts recruitment and upkeep costs, and cuts out Peasants). I'm finding it most, well, unappealing that I don't have a unit that can do a decent garrison duty in a settlement, so I was wondering if someone could help me create a Town Guard unit for the WRE, ERE, WRE Rebels and ERE Rebels, a unit that can't throw any pila, and looks like the Limitanei, but also (on large unit scale) has 120 men in the unit. Doesn't need to be very good against other units, just needs to be decent at keeping public order. Thanks.
    I believe in a society without rules, laws and regulations. A society where there are only ideas - strict ideas that must be followed to by the letter - and any failure to comply is punishable by death. This would be no dictatorship or police state, no one would be living in terror. It would merely be a 'reassessment of one's preferences,' people living in 'not-so-optimistic security.' So, welcome, those who are 'longing to be blindly obedient and loyal, unbeknownst to them.'

  2. #2
    nudge nudge, wink wink Member GrimSta's Avatar
    Join Date
    Oct 2005
    Posts
    126

    Default Re: Adding a new unit

    Copy this into your export_descr_unit

    type town guard
    dictionary town_guard ; Limitanei
    category infantry
    class spearmen
    voice_type Light_1
    soldier limitanei, 60, 0, 1
    attributes sea_faring, hide_forest, can_sap
    formation 1, 2, 2, 3, 5, square
    stat_health 1, 0
    stat_pri 3, 1, no, 0, 0, melee, simple, piercing, spear, 25 ,0.73
    stat_pri_attr prec, thrown
    stat_sec 0, 0, no, 0, 0, no, no, no, none, 25 ,0.73
    stat_sec_attr light_spear, spear_bonus_4
    stat_pri_armour 6, 5, 6, leather
    stat_sec_armour 0, 2, flesh
    stat_heat 4
    stat_ground 2, 0, 3, 0
    stat_mental 3, normal, trained
    stat_charge_dist 30
    stat_fire_delay 0
    stat_food 60, 300
    stat_cost 0, 125, 60, 30, 50, 230
    ownership slave, empire_west, empire_east, empire_west_rebels, empire_east_rebels
    and then copy this into your descr_model_battle

    type town_guard
    ;--------------------------------------
    skeleton fs_spearman
    indiv_range 40
    texture empire_west, bi/data/models_unit/textures/BI_unit_limitanei_west_empire.tga
    texture empire_east, bi/data/models_unit/textures/BI_unit_limitanei_empire_east.tga
    texture empire_west_rebels, bi/data/models_unit/textures/BI_unit_limitanei_empire_west_rebels.TGA
    texture empire_east_rebels, bi/data/models_unit/textures/BI_unit_limitanei_empire_east_rebels.tga
    texture slave, bi/data/models_unit/textures/BI_unit_limitanei_slave.tga
    model_flexi bi/data/models_unit/BI_unit_limitanei_lod1.cas, 15
    model_flexi bi/data/models_unit/BI_unit_limitanei_lod2.cas, 30
    model_flexi bi/data/models_unit/BI_unit_limitanei_lod3.cas, 40
    model_flexi bi/data/models_unit/BI_unit_limitanei_lod4.cas, max
    ;model_sprite empire_east, 60.0, bi/data/sprites/empire_east_limitanei_sprite.spr
    ;model_sprite empire_west, 60.0, bi/data/sprites/empire_west_limitanei_sprite.spr
    model_sprite slave, 60.0, bi/data/sprites/slave_limitanei_sprite.spr
    model_sprite empire_west_rebels, 60.0, bi/data/sprites/empire_west_rebels_limitanei_sprite.spr
    model_sprite empire_east_rebels, 60.0, bi/data/sprites/empire_east_rebels_limitanei_sprite.spr
    model_sprite empire_west, 60.0, bi/data/sprites/empire_west_limitanei_sprite.spr
    model_sprite empire_east, 60.0, bi/data/sprites/empire_east_limitanei_sprite.spr
    model_tri 400, 0.5f, 0.5f, 0.5f
    That will add a new unit called Town Guard, with no unit card that cannot be recruited.
    To make them playable they need a Unit Description though

    Go to export_descr_unit_enums and add this to the bottom
    town_guard
    town_guard_descr
    town_guard_descr_shot
    Then go to bi/text/export_units and add this in to the bottom

    {town_guard} Town Guard

    {town_guard_descr}
    Town Guard patrol the towns of the Roman Empire and keep the streets and allys safe for the Roman Citizen to pass through. They are best suited to garrisoning cities, however they can be called upon to fight in the legions if required altough the day they fight in place of the legionarii will be a sad day indeed for Rome.

    {town_guard_descr_short}
    Town Guard patrol the towns of the Roman Empire and keep the streets and allys safe for the Roman Citizen to pass through.
    To make them recruitable you need to add the following lines to export_descr_buildings, put this in the "building barracks" section, just press ctrl+f to find "building barracks" then add this underneath Limitanei

    recruit "town guard" 0 requires factions { empire_west_rebels, empire_west, empire_east_rebels, empire_east, }
    That will make them recruitable.
    To give them a unit card just find the Limitanei ones and change them slightly (write town guard on them or something) and change the name of it to "#town_guard" and make one of those for the 4 Roman factions.

    The Unit Cards can be found in bi/data/ui/units/faction name
    To make Unit Info cards just find the limitanei one in bi/data/ui/units_info/faction name change it to what you want then call it town_guard.


    I Hope that helps mate.

    Last edited by GrimSta; 12-05-2005 at 19:29.
    "I'm right and everyone else is wrong or has taken too much LSD."

  3. #3
    Evil Overlord Member Kaidonni's Avatar
    Join Date
    Dec 2005
    Location
    If I told you, I'd have to kill you. England.
    Posts
    340

    Default Re: Adding a new unit

    It all works fine mate (when I have the right files put into my BI folder...lol, I put some unmodded files in and was confused as to why I couldn't find Town Guard...lol).

    One more thing - when right clicking on the recruitment queue to bring up info on them, it shows a peasant in the info window...is there any way to avoid that, or have I done something wrong?
    I believe in a society without rules, laws and regulations. A society where there are only ideas - strict ideas that must be followed to by the letter - and any failure to comply is punishable by death. This would be no dictatorship or police state, no one would be living in terror. It would merely be a 'reassessment of one's preferences,' people living in 'not-so-optimistic security.' So, welcome, those who are 'longing to be blindly obedient and loyal, unbeknownst to them.'

  4. #4
    nudge nudge, wink wink Member GrimSta's Avatar
    Join Date
    Oct 2005
    Posts
    126

    Default Re: Adding a new unit

    did you create unit cards for them?
    Oh, and i forgot you were using Meqon-Mod, ill reduce the cost of those guys for you so it fits with his work :D
    "I'm right and everyone else is wrong or has taken too much LSD."

  5. #5
    Evil Overlord Member Kaidonni's Avatar
    Join Date
    Dec 2005
    Location
    If I told you, I'd have to kill you. England.
    Posts
    340

    Default Re: Adding a new unit

    I created unit cards in the ui section for them. I took the #limitanei.tga files, copied them, and pasted them in the correct places (for each of the Romans), and renamed the files to #town_guard.tga.
    I believe in a society without rules, laws and regulations. A society where there are only ideas - strict ideas that must be followed to by the letter - and any failure to comply is punishable by death. This would be no dictatorship or police state, no one would be living in terror. It would merely be a 'reassessment of one's preferences,' people living in 'not-so-optimistic security.' So, welcome, those who are 'longing to be blindly obedient and loyal, unbeknownst to them.'

  6. #6
    Evil Overlord Member Kaidonni's Avatar
    Join Date
    Dec 2005
    Location
    If I told you, I'd have to kill you. England.
    Posts
    340

    Default Re: Adding a new unit

    Ah...didn't do the unit info ones. I need town_guard versions of the limitanei.tga files, don't I, for the unit info? What about the battle map, too? No need for you to change the costs, etc, I've done that bit.
    I believe in a society without rules, laws and regulations. A society where there are only ideas - strict ideas that must be followed to by the letter - and any failure to comply is punishable by death. This would be no dictatorship or police state, no one would be living in terror. It would merely be a 'reassessment of one's preferences,' people living in 'not-so-optimistic security.' So, welcome, those who are 'longing to be blindly obedient and loyal, unbeknownst to them.'

  7. #7
    nudge nudge, wink wink Member GrimSta's Avatar
    Join Date
    Oct 2005
    Posts
    126

    Default Re: Adding a new unit

    on the battle map they are identical to Limitanei, if you want them changed i can do a small reskin for you
    "I'm right and everyone else is wrong or has taken too much LSD."

  8. #8
    Evil Overlord Member Kaidonni's Avatar
    Join Date
    Dec 2005
    Location
    If I told you, I'd have to kill you. England.
    Posts
    340

    Default Re: Adding a new unit

    No, no reskin needed thanks. They'll be just fine. I'll see if I can't get their unit info card correct.
    I believe in a society without rules, laws and regulations. A society where there are only ideas - strict ideas that must be followed to by the letter - and any failure to comply is punishable by death. This would be no dictatorship or police state, no one would be living in terror. It would merely be a 'reassessment of one's preferences,' people living in 'not-so-optimistic security.' So, welcome, those who are 'longing to be blindly obedient and loyal, unbeknownst to them.'

  9. #9
    Evil Overlord Member Kaidonni's Avatar
    Join Date
    Dec 2005
    Location
    If I told you, I'd have to kill you. England.
    Posts
    340

    Default Re: Adding a new unit

    Okay...one problem. The game CTDs whenI go to the battlefield. Specifically when I press 'Start Deployment.' I was testing out the Town Guard.
    I believe in a society without rules, laws and regulations. A society where there are only ideas - strict ideas that must be followed to by the letter - and any failure to comply is punishable by death. This would be no dictatorship or police state, no one would be living in terror. It would merely be a 'reassessment of one's preferences,' people living in 'not-so-optimistic security.' So, welcome, those who are 'longing to be blindly obedient and loyal, unbeknownst to them.'

  10. #10
    Evil Overlord Member Kaidonni's Avatar
    Join Date
    Dec 2005
    Location
    If I told you, I'd have to kill you. England.
    Posts
    340

    Default Re: Adding a new unit

    Yep...it did it a second time...
    I believe in a society without rules, laws and regulations. A society where there are only ideas - strict ideas that must be followed to by the letter - and any failure to comply is punishable by death. This would be no dictatorship or police state, no one would be living in terror. It would merely be a 'reassessment of one's preferences,' people living in 'not-so-optimistic security.' So, welcome, those who are 'longing to be blindly obedient and loyal, unbeknownst to them.'

  11. #11
    Evil Overlord Member Kaidonni's Avatar
    Join Date
    Dec 2005
    Location
    If I told you, I'd have to kill you. England.
    Posts
    340

    Default Re: Adding a new unit

    It's okay now...found out it was the unit not having any missile attack choice.
    I believe in a society without rules, laws and regulations. A society where there are only ideas - strict ideas that must be followed to by the letter - and any failure to comply is punishable by death. This would be no dictatorship or police state, no one would be living in terror. It would merely be a 'reassessment of one's preferences,' people living in 'not-so-optimistic security.' So, welcome, those who are 'longing to be blindly obedient and loyal, unbeknownst to them.'

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO