Author Topic: Nightly Builds Discussion for Modders/LPers/Players/etc.  (Read 36178 times)

Offline FeruEnzeru[RETIRED/I QUIT]

  • Colonel
  • ****
  • Posts: 430
  • retired, because of Meridian and his followers. 👎
    • View Profile
Re: Nightly Builds Discussion for Modders/LPers/Players/etc.
« Reply #90 on: July 14, 2018, 09:12:49 pm »
Just a heads up for modders, as of the 2018_07_08_2236 nightly, unit capturability (i.e. can they drop unconscious) is now defined by ruleset. This means every unit, even explodey ones, are now capturable by default unless you explicitly set them to "capturable: false".

On the bright side, you can now apply this to any unit!
Gotcha. I'll think of learning this "capturable: true/false" code maybe a different day until i update my OXC and OXCE+ unless my health's feeling better.


Thank your for the warning, SS.

Offline Ethereal

  • Colonel
  • ****
  • Posts: 303
    • View Profile
Re: Nightly Builds Discussion for Modders/LPers/Players/etc.
« Reply #91 on: July 15, 2018, 07:45:27 am »
I, too, will wait for developments. I see no sense in such changes. Especially by default to do this... Would put it as a separate option - that is another matter.

Offline Hobbes

  • Commander
  • *****
  • Posts: 3463
  • Infiltration subroutine in progress
    • View Profile
Re: Nightly Builds Discussion for Modders/LPers/Players/etc.
« Reply #92 on: July 19, 2018, 06:41:14 pm »
This is a heads-up for all mods that include changes to the appearance of alien races because of a recent nightly change.

Before the nightly change, races in alienMissions followed this monthly progression:
Code: [Select]
  - type: STR_ALIEN_RESEARCH
    raceWeights:
      0:
        STR_SECTOID: 70
        STR_SNAKEMAN: 10
        STR_FLOATER: 20
      1:
        STR_SECTOID: 60
        STR_SNAKEMAN: 10
        STR_FLOATER: 30
      3:
        STR_SECTOID: 30
        STR_SNAKEMAN: 10
        STR_MUTON: 30
        STR_FLOATER: 30
      5:
        STR_SECTOID: 20
        STR_SNAKEMAN: 10
        STR_MUTON: 40
        STR_FLOATER: 30
      7:
        STR_SECTOID: 30
        STR_SNAKEMAN: 10
        STR_MUTON: 30
        STR_FLOATER: 30

After openxcom_git_master_2018_07_19_1404, this is the new progression for all alienMission entries (not just Alien Research):

Code: [Select]
alienMissions:
  - type: STR_ALIEN_RESEARCH
    raceWeights:
      0:
        STR_SECTOID: 70
        STR_SNAKEMAN: 10
        STR_FLOATER: 20
      1:
        STR_SECTOID: 60
        STR_SNAKEMAN: 10
        STR_FLOATER: 30
      3:
        STR_SECTOID: 30
        STR_SNAKEMAN: 10
        STR_MUTON: 30
        STR_FLOATER: 30
      6:
        STR_SECTOID: 20
        STR_SNAKEMAN: 10
        STR_MUTON: 40
        STR_FLOATER: 30
      9:
        STR_SECTOID: 30
        STR_SNAKEMAN: 10
        STR_MUTON: 30
        STR_FLOATER: 30

Now, why were months 5 and 7 replaced with months 6 and 9 you may ask?

The answer is that the original info on UFOPaedia.org regarding alien missions, which was used when OXC was first implemented, has recently been discovered to be incorrect by magic9mushroom and this has been confirmed by Warboy through examination of the original code.

The original author wrongly induced from empirical data that the progression of months was 0, 1, 3, 5, 7, but further testing of the original game and a code dig revealed it to be 0, 1, 3, 6, 9 instead, and thus the nightly has been fixed.

The practical implication of this change is that the appearance of Mutons/Ethereals on Terror missions has been pushed forward to July (month 6) and the same for the appearance of Ethereals in Infiltration and Base missions. And other smaller changes.

