[Script] some unofficial additions

Users who are viewing this thread

Hi! I'm trying to learn how to mod in this game, so I picked up the best & simplest mod with source code availabe, Diplomacy, and started playing with it.

If you don't know how to use the module system to build a module, or you just don't care, I've packaged a module so you can just put it into the Modules directory and it works. It's based on the last Diplomacy source, it's totally savegame compatibile with Diplomacy and so with the Native itself.

Here it is: http://dl.dropbox.com/u/23664530/diplomacy_unofficial_additions_0.1.zip




WIFE AS COMPANION


My first attempt is to implement a thing that in the code was a "TODO": the different reaction when we ask our spouse to join us in travelling.

This is the code, that has to be put into module_dialogs.py (search for a string that says something like "TODO: Differentiate between personalities, here!"). This should be clear for everyone that has played a bit with warband modding, but if you are inexperienced and want to try it nevertheless, I'll provide you a bit more detailed guide (from which line to which line to cut & paste, essentially).

Code:
	[
		anyone,
		
		"spouse_join",
		
		[
			(call_script, "script_dplmc_print_player_spouse_says_my_husband_wife_to_s0", "$g_talk_troop", 0),
			
			(troop_slot_eq, "$g_talk_troop", slot_lord_reputation_type, lrep_adventurous),
		],
		
		"Really?  You'd ask me to ride with your band like the old stories? To be with you in the field and watch your back in the wars?  I've dreamed about this since I was a little girl!  To see those dreams realized in this modern world would be so amazing! I shall make ready at once!  Thank you so much, {s0}!", 

		"close_window", 
		
		[
			(party_add_members, "p_main_party", "$g_talk_troop", 1),
			(call_script, "script_dplmc_save_civilian_clothing", "$g_talk_troop"), #Save personal items
			
			(str_store_troop_name, s6, "$g_talk_troop"),
			(display_message, "@{s6} has joined your party."),
			
			(assign, "$g_leave_encounter", 1),
			
			# let's add some objects to this adventurous wife
			(troop_add_item, "$g_talk_troop","itm_hunter", imod_spirited),
			(troop_add_item, "$g_talk_troop","itm_tribal_warrior_outfit", imod_lordly),
			(troop_add_item, "$g_talk_troop","itm_leather_boots", imod_lordly),
			(troop_add_item, "$g_talk_troop","itm_leather_gloves", imod_lordly),
			(troop_add_item, "$g_talk_troop","itm_female_hood", imod_lordly),
			(troop_add_item, "$g_talk_troop","itm_hunting_bow", imod_masterwork),
			(troop_add_item, "$g_talk_troop","itm_arrows", imod_masterwork),
			
			# ..and some proficiencies
			(troop_raise_attribute, "$g_talk_troop", ca_strength, 2),
			(troop_raise_attribute, "$g_talk_troop", ca_agility, 6),
			(troop_raise_attribute, "$g_talk_troop", ca_intelligence, 4),
			(troop_raise_attribute, "$g_talk_troop", ca_charisma, 3),
			
			(troop_raise_skill, "$g_talk_troop", skl_power_draw, 2),
			(troop_raise_skill, "$g_talk_troop", skl_weapon_master, 1),
			(troop_raise_skill, "$g_talk_troop", skl_athletics, 3),
			(troop_raise_skill, "$g_talk_troop", skl_riding, 3),
			(troop_raise_skill, "$g_talk_troop", skl_trade, 2),
			(troop_raise_skill, "$g_talk_troop", skl_tracking, 2),
			(troop_raise_skill, "$g_talk_troop", skl_first_aid, 2),
			(troop_raise_skill, "$g_talk_troop", skl_wound_treatment, 2),
			(troop_raise_skill, "$g_talk_troop", skl_leadership, 2),
			
			(troop_raise_proficiency, "$g_talk_troop", wpt_archery, 20),
			
			(add_xp_to_troop, 500, "$g_talk_troop"),

			(try_begin),
				(call_script, "script_troop_get_relation_with_troop", "$g_talk_troop", "trp_player"),
				(le, reg0, 50),
				(call_script, "script_troop_change_relation_with_troop", "$g_talk_troop", "trp_player", 15),
			(try_end),
		]
	],

	[
		anyone,
		
		"spouse_join",
		
		[
			(call_script, "script_dplmc_print_player_spouse_says_my_husband_wife_to_s0", "$g_talk_troop", 0),
			
			(troop_slot_eq, "$g_talk_troop", slot_lord_reputation_type, lrep_otherworldly),
		],
		
		"You want me to ride with you into the wars?  I've read such things in books and heard the minstrel's tales of women fighting alongside the men. And I know there are some common women swept up into the wars who fight as Sword Sisters or serve as camp followers. But I never thought such an opportunity could come to me. I've never seen a battle up close -- except in the arena of course -- and the thought of having a man rush me with a raised ax terrifies me.^^Still -- to sleep under the stars with {s0}, to see the world, to ride to victory on a gallant steed... these are opportunities rarely offered to women. I would be doing my sex a disservice not to seize upon it. I will come with you.",
		
		"close_window",
		
		[
			(party_add_members, "p_main_party", "$g_talk_troop", 1),
			(call_script, "script_dplmc_save_civilian_clothing", "$g_talk_troop"),#Save personal items
			
			(str_store_troop_name, s6, "$g_talk_troop"),
			(display_message, "@{s6} has joined your party."),
			
			(assign, "$g_leave_encounter", 1),
			
			# let's add some objects to this otherwordly wife
			(troop_add_item, "$g_talk_troop","itm_saddle_horse", imod_spirited),
			(troop_add_item, "$g_talk_troop","itm_lady_dress_ruby", imod_lordly),
			(troop_add_item, "$g_talk_troop","itm_light_leather_boots", imod_lordly),
			(troop_add_item, "$g_talk_troop","itm_female_hood", imod_lordly),
			
			# ..and some proficiencies
			(troop_raise_attribute, "$g_talk_troop", ca_strength, 2),
			(troop_raise_attribute, "$g_talk_troop", ca_agility, 2),
			(troop_raise_attribute, "$g_talk_troop", ca_intelligence, 5),
			(troop_raise_attribute, "$g_talk_troop", ca_charisma, 6),
			
			(troop_raise_skill, "$g_talk_troop", skl_athletics, 2),
			(troop_raise_skill, "$g_talk_troop", skl_riding, 1),
			(troop_raise_skill, "$g_talk_troop", skl_trade, 3),
			(troop_raise_skill, "$g_talk_troop", skl_engineer, 2),
			(troop_raise_skill, "$g_talk_troop", skl_first_aid, 2),
			(troop_raise_skill, "$g_talk_troop", skl_surgery, 2),
			(troop_raise_skill, "$g_talk_troop", skl_wound_treatment, 2),
			(troop_raise_skill, "$g_talk_troop", skl_leadership, 3),
			
			(add_xp_to_troop, 200, "$g_talk_troop"),
			
			(try_begin),
				(call_script, "script_troop_get_relation_with_troop", "$g_talk_troop", "trp_player"),
				(le, reg0, 50),
				(call_script, "script_troop_change_relation_with_troop", "$g_talk_troop", "trp_player", 5),
			(try_end),
		]
	],
  
	[
		anyone,
		
		"spouse_join",
		
		[
			(call_script, "script_dplmc_print_player_spouse_says_my_husband_wife_to_s0", "$g_talk_troop", 0),
			(troop_slot_eq, "$g_talk_troop", slot_lord_reputation_type, lrep_moralist),
		],
		
		"Ride out with you to the wars? I must confess to being tempted, if only to see to it that you and your men refrain from the vices to which your sex is susceptible, such as drinking and wenching and plundering and slaughtering prisoners. But I am a woman, a lady of noble lineage, and for a Calradian woman, riding out to war is just not to be done.^^It is not my place. My place is here, maintaining your household and protecting your interests in your absence, and ensuring your hearth is warmed when you return.^^That is my role as a woman, and I am content.", 
		
		"close_window",

		[
			(assign, "$g_leave_encounter", 1),
     
			# no relationship modification
		]
	],
  
	[
		anyone,
		
		"spouse_join",
		
		[
			(call_script, "script_dplmc_print_player_spouse_says_my_husband_wife_to_s0", "$g_talk_troop", 0),
			(troop_slot_eq, "$g_talk_troop", slot_lord_reputation_type, lrep_ambitious),
		],
		
		"What? Ride to the wars like a common camp follower? Spend my days in slaughter like some harlot of a Sword Sister? You presume a great deal, {s0}. I am not some common tavern drek or tomboy mercenary. I am a Lady of Calradia, brought up from birth to assist my husband in the ruling of the household and lands. I seek my glory in the deeds of my husband. Not in my own.^^For me to play a man's part would cheapen me and subject me to the scorn and contempt of every highborn Calradian. I do not take this suggestion kindly and I do not wish to be asked again.", 
		
		"close_window",
		
		[
			(assign, "$g_leave_encounter", 1),
			
			(try_begin),
				(call_script, "script_troop_get_relation_with_troop", "$g_talk_troop", "trp_player"),
				(le, reg0, 20),
				(ge, reg0, -50),
				(call_script, "script_troop_change_relation_with_troop", "$g_talk_troop", "trp_player", -10),
			(try_end),
		]
	],

	[
		anyone,
		
		"spouse_join",
		
		[
			(call_script, "script_dplmc_print_player_spouse_says_my_husband_wife_to_s0", "$g_talk_troop", 0),
			(troop_slot_eq, "$g_talk_troop", slot_lord_reputation_type, lrep_conventional),
		],

		"Oh, {s0}, why do you ask me this? I couldn't ride into battle with you! I've never held a sword in my life! I'd be worse than hopeless! Few Calradians of noble lineage teach their daughters to fight and I'm not sure I would have learned to fight even I'd been given the opportunity. The weakest recruit in your army has more virtue in a fight than I, who have never wielded any weapon deadlier than an embroidery needle. I would get your men killed trying to protect me.^^You are my {s0} and I respect you, but if you wanted a wife who was going to be able to stand with you shoulder to shoulder, shield to shield -- you should have married someone else.", 
		
		"close_window",
		
		[
			(assign, "$g_leave_encounter", 1),

			(try_begin),
				(call_script, "script_troop_get_relation_with_troop", "$g_talk_troop", "trp_player"),
				(le, reg0, 20),
				(ge, reg0, -50),
				(call_script, "script_troop_change_relation_with_troop", "$g_talk_troop", "trp_player", -5),
			(try_end),
		]
	],

