Lathrael
Recruit
Proably most people working on mod making know this, but for amateurs like me, i would like to share source codes to add your wife to your party as an effective companion.
First, add this somewhere in spouse_talk;
Now she's in your party! But having no options... for that we do this next;
At start of member_talk:
Now, she can use member menus! But this can lead (and will) lots of bugs and NO STRING errors, unless we do some changes on;
and to keep things clean;
Now, you cannot ask her questions or send her on to errands, (which may lead errors).
Well, if you watched Coupling, you may know the term the "unflushable"... To prevent that let's make an option to send her away to court;
and now, to see her morale bar on conversation screen;
Now it's done!
She basicly stays as your wife in game mechanics, but can do anything a companion does. So she will appear in your court when you are at and all options will be avaiable. But there are few glitches, if she wears any "non-civilian" armors, she will appear naked at castle. And this happened to me few times, her weapon slots got messed up. But if you make her unequip all weapons, back to menu and go to her inv again it will be fixed!
Feel free to use it
Cheers!
-Lath
First, add this somewhere in spouse_talk;
[anyone|plyr, "spouse_talk", [ (troop_get_slot, ":player_spouse", "trp_player", slot_troop_spouse), (eq, "$g_talk_troop", ":player_spouse"), ], "I want you to join my party", "spouse_join", []], [anyone, "spouse_join", [ ], "Of course my love!", "close_window", [ (party_add_members, "p_main_party", "$g_talk_troop", 1), (assign, "$g_leave_encounter", 1), ]], |
Now she's in your party! But having no options... for that we do this next;
At start of member_talk:
[anyone,"member_chat", [ (store_conversation_troop,"$g_talk_troop"), (troop_slot_eq, "$g_talk_troop", slot_troop_occupation, slto_kingdom_lady), (troop_slot_eq, "trp_player", slot_troop_spouse, "$g_talk_troop"), ], "Yes, my love?", "member_talk", []], |
Now, she can use member menus! But this can lead (and will) lots of bugs and NO STRING errors, unless we do some changes on;
[anyone,"member_chat", [ (store_conversation_troop,"$g_talk_troop"), (troop_is_hero,"$g_talk_troop"), (troop_get_slot, ":honorific", "$g_talk_troop", slot_troop_honorific), (str_store_string, s5, ":honorific"), (neg|troop_slot_eq, "trp_player", slot_troop_spouse, "$g_talk_troop"), ], "Yes, {s5}?", "member_talk",.................................................... |
and to keep things clean;
[anyone|plyr,"member_talk", [ (neg|troop_slot_eq, "trp_player", slot_troop_spouse, "$g_talk_troop"), ], "We need to separate for a while.", "member_separate",[..................... [anyone|plyr,"member_talk", [ (neg|troop_slot_eq, "trp_player", slot_troop_spouse, "$g_talk_troop"), ], "I'd like to ask you something.", "member_question",[]], |
Now, you cannot ask her questions or send her on to errands, (which may lead errors).
Well, if you watched Coupling, you may know the term the "unflushable"... To prevent that let's make an option to send her away to court;
[anyone|plyr,"member_talk", [ (troop_slot_eq, "$g_talk_troop", slot_troop_occupation, slto_kingdom_lady), (troop_slot_eq, "trp_player", slot_troop_spouse, "$g_talk_troop"), ], "This is unsafe for you. You should get back to our court.", "spouse_leave",[]], [anyone, "spouse_leave", [ ], "Are you sure, my love?", "spouse_leave_confirm", []], [anyone|plyr,"spouse_leave_confirm", [], "Yes.", "close_window", [(remove_member_from_party, "$g_talk_troop"), ]], [anyone|plyr,"spouse_leave_confirm", [], "No, I'd rather have you at my side.", "do_member_trade",[]], |
and now, to see her morale bar on conversation screen;
[anyone ,"member_chat", [ (store_conversation_troop, "$g_talk_troop"), (try_begin), (is_between, "$g_talk_troop", companions_begin, companions_end), (talk_info_show, 1), (call_script, "script_setup_talk_info_companions"), (else_try), (troop_is_hero, "$g_talk_troop"), (talk_info_show, 1), (call_script, "script_setup_talk_info"), (else_try), (is_between, "$g_talk_troop", pretenders_begin, pretenders_end), (talk_info_show, 1), (call_script, "script_setup_talk_info"), (try_end), |
Now it's done!
She basicly stays as your wife in game mechanics, but can do anything a companion does. So she will appear in your court when you are at and all options will be avaiable. But there are few glitches, if she wears any "non-civilian" armors, she will appear naked at castle. And this happened to me few times, her weapon slots got messed up. But if you make her unequip all weapons, back to menu and go to her inv again it will be fixed!
Feel free to use it
Cheers!
-Lath