Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPC faction camps #73372

Merged
merged 23 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
53d39a9
Revert https://github.com/CleverRaven/Cataclysm-DDA/pull/72296
RenechCDDA Apr 29, 2024
13cb9dd
Mapgen-spawned NPC camps
RenechCDDA Apr 29, 2024
0b1ef78
No bulletin boards or faction display
RenechCDDA Apr 29, 2024
82d89ed
Normalize camp access based on faction relationship
RenechCDDA May 9, 2024
30f09f6
Allow all NPCs to eat out of camp that they can access
RenechCDDA May 9, 2024
9d6f2bf
Add camps to vanilla factions
RenechCDDA May 9, 2024
5653001
Camps for in-repo mods
RenechCDDA May 10, 2024
52884da
Give all our factions reasonable food stores
RenechCDDA May 10, 2024
08679de
Handle infinite food for most NPC factions
RenechCDDA May 10, 2024
c989f1a
NPC camps use a special camp type which always provides water
RenechCDDA May 10, 2024
7d17140
Some factions share water access
RenechCDDA May 10, 2024
081357e
Can't send NPCs to NPC camps you've never seen before
RenechCDDA May 10, 2024
d9fdcea
Prevent NPCs from infinitely looping when starved and eating from camp
RenechCDDA May 10, 2024
be3274a
Camp migrations for previously placed specials
RenechCDDA May 10, 2024
e0e05cf
Merge branch 'master' into NPC_camps
RenechCDDA May 10, 2024
12e455e
Update src/map.h
RenechCDDA May 10, 2024
40dddf0
Nix fake IDs
RenechCDDA May 10, 2024
403d255
Oops - reset loaded migrations when asked
RenechCDDA May 10, 2024
93146b5
Fixes - wasteland scavengers get camps.
RenechCDDA May 10, 2024
4707ff6
typo fix thanks
RenechCDDA May 19, 2024
2d03b77
Merge branch 'master' into NPC_camps
Maleclypse May 26, 2024
303010b
Update u_has_camp
RenechCDDA May 29, 2024
8939787
Camp name translations, hopefully?
RenechCDDA May 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
56 changes: 37 additions & 19 deletions data/json/npcs/factions.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"size": 1,
"power": 100,
"fac_food_supply": { "calories": 0, "vitamins": { } },
"consumes_food": true,
"wealth": 0,
"relations": {
"your_followers": {
Expand Down Expand Up @@ -60,7 +61,9 @@
"known_by_u": false,
"size": 100,
"power": 100,
"fac_food_supply": { "calories": 115200, "vitamins": { "iron": 800, "calcium": 800, "vitC": 600 } },
"//": "90 days worth of food for 10 people, at 3000kcal/day and full RDA of iron/calcium/vitC",
"//2": "Expect to see these values a lot.",
"fac_food_supply": { "calories": 2700000000, "vitamins": { "iron": 86400, "calcium": 86400, "vitC": 86400 } },
Fris0uman marked this conversation as resolved.
Show resolved Hide resolved
"wealth": 100000000,
"currency": "RobofacCoin",
"price_rules": [ { "group": "NC_ROBOFAC_gear", "markup": 2 } ],
Expand All @@ -74,6 +77,7 @@
"defends your space": true,
"knows your voice": true
},
"robofac_auxiliaries": { "share my stuff": true },
"marloss": { "kill on sight": true }
},
"epilogues": [
Expand All @@ -91,7 +95,8 @@
"known_by_u": false,
"size": 70,
"power": 100,
"fac_food_supply": { "calories": 115200, "vitamins": { } },
"//": "No food supply, they eat off of robofac's",
"fac_food_supply": { "calories": 0, "vitamins": { } },
"wealth": 75000,
"currency": "RobofacCoin",
"relations": {
Expand All @@ -117,7 +122,8 @@
"known_by_u": false,
"size": 100,
"power": 100,
"fac_food_supply": { "calories": 201600, "vitamins": { } },
"//": "FIXME: No camp! One character spawns at the refugee center but can't eat out of their stores",
"fac_food_supply": { "calories": 2700000000, "vitamins": { "iron": 86400, "calcium": 86400, "vitC": 86400 } },
"wealth": 100000000,
"relations": {
"old_guard": {
Expand Down Expand Up @@ -155,7 +161,9 @@
"known_by_u": false,
"size": 100,
"power": 100,
"fac_food_supply": { "calories": 115200, "vitamins": { } },
"//": "(only) 30 days worth of food for 100 people, at 3000kcal/day and full RDA of iron/calcium/vitC",
"//2": "Their canonical starvation is not yet implemented.",
"fac_food_supply": { "calories": 9000000000, "vitamins": { "iron": 288000, "calcium": 288000, "vitC": 288000 } },
"wealth": 75000000,
"currency": "FMCNote",
"price_rules": [
Expand Down Expand Up @@ -201,6 +209,7 @@
"kill on sight": false,
"watch your back": true,
"share my stuff": false,
"share public goods": true,
"guard your stuff": true,
"lets you in": false,
"defends your space": false,
Expand Down Expand Up @@ -241,7 +250,8 @@
"known_by_u": false,
"size": 5,
"power": 0,
"fac_food_supply": { "calories": 1152, "vitamins": { } },
"//": "No camp, on purpose! These guys will literally starve.",
"fac_food_supply": { "calories": 0, "vitamins": { } },
"wealth": 100,
"relations": {
"lobby_beggars": {
Expand Down Expand Up @@ -301,7 +311,7 @@
"known_by_u": false,
"size": 100,
"power": 100,
"fac_food_supply": { "calories": 115200, "vitamins": { } },
"fac_food_supply": { "calories": 2700000000, "vitamins": { "iron": 86400, "calcium": 86400, "vitC": 86400 } },
"wealth": 10000000,
"currency": "FMCNote",
"price_rules": [ { "item": "money_strap_FMCNote", "fixed_adj": 0 }, { "item": "money_bundle_FMCNote", "fixed_adj": 0 } ],
Expand Down Expand Up @@ -331,7 +341,8 @@
"known_by_u": false,
"size": 2,
"power": 5,
"fac_food_supply": { "calories": 4000, "vitamins": { } },
"//": "180 days worth of food for 2 people, at 3000kcal/day and full RDA of iron/calcium/vitC",
"fac_food_supply": { "calories": 1080000000, "vitamins": { "iron": 34560, "calcium": 34560, "vitC": 34560 } },
"wealth": 100000,
"currency": "FMCNote",
"price_rules": [ { "item": "money_strap_FMCNote", "fixed_adj": 0 }, { "item": "money_bundle_FMCNote", "fixed_adj": 0 } ],
Expand Down Expand Up @@ -361,7 +372,8 @@
"known_by_u": false,
"size": 100,
"power": 100,
"fac_food_supply": { "calories": 172800, "vitamins": { } },
"//": "No camp, on purpose! The pilgrim group should probably be full marloss, and not need to eat?",
"fac_food_supply": { "calories": 0, "vitamins": { } },
"wealth": 25000,
"relations": {
"marloss": {
Expand Down Expand Up @@ -404,9 +416,10 @@
"likes_u": 0,
"respects_u": 0,
"known_by_u": false,
"size": 100,
"size": 1,
"power": 100,
"fac_food_supply": { "calories": 172800, "vitamins": { } },
"//": "90 days worth of food for 1 person, at 3000kcal/day and full RDA of iron/calcium/vitC",
"fac_food_supply": { "calories": 270000000, "vitamins": { "iron": 8640, "calcium": 8640, "vitC": 8640 } },
"wealth": 2500000,
"relations": {
"lobby_beggars": { "knows your voice": true },
Expand All @@ -430,7 +443,7 @@
"known_by_u": false,
"size": 100,
"power": 100,
"fac_food_supply": { "calories": 230400, "vitamins": { } },
"fac_food_supply": { "calories": 2700000000, "vitamins": { "iron": 86400, "calcium": 86400, "vitC": 86400 } },
"wealth": 45000000,
"relations": {
"hells_raiders": {
Expand Down Expand Up @@ -506,7 +519,8 @@
"known_by_u": false,
"size": 1,
"power": 10,
"fac_food_supply": { "calories": 2304, "vitamins": { } },
"//": "90 days worth of food for 1 person, at 3000kcal/day and full RDA of iron/calcium/vitC",
"fac_food_supply": { "calories": 270000000, "vitamins": { "iron": 8640, "calcium": 8640, "vitC": 8640 } },
"wealth": 0,
"relations": {
"apis_hive": {
Expand Down Expand Up @@ -534,7 +548,8 @@
"size": 7,
"power": 10,
"currency": "signed_chit",
"fac_food_supply": { "calories": 115200, "vitamins": { } },
"//": "FOUR camps.",
"fac_food_supply": { "calories": 2700000000, "vitamins": { "iron": 86400, "calcium": 86400, "vitC": 86400 } },
"wealth": 75000,
"relations": {
"free_merchants": {
Expand Down Expand Up @@ -607,7 +622,7 @@
"size": 25,
"power": 20,
"currency": "icon",
"fac_food_supply": { "calories": 87500, "vitamins": { } },
"fac_food_supply": { "calories": 2700000000, "vitamins": { "iron": 86400, "calcium": 86400, "vitC": 86400 } },
"wealth": 82500,
"relations": {
"gods_community": {
Expand Down Expand Up @@ -699,7 +714,8 @@
"size": 1,
"power": 1,
"currency": "fur",
"fac_food_supply": { "calories": 87500, "vitamins": { } },
"//": "90 days worth of food for 1 person, at 3000kcal/day and full RDA of iron/calcium/vitC",
"fac_food_supply": { "calories": 270000000, "vitamins": { "iron": 8640, "calcium": 8640, "vitC": 8640 } },
"wealth": 82500,
"relations": {
"free_merchants": {
Expand Down Expand Up @@ -781,7 +797,8 @@
"known_by_u": false,
"size": 3,
"power": 3,
"fac_food_supply": { "calories": 100, "vitamins": { } },
"//": "FIXME: Currently no camps! Spawns via % chance in a bit of nested mapgen, then moves to an existing lighthouse (with no way to know which lighthouse during mapgen!). Will probably need some dynamic camp placement to support.",
"fac_food_supply": { "calories": 2700000000, "vitamins": { "iron": 86400, "calcium": 86400, "vitC": 86400 } },
"wealth": 20000,
"relations": {
"free_merchants": { "knows your voice": true },
Expand All @@ -800,7 +817,8 @@
"known_by_u": true,
"size": 100,
"power": 100,
"fac_food_supply": { "calories": 230400, "vitamins": { } },
"//": "7 days worth of food for 10 people, at 3000kcal/day and *half* RDA of iron/calcium/vitC",
"fac_food_supply": { "calories": 210000000, "vitamins": { "iron": 3360, "calcium": 3360, "vitC": 3360 } },
"wealth": 45000000,
"relations": {
"hells_raiders": {
Expand Down Expand Up @@ -832,7 +850,7 @@
"mon_faction": "exodii",
"size": 100,
"power": 100,
"fac_food_supply": { "calories": 115200, "vitamins": { } },
"fac_food_supply": { "calories": 2700000000, "vitamins": { "iron": 86400, "calcium": 86400, "vitC": 86400 } },
"wealth": 75000000,
"price_rules": [ { "group": "games_board_all", "premium": 2.5 } ],
"relations": {
Expand Down Expand Up @@ -915,7 +933,7 @@
"known_by_u": false,
"size": 100,
"power": 100,
"fac_food_supply": { "calories": 115200, "vitamins": { } },
"fac_food_supply": { "calories": 2700000000, "vitamins": { "iron": 86400, "calcium": 86400, "vitC": 86400 } },
"wealth": 25000000,
"currency": "FlatCoin",
"price_rules": [
Expand Down
62 changes: 62 additions & 0 deletions data/json/obsoletion_and_migration_0.I/camp_placement.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
[
{
"type": "camp_migration",
"camp_migrations": { "name": "Refugee Center", "overmap_terrain": "evac_center_13", "faction": "free_merchants" }
},
{
"type": "camp_migration",
"camp_migrations": { "name": "Exodii", "overmap_terrain": "exodii_base_x1y2z1", "faction": "exodii" }
},
{
"type": "camp_migration",
"camp_migrations": { "name": "???", "overmap_terrain": "hive", "faction": "apis_hive" }
},
{
"type": "camp_migration",
"camp_migrations": { "name": "Lapin", "overmap_terrain": "cabin_lapin", "faction": "lapin" }
},
{
"type": "camp_migration",
"camp_migrations": { "name": "Holdouts", "overmap_terrain": "prison_island_1_6", "faction": "prisoners" }
},
{
"type": "camp_migration",
"camp_migrations": { "name": "New England Church Retreat", "overmap_terrain": "godco_5", "faction": "gods_community" }
},
{
"type": "camp_migration",
"camp_migrations": { "name": "Tacoma", "overmap_terrain": "ranch_camp_67", "faction": "tacoma_commune" }
},
{
"type": "camp_migration",
"camp_migrations": { "name": "Hub 01", "overmap_terrain": "robofachq_surface_entrance", "faction": "robofac" }
},
{
"type": "camp_migration",
"camp_migrations": { "name": "Cody & Jay", "overmap_terrain": "isolated_house_farm_gunsmith", "faction": "isolated_artisans" }
},
{
"type": "camp_migration",
"camp_migrations": { "name": "Cabin", "overmap_terrain": "cabin_isherwood", "faction": "isherwood_family" }
},
{
"type": "camp_migration",
"camp_migrations": { "name": "Isherwood Stables", "overmap_terrain": "horse_farm_isherwood_6", "faction": "isherwood_family" }
},
{
"type": "camp_migration",
"camp_migrations": { "name": "Isherwood Outcropping", "overmap_terrain": "farm_isherwood_2", "faction": "isherwood_family" }
},
{
"type": "camp_migration",
"camp_migrations": { "name": "Isherwood Farms", "overmap_terrain": "dairy_farm_isherwood_SW", "faction": "isherwood_family" }
},
{
"type": "camp_migration",
"camp_migrations": { "name": "Merchant", "overmap_terrain": "bunker_shop_b", "faction": "wasteland_scavengers" }
},
{
"type": "camp_migration",
"camp_migrations": { "name": "The Great Library", "overmap_terrain": "campus_media_0_0_0", "faction": "the_great_library" }
}
]
2 changes: 1 addition & 1 deletion data/json/overmap/overmap_special/alien.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
{ "point": [ 2, 1, 1 ], "overmap": "exodii_base_x2y1z1_north" },
{ "point": [ 3, 1, 1 ], "overmap": "exodii_base_x3y1z1_north" },
{ "point": [ 0, 2, 1 ], "overmap": "exodii_base_x0y2z1_north" },
{ "point": [ 1, 2, 1 ], "overmap": "exodii_base_x1y2z1_north" },
{ "point": [ 1, 2, 1 ], "overmap": "exodii_base_x1y2z1_north", "camp": "exodii", "camp_name": "Exodii" },
{ "point": [ 2, 2, 1 ], "overmap": "exodii_base_x2y2z1_north" },
{ "point": [ 3, 2, 1 ], "overmap": "exodii_base_x3y2z1_north" },
{ "point": [ 0, 3, 1 ], "overmap": "exodii_base_x0y3z1_north" },
Expand Down
7 changes: 6 additions & 1 deletion data/json/overmap/overmap_special/campus.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,12 @@
{ "point": [ 10, 6, 3 ], "overmap": "campus_commons_1_2_3_north" },
{ "point": [ 9, 7, 3 ], "overmap": "campus_commons_0_3_3_north" },
{ "point": [ 10, 7, 3 ], "overmap": "campus_commons_1_3_3_north" },
{ "point": [ 12, 10, 0 ], "overmap": "campus_media_0_0_0_north" },
{
"point": [ 12, 10, 0 ],
"overmap": "campus_media_0_0_0_north",
"camp": "the_great_library",
"camp_name": "The Great Library"
},
{ "point": [ 12, 11, 0 ], "overmap": "campus_media_0_1_0_north" },
{ "point": [ 13, 10, 0 ], "overmap": "campus_media_1_0_0_north" },
{ "point": [ 13, 11, 0 ], "overmap": "campus_media_1_1_0_north" },
Expand Down