Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
When I add items to multiplayer troops, in the equipment menu ingame all of the items are displayed out in a line to the right when you click the box.
Since i've added lots of armours, the line extends past the right edge of the screen...

Is there a way to make the list of items go down rows, rather than straight across?
 
I have no idea, would be cool, but maybe you would have to cut down on the amount of armours. (I hope not, though.)

Is it possible to assign different animations to different weapons of the same type? Like a hunting crossbow keeps the same easy reload animation while a heavier crossbow gets a different one? Or with shields, a small shield gets used in the same way on horse as in native, but a huge tower shield would have to kept pretty much in one spot held next to the horse?
 
Yea the item type doesn't define the animations, the itcf_whatever does.

Code:
["hunting_crossbow", "Hunting Crossbow", [("crossbow_a",0)], itp_type_crossbow |itp_merchandise|itp_primary|itp_two_handed ,itcf_shoot_crossbow|itcf_carry_crossbow_back, 
22 , weight(2.25)|difficulty(0)|spd_rtng(47) | shoot_speed(50) | thrust_damage(37 ,  pierce)|max_ammo(1),imodbits_crossbow ],

Header_items:
Code:
itcf_shoot_crossbow                                  = 0x0000000000004000
 
Then again there are only so many animations the engine can handle. Or did they fix that?
 
I'm wondering if anyone has any idea how to get AI lords to rest at other lords castles, as though they (the castles) were their own.

My problem is that vassals with only a village assigned as a fief will rest at the adjoining fortification, but for some reason they never attend feasts because their men are "weary". My vassals are in a constant state of weariness, which for some reason only prevents them from attending my feasts. I'm assuming it's in the scripts somewhere but i have far too little experience reading the code to find the script that handles it.

