Author Topic: [Code] MnB 1.011 New Starting Up (Splitted into 3 posts)  (Read 2179 times)

0 Members and 1 Guest are viewing this topic.

dunde

  • Grandmaster Knight
  • *
  • Curious Coder of The Vision
    • View Profile
  • Faction: Swadian
  • WB
[Code] MnB 1.011 New Starting Up (Splitted into 3 posts)
« on: April 14, 2010, 06:25:44 AM »
This is an alternative way to create a new game, with less clicks and randomizeable option.
ScreenShot :


Here you are, the code :

(click to show/hide)

(click to show/hide)


on module_presentations.py

(click to show/hide)

(click to show/hide)

EDIT :
add main_party constants to module_constants.py
« Last Edit: April 14, 2010, 02:42:20 PM by dunde »

dunde

  • Grandmaster Knight
  • *
  • Curious Coder of The Vision
    • View Profile
  • Faction: Swadian
  • WB
Re: MnB 1.011 New Starting Up (Splitted into 3 posts)
« Reply #1 on: April 14, 2010, 06:26:21 AM »
(click to show/hide)

(click to show/hide)
« Last Edit: April 14, 2010, 02:50:40 PM by dunde »

dunde

  • Grandmaster Knight
  • *
  • Curious Coder of The Vision
    • View Profile
  • Faction: Swadian
  • WB
Re: MnB 1.011 New Starting Up (Splitted into 3 posts)
« Reply #2 on: April 14, 2010, 06:26:46 AM »
(click to show/hide)

« Last Edit: April 14, 2010, 06:42:31 AM by dunde »

Havoc

  • Four Hooves, No Love
  • Grandmaster Knight
  • *
  • Judging you.
    • View Profile
  • Faction: Swadian
  • M&BWB
Re: MnB 1.011 New Starting Up (Splitted into 3 posts)
« Reply #3 on: April 14, 2010, 06:47:55 AM »
Wow, impressive.
i always hated it how indians ended up in south america
Quote from: My Girlfriend
You are not getting me pregnant so you can turn the baby into a rabbit.

zeusbenedict

  • Regular
  • *
  • What is personal text.
    • View Profile
  • Faction: Sarranid
Re: MnB 1.011 New Starting Up (Splitted into 3 posts)
« Reply #4 on: April 14, 2010, 08:42:04 AM »
Whoah. Can I use this?


Wait, is this possible with WB?

dunde

  • Grandmaster Knight
  • *
  • Curious Coder of The Vision
    • View Profile
  • Faction: Swadian
  • WB
Re: MnB 1.011 New Starting Up (Splitted into 3 posts)
« Reply #5 on: April 14, 2010, 10:53:27 AM »
Whoah. Can I use this?

Sure, it was posted here to be used

Wait, is this possible with WB?

I don't have WB yet to try, but I'm sure with some adjustments, it can be used for WB

KON_Air

  • Master Knight
  • *
    • View Profile
  • Faction: Neutral
  • MP nick: KON_Air
  • M&BWB
Re: MnB 1.011 New Starting Up (Splitted into 3 posts)
« Reply #6 on: April 14, 2010, 01:25:23 PM »
It works differences are trivial;
1-Warband, for some reason wants skl_xyz's in "". So skl_looting will give error but "skl_looting" won't.
2-Menus moved around a bit.
3-Kingdom_heroes_begin/end constant is gone, replaced with active_npcs_begin/end.
4-Replace main_party with "p_main_party" in banner selection presentation.

That's pretty much it. There are a bunch of defined constants for WB characters backgrounds, but they seem to do nothing, so nothing is missed by not assigning them anything.

