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

Spawn rates lower than the default can make Clear Back Bay impossible #36422

Closed
Kodiologist opened this issue Dec 25, 2019 · 1 comment · Fixed by Hirmuolio/Cataclysm-DDA#49 or #36451
Closed
Labels
<Bug> This needs to be fixed Missions Quests and missions Monsters Monsters both friendly and unfriendly. Spawn Creatures, items, vehicles, locations appearing on map

Comments

@Kodiologist
Copy link
Contributor

Describe the bug

It seems that you need to kill a particular monster, a named zombie, in order to complete the Clear Back Bay mission, but if the spawn rate is below 1, the monster may not spawn, so the quest becomes impossible to complete.

Steps To Reproduce

  1. Create a world with spawn rate 0.10.
  2. Teleport to the refugee center.
  3. Get the quest.
  4. Kill all the zombies in the back bay. In general, the named zombie won't be there.
  5. Observe that the quest-giver doesn't think the quest is done.

Expected behavior

One of:

  1. The game should force the named zombie to spawn.
  2. The quest-giver should be satisfied with killing the zombies that do spawn.
  3. If the named zombie is never spawned, the quest shouldn't be offered in the first place.
@ZhilkinSerg ZhilkinSerg added <Bug> This needs to be fixed Missions Quests and missions Monsters Monsters both friendly and unfriendly. Spawn Creatures, items, vehicles, locations appearing on map labels Dec 25, 2019
@Hirmuolio
Copy link
Contributor

Hirmuolio commented Dec 25, 2019

The mapgen code for spawning one monster seems to have two separate ways to not spawn any monsters and the earlier one is getting triggered here.

mapgen.cpp line 1207

if( !x_in_y( odds_after_density, 100 ) ) {
    return;
}

The number of monsters to spawn is decided later and can result in zero spawn again making this x_in_y check redundant.

The x_in_y check should probably be just removed.

Edit: It is needed after all. I'll just move it down a bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bug> This needs to be fixed Missions Quests and missions Monsters Monsters both friendly and unfriendly. Spawn Creatures, items, vehicles, locations appearing on map
Projects
None yet
3 participants