Author Topic: [DONE][Suggestion] "Force spawn" option  (Read 442 times)

Offline Delian

  • Commander
  • *****
  • Posts: 659
    • View Profile
[DONE][Suggestion] "Force spawn" option
« on: February 28, 2025, 12:20:53 am »
As documented, the current difficulty option difficultyDemigod has two functions:
- Always spawn maximum amount of enemies set in the deployment for the current difficulty
- Force spawn enemies even if there's not enough spawn nodes

This is not configurable enough for modders (e.g. Dioxine only wanted the force-spawning feature, but not the always-maximum-enemies feature). Therefore, I suggest adding two new options, which together work the same as difficultyDemigod:
- difficultyDemigodMaxEnemies
- difficultyDemigodForceSpawn

Offline hth

  • Captain
  • ***
  • Posts: 55
    • View Profile
Re: [Suggestion] Split difficultyDemigod
« Reply #1 on: February 28, 2025, 12:59:09 am »
How about to remove this incorrect and confusing term entirely, leaving only these two options instead?

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3436
  • Posts: 421
    • View Profile
Re: [Suggestion] Split difficultyDemigod
« Reply #2 on: February 28, 2025, 02:10:56 am »
No, because it will break all mods that use it.

Offline Delian

  • Commander
  • *****
  • Posts: 659
    • View Profile
Re: [Suggestion] Split difficultyDemigod
« Reply #3 on: February 28, 2025, 09:55:11 am »
I'm also against removing it. As I wrote, I suggest adding new options while keeping the old one, to keep backwards compatibility. But the new options have priority over the old one, so if both new options are set, then the old one has no effect.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9415
    • View Profile
Re: [Suggestion] Split difficultyDemigod
« Reply #4 on: February 28, 2025, 08:56:04 pm »
"Max enemies" is already moddable, I don't feel the need to add an option for something that can already be done.

"Force spawn" can be added.

Effects will be cumulative (i.e. new option will not have priority over the old one). Modder to decide, which one he wants to use.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9415
    • View Profile
Re: [Suggestion] "Force spawn" option
« Reply #5 on: March 07, 2025, 02:03:06 pm »
Implemented: https://github.com/MeridianOXC/OpenXcom/commit/c221adec6f96a457c26e0b7c3440b7a707dd20d8

Sample ruleset:

Code: [Select]
constants:
  extendedForceSpawn: true  # default false