Code: [Select]
#-- Dunde's Player Background BEGIN
#All "" marks placed one by one by KON_Air
#Because I totally forgot Replace functions of my editor.
("update_strings",
 [(store_add, ":str_pointer", "$character_nationality", nationality_init),
  (str_store_string, s12, ":str_pointer"),
  (store_add, ":str_pointer", "$background_parent", parent_init),
  (str_store_string, s13, ":str_pointer"),
  (store_add, ":str_pointer", "$background_childhood", childhood_init),
  (str_store_string, s14, ":str_pointer"),
  (store_add, ":str_pointer", "$background_job", job_init),
  (str_store_string, s15, ":str_pointer"),
  (store_add, ":str_pointer", "$background_reason", reason_init),
  (str_store_string, s16, ":str_pointer"),
  (str_clear, s17),
  (store_add, ":str_pointer", "$character_nationality", story_nationality_init),
  (str_store_string, s1, ":str_pointer"),
  (str_store_string, s17, "str_story_all"),
  (store_add, ":str_pointer", "$background_parent", story_parent_init),
  (str_store_string, s1, ":str_pointer"),
  (str_store_string, s17, "str_story_all"),
  (store_add, ":str_pointer", "$background_childhood", story_childhood_init),
  (str_store_string, s1, ":str_pointer"),
  (str_store_string, s17, "str_story_all"),
  (store_add, ":str_pointer", "$background_job", story_job_init),
  (str_store_string, s1, ":str_pointer"),
  (str_store_string, s17, "str_story_all"),
  (store_add, ":str_pointer", "$background_reason", story_reason_init),
  (str_store_string, s1, ":str_pointer"),
  (str_store_string, s17, "str_story_all"),
  (overlay_set_text, "$g_presentation_obj_11", "str_gender_value"),
  (overlay_set_text, "$g_presentation_obj_12", "str_nationality_value"),
  (overlay_set_text, "$g_presentation_obj_13", "str_parent_value"),
  (overlay_set_text, "$g_presentation_obj_14", "str_childhood_value"),
  (overlay_set_text, "$g_presentation_obj_15", "str_jobs_value"),
  (overlay_set_text, "$g_presentation_obj_16", "str_reason_value"),
  (overlay_set_text, "$g_presentation_obj_7", "str_story"),]),