Now, a little scheme of what it does depending on the spouse personality:

  • Adventurous: she will LOVE to go with you. If you have a relationship with her of 50 or less, you will get a +15.
  • Otherworldly: she thinks this is very romantic, even though it scares the hell out of her. She wil come, giving you a little bonus of +5 at the same condition as before.
  • Moralist: she thinks it could be a good idea, because she'd be able to "spread the goodness" (in the files, the moralist personality is described like the upstanding for lords)...but she knows her place, and refuses. No relationship changes.
  • Ambitious: WTF?? She's gonna be a queen, not your wandering sexual toy! be off! (if your relationship with her is between -50 and 20, you get a bad -10)
  • Conventional: what would the others think about that?? OMG I can't, I can't...and since you proposed this to me, now I'll dream about it a bit, and that's very bad too! be off, no sex this night. (at the same conditions of "ambitious", you get a -5 in relationship)

That's pretty much all! I haven't thought about the opposite situation, if you play a female...but I "think" that you cannot ask to your husband to follow you (it would be complicated...he has an army of his own). So should be ok.

Any suggestion/correction on the dialogs, bonus, malus etc?


COMPANIONS AS EMISSARY/SPY


Now, if you own a kingdom, you may have noticed as the minister can send your companions in a lot of diplomatic missions...but you cannot ask them directly :razz: as a guy in the suggestion thread as mentioned, it would help a lot.

