attribs and skill points for troops [solved]

Users who are viewing this thread

Status
Not open for further replies.
I created some heroes on my mod. I want the heroes recruited from top tier troops using this script so I copied top tier troops into new troops, renamed them, cleared their flags and flagged them as tf_hero.
It works so I get new companion that has level,attribs, skill points, items and face just like the troop, it s used to be before upgraded.
The problem is the stats are too low for a hero with his level. Companion that  upgraded from swadian knight (level 25) only have total 26 skill points used. Comparing with borcha (level 3) that has 17 skill points, 26 is too low. I wonder how to adjust troops skill respect to their level, just like attrib. I see the total attribs for troops are 20+troop's level.
Is it hardcoded? Or I miss something?
 
Can't you set the troop attributes to whatever you want?  You can have level 1 troops with 10 in every skill or level 40 knights with rookie stats or skills.
 
i want to write starting skill set on module_troops.py, then the skills upgraded according the starting level just like the attribs. I read the proccess_troops.py and I see no different methods how module system read attribs and skills from module_troops.py but only attribs upgraded by the level.
 
First of all, I'd like to thank the moderators for doing their job with muting me and the other spammers.
Then, I promise to never spam again.

And now on topic.
dunde, look here:
  ["sirathean_long_swordsman","Sirathean Long Swordsman","Sirathean Long Swordsmen",tf_armored_troop,0,0,fac_neutral,
  [itm_bastard_sword_a,
  itm_surcoat_over_mail,
  itm_hide_boots,
  itm_bascinet,
  ],
  atk_attrib|level(22),wp_melee(110),knows_common|knows_riding_3|knows_ironflesh_2|knows_shield_3,swadian_face_middle_1, swadian_face_old_2],
The blue stuff is the troop's atributes. You can change them to whatever you want like this:
Code:
atk_attrib = str_12 | agi_9 | int_9 | cha_6
or this:
  ["sirathean_long_swordsman","Sirathean Long Swordsman","Sirathean Long Swordsmen",tf_armored_troop,0,0,fac_neutral,
  [itm_bastard_sword_a,
  itm_surcoat_over_mail,
  itm_hide_boots,
  itm_bascinet,
  ],
  str_12 | agi_9 | int_9 | cha_6|level(22),wp_melee(110),knows_common|knows_riding_3|knows_ironflesh_2|knows_shield_3,swadian_face_middle_1, swadian_face_old_2],

If you want skills, you can do the same with the knows_<whatever> things.
 
Thank you, lumos. It's nice to see you again.
From your example below :
  ["sirathean_long_swordsman","Sirathean Long Swordsman","Sirathean Long Swordsmen",tf_armored_troop,0,0,fac_neutral,
  [itm_bastard_sword_a,
  itm_surcoat_over_mail,
  itm_hide_boots,
  itm_bascinet,
  ],
  str_12 | agi_9 | int_9 | cha_6|level(22),wp_melee(110),knows_common|knows_riding_3|knows_ironflesh_2|knows_shield_3,swadian_face_middle_1, swadian_face_old_2],

then a Sirathean Long Swordsman will be level 22, and at least 12 strength, 9 agility, 9 intelegent, and 6 charisma. And he will get another 6 bonus attribs point  due to his level that randomly distributed. And he will have 3 riding, 2 trade, 2 inventory management, 1 prisoner management, 1 leadership, 2 ironflesh and 3 shield skills. Neither being level 22 or his 9+ intelegent give him any skill bonus. That's the problem.
 
That's true, but you can compensate this by:
                      a) calling a script when you upgrade him to hero that distributes him random skills;
                      b) making the hero with really better skills than the troop.
I think that the first will be better, but harder (not very, actually) to make.

EDIT: Thank you for noting that a level 22 troop will have only 2 in ironflesh. I'll fix that ASAP.
 
Yes, I preffer the 1st option. Thanks again, Lumos.
Here is the solution I got from your option :
- I downgrade the heroes abaout 20 levels;
  I think it's worthy to loose a 25 level Swadian Knight for 5 level upgradeable hero with same initial skills
  plus many skill bonus with only loosing about 9 attrib points.
- I raise heroes attribs to :
    Total Attribs = 31 + level
  so they will be as strong as native companion with same level.
  Additional atribbs are distributed among agility, strength and charisma
- I raise heroes skills to :
    Total Skills = 13 + level + Intelegent
  so they will have same skill points with player troop with same level.
  Additional attribs are distributed randomly among some useful party skill.
  I don't add them to combat oriented skill , because as top tier troops they have been good enoug already in combat oriented skills.
      (try_for_range, ":hero_id", additional_heroes_begin, additional_heroes_end),         
          ## Remove NO STRING ERROR in member_talk dialogs 
          (troop_set_slot, ":hero_id", slot_troop_honorific, "str_npc2_honorific"),
          (store_character_level, ":level", ":hero_id"),
          ## Attrib adjustment : (troop_raise_attribute,<troop_id>,<attribute_id>,<value>),
          (assign, ":total", 0),
          (try_for_range, ":attrib_id", 0, 4),
              (store_attribute_level, ":attrib_point",":hero_id", ":attrib_id"),
              (val_add, ":total", ":attrib_point"),
          (try_end),
          (store_add, ":attrib", ":level", 31),
          (val_sub, ":attrib", ":total"),
          (try_begin),
              (gt, ":attrib", 0),
              (try_for_range, ":unused", 0, ":attrib"),
                  (store_mod, ":rand", ":unused", 3),
                  (try_begin),
                    (eq, ":rand", 0),
                    (assign, ":attrib_id", ca_agility),
                  (else_try),
                    (eq, ":rand", 1),
                    (assign, ":attrib_id", ca_strength),
                  (else_try),
                    (eq, ":rand", 2),
                    (assign, ":attrib_id", ca_charisma),
                  (try_end),
                  (troop_raise_attribute,":hero_id", ":attrib_id", 1),
              (try_end),
          (try_end),
          ## Skill adjustment  : (troop_raise_skill,<troop_id>,<skill_id>,<value>),
          (assign, ":total", 0),
          (try_for_range, ":skill_id", "skl_trade", "skl_reserved_18"),
              (store_skill_level, ":skill_point", ":skill_id", ":hero_id"),
              (val_add, ":total", ":skill_point"),
          (try_end),         
          (store_attribute_level, ":skill",":hero_id", ca_intelligence),
          (val_add, ":skill", ":level"),
          (val_add, ":skill", 13),
          (val_sub, ":skill", ":total"),
          (try_begin),
              (gt, ":skill", 0),
              (try_for_range, ":unused", 0, ":skill"),
                (store_random_in_range, ":rand", 0, 6),
                (try_begin),
                    (eq, ":rand", 0),
                    (assign, ":skill_id", "skl_leadership"),
                (else_try),
                    (eq, ":rand", 1),
                    (assign, ":skill_id", "skl_tactics"),
                (else_try),
                    (eq, ":rand", 2),
                    (assign, ":skill_id", "skl_trainer"),
                (else_try),
                    (eq, ":rand", 3),
                    (assign, ":skill_id", "skl_first_aid"),
                (else_try),
                    (eq, ":rand", 4),
                    (assign, ":skill_id", "skl_surgery"),
                (else_try),
                    (eq, ":rand", 5),
                    (assign, ":skill_id", "skl_wound_treatment"),
                (try_end),
                (troop_raise_skill, ":hero_id", ":skill_id", 1),
              (try_end),
          (try_end),
      (try_end),
 
Status
Not open for further replies.
Back
Top Bottom