SP Tutorial Module System Warband: Cleric in your mod

正在查看此主题的用户

Idibil

Grandmaster Knight
Easy tutorial that teaches you to enter a cleric npc in your mod (It can be used to introduce many other types of character)

Objective: Create a high-ranking cleric who is part of the advisors of the kings of the factions.

Two main functions:
-Confession - forgive our sins and those of our men
-Reputation - by his sermons and those of their prelates, improve our affinity with his kingdom.

Note: Remember adjust names and number of clerics to your mod.


Module Constans:

slot_center_ransom_broker        = 95
slot_center_tavern_traveler      = 96
slot_center_traveler_info_faction = 97
slot_center_tavern_bookseller    = 98
slot_center_tavern_minstrel      = 99

slot_center_sacerdote      = 101 #add Idibil Brytenwalda for cleric

Module Constans

#add Idibil Brytenwalda cleric
sacerdote_begin = "trp_sacerdote_1"
sacerdote_end  = "trp_kingdom_heroes_including_player_begin"

tavern_minstrels_begin = "trp_tavern_minstrel_1"
tavern_minstrels_end  = sacerdote_begin
#brytenwalda end


tavern_booksellers_begin = "trp_tavern_bookseller_1"
tavern_booksellers_end  = tavern_minstrels_begin


Module troops (i had 30 cleric here, but you can delete without affecting the system)
Note: you should change "scn_town_14_castle" with your scene, and fac_kingdom_4, with your mod faction.

# Tavern minstrel.
  ["tavern_minstrel_1","Wandering Bard","Minstrel",tf_hero|tf_randomize_face|tf_guarantee_shield|tf_guarantee_armor|tf_guarantee_boots, 0, reserved, fac_commoners,[itm_dane_tunic1, itm_bare_legs_blue, itm_lute],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2], #lute
  ["tavern_minstrel_2","Wandering Bard","Minstrel",tf_hero|tf_randomize_face|tf_guarantee_shield|tf_guarantee_armor|tf_guarantee_boots, 0, reserved, fac_commoners,[itm_tunic_with_green_cape, itm_bare_legs_blue, itm_lyre],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2],  #early harp/lyre
  ["tavern_minstrel_3","Wandering Bard","Minstrel",tf_hero|tf_randomize_face|tf_guarantee_shield|tf_guarantee_armor|tf_guarantee_boots, 0, reserved, fac_commoners,[itm_tunic_c, itm_bare_legs_blue, itm_lute],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2], #lute/oud or rebab
  ["tavern_minstrel_4","Wandering Bard","Minstrel",tf_hero|tf_randomize_face|tf_guarantee_shield|tf_guarantee_armor|tf_guarantee_boots, 0, reserved, fac_commoners,[itm_shirt_gaelic, itm_bare_legs_blue, itm_lyre],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2], #No instrument or lyre
  ["tavern_minstrel_5","Wandering Bard","Minstrel",tf_hero|tf_randomize_face|tf_guarantee_shield|tf_guarantee_armor|tf_guarantee_boots, 0, reserved, fac_commoners,[itm_mercia_tunic1, itm_bare_legs_blue, itm_lute],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2], #Lute or Byzantine/Occitan lyra




