Author Topic: [Submod] Everyone surrender  (Read 4641 times)

Offline Juku121

  • Commander
  • *****
  • Posts: 1806
  • We're all mad here.
    • View Profile
Re: [Submod] Everyone surrender
« Reply #15 on: January 02, 2024, 12:24:42 pm »
Should the type: be instead override:.  I assume, it's a more correct approach when developing a submod.
Ideologically, yes. Practically, this only makes the submod 100% crash if Solarius removes an enemy, as opposed to maybe causing a minor issue and very likely nothing. So, not really unless you're dedicated to maintaining the submod.
« Last Edit: January 03, 2024, 05:40:32 pm by Meridian »

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3406
    • View Profile
Re: [Submod] Everyone surrender
« Reply #16 on: January 02, 2024, 03:36:57 pm »
Then if you do not want crash then use `update:` as it only spam logs when do not find rule with given name.

Offline Juku121

  • Commander
  • *****
  • Posts: 1806
  • We're all mad here.
    • View Profile
Re: [Submod] Everyone surrender
« Reply #17 on: January 02, 2024, 07:46:28 pm »
Spoiler" Ignore me":
What does this even mean?
Quote from: Ruleset reference
     Another feature (added in OXCE v7.9) allows modders to better control how rulesets are overridden between mods and submods:

 items: !info                # this tag can be used to check if a given ruleset supports the new features
   - type: STR_RANDOM        # from OXC, this was effectively split into `update:` and `new:` to make modder's intention clearer
   - delete: STR_X           # from OXC
   - new: STR_UNIQUE_NAME    # if an item with this name exists already (i.e. was created by another mod), the game raises a hard error
   - override: STR_OLD_NAME  # check if this name was used already and update the given item, hard error if the item did not exist
   - update: STR_OPTIONAL    # check if this name was used already and update the given item, do nothing if the item did not exist
« Last Edit: January 02, 2024, 07:58:56 pm by Juku121 »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9310
    • View Profile
Re: [Submod] Everyone surrender
« Reply #18 on: January 03, 2024, 05:43:01 pm »
Replaced [/t]] with [/tt] so that forum displays correct text formatting.

Deleted all posts about what does [/t]] mean... feel free to continue the discussion.
« Last Edit: January 03, 2024, 05:45:28 pm by Meridian »

Offline AndyFox

  • Captain
  • ***
  • Posts: 78
  • ÷)
    • View Profile
Re: [Submod] Everyone surrender
« Reply #19 on: February 04, 2025, 09:48:06 pm »
How can this submod be modified so that all enemies surrender? And on the first turn!

P. S. Know that this is the dirtiest cheat. It is needed to quickly finish many similar battles.

Offline Juku121

  • Commander
  • *****
  • Posts: 1806
  • We're all mad here.
    • View Profile
Re: [Submod] Everyone surrender
« Reply #20 on: February 05, 2025, 12:36:50 am »
Probably by using 'autoSurrender' instead of 'canSurrender'. Although if all enemies always surrender, your game will have no battles at all.

Offline AndyFox

  • Captain
  • ***
  • Posts: 78
  • ÷)
    • View Profile
Re: [Submod] Everyone surrender
« Reply #21 on: February 05, 2025, 04:33:08 am »
Probably by using 'autoSurrender' instead of 'canSurrender'. Although if all enemies always surrender, your game will have no battles at all.

Thanks a lot! Is it possible to enable 'autoSurrender' on the third move, for example?

Offline Kozinsky

  • Colonel
  • ****
  • Posts: 153
  • Sorry for my bEd English
    • View Profile
Re: [Submod] Everyone surrender
« Reply #22 on: February 05, 2025, 09:41:27 am »
Thanks a lot! Is it possible to enable 'autoSurrender' on the third move, for example?

To do this, in addition to enabling 'autoSurrender' for all units, you'll need to use a script that will forcibly reduce all opponents current morale to zero (or lower) on the third turn.

If you are not good with scripts, it will be easier to use debug mode:
https://www.ufopaedia.org/index.php/Hidden_Features_(OpenXcom)#Debug_mode