-
Notifications
You must be signed in to change notification settings - Fork 340
feat(mods): Obsolete no_global_uniques in favour of a RESPECT_GLOBALLY_UNIQUE world option #6769
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
base: main
Are you sure you want to change the base?
feat(mods): Obsolete no_global_uniques in favour of a RESPECT_GLOBALLY_UNIQUE world option #6769
Conversation
a5b9876 to
78bf959
Compare
b2a4c94 to
0f66252
Compare
0f66252 to
20e6ede
Compare
This reverts commit 20e6ede.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed cabin_lapin to be [99, 100] occurances and have a unique omt name to make it easily searchable
Genned a default world, found one cabin_lapin in ~16 overmaps as expected
Genned a world with RESPECT_GLOBALLY_UNIQUE set to false, found 2 cabin_lapin's in 5 overmaps
sorry, could you be more specific? even after increaing occurances to [99, 100] i wasn't able to find any "cabin" in overmap. how do i give it a unique name?
--- a/data/json/overmap/overmap_terrain/overmap_terrain.json
+++ b/data/json/overmap/overmap_terrain/overmap_terrain.json
@@ -185,7 +185,7 @@
},
{
"type": "overmap_terrain",
- "id": [ "cabin", "cabin_1", "cabin_2", "cabin_3", "cabin_4", "cabin_5", "cabin_6", "cabin_7", "cabin_lapin", "bandit_cabin" ],
+ "id": [ "cabin", "cabin_1", "cabin_2", "cabin_3", "cabin_4", "cabin_5", "cabin_6", "cabin_7", "bandit_cabin" ],
"name": "cabin",
"sym": "C",
"color": "i_green",
@@ -194,6 +194,17 @@
"mondensity": 2,
"flags": [ "RISK_LOW", "SOURCE_SAFETY", "SOURCE_FOOD" ]
},
+ {
+ "type": "overmap_terrain",
+ "id": [ "cabin_lapin" ],
+ "name": "SEARCHFORME",
+ "sym": "!",
+ "color": "red",
+ "see_cost": 5,
+ "extras": "build",
+ "mondensity": 2,
+ "flags": [ "RISK_LOW", "SOURCE_SAFETY", "SOURCE_FOOD" ]
+ },
{
"type": "overmap_terrain",
"id": [There's generic cabins all over tho so idk how you can't find any '^^ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good at a glance.
- Compiled and load-tested.
- Spawned at refugee center, had no issues finding it.
- Temporarily set them to be a 100% mandatory special, started debugging across multiple overmaps and did not find a second one.
- Went back and set the option off.
Problem: even though I set occurrences to 1/1 for refugee centers to test a world where global specials were definitely set to off, which SHOULD force an appearance of the refugee center in every single world, I'm still not finding more than one after having visited several overmaps.

Purpose of change (The Why)
Closes #6757
Describe the solution (The How)
If RESPECT_GLOBALLY_UNIQUE is set to false GLOBALLY_UNIQUE (max one per world) specials are instead treated as though they're UNIQUE (max one per overmap)
They're still tracked as being placed in case you turn it back on mid save
Obsolete no_global_uniques mod as it's superceded by the option and errorlessly remove it
Describe alternatives you've considered
I attempted to migrate the new option to false if you had the mod for an updating world but it's not convenient to inject that in the place where BN does mod replacements due to call order and I didn't want to scope creep into trying store it and alter it later (the reverted commit does change the setting to false but also pops up an error and loses other non default world settings)
Testing
Changed cabin_lapin to be [99, 100] occurances and have a unique omt name to make it easily searchable
Genned a default world, found one cabin_lapin in ~16 overmaps as expected
Genned a world with RESPECT_GLOBALLY_UNIQUE set to false, found 2 cabin_lapin's in 5 overmaps
Additional context
Cloned BN so I can port the not yet merged rainbows to DDA and figured I might as well nab an easy C++ PR while I'm here
Checklist
Mandatory
closes #1234in Summary of the PR so it can be closed automatically.mainso it won't cause conflict when updatingmainbranch later.