The propose of this post is to warn modders because this change can lead to ruleset/balance issues if your mod doesn't take into account the new monthly progression.

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2131
    • View Profile
Re: Nightly Builds Discussion for Modders/LPers/Players/etc.
« Reply #93 on: September 29, 2018, 09:36:28 pm »
Just a heads-up for modders, we've been improving mod loading in OpenXcom by optimizing extraSprites, since they were the biggest culprit in big mods. For example, now instead of loading everything right at the start, extraSprites are only loaded the first time the game needs them, which significantly improves initial load time and memory consumption. Let us know if this made things better or worse for you, and if you see any bugs from these changes such as graphical glitches.

Only downside for modders is that now "Image not found" errors will only occur in-game, instead of right at the start. If this is a concern, you you can go back to the old loading by setting "lazyLoadResources" to "false" in options.cfg.

Offline Yankes

  • Commander
  • *****
  • Posts: 2142
    • View Profile
Re: Nightly Builds Discussion for Modders/LPers/Players/etc.
« Reply #94 on: June 08, 2019, 05:02:26 pm »
BREAKING CHANGE INCOMING

SupSuper merged my PR that change how OXC handle negative indexes and common surfaces for all mods.

This mainly affect `bigSprite`, where OXC use negative indexes for terror unit weapons. Right now they are now invalid, game will reject mods that use them. Only exception is `-1` but it now mean no-sprite not terror weapon sprite.
If your mod still need this surface there are still available but under different syntax:
Code: [Select]
bigSprite: { mod: master, index: 61 } # under this we have old "-1" sprite, 60 is "-2" etc. for UFO, XCOM2 have different offsets because it have more surfaces
This new syntax allow you to access resources of other mods (work for sound and other shared surface sets too).

Code: [Select]
bigSprite:
  mod: MyOtherMod #id of mod from `metadata.yml`
  index: 120

Old syntax still work
Code: [Select]
bigSprite: 120
and is equal to
Code: [Select]
bigSprite:
  mod: current #alias for current mod
  index: 120

Example of change I made to make Final mod pack to work with this new version:

https://github.com/Yankes/Final-Mod-Pack/commit/bdad8bb33713577259d0f36a779d50da295a9dd3


some additional changes:

added `ignoreInBaseDefense` from OXCE as some mods used negative index to limit usage of items.
if you exceeded `reservedSpace` for your mod, game will fail to load.
« Last Edit: June 08, 2019, 05:05:13 pm by Yankes »

Offline hellrazor

  • Commander
  • *****
  • Posts: 2199
  • Deep Ruleset Digger & Bughunter
    • View Profile
    • Github Account
Re: Nightly Builds Discussion for Modders/LPers/Players/etc.
« Reply #95 on: June 14, 2019, 07:32:15 pm »
One stupid Question how did the indexing of bigSprites now changed?

And how do i have to change the indexes in my mod so that things loads normally?

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 5477
  • Aaand we're back!
    • View Profile
    • My Wiki
Re: Nightly Builds Discussion for Modders/LPers/Players/etc.
« Reply #96 on: June 14, 2019, 07:53:44 pm »
One stupid Question how did the indexing of bigSprites now changed?

Negative indexes are not allowed anymore.

And how do i have to change the indexes in my mod so that things loads normally?

1/ Easier method: Copy the terror weapon bigob sprites into your mod and give them positive indices.

2/ Easy method: Reference the existing terror weapon bigob sprites from xcom1 as described by Yankes above.
« Last Edit: August 04, 2019, 11:26:05 am by Meridian »

Offline The Martian

  • Colonel
  • ****
  • Posts: 209
  • "It implores you to listen to its arguments..."
    • View Profile
Re: Nightly Builds Discussion for Modders/LPers/Players/etc.
« Reply #97 on: August 01, 2019, 04:24:57 pm »
Only downside for modders is that now "Image not found" errors will only occur in-game, instead of right at the start. If this is a concern, you you can go back to the old loading by setting "lazyLoadResources" to "false" in options.cfg.

That's handy.

Thank you for providing that toggle option.