FantasyWarrior
Hello
Somebody want my hunger script ?
-9 for strength
-6 for agility
when we dont have food.
let's go.
module_script
at the end,before the last ]
module_script2
find get_player_party_morale_values bloc and after
(assign, "$g_player_party_morale_modifier_food", 0),
(try_for_range, ":cur_edible", food_begin, food_end),
bellow
(call_script, "script_cf_player_has_item_without_modifier", ":cur_edible", imod_rotten),
(item_get_slot, ":food_bonus", ":cur_edible", slot_item_food_bonus),
past this
module_script3
find this bloc
cf_player_has_item_without_modifier
and after this
(assign, ":has_without_modifier", 1),
(assign, ":inv_size", 0), #break
(try_end),
past
module_simple_triggers
find
# Consuming food at every 14 hours
(14,
and after
(try_begin),
(gt, ":available_food", 0),
(store_random_in_range, ":selected_food", 0, ":available_food"),
(call_script, "script_consume_food", ":selected_food"),
(else_try),
(eq, ":no_food_displayed", 0),
(display_message, "@I am hungry !", 0xFF0000),
(call_script, "script_change_player_party_morale", -3),
past
Good appetite
edit: and for the following menu :
game menu
after
("view_faction_relations_report",[],"View faction relations report.",
[(jump_to_menu, "mnu_faction_relations_report"),
]
),
past
game_menu 2
after
past
Somebody want my hunger script ?
-9 for strength
-6 for agility
when we dont have food.
let's go.
module_script
at the end,before the last ]
Code:
#hunger mod scripts
("hungry-damages_1429",
[
(troop_raise_attribute, "$g_player_troop", ca_agility, -6),
(troop_raise_attribute, "trp_player", ca_strength, -9),
(assign, "$malus_de_faim", 1),
]),
("hungry-restore_1429",
[
(troop_raise_attribute, "$g_player_troop", ca_agility, 6),
(troop_raise_attribute, "trp_player", ca_strength, 9),
(assign, "$malus_de_faim", 0),
(display_message, "@you are satisfied !", 0x33DD33),
]),
#hunger mod
module_script2
find get_player_party_morale_values bloc and after
(assign, "$g_player_party_morale_modifier_food", 0),
(try_for_range, ":cur_edible", food_begin, food_end),
bellow
(call_script, "script_cf_player_has_item_without_modifier", ":cur_edible", imod_rotten),
(item_get_slot, ":food_bonus", ":cur_edible", slot_item_food_bonus),
past this
Code:
#hunger mod
(assign, "$testhas_without_modifier", 1),
#hunger mod
module_script3
find this bloc
cf_player_has_item_without_modifier
and after this
(assign, ":has_without_modifier", 1),
(assign, ":inv_size", 0), #break
(try_end),
past
Code:
#hunger mod
(try_begin),
(eq, "$testhas_without_modifier", 1),
(eq, ":has_without_modifier", 1),
(eq, "$malus_de_faim", 1),
(call_script, "script_hungry-restore_1429"),
(assign, "$testhas_without_modifier", 0),
(try_end),
(eq, ":has_without_modifier", 1),
#hunger mod
]),
module_simple_triggers
find
# Consuming food at every 14 hours
(14,
and after
(try_begin),
(gt, ":available_food", 0),
(store_random_in_range, ":selected_food", 0, ":available_food"),
(call_script, "script_consume_food", ":selected_food"),
(else_try),
(eq, ":no_food_displayed", 0),
(display_message, "@I am hungry !", 0xFF0000),
(call_script, "script_change_player_party_morale", -3),
past
Code:
#hunger mod
(try_begin),
(eq, ":no_food_displayed", 0),
(eq, "$malus_de_faim", 0),
(call_script, "script_hungry-damages_1429"),
#
Good appetite
edit: and for the following menu :
game menu
after
("view_faction_relations_report",[],"View faction relations report.",
[(jump_to_menu, "mnu_faction_relations_report"),
]
),
past
Code:
#hunger mod ("view_hungry_report",[],"Healt report.",
[(jump_to_menu, "mnu_hungry_report"),
]
),
#
game_menu 2
after
Code:
("faction_relations_report",0,
"{s1}",
"none",
[(str_clear, s2),
(try_for_range, ":cur_kingdom", kingdoms_begin, kingdoms_end),
(faction_slot_eq, ":cur_kingdom", slot_faction_state, sfs_active),
(neq, ":cur_kingdom", "fac_player_supporters_faction"),
(store_relation, ":cur_relation", "fac_player_supporters_faction", ":cur_kingdom"),
(try_begin),
(ge, ":cur_relation", 90),
(str_store_string, s3, "@Loyal"),
(else_try),
(ge, ":cur_relation", 80),
(str_store_string, s3, "@Devoted"),
(else_try),
(ge, ":cur_relation", 70),
(str_store_string, s3, "@Fond"),
(else_try),
(ge, ":cur_relation", 60),
(str_store_string, s3, "@Gracious"),
(else_try),
(ge, ":cur_relation", 50),
(str_store_string, s3, "@Friendly"),
(else_try),
(ge, ":cur_relation", 40),
(str_store_string, s3, "@Supportive"),
(else_try),
(ge, ":cur_relation", 30),
(str_store_string, s3, "@Favorable"),
(else_try),
(ge, ":cur_relation", 20),
(str_store_string, s3, "@Cooperative"),
(else_try),
(ge, ":cur_relation", 10),
(str_store_string, s3, "@Accepting"),
(else_try),
(ge, ":cur_relation", 0),
(str_store_string, s3, "@Indifferent"),
(else_try),
(ge, ":cur_relation", -10),
(str_store_string, s3, "@Suspicious"),
(else_try),
(ge, ":cur_relation", -20),
(str_store_string, s3, "@Grumbling"),
(else_try),
(ge, ":cur_relation", -30),
(str_store_string, s3, "@Hostile"),
(else_try),
(ge, ":cur_relation", -40),
(str_store_string, s3, "@Resentful"),
(else_try),
(ge, ":cur_relation", -50),
(str_store_string, s3, "@Angry"),
(else_try),
(ge, ":cur_relation", -60),
(str_store_string, s3, "@Hateful"),
(else_try),
(ge, ":cur_relation", -70),
(str_store_string, s3, "@Revengeful"),
(else_try),
(str_store_string, s3, "@Vengeful"),
(try_end),
(str_store_faction_name, s4, ":cur_kingdom"),
(assign, reg1, ":cur_relation"),
(str_store_string, s2, "@{!}{s2}^{s4}: {reg1} ({s3})"),
(try_end),
(str_store_string, s1, "@Your relation with the factions are:^{s2}"),
],
[
("continue",[],"Continue...",
[(jump_to_menu, "mnu_reports"),
]
),
]
),
past
Code:
("hungry_report",0,
"{s1}",
"none",
[(str_clear, s1),
#hunger mod reports
(try_begin),
(eq, "$malus_de_faim", 0),
(lt, "$malus_de_faim", 1),
(str_store_string, s3, "@i'm satisfied !"),
(else_try),
# (eq, "$malus_de_faim", 1),
#(lt, "$malus_de_faim", 0),
(str_store_string, s3, "@i am hungry! malus for -9/ ag -6"),#
(try_end),
(str_store_string, s1, "@Healt report:^{s3}"),
],
[
("continue",[],"Continue...",
[(jump_to_menu, "mnu_reports"),
]
),
]
),