So I implemented it :smile:

Search for this string in the file module_dialogs.py: ], "Do you have any connections that we could use to our advantage?", "member_intelgathering_1",[]],

Just after, paste this code:

Code:
# simple diplomacy, asking directly to a companion

[
	anyone|plyr,
	
	"member_question_2",
	
	# conditions: the player rules its own kingdom, and the npc he is talking with is a proper companion (not a spouse, for example)
	[
		(faction_slot_eq, "$players_kingdom", slot_faction_leader, "trp_player"),
		(is_between, "$g_talk_troop", companions_begin, companions_end),
	], 
	
	"I need your skills for a very delicate matter",
	
	"roak_dispatch_member",
	
	[]
],

[
	anyone,
	
	"roak_dispatch_member",
	
	[], #TODO: check relation with player
	
	"Of course, you can count on me. What do you need me to do?",
	
	"roak_dispatch_member_2",
	
	[]
],

# spy
[
	anyone|plyr,
	
	"roak_dispatch_member_2",
	
	[],
	
	"I want you to spy out another kingdom",
	
	"roak_member_as_spy",
	
	[]
],

[
	anyone,
	
	"roak_member_as_spy",
	
	[],
	
	"About which kingdom should I collect intelligence?",
	
	"roak_member_as_spy_select",
	
	[
		(assign, "$g_emissary_selected", "$g_talk_troop"),
	]
],

