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

Quest Items and "Item Spawn Scaling Factor" World Option #63030

Closed
ChromePoptart opened this issue Jan 7, 2023 · 2 comments
Closed

Quest Items and "Item Spawn Scaling Factor" World Option #63030

ChromePoptart opened this issue Jan 7, 2023 · 2 comments
Labels
(S1 - Need confirmation) Report waiting on confirmation of reproducibility stale Closed for lack of activity, but still valid.

Comments

@ChromePoptart
Copy link

Describe the bug

Summary: I believe having the "item spawn scaling factor" world option less than 100% resulted in a quest item not dropping for me -- it seems to me that it'd be best for unique items (or, at the very least, quest items) to always spawn, regardless of the world option value.

[Minor Hub 01 spoilers ahead.]

During world generation for the world/character I'm currently playing, I set the "item spawn scaling factor" to 70% for a bit of additional challenge. My assumption as to what this means in practice is that any item that would spawn (after all other behind-the-scenes probabilities are considered) is again checked against a subsequent roll to see if it does end up spawning.

Upon reaching the final room of the Hub 01 collapsed tower mission, the target item mentioned in the mission description (template_photonics) was present -- I picked it up, returned to Hub 01, and finished the quest.

Later, after completing more Hub 01 missions, I was surprised to see that I hadn't been offered the chance to requisition any additional prototype equipment besides the HWP. Digging into the code a little bit, I discovered that being offered additional prototype gear requires having found a unique item template_armor during the Hub 01 collapsed tower mission and giving that to the Hub 01 quest giver. Since I'm an obsessive looter, I didn't think that I'd missed anything in the collapsed tower final room -- I returned to the area to double-check, and I indeed had not missed the template_armor item or something like that.

Looking into the code a bit more, I discovered that template_photonics and template_armor are both only ever spawned as part of the nano_templates item group. Both of those items have a 100% chance to spawn within nano_templates, and nano_templates has a 100% chance to spawn within the final room of the collapsed tower.

So, why didn't a template_armor spawn for me when a template_photonics did? My conclusion is that the rolls due to the world's 70% "item spawn scaling factor" resulted in success for template_photonics and failure for template_armor. In this particular instance, that meant that I could finish the Hub 01 quest (since template_photonics is the required item and template_armor just seems to be a bonus). However, I didn't get the opportunity to get any of that sweet, sweet, more advanced Hub 01 gear.

I personally think that unique items should always spawn, regardless of the "item spawn scaling factor" value. Items necessary to finish quests (such as template_photonics) should definitely always spawn so that players aren't prevented from finishing quests. However, I'd also argue that any unique-but-not-absolutely-necessary-to-progress-the-game items (such as template_armor) should also always spawn. Otherwise, the player could inadvertently miss out on some portion of the game's content without being any the wiser.

I would guess that the intention of the "item spawn scaling factor" world option is to make it more difficult to progress in the game due to fewer spawns of items being present -- that is, while you might not find that crafting tool you need in the first or second place you look where you'd normally find it, if you survive long enough to keep checking other places, you'll get it eventually. I'm assuming that it is NOT intended to unknowingly cut out some of the game's content.

(I've included some more thoughts about behind-the-scenes causes under "Steps to reproduce" below.)

Steps to reproduce

  1. Create a new world with the "item spawn scaling factor" world option set to less than 100% (I set it to 10% for testing purposes).
  2. Use debug options to reveal overmap to find Hub 01, then teleport there.
  3. Talk to Hub 01 quest giver to get initial prototype robot quest, then teleport to and complete that quest (note: prototype I/O recorder DID spawn).
  4. Talk to Hub 01 quest giver to get "Return to sender" quest, then teleport to and complete that quest (note: DARPA hard case DID spawn).
  5. Talk to Hub 01 quest giver to get "Light Retrieval" quest. Teleport to collapsed tower, fall down one level, teleport to overmap tile of final room, and make way inside.
  6. Note that neither template_photonics nor template_armor spawned within the small wooden box:
    image
  7. Return to Hub 01 quest giver to try to complete "Light Retrieval" quest, but option is not present:
    image

===============================

Note: given that both the prototype I/O recorder and the DARPA hard card did both spawn despite the "item spawn scaling factor" being set to only 10%, but neither template_photonics nor template_armor spawned, I wondered if it's the way in which the items are forced to spawn that's the difference. Looking into the code a bit:

  • For prototype I/O recorder robofac_test_data:
    Part of item group mon_robofac_prototype_drops, which drops on death of mon_robofac_prototype
    Does have MISSION_ITEM flag
  • For DARPA hard case robofac_hardcase:
    Spawn via mapgen under: "nested_mapgen_id": "robofac_mi2_convoy_ambush_chunk",
    Placed with: "item": { "@": [ { "item": "rmi2_corpse" }, { "item": "robofac_hardcase" } ] },
    Does NOT have MISSION_ITEM flag
  • For template_photonics nor template_armor, which are under the nano_templates item group:
    Spawn via mapgen under: "nested_mapgen_id": "robofac_mi3_photonics_chunk",
    Placed with: "items": { "T": { "item": "nano_templates", "chance": 100 } }
    Neither has MISSION_ITEM flag
  1. Does the "chance": 100 qualifier for the nano_templates item group matter?
  2. Is perhaps the "item spawn scaling factor" ignored when directly spawning items via mapgen, but factored in when calculating whether to spawn the contents of those directly-spawned items if they're item groups, containers, or collections? (That is, nano_templates will always be directly spawned, but its individual contents are still checked against "item spawn scaling factor".)
  3. Does the MISSION_ITEM item flag matter?

Expected behavior

  1. Items necessary for missions should always spawn, regardless of the "item spawn scaling factor" world option.
  2. I'd posit that the best gameplay experience is that other unique items (i.e., not just those required for missions) should also always spawn, even if "item spawn scaling factor" is less than 100%.
  3. (I'm not sure exactly how the "item spawn scaling factor" code works, but, if it's possible for extra, duplicate items to be spawned if "item spawn scaling factor" is greater than 100%, it probably makes sense that still only one mission-necessary item should ever spawn. I can see that same logic being used to argue that non-mission-necessary-but-still-unique items should also not spawn more than once, but I suppose that point is more up for discussion.)

Screenshots

No response

Versions and configuration

  • OS: Windows
    • OS Version: 10.0.19044.2364 (21H2)
  • Game Version: 5772feb [64-bit]
  • Graphics Version: Tiles
  • Game Language: System language []
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    No Fungal Growth [no_fungal_growth],
    Bionic Professions [package_bionic_professions],
    Blaze Industries [blazeindustries],
    Bionic Slots [cbm_slots]
    ]

Additional context

No response

@ChromePoptart ChromePoptart added the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Jan 7, 2023
@Night-Pryanik
Copy link

This is essentially the same as #58225. The fix would be to add MISSION_ITEM flag to all quest mission-related items and make sure that these items have 100% chance to spawn in mapgen.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 7, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not bump or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

@github-actions github-actions bot added the stale Closed for lack of activity, but still valid. label Feb 7, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
(S1 - Need confirmation) Report waiting on confirmation of reproducibility stale Closed for lack of activity, but still valid.
Projects
None yet
Development

No branches or pull requests

2 participants