SP Tutorial Module System Make your own Companions

Currently Viewing (Users: 0, Guests: 1)

Modding Nation

Recruit
WB
Best answers
0
Thank you :smile: but may I ask where I find the file needed for this change? I can't find what I'm looking for in the "scripts" file.
 

Malik Faris

Squire
M&BWBWF&SNW
Best answers
0
In module_scripts.py, search for "trp_npc1"
It's at the bottom of his section.

        (troop_set_slot, "trp_npc1", slot_troop_morality_type, tmt_egalitarian),  #borcha
        (troop_set_slot, "trp_npc1", slot_troop_morality_value, 4),  #borcha
        (troop_set_slot, "trp_npc1", slot_troop_2ary_morality_type, tmt_aristocratic),  #borcha
        (troop_set_slot, "trp_npc1", slot_troop_2ary_morality_value, -1),
        (troop_set_slot, "trp_npc1", slot_troop_personalityclash_object, "trp_npc7"),  #borcha - deshavi
        (troop_set_slot, "trp_npc1", slot_troop_personalityclash2_object, "trp_npc16"),  #borcha - klethi
        (troop_set_slot, "trp_npc1", slot_troop_personalitymatch_object, "trp_npc2"),  #borcha - marnid
        (troop_set_slot, "trp_npc1", slot_troop_home, "p_village_25"), #Dashbiga
        (troop_set_slot, "trp_npc1", slot_troop_payment_request, 300),
(troop_set_slot, "trp_npc1", slot_troop_kingsupport_argument, argument_ruler),
(troop_set_slot, "trp_npc1", slot_troop_kingsupport_opponent, "trp_npc14"), #lezalit
(troop_set_slot, "trp_npc1", slot_troop_town_with_contacts, "p_town_17"), #ichamur
(troop_set_slot, "trp_npc1", slot_troop_original_faction, 0), #ichamur
(troop_set_slot, "trp_npc1", slot_lord_reputation_type, lrep_roguish), #
 

Modding Nation

Recruit
WB
Best answers
0
Ah I have been looking in the completely wrong place. I was trying to edit all this through a diplomacy file which hasn't worked. I instead need to use a clean native with the module system. Is there anyway for me to add companions with an already completed mod?
 

kalarhan

Python Saint
Count
WBNWVCWF&S
Best answers
33
Modding Nation said:
Ah I have been looking in the completely wrong place. I was trying to edit all this through a diplomacy file which hasn't worked. I instead need to use a clean native with the module system. Is there anyway for me to add companions with an already completed mod?
if you have the mod source (like Floris or Brytenwalda) then yes, it is the same idea as adding them to native. Keep in mind that mods may have new rules and restrictions you will need to follow when adding your new companions, so it may not be a simple copy and paste.
 

benis

Recruit
Best answers
0
Sorry for reviving this but I'm having a weird error. Changing the existing npcs personality clash to trp_dranton like you said makes them all clash with me instead.
 

MrXiskov

Recruit
WBWF&S
Best answers
0
I hope I'm not late and someone can help me... :sad:
I'm working on a mod and I have started on the companions, all has going well until modding the strings started  :roll: . I have not modified the lines of other characters, nor erased or added spaces between lines, and only added the lines for two new characters, however, when I test it in game, all companions have their lines mixed up, some have most of their lines correct but only having one or two swapped and then there's others who have almost all the lines changed. As a novice in modding, I struggle a lot in attempting to fix this, there is a way I can know where did I screw up? I don't want to add **** lot of companions into the game and turn the strings file into a ****fest.  :ohdear:
 

NPC99