[
	anyone|plyr|repeat_for_factions,
	
	"roak_member_as_spy_select",
	
	[
		(store_repeat_object, ":faction_no"),
		(is_between, ":faction_no", npc_kingdoms_begin, npc_kingdoms_end),
		(faction_slot_eq, ":faction_no", slot_faction_state, sfs_active),
		(faction_get_slot, ":leader_no", ":faction_no", slot_faction_leader),
		(str_store_troop_name, s10, ":leader_no"),
		(str_store_faction_name, s11, ":faction_no"),
		(str_clear, s14),
	],
	
	"{s11}{s14}",
	
	"roak_member_dispatch",
	
	[
		(store_repeat_object, "$g_faction_selected"),
		(assign, "$g_initiative_selected", dplmc_npc_mission_spy_request),
	]
],

[
	anyone|plyr,
	
	"roak_member_as_spy_select",

	[],
		
	"Nevermind",
	
	"member_talk",
		
	[]
],

# diplomatic mission

[
	anyone|plyr,
	
	"roak_dispatch_member_2",
	
	[],
	
	"I want you to meet the king of another faction",
	
	"roak_member_as_emissary",
	
	[]
],

[
	anyone,
	
	"roak_member_as_emissary",
	
	[],
	
	"Which king should I meet?",
	
	"roak_member_as_emissary_select",
	
	[
		(assign, "$g_emissary_selected", "$g_talk_troop"),
	]
],

[
	anyone|plyr|repeat_for_factions,
	
	"roak_member_as_emissary_select",
	
	[
		(store_repeat_object, ":faction_no"),
		(is_between, ":faction_no", npc_kingdoms_begin, npc_kingdoms_end),
		
		##diplomacy start+ Required if the player can be ruler or co-ruler of another faction
		(neg|faction_slot_eq, ":faction_no", slot_faction_leader, "trp_player"),
		(neq, ":faction_no", "$players_kingdom"),
		##diplomacy end+
		(neq, ":faction_no", "fac_player_supporters_faction"),
		(faction_slot_eq, ":faction_no", slot_faction_state, sfs_active),
		(faction_get_slot, ":leader_no", ":faction_no", slot_faction_leader),
		(str_store_troop_name, s10, ":leader_no"),
		(str_store_faction_name, s11, ":faction_no"),
		(str_clear, s14),
		#Has/has not recognized us a monarch
	],
	
	"{s10} of the {s11}{s14}",
	
	"roak_member_as_emissary_what",
	
	[
		(store_repeat_object, "$g_faction_selected"),
	]
],