# idibil brytenwalda cleric, abbot and bishop (quest especial derfel Cadarn, historical character, born 566. Hermit at 636)
  ["sacerdote_1","Abbot Felix of Dommoc","sacerdote",tf_hero|tf_guarantee_armor|tf_guarantee_boots, scn_town_14_castle|entry(11), reserved, fac_kingdom_4,[itm_robecross, itm_bare_legs_blue],def_attrib|level(5),wp(20),knows_common,0x0000000be90ce5d226a971b31e54c8f400000000001e56990000000000000000],
  ["sacerdote_2","Abbot Fursey","sacerdote",tf_hero|tf_guarantee_armor|tf_guarantee_boots, scn_town_40_castle|entry(11), reserved, fac_kingdom_31,[itm_robe, itm_bare_legs_blue],def_attrib|level(5),wp(20),knows_common,0x0000000e821043404864c59b0c92352400000000001d56580000000000000000],
  ["sacerdote_3","Bishop Paulinus","sacerdote",tf_hero|tf_guarantee_armor|tf_guarantee_boots, scn_town_1_castle|entry(11), reserved, fac_kingdom_1,[itm_robecross, itm_bare_legs_blue],def_attrib|level(5),wp(20),knows_common,0x0000000fef04e44e28e265e2d46d454200000000001dc8eb0000000000000000],
  ["sacerdote_4","Bishop Honorius","sacerdote",tf_hero|tf_guarantee_armor|tf_guarantee_boots, scn_town_2_castle|entry(11), reserved, fac_kingdom_2,[itm_robe, itm_bare_legs_blue],def_attrib|level(5),wp(20),knows_common,0x0000000ff810e2931864a41b3432c91c00000000001da6230000000000000000],
  ["sacerdote_5","Abbot Aidan","sacerdote",tf_hero|tf_guarantee_armor|tf_guarantee_boots, scn_town_12_castle|entry(11), reserved, fac_kingdom_3,[itm_robecross, itm_bare_legs_blue],def_attrib|level(5),wp(20),knows_common,0x00000009e20c458e251572bb5c38b71c00000000001e3cdc0000000000000000],
  ["sacerdote_6","Abbot Boisil","sacerdote",tf_hero|tf_guarantee_armor|tf_guarantee_boots, scn_town_27_castle|entry(11), reserved, fac_kingdom_13,[itm_robe, itm_bare_legs_blue],def_attrib|level(5),wp(20),knows_common,0x00000009ff04e00e3ab34a3ad54956a300000000001cb2d80000000000000000],
  ["sacerdote_7","Bishop Binarus","sacerdote",tf_hero|tf_guarantee_armor|tf_guarantee_boots, scn_town_16_castle|entry(11), reserved, fac_kingdom_5,[itm_robecross, itm_bare_legs_blue],def_attrib|level(5),wp(20),knows_common,0x000000083300e34e18acb0c495d0b73600000000001f5c930000000000000000],
  ["sacerdote_8","Abbot Saxulf","sacerdote",tf_hero|tf_guarantee_armor|tf_guarantee_boots, scn_town_4_castle|entry(11), reserved, fac_kingdom_9,[itm_robe, itm_bare_legs_blue],def_attrib|level(5),wp(20),knows_common,0x0000000ec40c111342b676b8a415c8e100000000001d642e0000000000000000],
  ["sacerdote_9","Bishop Oudeceus","sacerdote",tf_hero|tf_guarantee_armor|tf_guarantee_boots, scn_town_9_castle|entry(11), reserved, fac_kingdom_26,[itm_robecross, itm_bare_legs_blue],def_attrib|level(5),wp(20),knows_common,0x0000000d940050ce58aba6ad0c6e5a9d00000000001dc6a20000000000000000],
  ["sacerdote_10","Abbot Dona ap Selyffan","sacerdote",tf_hero|tf_guarantee_armor|tf_guarantee_boots, scn_town_22_castle|entry(11), reserved, fac_kingdom_22,[itm_robe, itm_bare_legs_blue],def_attrib|level(5),wp(20),knows_common,0x0000000d8008e14e235289b6629238e200000000001e26e40000000000000000],
  ["sacerdote_11","Bishop Felix","sacerdote",tf_hero|tf_guarantee_armor|tf_guarantee_boots, scn_town_13_castle|entry(11), reserved, fac_kingdom_23,[itm_robecross, itm_bare_legs_blue],def_attrib|level(5),wp(20),knows_common,0x0000000fee003300329eb63ba64f4a8200000000001e8b2b0000000000000000],
  ["sacerdote_12","Bishop Rhun ap Urbgen","sacerdote",tf_hero|tf_guarantee_armor|tf_guarantee_boots, scn_town_7_castle|entry(11), reserved, fac_kingdom_15,[itm_robe, itm_bare_legs_blue],def_attrib|level(5),wp(20),knows_common,0x0000000fc80c528e4cda72551877586500000000001e3ce30000000000000000],
  ["sacerdote_13","Bishop Mochonna","sacerdote",tf_hero|tf_guarantee_armor|tf_guarantee_boots, scn_town_6_castle|entry(11), reserved, fac_kingdom_18,[itm_robecross, itm_bare_legs_blue],def_attrib|level(5),wp(20),knows_common,0x0000000cac08e3ce365b7158a3439a9300000000001e165a0000000000000000],
  ["sacerdote_14","Abbot Cuminian","sacerdote",tf_hero|tf_guarantee_armor|tf_guarantee_boots, scn_town_30_castle|entry(11), reserved, fac_kingdom_17,[itm_robe, itm_bare_legs_blue],def_attrib|level(5),wp(20),knows_common,0x0000000c9f0061401cc9664bc48f34d100000000001cb2930000000000000000],
  ["sacerdote_15","Abbot Colman mac Duach","sacerdote",tf_hero|tf_guarantee_armor|tf_guarantee_boots, scn_town_36_castle|entry(11), reserved, fac_kingdom_28,[itm_robecross, itm_bare_legs_blue],def_attrib|level(5),wp(20),knows_common,0x00000009d408154e26b3a4c34c9534cb00000000000dba530000000000000000],
  ["sacerdote_16","Abbot Riderch","sacerdote",tf_hero|tf_guarantee_armor|tf_guarantee_boots, scn_town_33_castle|entry(11), reserved, fac_kingdom_30,[itm_robe, itm_bare_legs_blue],def_attrib|level(5),wp(20),knows_common,0x0000000ff90c6552299c3524f4ca5b2200000000001f38b50000000000000000],
  ["sacerdote_17","Abbot Molaise","sacerdote",tf_hero|tf_guarantee_armor|tf_guarantee_boots, scn_town_21_castle|entry(11), reserved, fac_kingdom_27,[itm_robecross, itm_bare_legs_blue],def_attrib|level(5),wp(20),knows_common,0x0000000c9a0464ce2725553aeb7138d400000000001df91b0000000000000000],
  ["sacerdote_18","Abbot Aedh Dubh","sacerdote",tf_hero|tf_guarantee_armor|tf_guarantee_boots, scn_town_19_castle|entry(11), reserved, fac_kingdom_19,[itm_robe, itm_bare_legs_blue],def_attrib|level(5),wp(20),knows_common,0x0000000c820c545346ddae431e79b6a400000000001e34680000000000000000],
  ["sacerdote_19","Abbot Aileran","sacerdote",tf_hero|tf_guarantee_armor|tf_guarantee_boots, scn_town_32_castle|entry(11), reserved, fac_kingdom_29,[itm_robecross, itm_bare_legs_blue],def_attrib|level(5),wp(20),knows_common,0x0000000cb60801d258dc49257ab1d9a300000000001e89950000000000000000],

  ["sacerdote_20","Abbot Foillan","sacerdote",tf_hero|tf_guarantee_armor|tf_guarantee_boots, scn_town_41_castle|entry(11), reserved, fac_kingdom_6,[itm_robe, itm_bare_legs_blue],def_attrib|level(5),wp(20),knows_common,0x0000000c8610110e491b69d5714a290c00000000001e33070000000000000000],
  ["sacerdote_21","Abbot Finian","sacerdote",tf_hero|tf_guarantee_armor|tf_guarantee_boots, scn_town_42_castle|entry(11), reserved, fac_kingdom_7,[itm_robecross, itm_bare_legs_blue],def_attrib|level(5),wp(20),knows_common,0x0000000fcc0cc18e2892249c9cc9293200000000001e1ade0000000000000000],
  ["sacerdote_22","Abbot Petroc","sacerdote",tf_hero|tf_guarantee_armor|tf_guarantee_boots, scn_town_17_castle|entry(11), reserved, fac_kingdom_8,[itm_robe, itm_bare_legs_blue],def_attrib|level(5),wp(20),knows_common,0x0000000eb304c5524313aac88b84cd1300000000001cc35d0000000000000000],
  ["sacerdote_23","Bishop Inabwy","sacerdote",tf_hero|tf_guarantee_armor|tf_guarantee_boots, scn_town_26_castle|entry(11), reserved, fac_kingdom_25,[itm_robecross, itm_bare_legs_blue],def_attrib|level(5),wp(20),knows_common,0x0000000eb00005531f6c7249649b36e500000000001dd4a40000000000000000],
  ["sacerdote_24","Bishop Euddogwy","sacerdote",tf_hero|tf_guarantee_armor|tf_guarantee_boots, scn_town_28_castle|entry(11), reserved, fac_kingdom_11,[itm_robe, itm_bare_legs_blue],def_attrib|level(5),wp(20),knows_common,0x0000000ad700034039640f5b94aea29200000000001e331c0000000000000000],
  ["sacerdote_25","Abbot Peius","sacerdote",tf_hero|tf_guarantee_armor|tf_guarantee_boots, scn_town_3_castle|entry(11), reserved, fac_kingdom_12,[itm_robecross, itm_bare_legs_blue],def_attrib|level(5),wp(20),knows_common,0x0000000ad50c35ce449cc5c653a22cee00000000001e395a0000000000000000],
  ["sacerdote_26","Bishop Fechin","sacerdote",tf_hero|tf_guarantee_armor|tf_guarantee_boots, scn_town_24_castle|entry(11), reserved, fac_kingdom_14,[itm_robe, itm_bare_legs_blue],def_attrib|level(5),wp(20),knows_common,0x0000000fd200e0d35b6476289f1acc9400000000001d6cde0000000000000000],
  ["sacerdote_27","Bishop Aebbe","sacerdote",tf_hero|tf_guarantee_armor|tf_guarantee_boots, scn_town_5_castle|entry(11), reserved, fac_kingdom_16,[itm_robecross, itm_bare_legs_blue],def_attrib|level(5),wp(20),knows_common,0x0000000ff10095d3312c6dc0abc946e200000000001e36550000000000000000],
  ["sacerdote_28","Abbot Ultan","sacerdote",tf_hero|tf_guarantee_armor|tf_guarantee_boots, scn_town_39_castle|entry(11), reserved, fac_kingdom_20,[itm_robe, itm_bare_legs_blue],def_attrib|level(5),wp(20),knows_common,0x0000000a5d04334e454b9a511b29b09e00000000001db4e60000000000000000],
  ["sacerdote_29","Bishop Dywel","sacerdote",tf_hero|tf_guarantee_armor|tf_guarantee_boots, scn_town_26_castle|entry(11), reserved, fac_kingdom_21,[itm_robecross, itm_bare_legs_blue],def_attrib|level(5),wp(20),knows_common,0x0000000a530854ce66d36db8dc66156300000000001e152a0000000000000000],
  ["sacerdote_30","Abbot Oengus","sacerdote",tf_hero|tf_guarantee_armor|tf_guarantee_boots, scn_town_29_castle|entry(11), reserved, fac_kingdom_24,[itm_robe, itm_bare_legs_blue],def_attrib|level(5),wp(20),knows_common,0x0000000fe704c240465354b6dc50dd5e00000000001e62e30000000000000000],
