More goals added. Introduced a passive goal system for things that should be accomplished but are less guided and depend more on player style.

This commit is contained in:
Storm Dragon
2026-07-01 09:34:55 -04:00
parent 59352bb0b6
commit e690819071
13 changed files with 129 additions and 12 deletions
+9
View File
@@ -1005,6 +1005,15 @@ system.goals.goal.craft_snare.name=Maak 'n strik.
system.goals.goal.catch_snare.name=Vang iets in 'n strik.
system.goals.goal.butcher_game.name=Slag wild.
system.goals.goal.craft_sling.name=Maak 'n slinger.
system.goals.goal.craft_bow.name=Craft a bow.
system.goals.goal.build_herb_garden.name=Build an herb garden.
system.goals.goal.upgrade_storage_2.name=Fully upgrade storage.
system.goals.goal.build_pasture.name=Build a pasture.
system.goals.goal.build_stable.name=Build a stable.
system.goals.goal.craft_quiver.name=Craft a quiver.
system.goals.goal.craft_arrows.name=Craft arrows.
system.goals.goal.survive_day_9.name=Survive until day 9.
system.goals.goal.tame_pet.name=Tame a pet.
system.goals.goal.light_fire.name=Steek 'n vuur aan.
system.goals.goal.unknown.name=Onbekende doelwit.
system.goals.goal.win_adventure.name=Wen 'n avontuur.
+10 -1
View File
@@ -259,6 +259,15 @@ goals.goal.craft_snare.name=Craft a snare.
goals.goal.catch_snare.name=Catch something in a snare.
goals.goal.butcher_game.name=Butcher game.
goals.goal.craft_sling.name=Craft a sling.
goals.goal.craft_bow.name=Craft a bow.
goals.goal.build_herb_garden.name=Build an herb garden.
goals.goal.upgrade_storage_2.name=Fully upgrade storage.
goals.goal.build_pasture.name=Build a pasture.
goals.goal.build_stable.name=Build a stable.
goals.goal.craft_quiver.name=Craft a quiver.
goals.goal.craft_arrows.name=Craft arrows.
goals.goal.survive_day_9.name=Survive until day 9.
goals.goal.tame_pet.name=Tame a pet.
goals.goal.unknown.name=Unknown goal.
goals.menu.prompt=Goals. {option}
goals.menu.current=Current goal: {goal}
@@ -1288,7 +1297,7 @@ msg.ce3897c6b3be={arg1}: {arg2}
; seed:learn_sounds_label:sounds/items/item_breaks.ogg
msg.ce5aeca95fb9=item breaks
; src/i18n.nvgt:677:speak_with_history[0]
; src/pet_system.nvgt:935:speak_with_history[0]
; src/pet_system.nvgt:936:speak_with_history[0]
; src/save_system.nvgt:344:speak_with_history[0]
msg.cea88b214070={arg1} {arg2}
; seed:manual
+10 -1
View File
@@ -259,6 +259,15 @@ goals.goal.craft_snare.name=Craft a snare.
goals.goal.catch_snare.name=Catch something in a snare.
goals.goal.butcher_game.name=Butcher game.
goals.goal.craft_sling.name=Craft a sling.
goals.goal.craft_bow.name=Craft a bow.
goals.goal.build_herb_garden.name=Build an herb garden.
goals.goal.upgrade_storage_2.name=Fully upgrade storage.
goals.goal.build_pasture.name=Build a pasture.
goals.goal.build_stable.name=Build a stable.
goals.goal.craft_quiver.name=Craft a quiver.
goals.goal.craft_arrows.name=Craft arrows.
goals.goal.survive_day_9.name=Survive until day 9.
goals.goal.tame_pet.name=Tame a pet.
goals.goal.unknown.name=Unknown goal.
goals.menu.prompt=Goals. {option}
goals.menu.current=Current goal: {goal}
@@ -1288,7 +1297,7 @@ msg.ce3897c6b3be={arg1}: {arg2}
; seed:learn_sounds_label:sounds/items/item_breaks.ogg
msg.ce5aeca95fb9=item breaks
; src/i18n.nvgt:677:speak_with_history[0]
; src/pet_system.nvgt:935:speak_with_history[0]
; src/pet_system.nvgt:936:speak_with_history[0]
; src/save_system.nvgt:344:speak_with_history[0]
msg.cea88b214070={arg1} {arg2}
; seed:manual
+9
View File
@@ -1005,6 +1005,15 @@ system.goals.goal.craft_snare.name=Fabrica una trampa.
system.goals.goal.catch_snare.name=Atrapa algo en una trampa.
system.goals.goal.butcher_game.name=Descuartiza caza.
system.goals.goal.craft_sling.name=Fabrica una honda.
system.goals.goal.craft_bow.name=Craft a bow.
system.goals.goal.build_herb_garden.name=Build an herb garden.
system.goals.goal.upgrade_storage_2.name=Fully upgrade storage.
system.goals.goal.build_pasture.name=Build a pasture.
system.goals.goal.build_stable.name=Build a stable.
system.goals.goal.craft_quiver.name=Craft a quiver.
system.goals.goal.craft_arrows.name=Craft arrows.
system.goals.goal.survive_day_9.name=Survive until day 9.
system.goals.goal.tame_pet.name=Tame a pet.
system.goals.goal.light_fire.name=Enciende un fuego.
system.goals.goal.unknown.name=Objetivo desconocido.
system.goals.goal.win_adventure.name=Gana una aventura.
+9
View File
@@ -763,6 +763,15 @@ def write_catalog(entries: Dict[str, Dict[str, object]], output_path: Path) -> N
("system.goals.goal.catch_snare.name", "Catch something in a snare."),
("system.goals.goal.butcher_game.name", "Butcher game."),
("system.goals.goal.craft_sling.name", "Craft a sling."),
("system.goals.goal.craft_bow.name", "Craft a bow."),
("system.goals.goal.build_herb_garden.name", "Build an herb garden."),
("system.goals.goal.upgrade_storage_2.name", "Fully upgrade storage."),
("system.goals.goal.build_pasture.name", "Build a pasture."),
("system.goals.goal.build_stable.name", "Build a stable."),
("system.goals.goal.craft_quiver.name", "Craft a quiver."),
("system.goals.goal.craft_arrows.name", "Craft arrows."),
("system.goals.goal.survive_day_9.name", "Survive until day 9."),
("system.goals.goal.tame_pet.name", "Tame a pet."),
("system.goals.goal.unknown.name", "Unknown goal."),
("system.goals.menu.prompt", "Goals. {option}"),
("system.goals.menu.current", "Current goal: {goal}"),
+7 -1
View File
@@ -246,6 +246,7 @@ void craft_herb_garden() {
add_personal_count(ITEM_VINES, -3);
add_personal_count(ITEM_LOGS, -2);
add_world_herb_garden(x);
complete_goal(GOAL_BUILD_HERB_GARDEN);
speak_with_history(tr("system.crafting.buildings.herb_garden.built"), true);
} else {
speak_crafting_missing(missing);
@@ -290,9 +291,12 @@ void craft_storage() {
add_personal_count(ITEM_VINES, -vineCost);
if (world_storages.length() == 0) {
add_world_storage(x);
complete_goal(GOAL_BUILD_STORAGE);
}
storage_level = targetLevel;
complete_goal(GOAL_BUILD_STORAGE);
if (storage_level >= STORAGE_LEVEL_UPGRADE_2) {
complete_goal(GOAL_UPGRADE_STORAGE_2);
}
dictionary storageArgs;
storageArgs.set("capacity", newCapacity);
speak_with_history(trf("system.crafting.buildings.storage.upgraded", storageArgs), true);
@@ -325,6 +329,7 @@ void craft_pasture() {
add_personal_count(ITEM_LOGS, -PASTURE_LOG_COST);
add_personal_count(ITEM_ROPES, -PASTURE_ROPE_COST);
add_world_pasture(x);
complete_goal(GOAL_BUILD_PASTURE);
speak_with_history(tr("system.crafting.buildings.pasture.built"), true);
} else {
speak_crafting_missing(missing);
@@ -358,6 +363,7 @@ void craft_stable() {
add_personal_count(ITEM_STONES, -STABLE_STONE_COST);
add_personal_count(ITEM_VINES, -STABLE_VINE_COST);
add_world_stable(x);
complete_goal(GOAL_BUILD_STABLE);
speak_with_history(tr("system.crafting.buildings.stable.built"), true);
} else {
speak_crafting_missing(missing);
+2
View File
@@ -93,6 +93,7 @@ void craft_arrows() {
add_personal_count(ITEM_FEATHERS, -4);
add_personal_count(ITEM_STONES, -2);
add_personal_count(ITEM_ARROWS, ARROWS_PER_CRAFT);
complete_goal(GOAL_CRAFT_ARROWS);
dictionary arrowArgs;
arrowArgs.set("count", ARROWS_PER_CRAFT);
speak_with_history(trf("system.crafting.materials.crafted.arrows", arrowArgs), true);
@@ -145,6 +146,7 @@ void craft_arrows_max() {
add_personal_count(ITEM_FEATHERS, -(maxCraft * 4));
add_personal_count(ITEM_STONES, -(maxCraft * 2));
add_personal_count(ITEM_ARROWS, ARROWS_PER_CRAFT * maxCraft);
complete_goal(GOAL_CRAFT_ARROWS);
dictionary arrowsMaxArgs;
arrowsMaxArgs.set("count", ARROWS_PER_CRAFT * maxCraft);
speak_with_history(trf("system.crafting.materials.crafted.arrows", arrowsMaxArgs), true);
+2
View File
@@ -315,6 +315,7 @@ void craft_quiver() {
add_personal_count(ITEM_SKINS, -2);
add_personal_count(ITEM_VINES, -2);
add_personal_count(ITEM_QUIVERS, 1);
complete_goal(GOAL_CRAFT_QUIVER);
speak_with_history(tr("system.crafting.tools.crafted.quiver"), true);
} else {
speak_crafting_missing(missing);
@@ -353,6 +354,7 @@ void craft_quiver_max() {
add_personal_count(ITEM_SKINS, -(maxCraft * 2));
add_personal_count(ITEM_VINES, -(maxCraft * 2));
add_personal_count(ITEM_QUIVERS, maxCraft);
complete_goal(GOAL_CRAFT_QUIVER);
dictionary quiverArgs;
quiverArgs.set("count", maxCraft);
speak_with_history(trf("system.crafting.tools.crafted_max.quivers", quiverArgs), true);
+2
View File
@@ -215,6 +215,7 @@ void craft_bow() {
add_personal_count(ITEM_STICKS, -1);
add_personal_count(ITEM_BOWSTRINGS, -1);
add_personal_count(ITEM_BOWS, 1);
complete_goal(GOAL_CRAFT_BOW);
speak_with_history(tr("system.crafting.weapons.crafted.bow"), true);
} else {
speak_crafting_missing(missing);
@@ -253,6 +254,7 @@ void craft_bow_max() {
add_personal_count(ITEM_STICKS, -max_craft);
add_personal_count(ITEM_BOWSTRINGS, -max_craft);
add_personal_count(ITEM_BOWS, max_craft);
complete_goal(GOAL_CRAFT_BOW);
dictionary bowArgs;
bowArgs.set("count", max_craft);
speak_with_history(trf("system.crafting.weapons.crafted_max.bows", bowArgs), true);
+44 -9
View File
@@ -20,7 +20,16 @@ const int GOAL_CATCH_SNARE = 14;
const int GOAL_BUTCHER_GAME = 15;
const int GOAL_CRAFT_SLING = 16;
const int GOAL_CRAFT_SNARE = 17;
const int GOAL_COUNT = 18;
const int GOAL_CRAFT_BOW = 18;
const int GOAL_BUILD_HERB_GARDEN = 19;
const int GOAL_UPGRADE_STORAGE_2 = 20;
const int GOAL_BUILD_PASTURE = 21;
const int GOAL_BUILD_STABLE = 22;
const int GOAL_CRAFT_QUIVER = 23;
const int GOAL_CRAFT_ARROWS = 24;
const int GOAL_SURVIVE_DAY_9 = 25;
const int GOAL_TAME_PET = 26;
const int GOAL_COUNT = 27;
// Mastery spend categories.
const int MASTERY_CRAFTING = 0;
@@ -71,6 +80,15 @@ string goal_name_key(int goalId) {
if (goalId == GOAL_CATCH_SNARE) return "system.goals.goal.catch_snare.name";
if (goalId == GOAL_BUTCHER_GAME) return "system.goals.goal.butcher_game.name";
if (goalId == GOAL_CRAFT_SLING) return "system.goals.goal.craft_sling.name";
if (goalId == GOAL_CRAFT_BOW) return "system.goals.goal.craft_bow.name";
if (goalId == GOAL_BUILD_HERB_GARDEN) return "system.goals.goal.build_herb_garden.name";
if (goalId == GOAL_UPGRADE_STORAGE_2) return "system.goals.goal.upgrade_storage_2.name";
if (goalId == GOAL_BUILD_PASTURE) return "system.goals.goal.build_pasture.name";
if (goalId == GOAL_BUILD_STABLE) return "system.goals.goal.build_stable.name";
if (goalId == GOAL_CRAFT_QUIVER) return "system.goals.goal.craft_quiver.name";
if (goalId == GOAL_CRAFT_ARROWS) return "system.goals.goal.craft_arrows.name";
if (goalId == GOAL_SURVIVE_DAY_9) return "system.goals.goal.survive_day_9.name";
if (goalId == GOAL_TAME_PET) return "system.goals.goal.tame_pet.name";
return "system.goals.goal.unknown.name";
}
@@ -99,6 +117,15 @@ string goal_summary(int goalId) {
else if (goalId == GOAL_CATCH_SNARE) name = "Catch something in a snare.";
else if (goalId == GOAL_BUTCHER_GAME) name = "Butcher game.";
else if (goalId == GOAL_CRAFT_SLING) name = "Craft a sling.";
else if (goalId == GOAL_CRAFT_BOW) name = "Craft a bow.";
else if (goalId == GOAL_BUILD_HERB_GARDEN) name = "Build an herb garden.";
else if (goalId == GOAL_UPGRADE_STORAGE_2) name = "Fully upgrade storage.";
else if (goalId == GOAL_BUILD_PASTURE) name = "Build a pasture.";
else if (goalId == GOAL_BUILD_STABLE) name = "Build a stable.";
else if (goalId == GOAL_CRAFT_QUIVER) name = "Craft a quiver.";
else if (goalId == GOAL_CRAFT_ARROWS) name = "Craft arrows.";
else if (goalId == GOAL_SURVIVE_DAY_9) name = "Survive until day 9.";
else if (goalId == GOAL_TAME_PET) name = "Tame a pet.";
}
int points = goal_reward_points(goalId);
if (points == 1) {
@@ -146,19 +173,13 @@ bool is_goal_completed(int goalId) {
int get_current_goal_id() {
int[] goalOrder = {GOAL_CRAFT_KNIFE, GOAL_CRAFT_AXE, GOAL_CHOP_TREE_1, GOAL_CRAFT_SPEAR,
GOAL_CRAFT_SNARE, GOAL_CATCH_SNARE, GOAL_BUILD_FIREPIT, GOAL_LIGHT_FIRE,
GOAL_BUTCHER_GAME, GOAL_CRAFT_SLING, GOAL_BUILD_ALTAR, GOAL_BUILD_STORAGE,
GOAL_COMPLETE_QUEST, GOAL_WIN_ADVENTURE, GOAL_ENGRAVE_RUNE, GOAL_CHOP_TREE_4,
GOAL_CHOP_TREE_9, GOAL_CHOP_TREE_27};
GOAL_BUTCHER_GAME, GOAL_CRAFT_SLING, GOAL_BUILD_ALTAR, GOAL_COMPLETE_QUEST,
GOAL_CRAFT_BOW, GOAL_WIN_ADVENTURE, GOAL_ENGRAVE_RUNE};
for (uint i = 0; i < goalOrder.length(); i++) {
if (!goalsCompleted[goalOrder[i]]) {
return goalOrder[i];
}
}
for (int i = 0; i < GOAL_COUNT; i++) {
if (!goalsCompleted[i]) {
return i;
}
}
return -1;
}
@@ -289,6 +310,20 @@ bool complete_goal(int goalId) {
return true;
}
bool complete_goal_silent(int goalId) {
if (!is_valid_goal_id(goalId)) {
return false;
}
if (goalsCompleted[goalId]) {
return false;
}
goalsCompleted[goalId] = true;
int points = goal_reward_points(goalId);
goalPointsUnspent += points;
goalPointsEarned += points;
return true;
}
void record_tree_chopped_goal_progress() {
treesChopped++;
if (treesChopped >= 1) complete_goal(GOAL_CHOP_TREE_1);
+1
View File
@@ -631,6 +631,7 @@ void adopt_pet(const string& in soundPath) {
petTravelTimer.restart();
dictionary joinsArgs;
joinsArgs.set("pet", get_pet_display_name());
complete_goal(GOAL_TAME_PET);
speak_with_history(trf("system.pet.joins_you", joinsArgs), true);
}
+21
View File
@@ -1612,6 +1612,12 @@ bool load_game_state_from_file(const string& in filename) {
tamingMasteryLevel = MASTERY_MAX_LEVEL;
if (treesChopped < 0)
treesChopped = 0;
if (current_day >= 9) {
complete_goal_silent(GOAL_SURVIVE_DAY_9);
}
if (petActive) {
complete_goal_silent(GOAL_TAME_PET);
}
if (petActive) {
int knockoutCooldown = get_pet_knockout_cooldown_hours();
if (petKnockoutHoursRemaining > knockoutCooldown)
@@ -1712,6 +1718,9 @@ bool load_game_state_from_file(const string& in filename) {
for (uint i = 0; i < herbPositions.length(); i++) {
add_world_herb_garden(parse_int(herbPositions[i]));
}
if (world_herb_gardens.length() > 0) {
complete_goal_silent(GOAL_BUILD_HERB_GARDEN);
}
string[] storagePositions = get_string_list_or_split(saveData, "storages_positions");
for (uint i = 0; i < storagePositions.length(); i++) {
@@ -1723,17 +1732,29 @@ bool load_game_state_from_file(const string& in filename) {
} else {
storage_level = (world_storages.length() > 0) ? STORAGE_LEVEL_UPGRADE_1 : STORAGE_LEVEL_BASE;
}
if (storage_level >= STORAGE_LEVEL_UPGRADE_1) {
complete_goal_silent(GOAL_BUILD_STORAGE);
}
if (storage_level >= STORAGE_LEVEL_UPGRADE_2) {
complete_goal_silent(GOAL_UPGRADE_STORAGE_2);
}
ensure_base_storage();
string[] pasturePositions = get_string_list_or_split(saveData, "pastures_positions");
for (uint i = 0; i < pasturePositions.length(); i++) {
add_world_pasture(parse_int(pasturePositions[i]));
}
if (world_pastures.length() > 0) {
complete_goal_silent(GOAL_BUILD_PASTURE);
}
string[] stablePositions = get_string_list_or_split(saveData, "stables_positions");
for (uint i = 0; i < stablePositions.length(); i++) {
add_world_stable(parse_int(stablePositions[i]));
}
if (world_stables.length() > 0) {
complete_goal_silent(GOAL_BUILD_STABLE);
}
string[] altarPositions = get_string_list_or_split(saveData, "altars_positions");
for (uint i = 0; i < altarPositions.length(); i++) {
+3
View File
@@ -891,6 +891,9 @@ void update_time() {
if (current_hour >= 24) {
current_hour = 0;
current_day++;
if (current_day >= 9) {
complete_goal(GOAL_SURVIVE_DAY_9);
}
area_expanded_today = false; // Reset for new day
update_invasion_chance_for_new_day();
invasion_triggered_today = false;