[
	anyone,
	
	"roak_member_as_emissary_what",
	
	[],
	
	"Fine. What should I tell to {s10} of the {s11}{s14}?",
	
	"roak_member_as_emissary_what_select",
	
	[],
],

[
	anyone|plyr,
	
	"roak_member_as_emissary_what_select",
	
	[
		(store_relation, ":relation", "fac_player_supporters_faction", "$g_faction_selected"),
		(lt, ":relation", 0),
	],
	
	"That our two kingdoms should enter into truce",
	
	"roak_member_dispatch",
	
	[
		(assign, "$g_initiative_selected", npc_mission_peace_request),
	]
],

[
	anyone|plyr,
	
	"roak_member_as_emissary_what_select",

	##diplomacy start+
	#[],
	[
		#Disable when the player is the ruler or co-ruler of an NPC kingdom.
		#Setting up a separate dialog for this is something to do later, but
		#not a high priority.
		#TODO: Consider if there should be an alternative when the player is married to a pretender.
		(neg|is_between, "$players_kingdom", npc_kingdoms_begin, npc_kingdoms_end),
		
		(faction_get_slot, ":leader_no", "$g_faction_selected", slot_faction_leader),#Use reg0 for gender

		(call_script, "script_dplmc_store_troop_is_female", ":leader_no"),
	],#next line "his" to {reg0?her:his}

	"That I wish to put myself under {reg0?her:his} protection, as {reg0?her:his} vassal.",
	
	"roak_member_dispatch",

	##diplomacy end+
	[
		(assign, "$g_initiative_selected", npc_mission_pledge_vassal),
	]
],

[
	anyone|plyr,
	
	"roak_member_as_emissary_what_select",

	[
		(store_relation, ":relation", "fac_player_supporters_faction", "$g_faction_selected"),

		(faction_slot_eq, "$g_faction_selected", slot_faction_recognized_player, 0),

		(ge, ":relation", 0),
	],
		
	"That I wish to express my goodwill, as one monarch to another.",
	
	"roak_member_dispatch",
		
	[
		(assign, "$g_initiative_selected", npc_mission_seek_recognition),
	]
],

#[
#	anyone|plyr,
#	
#	"roak_member_as_emissary_what_select",

#	[
#		(store_relation, ":relation", "fac_player_supporters_faction", "$g_faction_selected"),

#		(ge, ":relation", 0),
#		
#		##diplomacy start+],
#		#(neg|is_between, "$players_kingdom", npc_kingdoms_begin, npc_kingdoms_end),#Disable when the player shares power
#		(faction_get_slot, ":leader_no", "$g_faction_selected", slot_faction_leader),#Use reg0 for gender
#		
#		(call_script, "script_dplmc_store_troop_is_female", ":leader_no"),

#	],#next line "him" to {reg0?her:him}

#	"That I declare war upon {reg0?her:him}.",
#	
#	"minister_declare_war",
#	##diplomacy end+
#	
#	[]
#],

[
	anyone|plyr,
	
	"roak_member_as_emissary_what_select",

	[],
		
	"Nevermind",
	
	"member_talk",
		
	[]
],

# dispatch, either spy or diplomatic