("init_char_stat",
 [(set_show_messages, 0),
  # Gender     
  (try_begin),
     (eq,"$character_gender", tf_male),
     (troop_raise_attribute, player,ca_strength,1),
     (troop_raise_attribute, player,ca_charisma,1),
  (else_try),
     (eq,"$character_gender", tf_female),
     (troop_raise_attribute, player,ca_agility,1),
     (troop_raise_attribute, player,ca_intelligence,1),
  (try_end),
  (troop_raise_attribute, player,ca_strength,1),
  (troop_raise_attribute, player,ca_agility,1),
  (troop_raise_attribute, player,ca_charisma,1),
  (troop_raise_skill, player,skl_leadership,1),
  (troop_raise_skill, player,skl_riding,1),
  ## Commented Parts : Only for my Mod
  ## Nationality
  (assign, ":char_type", "$character_gender"),
  ##(try_begin),
  ##   (eq, "$character_nationality", 4),
  ##   (val_or, ":char_type", tf_tall),
  ##(try_end),
  ##(store_add, ":slot", ":char_type", slot_item_normal_male),
  (troop_set_type, player, ":char_type"),
  ##(troop_set_slot, player, slot_troop_gender, ":slot"),
  # Parent
  (try_begin),
     (eq,"$background_parent",1),
     (eq,"$character_gender",tf_male),
     (troop_raise_attribute, player,ca_intelligence,1),
     (troop_raise_attribute, player,ca_charisma,2),
     (troop_raise_skill, player,"skl_weapon_master",1),
     (troop_raise_skill, player,"skl_power_strike",1),
     (troop_raise_skill, player,"skl_riding",1),
     (troop_raise_skill, player,"skl_tactics",1),
     (troop_raise_skill, player,"skl_leadership",1),
     (troop_raise_proficiency, player,wpt_one_handed_weapon,10),
     (troop_raise_proficiency, player,wpt_two_handed_weapon,10),
     (troop_raise_proficiency, player,wpt_polearm,10),
     (troop_add_item, player,"itm_tab_shield_round_a",imod_battered),
     (troop_set_slot, player, slot_troop_renown, 100),
     (call_script, "script_change_player_honor", 3),
     (troop_add_gold, player, 100),
  (else_try),
     (eq,"$background_parent",1),
     (eq,"$character_gender",tf_female),
     (troop_raise_attribute, player,ca_intelligence,2),
     (troop_raise_attribute, player,ca_charisma,1),
     (troop_raise_skill, player,"skl_wound_treatment",1),
     (troop_raise_skill, player,"skl_riding",2),
     (troop_raise_skill, player,"skl_first_aid",1),
     (troop_raise_skill, player,"skl_leadership",1),
     (troop_raise_proficiency, player,wpt_one_handed_weapon,20),
     (troop_set_slot, player, slot_troop_renown, 50),
     (troop_add_item, player,"itm_tab_shield_round_a",imod_battered),
     (troop_add_gold, player, 100),
  (else_try),
     (eq,"$background_parent",2),
     (troop_raise_attribute, player,ca_intelligence,2),
     (troop_raise_attribute, player,ca_charisma,1),
     (troop_raise_skill, player,"skl_riding",1),
     (troop_raise_skill, player,"skl_leadership",1),
     (troop_raise_skill, player,"skl_trade",2),
     (troop_raise_skill, player,"skl_inventory_management",1),
     (troop_raise_proficiency, player,wpt_two_handed_weapon,10),
     (troop_add_gold, player, 250),
     (troop_set_slot, player, slot_troop_renown, 20),
  (else_try),
     (eq,"$background_parent",3),
     (troop_raise_attribute, player,ca_strength,1),
     (troop_raise_attribute, player,ca_agility,1),
     (troop_raise_attribute, player,ca_charisma,1),
     (troop_raise_skill, player,"skl_ironflesh",1),
     (troop_raise_skill, player,"skl_power_strike",1),
     (troop_raise_skill, player,"skl_weapon_master",1),
     (troop_raise_skill, player,"skl_leadership",1),
     (troop_raise_skill, player,"skl_trainer",1),
     (troop_raise_proficiency, player,wpt_one_handed_weapon,10),
     (troop_raise_proficiency, player,wpt_two_handed_weapon,15),
     (troop_raise_proficiency, player,wpt_polearm,20),
     (troop_raise_proficiency, player,wpt_throwing,10),
     (troop_add_item, player,"itm_tab_shield_kite_b",imod_battered),
     (troop_add_gold, player, 50),
     (troop_set_slot, player, slot_troop_renown, 10),
  (else_try),
     (eq,"$background_parent",4),
     (troop_raise_attribute, player,ca_strength,1),
     (troop_raise_attribute, player,ca_agility,2),
     (troop_raise_skill, player,"skl_power_draw",1),
     (troop_raise_skill, player,"skl_tracking",1),
     (troop_raise_skill, player,"skl_pathfinding",1),
     (troop_raise_skill, player,"skl_spotting",1),
     (troop_raise_skill, player,"skl_athletics",1),
     (troop_raise_proficiency, player,wpt_two_handed_weapon,10),
     (troop_raise_proficiency, player,wpt_archery,30),
     (troop_add_gold, player, 30),
  (else_try),
     (eq,"$background_parent",5),
     (eq,"$character_gender",tf_male),
     (troop_raise_attribute, player,ca_strength,1),
     (troop_raise_attribute, player,ca_agility,1),
     (troop_raise_attribute, player,ca_intelligence,1),
     (troop_raise_skill, player,"skl_power_draw",1),
     (troop_raise_skill, player,"skl_horse_archery",1),
     (troop_raise_skill, player,"skl_pathfinding",1),
     (troop_raise_skill, player,"skl_riding",2),
     (troop_raise_proficiency, player,wpt_one_handed_weapon,10),
     (troop_raise_proficiency, player,wpt_archery,30),
     (troop_raise_proficiency, player,wpt_throwing,10),
     (troop_add_item, player,"itm_tab_shield_small_round_a",imod_battered),
     (troop_add_gold, player, 15),
     (troop_set_slot, player, slot_troop_renown, 10),
  (else_try),
     (eq,"$background_parent",5),
     (eq,"$character_gender",tf_female),
     (troop_raise_attribute, player,ca_strength,1),
     (troop_raise_attribute, player,ca_agility,1),
     (troop_raise_attribute, player,ca_intelligence,1),
     (troop_raise_skill, player,"skl_wound_treatment",1),
     (troop_raise_skill, player,"skl_first_aid",1),
     (troop_raise_skill, player,"skl_pathfinding",1),
     (troop_raise_skill, player,"skl_riding",2),
     (troop_raise_proficiency, player,wpt_one_handed_weapon,5),
     (troop_raise_proficiency, player,wpt_archery,20),
     (troop_raise_proficiency, player,wpt_throwing,5),
     (troop_add_item, player,"itm_tab_shield_small_round_a",imod_battered),
     (troop_add_gold, player, 20),
  (else_try),
     (eq,"$background_parent",6),
     (troop_raise_attribute, player,ca_agility,3),
     (troop_raise_skill, player,"skl_athletics",2),
     (troop_raise_skill, player,"skl_power_throw",1),
     (troop_raise_skill, player,"skl_inventory_management",1),
     (troop_raise_skill, player,"skl_looting",1),
     (troop_raise_proficiency, player,wpt_one_handed_weapon,20),
     (troop_raise_proficiency, player,wpt_throwing,20),
     (troop_add_item, player,"itm_throwing_knives",0),
     (troop_add_gold, player, 25),
  (else_try),
     (eq,"$background_parent",7),
     (troop_raise_attribute, player,ca_strength,1),
     (troop_raise_attribute, player,ca_intelligence,2),
     (troop_raise_attribute, player,ca_charisma,1),
     (troop_raise_skill, player,"skl_wound_treatment",1),
     (troop_raise_skill, player,"skl_leadership",1),
     (troop_raise_skill, player,"skl_prisoner_management",1),
     (troop_raise_proficiency, player,0,10),
     (troop_add_item, player,"itm_robe",0),
     (troop_add_item, player,"itm_wrapping_boots",0),
     (troop_add_item, player,"itm_club",0),
     (troop_add_item, player,"itm_smoked_fish",0),
     (troop_add_item, player,"itm_sumpter_horse",0),
     (troop_add_gold, player, 10),
     (troop_set_slot, player, slot_troop_renown, 10),
  (try_end),
  # Childhood
  (try_begin),
     (eq,"$background_childhood",1),
     (troop_raise_attribute, player,ca_charisma,1),
     (troop_raise_attribute, player,ca_strength,1),
     (troop_raise_skill, player,"skl_power_strike",1),
     (troop_raise_skill, player,"skl_persuasion",1),
     (troop_raise_proficiency, player,wpt_one_handed_weapon,15),
     (troop_raise_proficiency, player,wpt_polearm,5),
  (else_try),
     (eq,"$background_childhood",2),
     (troop_raise_attribute, player,ca_intelligence,1),
     (troop_raise_attribute, player,ca_strength,1),
     (troop_raise_skill, player,"skl_engineer",1),
     (troop_raise_skill, player,"skl_trade",1),
  (else_try),
     (eq,"$background_childhood",3),
     (troop_raise_attribute, player,ca_agility,1),
     (troop_raise_attribute, player,ca_intelligence,1),
     (troop_raise_skill, player,"skl_spotting",1),
     (troop_raise_skill, player,"skl_looting",1),
     (troop_raise_proficiency, player,wpt_one_handed_weapon,15),
     (troop_raise_proficiency, player,wpt_throwing,5),
  (else_try),
     (eq,"$background_childhood",4),
     (troop_raise_attribute, player,ca_strength,1),
     (troop_raise_attribute, player,ca_agility,1),
     (troop_raise_skill, player,"skl_horse_archery",1),
     (troop_raise_skill, player,"skl_power_throw",1),
     (troop_raise_proficiency, player,wpt_archery,15),
     (call_script,"script_change_troop_renown", player, 5),
  (else_try),
     (eq,"$background_childhood",5),
     (troop_raise_attribute, player,ca_intelligence,1),
     (troop_raise_attribute, player,ca_charisma,1),
     (troop_raise_skill, player,"skl_inventory_management",1),
     (troop_raise_skill, player,"skl_trade",1),
  (else_try),
     (eq,"$background_childhood",6),
     (troop_raise_attribute, player,ca_intelligence,1),
     (troop_raise_attribute, player,ca_charisma,1),
     (troop_raise_skill, player,"skl_athletics",1),
     (troop_raise_skill, player,"skl_riding",1),
     (troop_raise_proficiency, player,1,5),
     (troop_raise_proficiency, player,2,5),
     (call_script,"script_change_troop_renown", player, 15),
  (else_try),
     (eq,"$background_childhood",7),
     (troop_raise_attribute, player,ca_charisma,1),#3),
     (troop_raise_attribute, player,ca_agility,1),
     (troop_raise_skill, player,"skl_weapon_master",2),
     (troop_raise_proficiency, player,0,15),
     (troop_raise_proficiency, player,2,10),
     (troop_raise_proficiency, player,4,10),
     (call_script,"script_change_troop_renown", player, 20),
  (else_try),
     (eq,"$background_childhood",8),
     (troop_raise_attribute, player,ca_intelligence,1),
     (troop_raise_attribute, player,ca_charisma,1),
     (troop_raise_skill, player,"skl_leadership",1),
     (troop_raise_skill, player,"skl_tactics",1),
     (troop_raise_proficiency, player,0,10),
     (troop_raise_proficiency, player,1,10),
     (call_script,"script_change_troop_renown", player, 15),
  (else_try),
     (eq,"$background_childhood",9),
     (troop_raise_attribute, player,ca_intelligence,1),
     (troop_raise_attribute, player,ca_charisma,1),
     (troop_raise_skill, player,"skl_leadership",1),
     (troop_raise_skill, player,"skl_first_aid",1),
     (troop_raise_proficiency, player,2,30),
     (call_script,"script_change_troop_renown", player, 5),
  (try_end),
  # Job
  (try_begin),
     (eq,"$background_job",1),
     (troop_raise_attribute, player,ca_strength,2),
     (troop_raise_skill, player,"skl_power_strike",1),
     (troop_raise_skill, player,"skl_looting",1),
     (troop_raise_skill, player,skl_leadership,2),
     (troop_add_gold, player, 10),
     (try_begin),
        (this_or_next|player_has_item,"itm_sword_medieval_b"),
        (troop_has_item_equipped,player,"itm_sword_medieval_b"),
        (troop_remove_item, player,"itm_sword_medieval_b"),
     (try_end),
     (try_begin),
        (this_or_next|player_has_item,"itm_sword_medieval_c"),
        (troop_has_item_equipped,player,"itm_sword_medieval_c"),
        (troop_remove_item, player,"itm_sword_medieval_c"),
     (try_end),
     (troop_add_item, player,"itm_sword_medieval_b_small",0),
     (troop_add_item, player,"itm_wooden_shield",imod_battered),
     (troop_add_item, player,"itm_leather_jerkin",imod_ragged),
     (troop_add_item, player,"itm_hunting_crossbow", 0),
     (troop_add_item, player,"itm_bolts", 0),
     (troop_add_item, player,"itm_saddle_horse",imod_swaybacked),
     (troop_add_item, player,"itm_smoked_fish",0),
     (troop_raise_proficiency, player,0,10),
     (troop_raise_proficiency, player,4,10),
  (else_try),
     (eq,"$background_job",2),
     (troop_raise_attribute, player,ca_agility,2),
     (troop_raise_skill, player,"skl_weapon_master",3),
     (troop_raise_skill, player,"skl_athletics",1),
     (try_begin),
       (this_or_next|player_has_item,"itm_hide_boots"),
       (troop_has_item_equipped,player,"itm_hide_boots"),
       (troop_remove_item, player,"itm_hide_boots"),
     (try_end),
     (troop_add_item, player,"itm_khergit_guard_helmet",imod_crude),
     (troop_add_item, player,"itm_mail_chausses",imod_crude),
     (troop_add_item, player,"itm_sword_khergit_1",imod_plain),
     (troop_add_item, player,"itm_hunting_crossbow", 0),
     (troop_add_item, player,"itm_bolts", 0),
     (troop_add_item, player,"itm_saddle_horse",imod_swaybacked),
     (troop_add_item, player,"itm_smoked_fish",0),
     (troop_add_gold, player, 20),
     (troop_raise_proficiency, player,wpt_polearm,20),
     (troop_raise_proficiency, player,wpt_one_handed_weapon,20),
  (else_try),
     (eq,"$background_job",3),
     (eq,"$character_gender",tf_male),
     (troop_raise_attribute, player,ca_strength,1),
     (troop_raise_attribute, player,ca_agility,1),
     (troop_raise_skill, player,"skl_riding",1),
     (troop_raise_skill, player,"skl_weapon_master",1),
     (troop_raise_skill, player,"skl_power_strike",1),
     (troop_raise_skill, player,"skl_leadership",1),
     (troop_add_gold, player, 20),
     (troop_raise_proficiency, player,wpt_one_handed_weapon,30),
     (troop_raise_proficiency, player,wpt_two_handed_weapon,30),
     (troop_raise_proficiency, player,wpt_polearm,30),
     (troop_raise_proficiency, player,wpt_archery,10),
     (troop_raise_proficiency, player,wpt_crossbow,10),
     (troop_raise_proficiency, player,wpt_throwing,10),
     (troop_add_item, player,"itm_leather_jerkin",imod_ragged),
     (troop_add_item, player,"itm_leather_boots",imod_tattered),
     (troop_add_item, player,"itm_sword_medieval_a", imod_rusty),
     (troop_add_item, player,"itm_hunting_crossbow",0),
     (troop_add_item, player,"itm_bolts",0),
     (troop_add_item, player,"itm_saddle_horse",imod_swaybacked),
     (troop_add_item, player,"itm_smoked_fish",0),
  (else_try),
     (eq,"$background_job",3),
     (eq,"$character_gender",tf_female),
     (troop_raise_attribute, player,ca_intelligence,1),
     (troop_raise_attribute, player,ca_charisma,1),
     (troop_raise_skill, player,"skl_persuasion",2),
     (troop_raise_skill, player,"skl_riding",1),
     (troop_raise_skill, player,"skl_wound_treatment",1),
     (troop_add_item, player,"itm_dagger", 0),
     (troop_add_item, player,"itm_hunting_crossbow",0),
     (troop_add_item, player,"itm_bolts",0),
     (troop_add_item, player,"itm_courser", imod_spirited),
     (troop_add_item, player,"itm_woolen_hood",imod_sturdy),
     (troop_add_item, player,"itm_woolen_dress",imod_sturdy),
     (troop_add_gold, player, 100),
     (troop_raise_proficiency, player,wpt_one_handed_weapon,10),
     (troop_raise_proficiency, player,wpt_crossbow,15),
     (troop_add_item, player,"itm_smoked_fish",0),
  (else_try),
     (eq,"$background_job",4),
     (troop_raise_attribute, player,ca_charisma,2),
     (troop_raise_skill, player,"skl_weapon_master",1),
     (troop_raise_skill, player,"skl_persuasion",1),
     (troop_raise_skill, player,"skl_leadership",1),
     (troop_raise_skill, player,"skl_pathfinding",1),
     (troop_add_gold, player, 80),
     (troop_raise_proficiency, player,wpt_one_handed_weapon,25),
     (troop_raise_proficiency, player,wpt_crossbow,10),
     (troop_add_item, player,"itm_tabard",imod_sturdy),
     (troop_add_item, player,"itm_leather_boots",imod_ragged),
     (troop_add_item, player,"itm_sword_medieval_a", imod_rusty),
     (troop_add_item, player,"itm_hunting_crossbow", 0),
     (troop_add_item, player,"itm_bolts", 0),
     (troop_add_item, player,"itm_saddle_horse",imod_swaybacked),
     (troop_add_item, player,"itm_smoked_fish",0),
  (else_try),
     (eq,"$background_job",5),
     (troop_raise_attribute, player,ca_intelligence,2),
     (troop_raise_skill, player,"skl_weapon_master",1),
     (troop_raise_skill, player,"skl_surgery",1),
     (troop_raise_skill, player,"skl_wound_treatment",1),
     (troop_raise_skill, player,"skl_persuasion",1),
     (troop_add_gold, player, 80),
     (troop_raise_proficiency, player,wpt_one_handed_weapon,20),
     (troop_raise_proficiency, player,wpt_crossbow,20),
     (troop_add_item, player,"itm_linen_tunic",imod_sturdy),
     (troop_add_item, player,"itm_woolen_hose",0),
     (troop_add_item, player,"itm_sword_medieval_a", imod_rusty),
     (troop_add_item, player,"itm_hunting_crossbow", 0),
     (troop_add_item, player,"itm_bolts", 0),
     (troop_add_item, player,"itm_saddle_horse",imod_swaybacked),
     (troop_add_item, player,"itm_smoked_fish",0),
     (store_random_in_range, ":book_no", books_begin, books_end),
     (troop_add_item, player,":book_no",0),
  (else_try),
     (eq,"$background_job",6),
     (troop_raise_attribute, player,ca_charisma,1),
     (troop_raise_attribute, player,ca_intelligence,1),
     (troop_raise_skill, player,"skl_riding",1),
     (troop_raise_skill, player,"skl_trade",1),
     (troop_raise_skill, player,"skl_pathfinding",1),
     (troop_raise_skill, player,"skl_inventory_management",1),
     (troop_add_item, player,"itm_leather_gloves",imod_plain),
     (troop_add_gold, player, 90),
     (troop_raise_proficiency, player,wpt_polearm,15),
     (troop_add_item, player,"itm_leather_jacket",0),
     (troop_add_item, player,"itm_leather_boots",imod_ragged),
     (troop_add_item, player,"itm_fur_hat",0),
     (troop_add_item, player,"itm_staff",0),
     (troop_add_item, player,"itm_hunting_crossbow",0),
     (troop_add_item, player,"itm_bolts",0),
     (troop_add_item, player,"itm_saddle_horse",0),
     (troop_add_item, player,"itm_sumpter_horse",0),
     (troop_add_item, player,"itm_linen",0),
     (troop_add_item, player,"itm_pottery",0),
     (troop_add_item, player,"itm_wool",0),
     (troop_add_item, player,"itm_wool",0),
     (troop_add_item, player,"itm_smoked_fish",0),
  (else_try),
     (eq,"$background_job",7),
     (troop_raise_attribute, player,ca_strength,1),
     (troop_raise_attribute, player,ca_intelligence,1),
     (troop_raise_skill, player,"skl_weapon_master",1),
     (troop_raise_skill, player,"skl_engineer",1),
     (troop_raise_skill, player,"skl_tactics",1),
     (troop_raise_skill, player,"skl_trade",1),
     (troop_raise_proficiency, player,wpt_one_handed_weapon,15),
     (troop_add_gold, player, 100),
     (troop_add_item, player,"itm_leather_boots",imod_ragged),
     (troop_add_item, player,"itm_coarse_tunic",0),
     (troop_add_item, player,"itm_sword_medieval_b", imod_balanced),
     (troop_add_item, player,"itm_hunting_crossbow",0),
     (troop_add_item, player,"itm_bolts",0),
     (troop_add_item, player,"itm_tools",0),
     (troop_add_item, player,"itm_saddle_horse",0),
     (troop_add_item, player,"itm_smoked_fish",0),
  (else_try),
     (eq,"$background_job",8),
     (troop_raise_attribute, player,ca_strength,1),
     (troop_raise_attribute, player,ca_agility,1),
     (troop_raise_skill, player,"skl_power_draw",1),
     (troop_raise_skill, player,"skl_tracking",1),
     (troop_raise_skill, player,"skl_spotting",1),
     (troop_raise_skill, player,"skl_athletics",1),
     (troop_add_gold, player, 10),
     (troop_raise_proficiency, player,wpt_polearm,10),
     (troop_raise_proficiency, player,wpt_archery,35),
     (troop_add_item, player,"itm_axe",imod_chipped),
     (troop_add_item, player,"itm_rawhide_coat",0),
     (troop_add_item, player,"itm_hide_boots",0),
     (troop_add_item, player,"itm_hunting_bow",0),
     (troop_add_item, player,"itm_barbed_arrows",0),
     (troop_add_item, player,"itm_sumpter_horse",imod_heavy),
     (troop_add_item, player,"itm_dried_meat",0),
     (troop_add_item, player,"itm_dried_meat",0),
     (troop_add_item, player,"itm_furs",0),
     (troop_add_item, player,"itm_furs",0),
  (else_try),
     (eq,"$background_job",9),
     (troop_raise_attribute, player,ca_intelligence,1),
     (troop_raise_attribute, player,ca_charisma,1),
     (troop_raise_skill, player,"skl_trainer",1),
     (troop_raise_skill, player,"skl_wound_treatment",1),
     (troop_raise_skill, player,"skl_first_aid",1),
     (troop_raise_skill, player,"skl_surgery",1),
     (troop_add_item, player,"itm_leather_gloves",imod_ragged),
     (troop_add_item, player,"itm_quarter_staff",imod_heavy),
     (troop_add_item, player,"itm_black_hood",0),
     (troop_add_item, player,"itm_leather_jerkin",imod_ragged),
     (troop_add_item, player,"itm_hunting_crossbow", 0),
     (troop_add_item, player,"itm_bolts", 0),
     (troop_add_item, player,"itm_saddle_horse",imod_swaybacked),
     (troop_add_item, player,"itm_smoked_fish",0),
     (troop_add_gold, player, 10),
     (troop_raise_proficiency, player,wpt_polearm,50),
  (try_end),
  # Reason
  (try_begin),
     (eq,"$background_reason",1),
     (troop_raise_attribute, player,ca_strength,2),
     (troop_raise_skill, player,"skl_power_strike",1),
  (else_try),
     (eq,"$background_reason",2),
     (troop_raise_attribute, player,ca_charisma,2),
     (troop_raise_skill, player,"skl_ironflesh",1),
  (else_try),
     (eq,"$background_reason",3),
     (troop_raise_attribute, player,ca_agility,2),
     (troop_raise_skill, player,"skl_pathfinding",1),
  (else_try),
     (eq,"$background_reason",4),
     (troop_raise_attribute, player,ca_charisma,1),
     (troop_raise_attribute, player,ca_intelligence,1),
     (troop_raise_skill, player,"skl_wound_treatment",1),
     (troop_raise_proficiency, player,5,10),
  (else_try),
     (eq,"$background_reason",5),
     (troop_raise_attribute, player,ca_strength,1),
     (troop_raise_attribute, player,ca_intelligence,1),
     (troop_raise_skill, player,"skl_weapon_master",1),
  (else_try),
     (eq,"$background_reason",6),
     (troop_raise_attribute, player,ca_agility,1),
     (troop_raise_attribute, player,ca_intelligence,1),
     (troop_raise_skill, player,"skl_looting",1),
  (try_end),
  (set_show_messages, 1),
  (jump_to_menu, "mnu_start_phase_2"),]),

