OpenXcom Forum

OpenXcom Forks => OpenXcom Extended (OXCE) => OXCE Suggestions DONE => Topic started by: Delian on February 28, 2025, 12:20:53 am

Title: [DONE][Suggestion] "Force spawn" option
Post by: Delian 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
Title: Re: [Suggestion] Split difficultyDemigod
Post by: hth on February 28, 2025, 12:59:09 am
How about to remove this incorrect and confusing term entirely, leaving only these two options instead?
Title: Re: [Suggestion] Split difficultyDemigod
Post by: Yankes on February 28, 2025, 02:10:56 am
No, because it will break all mods that use it.
Title: Re: [Suggestion] Split difficultyDemigod
Post by: Delian 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.
Title: Re: [Suggestion] Split difficultyDemigod
Post by: Meridian 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.
Title: Re: [Suggestion] "Force spawn" option
Post by: Meridian 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
Title: Re: [DONE][Suggestion] "Force spawn" option
Post by: robin 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
?
Title: Re: [DONE][Suggestion] "Force spawn" option
Post by: Meridian on March 17, 2025, 01:15:15 am
Both are supported.

Mine is newer, yours is older (deprecated, but still working).
Title: Re: [DONE][Suggestion] "Force spawn" option
Post by: Dioxine on April 06, 2025, 09:24:26 pm
Thank you for this.