Baron
M&BWBWF&SVC
Best answers
26
MrXiskov said:
I hope I'm not late and someone can help me... :sad:
I'm working on a mod and I have started on the companions, all has going well until modding the strings started  :roll: . I have not modified the lines of other characters, nor erased or added spaces between lines, and only added the lines for two new characters, however, when I test it in game, all companions have their lines mixed up, some have most of their lines correct but only having one or two swapped and then there's others who have almost all the lines changed. As a novice in modding, I struggle a lot in attempting to fix this, there is a way I can know where did I screw up? I don't want to add **** lot of companions into the game and turn the strings file into a ****fest.  :ohdear:
The module system code requires companions and their dialogues to be maintained in the same sequence. In module_troops.py, your new companions npc17 & npc18 need to be added right after Klethi (npc16) and before ["kingdom_1_lord",

In module_strings.py there are lots of blocks of dialogue - npc?_intro, npc?_intro_response_1, npc?_intro_response_2, npc?_backstory_a, npc?_backstory_b, npc?_backstory_c, npc?_backstory_later,  npc?_backstory_response_1, npc?_backstory_response_2, npc?_signup, npc?_signup_2, npc?_signup_response_1, npc?_signup_response_2, npc?_payment, npc?_payment_response, npc?_morality_speech, npc?_2ary_morality_speech, npc?_personalityclash_speech, npc?_personalityclash_speech_b, npc?_personalityclash2_speech, npc?_personalityclash2_speech_b, npc?_personalitymatch_speech, npc?_personalitymatch_speech_b, npc?_returement_speech, npc?_rehire_speech, npc?_home_intro, npc?_home_description, npc?_home_description_2, npc?_home_recap, npc?_honorific, npc?_kingsupport_1, npc?_kingsupport_2, npc?_kingsupport_2a, npc?_kingsupport_2b, npc?_kingsupport_3, npc?_kingsupport_objection, npc?_intel_mission, npc?_fief_acceptance, npc?_woman_to_woman & npc?_turn_against.
You need to compete each block in order for all of them.
 

MrXiskov

Recruit
WBWF&S
Best answers
0
NPC99 said:
MrXiskov said:
I hope I'm not late and someone can help me... :sad:
I'm working on a mod and I have started on the companions, all has going well until modding the strings started  :roll: . I have not modified the lines of other characters, nor erased or added spaces between lines, and only added the lines for two new characters, however, when I test it in game, all companions have their lines mixed up, some have most of their lines correct but only having one or two swapped and then there's others who have almost all the lines changed. As a novice in modding, I struggle a lot in attempting to fix this, there is a way I can know where did I screw up? I don't want to add **** lot of companions into the game and turn the strings file into a ****fest.  :ohdear:
The module system code requires companions and their dialogues to be maintained in the same sequence. In module_troops.py, your new companions npc17 & npc18 need to be added right after Klethi (npc16) and before ["kingdom_1_lord",

In module_strings.py there are lots of blocks of dialogue - npc?_intro, npc?_intro_response_1, npc?_intro_response_2, npc?_backstory_a, npc?_backstory_b, npc?_backstory_c, npc?_backstory_later,  npc?_backstory_response_1, npc?_backstory_response_2, npc?_signup, npc?_signup_2, npc?_signup_response_1, npc?_signup_response_2, npc?_payment, npc?_payment_response, npc?_morality_speech, npc?_2ary_morality_speech, npc?_personalityclash_speech, npc?_personalityclash_speech_b, npc?_personalityclash2_speech, npc?_personalityclash2_speech_b, npc?_personalitymatch_speech, npc?_personalitymatch_speech_b, npc?_returement_speech, npc?_rehire_speech, npc?_home_intro, npc?_home_description, npc?_home_description_2, npc?_home_recap, npc?_honorific, npc?_kingsupport_1, npc?_kingsupport_2, npc?_kingsupport_2a, npc?_kingsupport_2b, npc?_kingsupport_3, npc?_kingsupport_objection, npc?_intel_mission, npc?_fief_acceptance, npc?_woman_to_woman & npc?_turn_against.
You need to compete each block in order for all of them.
When I first started modding the companions I had that issue (that I was missing lines), however, this case I'm reporting I have all the lines completed already for both NPC17 & NPC18, I checked it three times that they're all well written and everything, however, this error of mixed up lines still appears.
 

MrXiskov

Recruit
WBWF&S
Best answers
0
NPC99 said:
Check you have correctly completed step 3 in the guide.
:oops: Well, you found out what was wrong, the lines in the script file were set for 17 rather than 18, oopsies  :oops: :ohdear: Thanks you and I owe you one!
 

Daisho

Recruit
Best answers
0
:mrgreen: :mrgreen: Worked flawless... My only issue was the .bat file but I got it working at least in a way XD In my first mod for Warbands I made an item, changed the name of the king of swadia to deez nuttz, made a companion named douche.
 

Marsbsl

Recruit
Best answers
0
please help i can't find the companion that i have created following the step 2

["npc16","Klethi","Klethi",tf_female|tf_hero|tf_unmoveable_in_party_window, 0, reserved,  fac_commoners,[itm_peasant_dress,itm_nomad_boots, itm_dagger, itm_throwing_knives],
  str_7|agi_11|int_8|cha_7|level(2),wp(80),knows_tracker_npc|
  knows_power_throw_3|knows_athletics_2|knows_power_strike_1,
  0x00000000000c100739ce9c805d2f381300000000001cc7ad0000000000000000],
  ["npc17","  newcompanion","newcompanion",tf_female|tf_hero|tf_unmoveable_in_party_window, 0, reserved,  fac_commoners,[itm_peasant_dress,itm_nomad_boots, itm_dagger, itm_throwing_knives],
  str_7|agi_11|int_8|cha_7|level(2),wp(80),knows_tracker_npc|
  knows_power_throw_3|knows_athletics_2|knows_power_strike_1,
  0x00000000000c100739ce9c805d2f381300000000001cc7ad0000000000000000],
#NPC system changes end
 

Arios

Recruit
Best answers
0
can i add the new created companions to a existing mod like FYSG for example
or it will only work for native

 

NPC99

Baron
M&BWBWF&SVC
Best answers
26
Arios said:
can i add the new created companions to a existing mod like FYSG for example
or it will only work for native
You can add companions to an existing mod if you have its module system - some mods make their module systems open source others keep them private.
 

Arios

Recruit
Best answers
0
it didnt work
i cant seem to get the option to  edit with iddle if i right click any of the .py files
can morghs help in creating companions if i instal python

 

kalarhan

Python Saint
Count
WBNWVCWF&S
Best answers
33
Arios said:
i cant seem to get the option to  edit with iddle if i right click any of the .py files
you can use any text editor, from the simple Notepad to more useful tools like Notepad++ and SublimeText.
 

Arios

Recruit
Best answers
0
kalarhan said:
Arios said:
i cant seem to get the option to  edit with iddle if i right click any of the .py files
you can use any text editor, from the simple Notepad to more useful tools like Notepad++ and SublimeText.
thanks