("randomize_background",
 [(store_script_param_1, ":in_presentation"),
  (store_random_in_range, reg11,   0,  200),
  (store_random_in_range, reg12, 100,  600),
  (store_random_in_range, reg13, 100,  800),
  (store_random_in_range, reg14, 100, 1000),
  (store_random_in_range, reg15, 100, 1000),
  (store_random_in_range, reg16, 100,  700),
  (store_div, "$character_gender", reg11, 100),
  (store_div, "$character_nationality", reg12, 100),
  (store_div, "$background_parent", reg13, 100),
  (store_div, "$background_childhood", reg14, 100),
  (store_div, "$background_job", reg15, 100),
  (store_div, "$background_reason", reg16, 100),
  (try_begin),
     (eq, ":in_presentation", 1),
     (store_mul, reg11, "$character_gender", 100),
     (store_mul, reg12, "$character_nationality", 100),
     (store_mul, reg13, "$background_parent", 100),
     (store_mul, reg14, "$background_childhood", 100),
     (store_mul, reg15, "$background_job", 100),
     (store_mul, reg16, "$background_reason", 100),     
     (overlay_set_val, "$g_presentation_obj_21", reg11),
     (overlay_set_val, "$g_presentation_obj_22", reg12),
     (overlay_set_val, "$g_presentation_obj_23", reg13),
     (overlay_set_val, "$g_presentation_obj_24", reg14),
     (overlay_set_val, "$g_presentation_obj_25", reg15),
     (overlay_set_val, "$g_presentation_obj_26", reg16),
  (try_end), ]),   