I did find this, which is exactly what they say when i ask them what they are doing. (Within "npc_decision_checklist_party_ai")
#My men are weary, and I wish to return home
(else_try),
  (eq, ":do_only_collecting_rents", 0),
  (this_or_next|gt, ":hours_since_last_rest", 504), #Three weeks
  (lt, ":aggressiveness", 25),  
  (gt, ":hours_since_last_rest", 16:cool:, #one week if aggressiveness < 25
  (eq, ":eek:peration_in_progress", 0),
 
  (call_script, "script_lord_get_home_center", ":troop_no"),
  (assign, ":home_center", reg0),
 
  (gt, ":home_center", -1),
  (assign, ":action", spai_holding_center),
  (assign, ":eek:bject", ":home_center"),
 
  (try_begin),
    (eq, ":troop_no", "$g_talk_troop"),
    (str_store_string, s14, "str_my_men_are_weary_so_we_are_returning_home"),
    (str_store_string, s16, "str_my_men_are_becoming_weary"),
  (try_end),
 
So I've been wanting to replace horses with motorcycles. I briefly considered using the original horse skeleton and tweaking the animation so it only uses the left front leg and the body, but decided on making a new skeleton. Now, problem here is animating horses seems to be woefully underdocumented - I think I read somewhere in a thread about camels that you need to have a place for the rider to sit for it to export properly. What does this mean? Do you need to export the horse and rider animations/skeletons together or something? If anyone could pass me the cliffnotes version of animating horses, I'd appreciate it.

Here is the first model I'm planning to use if it affects anything:
cruiser.png
 
I never used this shader, I will try it now. Thanks.

EDIT: I don't like it- it does support normalmap but armor doesn't shine, but thanks anyway.
 
Mustachio said:
I'm wondering if anyone has any idea how to get AI lords to rest at other lords castles, as though they (the castles) were their own.

My problem is that vassals with only a village assigned as a fief will rest at the adjoining fortification, but for some reason they never attend feasts because their men are "weary". My vassals are in a constant state of weariness, which for some reason only prevents them from attending my feasts. I'm assuming it's in the scripts somewhere but i have far too little experience reading the code to find the script that handles it.

I did find this, which is exactly what they say when i ask them what they are doing. (Within "npc_decision_checklist_party_ai")
#My men are weary, and I wish to return home
      (else_try),
  (eq, ":do_only_collecting_rents", 0),
  (this_or_next|gt, ":hours_since_last_rest", 504), #Three weeks
  (lt, ":aggressiveness", 25),  
  (gt, ":hours_since_last_rest", 16:cool:, #one week if aggressiveness < 25
  (eq, ":eek:peration_in_progress", 0),
 
  (call_script, "script_lord_get_home_center", ":troop_no"),
  (assign, ":home_center", reg0),
 
  (gt, ":home_center", -1),
  (assign, ":action", spai_holding_center),
  (assign, ":eek:bject", ":home_center"),
 
  (try_begin),
    (eq, ":troop_no", "$g_talk_troop"),
    (str_store_string, s14, "str_my_men_are_weary_so_we_are_returning_home"),
    (str_store_string, s16, "str_my_men_are_becoming_weary"),
  (try_end),
Change the spoilered part to:
(else_try),
  (eq, ":do_only_collecting_rents", 0),
  (this_or_next|gt, ":hours_since_last_rest", 504), #Three weeks
  (lt, ":aggressiveness", 25),  
  (gt, ":hours_since_last_rest", 16:cool:, #one week if aggressiveness < 25
  (eq, ":eek:peration_in_progress", 0),

            (try_begin),
              (neg|faction_slot_eq, ":faction_no", slot_faction_ai_state, sfai_feast),
                       
              (call_script, "script_lord_get_home_center", ":troop_no"),
              (assign, ":home_center", reg0),
 
              (gt, ":home_center", -1),
              (assign, ":action", spai_holding_center),
              (assign, ":eek:bject", ":home_center"),

                (try_begin),
                (eq, ":troop_no", "$g_talk_troop"),
                (str_store_string, s14, "str_my_men_are_weary_so_we_are_returning_home"),
                (str_store_string, s16, "str_my_men_are_becoming_weary"),
                (try_end),

              (else_try),
                (faction_slot_eq, ":faction_no", slot_faction_ai_state, sfai_feast),

              (try_begin),
                (eq, ":troop_no", "$g_talk_troop"),
                (str_store_string, s14, "str_my_men_are_weary_so_we_are_returning_home"),
                (str_store_string, s16, "str_my_men_are_becoming_weary"),
              (try_end),
            (try_end),

                                          -BUGFIX-
  (else_try),
    (eq, ":do_only_collecting_rents", 0),
    (this_or_next|gt, ":hours_since_last_rest", 504), #Three weeks
    (lt, ":aggressiveness", 25),   
    (gt, ":hours_since_last_rest", 16:cool:, #one week if aggressiveness < 25 
    (eq, ":eek:peration_in_progress", 0),
   
    (faction_slot_eq, ":faction_no", slot_faction_ai_object, ":faction_object"),
    (store_faction_of_troop, ":faction_no", ":troop_no"),

              (try_begin),
              (le, ":faction_object", 0),
              (neg|faction_slot_eq, ":faction_no", slot_faction_ai_state, sfai_feast),
              (call_script, "script_lord_get_home_center", ":troop_no"),
              (assign, ":home_center", reg0),
   
              (gt, ":home_center", -1),
              (assign, ":action", spai_holding_center),
              (assign, ":eek:bject", ":home_center"),

              (else_try),
              (gt, ":faction_object", 0),
              (store_faction_of_party, ":faction_no2", ":faction_object"),
              (store_relation, ":relation", ":faction_no", ":faction_no2"),

              (this_or_next|neg|faction_slot_eq, ":faction_no", slot_faction_ai_state, sfai_feast),
              (lt, ":relation", 0),

              (call_script, "script_lord_get_home_center", ":troop_no"),
              (assign, ":home_center", reg0),
   
              (gt, ":home_center", -1),
              (assign, ":action", spai_holding_center),
              (assign, ":eek:bject", ":home_center"),

              (else_try),
              (add_xp_to_troop, 0, ":troop_no"), #placeholder
              (try_end),

                (try_begin),
                  (eq, ":troop_no", "$g_talk_troop"),
                  (str_store_string, s14, "str_my_men_are_weary_so_we_are_returning_home"),
                  (str_store_string, s16, "str_my_men_are_becoming_weary"),
                (try_end),
Then change the string "My men are weary, so we are returning home." to "My men are weary." or something in the strings file for consistency's sake.
 
is there a way to easily extract all the item_kinds into module_items, as I've done a huge amount of work prior to installing python. Or if it would be possible to compile both to work together.
 
GetAssista said:
feuerzeuge said:
Do you need to export the horse and rider animations/skeletons together or something?

Animating horses is same as people + keeping in mind that rider maintains certain fixed position above horse during all this

Thanks. Is the position still going to be high up, or can I somehow shift it closer to the ground? I plan to change the rider's animations too, if that's worth anything.
 
Textures/font.dds. The position of each character are found in Data/font_data.xml. There's no guarantee that the icons will show up with the proper color though unless you adjust the alpha.
 
I am trying to make it in the mod so every time a patrol is created, it is shown in the faction colour of that faction.

However, the codes are not really correct at the moment. As you can see on the screenshot, every time a patrol is created, it is shown 6 times in the 6 different colours. But it only need to appear once in the correct colour of that faction.

1026444864.jpg

I suspect that the error is this; (neq, "fac_culture_1"),. I tried with several other operation commands, but nothing really worked yet. So that means I need the command that sees about which faction created the patrol, and uses the right colour for it.

Code:
        (eq, ":party_type", spt_patrol),
		(assign, ":party_template", "pt_patrol_party"),
		(neq, "fac_culture_1"),
		(display_message,"@Patrol created for {s7}.", 0xff0000),
		(neq, "fac_culture_2"),
		(display_message,"@Patrol created for {s7}.", 0x808000),	
		(neq, "fac_culture_3"),
		(display_message,"@Patrol created for {s7}.", 0xff3300),	
		(neq, "fac_culture_4"),
		(display_message,"@Patrol created for {s7}.", 0x095bc9),
		(neq, "fac_culture_5"),
		(display_message,"@Patrol created for {s7}.", 0xd2ee11),	
		(neq, "fac_culture_6"),
		(display_message,"@Patrol created for {s7}.", 0xff6633),			
     (else_try),

Hope somebody can help out with this matter. Thanks in advance anyway.
 
Status
Not open for further replies.
Back
Top Bottom