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

Offline Delian

  • Commander
  • *****
  • Posts: 704
    • 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: 62
    • 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

  • Commander
  • Global Moderator
  • Commander
  • *****
  • Posts: 3478
  • 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: 704
    • 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: 9534
    • 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: 9534
    • 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

Offline robin

  • Commander
  • *****
  • Posts: 1257
  • ULTIMATE ROOKIE
    • View Profile
Re: [DONE][Suggestion] "Force spawn" option
« Reply #6 on: March 17, 2025, 12:52:23 am »
In OXCE difficulty.rul, constants are preceded by "- ".
So perhaps it should be
Code: [Select]
constants:
  - extendedForceSpawn: true  # default false
?

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9534
    • View Profile
Re: [DONE][Suggestion] "Force spawn" option
« Reply #7 on: March 17, 2025, 01:15:15 am »
Both are supported.

Mine is newer, yours is older (deprecated, but still working).

Offline Dioxine

  • Commander
  • *****
  • Posts: 5488
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: [DONE][Suggestion] "Force spawn" option
« Reply #8 on: April 06, 2025, 09:24:26 pm »
Thank you for this.