#-- Dunde's Player Background END 
Comparing Fallout 3 and 1-2 is like comparing an apple to a mutated apple which is trying to bite your face.

dunde

  • Grandmaster Knight
  • *
  • Curious Coder of The Vision
    • View Profile
  • Faction: Swadian
  • WB
Re: MnB 1.011 New Starting Up (Splitted into 3 posts)
« Reply #7 on: April 14, 2010, 02:47:50 PM »
Thanks for noting the change for WB and missing main_party constants, KON_Air.
About the skl_* constants, it's look like header_skills.py 's not changed since previous MnB version (even older than 1.011) so skl_looting constant is not defined yet.
« Last Edit: April 14, 2010, 02:51:44 PM by dunde »

KON_Air

  • Master Knight
  • *
    • View Profile
  • Faction: Neutral
  • MP nick: KON_Air
  • M&BWB
Re: MnB 1.011 New Starting Up (Splitted into 3 posts)
« Reply #8 on: April 14, 2010, 04:21:20 PM »
Its not just looting all of the skills will give error, for some reason some operations work some don't without "".
Comparing Fallout 3 and 1-2 is like comparing an apple to a mutated apple which is trying to bite your face.

Lumos

  • Grandmaster Knight
  • *
  • Mens sana in corpore sano
    • View Profile
  • Faction: Nord
  • M&BWBWF&SNW