[
	anyone,
	
	"roak_member_dispatch",
	
	[
		(str_store_troop_name, s11, "$g_emissary_selected"),
		(str_store_faction_name, s12, "$g_faction_selected"),
		
		(try_begin),
			(eq, "$g_initiative_selected", dplmc_npc_mission_spy_request),
			
			(str_store_string, s14, "str_dplmc_gather_information"),
			(store_skill_level, ":emissary_spotting", "skl_spotting", "$g_emissary_selected"),
			(val_mul, ":emissary_spotting", 5),
			(val_add, ":emissary_spotting", 65),
			(val_min, ":emissary_spotting", 95),
			(store_random_in_range, ":random", 0, 100),

			(try_begin),#debug
				(eq, "$cheat_mode", 1),
				(assign, reg0, ":emissary_spotting"),
				(display_message, "@{!}DEBUG : emissary_spotting: {reg0}"),
				(assign, reg0, ":random"),
				(display_message, "@{!}DEBUG : random: {reg0}"),
			(try_end),

			(try_begin),
				(ge, ":emissary_spotting", ":random"),
				(assign, "$diplomacy_var", 0), # not caught
			(else_try),
				(lt, ":emissary_spotting", ":random"),
				(assign, "$diplomacy_var", 1), # caught
			(try_end),
			
		(else_try),
			(eq, "$g_initiative_selected", npc_mission_seek_recognition),
			
			(str_store_string, s14, "str_seek_recognition"),
		(else_try),
			(eq, "$g_initiative_selected", npc_mission_pledge_vassal),
			
			(str_store_string, s14, "str_seek_vassalhood"),
		(else_try),
			(eq, "$g_initiative_selected", npc_mission_peace_request),
			
			(str_store_string, s14, "str_seek_a_truce"),
		##diplomacy begin
		(else_try),
			(eq, "$g_initiative_selected", dplmc_npc_mission_nonaggression_request),
			
			(str_store_string, s14, "str_dplmc_conclude_non_agression"),
		##diplomacy end
		(try_end),
	],
	
	"I shall go to the {s12} to {s14} imminently!",
	
	"roak_member_dispatch_confirm",
	
	[
		(assign, "$g_emissary_selected", "$g_talk_troop"),
	]
],

[
	anyone|plyr,
	
	"roak_member_dispatch_confirm",
	
	[],
	
	"Good luck!",
	
	"member_talk",
	
	[
		(troop_set_slot, "$g_emissary_selected", slot_troop_days_on_mission, 3),
		(troop_set_slot, "$g_emissary_selected", slot_troop_current_mission, "$g_initiative_selected"),
		(troop_set_slot, "$g_emissary_selected", slot_troop_mission_object, "$g_faction_selected"),
		
		##diplomacy begin
		(troop_set_slot, "$g_emissary_selected", dplmc_slot_troop_mission_diplomacy, "$diplomacy_var"),
		(troop_set_slot, "$g_emissary_selected", dplmc_slot_troop_mission_diplomacy2, "$diplomacy_var2"),
		##diplomacy end

		(remove_member_from_party, "$g_emissary_selected", "p_main_party"),
	]
],

[
	anyone|plyr,
	
	"roak_member_dispatch_confirm",
	
	[],
	
	"Wait! I've changed my mind. Stay here.",
	
	"member_talk",
	
	[],
],

This allows asking the companion to:

  • Sign a truce
  • Pledge oath as a vassal
  • Recognize the player as a king
  • Sign a non-aggression pact
  • Spy out another kingdom

No gift...this is pretty much the job of a minister/chancellor or whatever, I think. When we are in the field we have no time to collect horses and such :razz:


WIFE QUESTS


This adds the code to allow wife quests (in addition, and separately, from the "political ones": this are just for your relationship with her).

So far I've implemented only one, a simple quest to bring her 1 velvet. It can be easyly extended to allow for different kind of gift. Some more work is required to implement a totally different one, but some of the dull work has been done.

In module_dialogs.py, just after this block of code:

Code:
  [anyone|plyr,"spouse_talk",
   [],
   "Let us think of a way to improve our standing in this realm", "combined_political_quests",[
   (call_script, "script_get_political_quest", "$g_talk_troop"),
   (assign, "$political_quest_found", reg0),
   (assign, "$political_quest_target_troop", reg1),
   (assign, "$political_quest_object_troop", reg2),
 ]],

Add this code:

Code:
	# wife quests

	[
		anyone|plyr,
		
		"spouse_talk",
		
		# FIXME: to change with, probably, "is_between" wife_quests_begin ... etc etc
		# so it will handle this part of the conversation for all of the future quests
		[(neg|check_quest_active, "qst_roak_wife_gift")],
		
		"Is there anything I can do to please you?",
		
		"roak_wife_give_quest",
		
		[
			(call_script, "script_get_quest", "$g_talk_troop"),
			(assign, "$random_quest_no", reg0),
		]
	],
	
	[
		anyone|plyr,
		
		"spouse_talk",
		
		[
			(call_script, "script_get_troop_item_amount", "trp_player", "itm_velvet"),
			(eq, reg0, 1),
		],
		
		"Look what I've brought to you..",
		
		"roak_wife_quest_succeeded",
		
		[]
	],
	
	[
		anyone,
		
		"roak_wife_give_quest",
		
		[(eq, "$random_quest_no", "qst_roak_wife_gift")],
		
		"Well..you are always running here and there, and I often feel alone. Prove me that you still bring me into your heart..show me that you treasure me! A cloth of velvet will do it.",
		
		"roak_wife_give_quest_2",
		
		[]
	],
	
	[
		anyone|plyr,
		
		"roak_wife_give_quest_2",
		
		[],
		
		"I like the idea! I will be back soon",
		
		"spouse_pretalk",
		
		[
			(setup_quest_text, "$random_quest_no"),
			(str_store_string, s2, "@Your wife asked you to get her a gift. Don't disappoint her!"),
			(call_script, "script_start_quest", "$random_quest_no", "$g_talk_troop"),
			
			(troop_add_items, "trp_player", "itm_velvet", 1),
		]
	],
	
	[
		anyone|plyr,
		
		"roak_wife_give_quest_2",
		
		[],
		
		"I'm sorry but I don't have the time now. Farewell",
		
		"spouse_pretalk",
		
		[]
	],
	
	[
		anyone,
		
		"roak_wife_give_quest",
		
		[],
		
		"No, {s0}, I cannot think of anything at the moment..",
		
		"spouse_pretalk",
		
		[]
	],
	
	[
		anyone,
		
		"roak_wife_quest_succeeded",
		
		[],
		
		"It's lovely! Thank you so much!",
		
		"spouse_pretalk",
		
		[
			(troop_remove_items, "trp_player", "itm_velvet", 1),
			(call_script, "script_troop_change_relation_with_troop", "$g_talk_troop", "trp_player", 5),
			(call_script, "script_succeed_quest", "$random_quest_no"),
		]
	],

In module_quests.py, just before ("quests_end", "Quests End", 0, "{!}."), add this:

Code:
	("roak_wife_gift", "A gift for your wife", qf_random_quest, "{!}Your wife asked you to get her a gift. Don't disappoint her!"),
	("roak_placeholder", "{!}blank_quest", qf_random_quest, "{!}placeholder"),
	#("", "", qf_random_quest, ""),

In module_constants.py, just after lady_quests_end_2  = "qst_blank_quest_16" add:

Code:
wife_quests_begin = "qst_roak_wife_gift"
wife_quests_end = "qst_roak_placeholder"

In module_scripts.py, search for the "function" get_quest and just after (assign, ":quests_end_2", mayor_quests_end_2), add:

Code:
      # wife quests
      (else_try),
        (troop_slot_eq, "trp_player", slot_troop_spouse, ":giver_troop"),
      	(assign, ":quests_begin", wife_quests_begin),
        (assign, ":quests_end", wife_quests_end),
        (assign, ":quests_begin_2", 0),
        (assign, ":quests_end_2", 0),