#brytenwalda end

Now, module dialogs

##  [anyone, "crook_search_person_7_1", [(call_script, "script_get_information_about_troops_position", "$selected_troop", 0)],
##  "{s1}", "crook_pretalk",[]],
##
##  [anyone, "crook_search_person_7_2", [],
##  "TODO: Come back later then.", "crook_pretalk",[]],
## 



#Idibil brytenwalda cleric
  [anyone, "start", [(is_between, "$g_talk_troop", sacerdote_begin, sacerdote_end),
                    ],
  "In nomine pater, {my lord/my lady}. I am a priest. I see in your eyes that you are a pious soul.", "sacerdote_talk", []],
  [anyone, "sacerdote_pretalk", [],
  "God guard you, {playername}. What can this humble servant do for you?", "sacerdote_talk", []],
  [anyone|plyr,"sacerdote_talk", [(neg|main_party_has_troop, "$g_talk_troop")],
  "I am not a Christian, crow -your face show anger-. Christian are sheeps. I worship the ancient gods, and I love war", "sacerdote_angry",[]],
  [anyone,"sacerdote_angry", [],
  "You... you... you are Satan, {playername} -his eyes are fire-. People in this kingdom will hate you", "close_window", [
            (call_script, "script_change_player_relation_with_faction_ex", "$g_talk_troop_faction", -9),
]],
  [anyone|plyr, "sacerdote_talk", [],
  "I am cristian, father -you down your head with respect-. I need your help.", "sacerdote_ayuda", []],
  [anyone|plyr, "sacerdote_talk", [],
  "I am not cristian, but i can learn if you help me", "sacerdote_ayuda", []],
  [anyone|plyr, "sacerdote_talk", [],
  "No thanks. I have other matters to attend to.", "close_window", []],

  [anyone, "sacerdote_ayuda", [],
  "Oh, well -he smiles, pleased-. I pray for you, for God to forgive your sins. I am here for help you, {playername},\
but you must help to the Church also -he place his hands on your shoulders-. I can help praying for you and your men and forgiving your sins -his tongue flicking-.\
But you need to donate 300 coins. I can do that people in this kingdom know of the generosity of {playername}, but you need to donate 1000 coins", "sacerdote_ayuda2", []],

  [anyone|plyr,"sacerdote_ayuda2",
  [], "Thanks you, father. We need that God forgive ours sins - I will donate 300 coins.", "sacerdote_pretalk",
  [
      (troop_remove_gold, "trp_player", 300),
      (call_script, "script_change_player_party_morale", 2),
      (call_script, "script_change_player_honor", 2),
      ]],
 
  [anyone|plyr,"sacerdote_ayuda2",
  [], "Thanks you, father. I want this kingdom love me. I will donate 800 coins.", "sacerdote_pretalk",
  [
      (troop_remove_gold, "trp_player", 800),
      (call_script, "script_change_player_relation_with_faction_ex", "$g_talk_troop_faction", 5),
      ]],

  [anyone|plyr,"sacerdote_ayuda2", [], "Are you selling your Faith? You are a pig!", "sacerdote_angry",[]],

  [anyone|plyr,"sacerdote_ayuda2", [], "Actually, cancel that order.", "sacerdote_pretalk",[]],

#brytenwalda end


Reasy. I was easy, no? Open your game and walk to capital town - casttle. You have new npc here.  :grin:

 
:grin:

I update the module troops, now you have a personalized face priest (and all priest are different and they have tonsure  :grin:)

 
So this code...
#add Idibil Brytenwalda cleric
sacerdote_begin = "trp_sacerdote_1"
sacerdote_end  = "trp_kingdom_heroes_including_player_begin"

tavern_minstrels_begin = "trp_tavern_minstrel_1"
tavern_minstrels_end  = sacerdote_begin
#brytenwalda end

tavern_booksellers_begin = "trp_tavern_bookseller_1"
tavern_booksellers_end  = tavern_minstrels_begin
..Is very Important for the dialogs?

Simple is, this code for get the range of them?
 
it determine that troops have that dialog. You can change for others troops or unique troop
 
Idibil 说:
it determine that troops have that dialog. You can change for others troops or unique troop
Very great Tutorials, For your Cleric and the Dialog Tutorial  :mrgreen:
 
后退
顶部 底部