Re: MnB 1.011 New Starting Up (Splitted into 3 posts)
« Reply #9 on: April 16, 2010, 08:52:46 PM »
If you import from the proper file, you don't need the "".

EDIT: But this strangely doesn't work with the skl_looting.

dunde

  • Grandmaster Knight
  • *
  • Curious Coder of The Vision
    • View Profile
  • Faction: Swadian
  • WB
Re: MnB 1.011 New Starting Up (Splitted into 3 posts)
« Reply #10 on: April 17, 2010, 03:12:40 AM »
We need to define skl_looting constant at header_skills.py as I did at updated 2nd post.

SPD_Phoenix

  • Master Knight
  • *
    • View Profile
  • Faction: Neutral
Re: MnB 1.011 New Starting Up (Splitted into 3 posts)
« Reply #11 on: April 17, 2010, 05:23:41 AM »
Are those sliding bars for switching selections?

It looks very good. May be add a small image to spice up the background?

dunde

  • Grandmaster Knight
  • *
  • Curious Coder of The Vision
    • View Profile
  • Faction: Swadian
  • WB
Re: MnB 1.011 New Starting Up (Splitted into 3 posts)
« Reply #12 on: April 17, 2010, 05:48:01 AM »
Yes, the sliding bars are for switching selections.
Empty space on left bottom corner is for placing module logo (if not used for expanded selection option).

Mylae

  • Sergeant
  • *
    • View Profile
  • M&BWBWF&S
Re: MnB 1.011 New Starting Up (Splitted into 3 posts)
« Reply #13 on: November 20, 2011, 05:55:59 PM »
ok, this is quite a old topic.
I'm starting to messy around with the module system, so maybe it's just me, but i tried to follow all the instruction. unfortunately, when i build the module, it gives me errors.

since the last version of module folder is surely updated, can anyone help me with a noobish guide for having this code in my game? Brytenwalda mod uses a similar presentation.
thanks in advance

dunde

  • Grandmaster Knight
  • *
  • Curious Coder of The Vision
    • View Profile
  • Faction: Swadian
  • WB
Re: MnB 1.011 New Starting Up (Splitted into 3 posts)
« Reply #14 on: November 20, 2011, 11:42:36 PM »
This code's out of date and very basic. I wrote it when I learn to make a presentation so the only overlays I knew atm  wer buttons and sliders overlays  :oops:
Custom Commander's source code has a better and much more simple similar code on it as it use combobox overlay.