then just before the string # Village Elder quests add:

Code:
	        	# wife quests
	        	(eq, ":quest_no", "qst_roak_wife_gift"),
	        	
	        	(try_begin),
	        		(assign, ":quest_expiration_days", 7),
	        		(assign, ":quest_dont_give_again_period", 1),
				(assign, ":result", ":quest_no"),
	        	(try_end),
	        	
	        (else_try),

And it's finally done :smile:
 
not that i'm particularly interested in doing it :wink: I've just implemented something that was meant to be into Diplomacy (was marked as "TODO" in the code), and if the husband cannot be put into the party...my "job" is done for this feature, is even better :razz:
 
koteko said:
I would really like some suggestions/comments on the dialogs and the rewards...anybody?

Dialogue:

Adventurous: 

Really?  You'd ask me to ride with your band like the old stories?  To be with you in the field and watch your back in the wars?  I've dreamed about this since since I was a little girl!  To see those dreams realized in this modern world would be so amazing!  I shall make ready at once!  Thank you so much, my love!

(Don't forget to give Adventurous ladies 2-300 experience to start with, since according to the minstrels they have ridden and hunted -- maybe also give them leather hunting gear aounting to Light Leather Armor, a Hunter horse, and leather gloves for falconry)

Otherworldly:

You want me to ride with you into the wars?  I've read such things in books and heard the minstrel's tales of women fighting alongside the men.  And I know there are some common women swept up into the wars who fight as Sword Sisters or serve as camp followers.  But I never thought such an opportunity could come to me.  I've never seen a battle up close -- except in the arena of course -- and the thought of having a man rush me with a raised ax terrifies me.  Still -- to sleep under the stars with my love, to see the world, to ride to victory on a gallant steed... these are opportunities rarely offered to women.  I would be doing my sex a disservice not to seize upon it.  I will come with you.

(Otherworldly ladies should be set to level 1 with zero experience, zero practical combat levels such as Power Strike or Athletics, one level in Riding, a high Intelligence level, moderately high Charisma and about 4 Strength.  Their equipment should be a dress, possibly a saddle horse, and possibly a piece of ladies' headgear).

Moralist:

Ride out with you to the wars?  I must confess to being tempted, if only to see to it that you and your men refrain from the vices to which your sex is susceptible, such as drinking and wenching and plundering and slaughtering prisoners.  But I am a woman, a lady of noble lineage, and for a Calradian woman, riding out to war is just not done.  It is not my place.  My place is here, maintaining your household and protecting your interests in your absence, and ensuring your hearth is warm for your return.  That is my role as a woman, and I am content.

Ambitious:

What?  Ride to the wars like a common camp follower?  Spend my days in slaughter like some harlot of a Sword Sister?  You presume a great deal, my husband.  I am not some common tavern drek or tomboy mercenary.  I am a Lady of Calradia, brought up from birth to assist my husband in the ruling of the household and lands.  I seek my glory in the deeds of my husband.  Not in my own.  For me to play a man's part would cheapen me and subject me to the scorn and contempt of every highborn Calradian.  I do not take this suggestion kindly and I do not wish to be asked again.

Conventional:

Oh, my husband, why do you ask me this?  I couldn't ride into battle with you!  I've never held a sword in my life!  I'd be worse than hopeless!  Few Calradians of noble lineage teach their daughters to fight and I'm not sure I would have learned to fight even I'd been given the opportunity.  The weakest recruit in your army has more virtue in a fight than I, who have never wielded any weapon deadlier than an embroidery needle.  I would get your men killed trying to protect me.  I love you, my husband, but if you wanted a wife who was going to be able to stand with you shoulder to shoulder, shield to shield -- you should have married someone else.
 
Hi.
I try to used your instruction to do that for Prophesy of Pendor mod.
But it didn't work.
Could you help me?
 
Back
Top Bottom