Skip to content

Commit

Permalink
u_val and the rest of fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
GuardianDll committed Aug 29, 2024
1 parent af3b644 commit c8b5a31
Show file tree
Hide file tree
Showing 169 changed files with 1,387 additions and 1,318 deletions.
6 changes: 3 additions & 3 deletions data/json/effects_on_condition/example_eocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
{
"type": "effect_on_condition",
"id": "EOC_item_transporter_test_2",
"condition": { "u_has_var": "eoc_sample_item_transporter_set_coordinates", "value": "yes" },
"condition": { "compare_string": [ "yes", { "u_val": "eoc_sample_item_transporter_set_coordinates" } ] },
"effect": [
{
"u_run_inv_eocs": "manual_mult",
Expand Down Expand Up @@ -128,12 +128,12 @@
"id": "EOC_if_else_test",
"effect": [
{
"if": { "u_has_var": "eoc_sample_if_else_test", "value": "yes" },
"if": { "compare_string": [ "yes", { "u_val": "eoc_sample_if_else_test" } ] },
"then": { "u_message": "You have variable." },
"else": [
{ "u_message": "You don't have variable." },
{
"if": { "not": { "u_has_var": "eoc_sample_if_else_test", "value": "yes" } },
"if": { "not": { "compare_string": [ "yes", { "u_val": "eoc_sample_if_else_test" } ] } },
"then": [ { "u_add_var": "eoc_sample_if_else_test", "value": "yes" }, { "u_message": "Variable added." } ]
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"and": [
{ "u_at_om_location": "lab_security_z-1" },
{ "u_has_item": "id_science_security_yellow" },
{ "not": { "u_has_var": "check_trap_trigger_valid_security_employee", "value": "yes" } }
{ "not": { "compare_string": [ "yes", { "u_val": "check_trap_trigger_valid_security_employee" } ] } }
]
},
"effect": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,9 @@
{
"type": "effect_on_condition",
"id": "EOC_PORTAL_YRAX_ATTENTION",
"condition": { "and": [ "u_is_outside", { "u_has_var": "u_met_apeirohedra", "value": "yes" }, { "one_in_chance": 400 } ] },
"condition": {
"and": [ "u_is_outside", { "compare_string": [ "yes", { "u_val": "u_met_apeirohedra" } ] }, { "one_in_chance": 400 } ]
},
"effect": [
{ "u_message": "An alien construct emerges from the storm.", "type": "neutral" },
{ "u_spawn_monster": "mon_yrax_quadraphract", "real_count": 1, "min_radius": 10, "max_radius": 15 }
Expand Down
36 changes: 18 additions & 18 deletions data/json/effects_on_condition/npc_eocs/appearance_eocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -232,22 +232,22 @@
"effect": [
{ "run_eocs": "assign_random_natural_hair_color" },
{
"if": { "u_has_var": "mutation_hair_color_natural_hair_color_black", "value": "yes" },
"if": { "compare_string": [ "yes", { "u_val": "mutation_hair_color_natural_hair_color_black" } ] },
"then": [ { "u_add_trait": { "context_val": "trait_id" }, "variant": "black" } ],
"else": {
"if": { "u_has_var": "mutation_hair_color_natural_hair_color_blond", "value": "yes" },
"if": { "compare_string": [ "yes", { "u_val": "mutation_hair_color_natural_hair_color_blond" } ] },
"then": [ { "u_add_trait": { "context_val": "trait_id" }, "variant": "blond" } ],
"else": {
"if": { "u_has_var": "mutation_hair_color_natural_hair_color_brown", "value": "yes" },
"if": { "compare_string": [ "yes", { "u_val": "mutation_hair_color_natural_hair_color_brown" } ] },
"then": [ { "u_add_trait": { "context_val": "trait_id" }, "variant": "brown" } ],
"else": {
"if": { "u_has_var": "mutation_hair_color_natural_hair_color_gray", "value": "yes" },
"if": { "compare_string": [ "yes", { "u_val": "mutation_hair_color_natural_hair_color_gray" } ] },
"then": [ { "u_add_trait": { "context_val": "trait_id" }, "variant": "gray" } ],
"else": {
"if": { "u_has_var": "mutation_hair_color_natural_hair_color_red", "value": "yes" },
"if": { "compare_string": [ "yes", { "u_val": "mutation_hair_color_natural_hair_color_red" } ] },
"then": [ { "u_add_trait": { "context_val": "trait_id" }, "variant": "red" } ],
"else": {
"if": { "u_has_var": "mutation_hair_color_natural_hair_color_white", "value": "yes" },
"if": { "compare_string": [ "yes", { "u_val": "mutation_hair_color_natural_hair_color_white" } ] },
"then": [ { "u_add_trait": { "context_val": "trait_id" }, "variant": "white" } ]
}
}
Expand Down Expand Up @@ -393,12 +393,12 @@
"id": "assign_random_natural_hair_color",
"condition": {
"and": [
{ "not": { "u_has_var": "mutation_hair_color_natural_hair_color_black", "value": "yes" } },
{ "not": { "u_has_var": "mutation_hair_color_natural_hair_color_blond", "value": "yes" } },
{ "not": { "u_has_var": "mutation_hair_color_natural_hair_color_brown", "value": "yes" } },
{ "not": { "u_has_var": "mutation_hair_color_natural_hair_color_gray", "value": "yes" } },
{ "not": { "u_has_var": "mutation_hair_color_natural_hair_color_red", "value": "yes" } },
{ "not": { "u_has_var": "mutation_hair_color_natural_hair_color_white", "value": "yes" } }
{ "not": { "compare_string": [ "yes", { "u_val": "mutation_hair_color_natural_hair_color_black" } ] } },
{ "not": { "compare_string": [ "yes", { "u_val": "mutation_hair_color_natural_hair_color_blond" } ] } },
{ "not": { "compare_string": [ "yes", { "u_val": "mutation_hair_color_natural_hair_color_brown" } ] } },
{ "not": { "compare_string": [ "yes", { "u_val": "mutation_hair_color_natural_hair_color_gray" } ] } },
{ "not": { "compare_string": [ "yes", { "u_val": "mutation_hair_color_natural_hair_color_red" } ] } },
{ "not": { "compare_string": [ "yes", { "u_val": "mutation_hair_color_natural_hair_color_white" } ] } }
]
},
"effect": [
Expand All @@ -417,7 +417,7 @@
{
"type": "effect_on_condition",
"id": "natural_hair_color_black",
"condition": { "not": { "u_has_var": "mutation_hair_color_picked_hair_color", "value": "yes" } },
"condition": { "not": { "compare_string": [ "yes", { "u_val": "mutation_hair_color_picked_hair_color" } ] } },
"effect": [
{ "u_add_var": "mutation_hair_color_natural_hair_color_black", "value": "yes" },
{ "u_add_var": "mutation_hair_color_picked_hair_color", "value": "yes" }
Expand All @@ -426,7 +426,7 @@
{
"type": "effect_on_condition",
"id": "natural_hair_color_blond",
"condition": { "not": { "u_has_var": "mutation_hair_color_picked_hair_color", "value": "yes" } },
"condition": { "not": { "compare_string": [ "yes", { "u_val": "mutation_hair_color_picked_hair_color" } ] } },
"effect": [
{ "u_add_var": "mutation_hair_color_natural_hair_color_blond", "value": "yes" },
{ "u_add_var": "mutation_hair_color_picked_hair_color", "value": "yes" }
Expand All @@ -435,7 +435,7 @@
{
"type": "effect_on_condition",
"id": "natural_hair_color_brown",
"condition": { "not": { "u_has_var": "mutation_hair_color_picked_hair_color", "value": "yes" } },
"condition": { "not": { "compare_string": [ "yes", { "u_val": "mutation_hair_color_picked_hair_color" } ] } },
"effect": [
{ "u_add_var": "mutation_hair_color_natural_hair_color_brown", "value": "yes" },
{ "u_add_var": "mutation_hair_color_picked_hair_color", "value": "yes" }
Expand All @@ -444,7 +444,7 @@
{
"type": "effect_on_condition",
"id": "natural_hair_color_gray",
"condition": { "not": { "u_has_var": "mutation_hair_color_picked_hair_color", "value": "yes" } },
"condition": { "not": { "compare_string": [ "yes", { "u_val": "mutation_hair_color_picked_hair_color" } ] } },
"effect": [
{ "u_add_var": "mutation_hair_color_natural_hair_color_gray", "value": "yes" },
{ "u_add_var": "mutation_hair_color_picked_hair_color", "value": "yes" }
Expand All @@ -453,7 +453,7 @@
{
"type": "effect_on_condition",
"id": "natural_hair_color_white",
"condition": { "not": { "u_has_var": "mutation_hair_color_picked_hair_color", "value": "yes" } },
"condition": { "not": { "compare_string": [ "yes", { "u_val": "mutation_hair_color_picked_hair_color" } ] } },
"effect": [
{ "u_add_var": "mutation_hair_color_natural_hair_color_white", "value": "yes" },
{ "u_add_var": "mutation_hair_color_picked_hair_color", "value": "yes" }
Expand All @@ -462,7 +462,7 @@
{
"type": "effect_on_condition",
"id": "natural_hair_color_red",
"condition": { "not": { "u_has_var": "mutation_hair_color_picked_hair_color", "value": "yes" } },
"condition": { "not": { "compare_string": [ "yes", { "u_val": "mutation_hair_color_picked_hair_color" } ] } },
"effect": [
{ "u_add_var": "mutation_hair_color_natural_hair_color_red", "value": "yes" },
{ "u_add_var": "mutation_hair_color_picked_hair_color", "value": "yes" }
Expand Down
6 changes: 3 additions & 3 deletions data/json/effects_on_condition/npc_eocs/godco_npc_eocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
}
]
},
"deactivate_condition": { "u_has_var": "dialogue_godco_godco_notalk_to_u", "value": "yes" },
"deactivate_condition": { "compare_string": [ "yes", { "u_val": "dialogue_godco_godco_notalk_to_u" } ] },
"effect": [ { "u_add_var": "dialogue_godco_godco_notalk_to_u", "value": "yes" } ]
},
{
Expand All @@ -47,11 +47,11 @@
"global": true,
"condition": {
"and": [
{ "u_has_var": "general_completed_theresa_going_away", "value": "yes" },
{ "compare_string": [ "yes", { "u_val": "general_completed_theresa_going_away" } ] },
{ "u_near_om_location": "godco_3", "range": 12 }
]
},
"deactivate_condition": { "u_has_var": "general_completed_theresa_gone", "value": "yes" },
"deactivate_condition": { "compare_string": [ "yes", { "u_val": "general_completed_theresa_gone" } ] },
"effect": [
{ "mapgen_update": "theresa_remove", "om_terrain": "godco_3" },
{ "u_lose_var": "general_completed_theresa_going_away" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
"and": [
{ "math": [ "isherwood_barry_rescued", "!=", "1" ] },
{ "math": [ "isherwood_family_coming", "!=", "1" ] },
{ "u_has_var": "barry_following", "type": "general", "context": "meeting", "value": "yes" },
{ "compare_string": [ "yes", { "u_val": "general_meeting_barry_following" } ] },
{ "u_near_om_location": "horse_farm_isherwood_13", "range": 30 }
]
},
Expand Down Expand Up @@ -307,7 +307,7 @@
"condition": {
"and": [
{ "u_has_mission": "MISSION_ISHERWOOD_CHRIS_1" },
{ "not": { "u_has_var": "barry_following", "type": "general", "context": "meeting", "value": "yes" } },
{ "not": { "compare_string": [ "yes", { "u_val": "general_meeting_barry_following" } ] } },
{
"and": [
{ "not": { "u_near_om_location": "barry_mi-go_scout_tower_1", "range": 2 } },
Expand Down Expand Up @@ -494,7 +494,7 @@
{ "u_near_om_location": "barry_mi-go_scout_tower_4", "range": 3 }
]
},
"deactivate_condition": { "u_has_var": "u_been_to_migos", "value": "yes" },
"deactivate_condition": { "compare_string": [ "yes", { "u_val": "u_been_to_migos" } ] },
"effect": [ { "u_add_var": "u_been_to_migos", "value": "yes" } ]
}
]
2 changes: 1 addition & 1 deletion data/json/encounters/randec_independent_travelers.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"type": "effect_on_condition",
"id": "EOC_traveler_random_destination_direction",
"//": "Picks a random direction for the NPC in question to be going in. Used for dialogue checks.",
"condition": { "not": { "u_has_var": "dialogue_travel_direction_picked_direction", "value": "yes" } },
"condition": { "not": { "compare_string": [ "yes", { "u_val": "dialogue_travel_direction_picked_direction" } ] } },
"effect": [
{
"weighted_list_eocs": [
Expand Down
4 changes: 2 additions & 2 deletions data/json/encounters/randenc_refugee_center.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{ "not": { "u_near_om_location": "evac_center_13", "range": 2 } },
"is_day",
{ "one_in_chance": 10 },
{ "u_has_var": "mission_flag_FMShopkeep_Mission1", "value": "yes" },
{ "compare_string": [ "yes", { "u_val": "mission_flag_FMShopkeep_Mission1" } ] },
{ "math": [ "time_since(u_timer_RC_Shoppers_RandEnc)", ">=", "time('1 d')" ] }
]
},
Expand Down Expand Up @@ -58,7 +58,7 @@
{ "not": { "u_near_om_location": "evac_center_13", "range": 2 } },
"is_day",
{ "one_in_chance": 15 },
{ "u_has_var": "mission_flag_FMShopkeep_Mission1", "value": "yes" },
{ "compare_string": [ "yes", { "u_val": "mission_flag_FMShopkeep_Mission1" } ] },
{ "math": [ "time_since(u_timer_JohnBailey_RandEnc)", ">=", "time('3 d')" ] }
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"and": [
{ "math": [ "npc_randomize_dialogue_direction", "==", "1" ] },
{ "npc_has_trait": "BOSS_Brigitte_LaCroix_01" },
{ "not": { "u_has_var": "BOSS_mission_directions", "value": "Brigitte_LaCroix" } }
{ "not": { "compare_string": [ "Brigitte_LaCroix", { "u_val": "BOSS_mission_directions" } ] } }
]
},
"effect": { "assign_mission": "directions_Brigitte_LaCroix" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"and": [
{ "math": [ "npc_randomize_dialogue_direction", "==", "1" ] },
{ "npc_has_trait": "BOSS_Lapin_01" },
{ "not": { "u_has_var": "BOSS_mission_directions", "value": "lapin" } }
{ "not": { "compare_string": [ "lapin", { "u_val": "BOSS_mission_directions" } ] } }
]
},
"effect": { "assign_mission": "directions_lapin" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"and": [
{ "math": [ "npc_randomize_dialogue_direction", "==", "1" ] },
{ "npc_has_trait": "BOSS_NC_FARMER_01" },
{ "not": { "u_has_var": "BOSS_mission_directions", "value": "farmer" } }
{ "not": { "compare_string": [ "farmer", { "u_val": "BOSS_mission_directions" } ] } }
]
},
"effect": { "assign_mission": "directions_farmer" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"and": [
{ "math": [ "npc_randomize_dialogue_direction", "==", "1" ] },
{ "npc_has_trait": "BOSS_NC_SURVIVOR_CHEF_01" },
{ "not": { "u_has_var": "BOSS_mission_directions", "value": "chef" } }
{ "not": { "compare_string": [ "chef", { "u_val": "BOSS_mission_directions" } ] } }
]
},
"effect": { "assign_mission": "directions_chef" },
Expand Down
7 changes: 3 additions & 4 deletions data/json/npcs/Backgrounds/hospital_2.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@
"id": "BGSS_HOSPITAL_2_STORY4",
"type": "talk_topic",
"dynamic_line": {
"u_has_var": "mission_BGSS_hospital_2_started_quest",
"value": "yes",
"compare_string": [ "yes", { "u_val": "mission_BGSS_hospital_2_started_quest" } ],
"no": {
"gendered_line": "Well, I still didn't have any food. Eventually I had to climb down the side of the building… so I did, as quietly as I could. It was night, and I have pretty good nightvision. Apparently the zombies don't, because I was able to slip right past them and steal a bicycle that was just laying on the side of the road. I'd kind of scouted out my route from above… I'm not from a big city, the hospital was the tallest building around. I avoided the major military blockades, and headed out of town towards a friend's old cabin. I had to fight off a couple of the <zombies>, but I managed to avoid any big fuss, by some miracle. I never made it to the cabin, but that's not important now.",
"relevant_genders": [ "npc" ]
Expand All @@ -116,11 +115,11 @@
"text": "Any chance you could point the way to that cabin for me?",
"condition": {
"and": [
{ "not": { "u_has_var": "mission_BGSS_hospital_2_started_quest", "value": "yes" } },
{ "not": { "compare_string": [ "yes", { "u_val": "mission_BGSS_hospital_2_started_quest" } ] } },
{
"not": {
"and": [
{ "u_has_var": "general_BGSS_hospital_2_asked_about_quest", "value": "yes" },
{ "compare_string": [ "yes", { "u_val": "general_BGSS_hospital_2_asked_about_quest" } ] },
{ "math": [ "time_since(u_timer_timers_hospital_2_asked_about_quest)", "<", "time('8 h')" ] }
]
}
Expand Down
Loading

0 comments on commit c8b5a31

Please sign in to comment.