Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - zee_ra

Pages: 1 ... 8 9 [10] 11 12 ... 14
The X-Com Files / Re: Ninja scrolls
« on: September 10, 2022, 07:19:09 am »
They're always present at Black Lotus HQ.

OXCE Support / Re: Need help with Flags
« on: September 06, 2022, 03:10:21 pm »

So, is copying the image data the only way to attain the desired outcome?

OXCE Support / Re: Need help with Flags
« on: September 06, 2022, 02:53:45 pm »
You need 8 images: 4 for a built facility and 4 for a facility under construction.

Code: [Select]
  - type: BASEBITS.PCK
      100: Resources/large_hangar/01.png
      101: Resources/large_hangar/02.png
      102: Resources/large_hangar/03.png
      103: Resources/large_hangar/04.png
      104: Resources/large_hangar/01.png
      105: Resources/large_hangar/02.png
      106: Resources/large_hangar/03.png
      107: Resources/large_hangar/04.png

I wonder, if there's a good way to reference image data from another mod, and assign in a different local index.  That is, 104 .. 107 should map to x-com-files::[305 .. 308].  Is there a way to achieve this?

I see now how it's done in the XCF, with its original resources, where the path string is repeated multiple times.  However, in my mod, there's no XCF image data present; I would like to avoid an un-necessary image data copy.


Thank you!  The segfault is now gone!

You can not "interrupt" an alien base. Alien bases don't have waves.
Why would you, given that they are not meant to be interruptible? The default is waves not being interruptible and defaults are usually not added to definitons.
One way for you to check would be to simply try it out. Also, why would you think that a mechanic meant to interrupt alien missions would not, in fact, interrupt an alien mission?
...why would you think otherwise? Again, why don't you simply try it out and see if it works?

How is "guarenteed to set-back" different from "will not be completed by the alien side"? Are you asking how to disable infiltration missions alltogether?

I have done some more play-testing, and the current configuration is quite adequate strategically.  By the time a final mission to Mars is possible, only 2 or 3 countries would defect, if every alien vessel on infiltration mission is intercepted.  The loot sold from all salvage missions in the month is already more than enough to pay for expenses.

I wonder if the statement that interception of vessels on infiltration missions slows down those missions for aliens is true.  If so, how it is reflected in the encoded mission parameters?

Ideally, I would like to have the capacity to have the Tasoth Factory missions more repeatable.  They do provide a very nice loot monthly, along with free Zrbite and Aq Plastics.

Help / Re: Exceeding 1,000 HandObs in 1 Mod?
« on: September 06, 2022, 12:57:33 pm »
no precedence, there will be only one index

original resource would be overwritten by the mod's resource

Thank you.  This is a good clarification.

OXCE Support / Re: Need help with Flags
« on: September 06, 2022, 12:53:49 pm »
I don't know the details of what GIMP does by default.

But it is NOT a recommended tool, it likes to be "too smart".

There are other recommended tools, search under Tools subforum.

I almost fixed the GIMP issues, so at this point issues related to it specifically are hardly worth our attention.

I'm more concerned with the segfault.  I think, there's some implicit assumption made about how to draw the boundaries for a 2x2 facility.  Is there a way to specify this explicitly?  I noticed that the following definitions in XCF don't really specify anything remotely close to that:
Code: [Select]
    spriteShape: 309
    size: 2
    buildCost: 1000000
    buildTime: 24
    monthlyCost: 16000
    aliens: 40
    prisonType: 4
    storage: 275
    mapName: XBASS_06
    listOrder: 6860

Code: [Select]
    spriteShape: 301
    size: 2
    buildCost: 2250000
    buildTime: 24
    monthlyCost: 35000
    personnel: 200
    rightClickActionType: 6
    manaRecoveryPerDay: 4
    aliens: 5
    prisonType: 4
    storage: 50
    mapName: XBASS_02
    listOrder: 6910

Code: [Select]
    spriteShape: 320
    size: 2
    provideBaseFunc: [WORKS]
    buildCost: 4600000
    buildTime: 48
    monthlyCost: 200000
    aliens: 5
    prisonType: 4
    storage: 25
      - [0, 5, 1]
      - [0, 15, 1]
      - [11, 3, 1]
      - [11, 17, 1]
    workshops: 250
    rightClickActionType: 2
    mapName: XBASS_36
        build: 40
        refund: 20
    listOrder: 6983

Yet the hangar definition in XCF is slightly distinct:
Code: [Select]
  - type: STR_HANGAR
    spriteShape: 9
    spriteFacility: 9
    size: 2
    buildCost: 200000
    buildTime: 25
    monthlyCost: 25000
    crafts: 1
    mapName: XBASE_16
    workshops: 5
    storage: 25
    aliens: 10
    prisonType: 4
      - [0, 8, 0]
      - [0, 10, 0]
      - [0, 12, 0]
      - [1, 11, 0]
      - [1, 9, 0]
      - [0, 16, 0]
      - [0, 18, 0]
      - [1, 17, 0]
      - [2, 16, 0]
      - [2, 18, 0]
    listOrder: 7260

The spriteFacility == 9 doesn't make too much sense to me, though.


Same result (= segfault) with
Code: [Select]
    spriteFacility: { mod: x-com-files, index: 305 }

Help / Re: Exceeding 1,000 HandObs in 1 Mod?
« on: September 06, 2022, 12:30:08 pm »

The only exception are the vanilla (UFO1994 / TFTD1995) resources that are shared across mods, e.g. bigob index 15 will always just be 15 internally, never 1015 or 5015 or 19015.
Applies to the following image and sound sets: BASEBITS.PCK, BIGOBS.PCK, FLOOROB.PCK, HANDOB.PCK, HIT.PCK, INTICON.PCK, SMOKE.PCK, X1.PCK, Projectiles, UnderwaterProjectiles, GlobeMarkers, BATTLE.CAT and GEO.CAT

What is the effect of clobbering the original game index in the mod?  I assume the mod's definition would simply take precedence over the original.  Is that correct?

OXCE Support / Re: Need help with Flags
« on: September 06, 2022, 12:28:46 pm »
1/ use palettes provided in the oxce package, in the 'common' folder

2/ ammo uses PAL_BATTLE_COMMON
3/ base facilities use PAL_BASESCAPE

4/ large base facilities need to be split

5/ only 8bit paletted pngs are supported

6/ alpha channel is completely ignored by the engine... you can use transparency if you want your images to look better outside of the game, but for the game, you'll need to use index 0 as well

7/ images larger than 32x40 don't lead to segfault, but there is also no reason to use bigger images

8/ you can use index 9 without referencing master, because it's an original UFO1994 resources and it is shared across mods (I exaplained it to you yesterday:,6017.msg149070.html#msg149070)

Thank you.  This really helps.

I have attached a sample mod that causes the segfault in my case.

The images are correctly getting displayed when the building is built, but when the large hangar building is ordered to be built, a segfault occurs.  Could you possibly have a look at the mod, and help me with debugging, and fixing the issue?

I also noticed that the GIMP is not exactly doing the right thing when saving the colormapped image.  In my case, after reducing to the pallette extracted from the original indexed base tile image (from the XCF mod), and stored in the GIMP pallettes, I got a weird output.  The file utility says it's a 4-bit indexed image.  The feh displays correct colored output.  The OXCE displays a tiled inconsistently colored gray image, with different squares having slightly different tint.  (The relevant PNG files are in large_hangar subdirectory).


I got the constructed facility to display properly by adjusting the GIMP use routine.  However, I'm still getting the segmentation fault when attempting to construct the building.  I'll see if I could inherit the boundaries from XCF in some way.  Is the spriteFacility flag responsible for displaying the boundaries of a facility being built?

OXCE Support / Re: Need help with Flags
« on: September 06, 2022, 10:14:08 am »
The easiest way to start is to take an existing flag and change it with a graphic editor which is able to keep the same palette, like Photoshop or Aseprite (or GIMP if you know what you're doing).

I wonder, which palletes should be used for editing the pngs for OXCE in GIMP?  I have seen a link to github directory with several palette files, and it's not clear which one to use for the following use cases:
  • ammunition items (for the soldier equipment screen; I assume the same sprite is reused for Ufopaedia)
  • base facilities

I also wonder, if it is possible to use large facility images for 2x2 facilities, or the sprite needs to be split in 4 (consecutively numbered in image ref index, presumably).

Finally, I would like to learn, which option should be used for saving PNG in GIMP.  I'm getting the error noted by original poster, that "OpenXcom only supports 8bit images" when using "8bpc RGB".  Other options are "8bpc GRAY", "8bpc RGBA", "8bpc GRAYA", "16bpc RGB", "16bpc RGBA", "16bpc GRAY", "16bpc GRAYA".  My guess that neither of those are the case, and a special paletted PNG mode should be utilized.  Is this correct?  Is this the only available option with the OXCE engine?

I'm also confused by the fact that I have seen the images with alpha channel in XCom Files, as base facilities.  The Ruleset Reference mentions that only transparency index of zero is supported.  Does it mean that alpha channel is indeed supported, but it's only 2-bit?  Are the aforementioned images in XCom Files therefore universally supported by the engine, assuming they only have full-transparency in the alpha channel?

Does the use of images larger than 32x40 lead to a segfault?  I'm getting some segfault, without meaningful log message to debug further, when trying to view the base with my larger 2x2 facility image.  If that is the case, then this is a bug in the implementation, since a program shouldn't crash on the bad input.  A graceful exit with an error message is an expected behaviour.

Since the original game used the large under-construction facility frames, what is the right offset reference to use for those?  Is it 9?  When I used it without referencing the master (xcom1), only as 9, and not { mod: master, index: 9 }, I got the right result.  Now, I'm confused, since my mod does not have an offset 9, and the numerical namespaces for graphics reference indexes are disjoint (that is, they are tagged with their respective disjoint namespaces).  Why did this work at all:
Code: [Select]
    spriteShape: 9
    spriteFacility: 100
and why did this not yield a reference error?


Apparently, GIMP tried to be too fool-proof by doing the right thing (= using indexed PNG mode whenever the image is already in the indexed mode) when "automatic pixelformat" option had been utilized at the time of export.  Eek!

Released Mods / Re: [COMPILATION] Final Mod Pack (FMP)
« on: September 06, 2022, 07:48:09 am »

Thank you for sharing this.  I wonder, if a similar package is available for all base-related images?  I've had a hard time launching the XComUtil on Linux, even under Wine.

I'm trying to mod the hangar image, which is not included as a png in the XComFiles.  The index used by the XCom Files is given as
Code: [Select]
  - type: STR_HANGAR
    spriteShape: 9
    spriteFacility: 9
    size: 2
    buildCost: 200000
    buildTime: 25
    monthlyCost: 25000
    crafts: 1
    mapName: XBASE_16
    workshops: 5
    storage: 25
    aliens: 10
    prisonType: 4
      - [0, 8, 0]
      - [0, 10, 0]
      - [0, 12, 0]
      - [1, 11, 0]
      - [1, 9, 0]
      - [0, 16, 0]
      - [0, 18, 0]
      - [1, 17, 0]
      - [2, 16, 0]
      - [2, 18, 0]
    listOrder: 7260

And it is not listed in the extraSprites_XCOMFILES.rul.

OXCE Wishlists / Re: [WIP] [Suggestion] Solar's wishlist
« on: September 05, 2022, 04:20:32 pm »
There is no such thing in OXC/E at the moment.

Ok.  Thank you for sharing that.

I wonder, if there's a way to ensure the strict version dependence on the parent mod?  It's something that I could pull off e.g. in HoI 4, and the rest is handled by static (i.e. mod release) generation, from templates, based on the contents of both templates and of the parent mod.

Help / Re: Exceeding 1,000 HandObs in 1 Mod?
« on: September 05, 2022, 04:18:29 pm »
reservedSpace is only for your mod, it doesn't do anything when referencing other mods (they have their own setting)

Use ` bigSprite: { mod: x-com-files, index: 1041 }` instead of ` bigSprite: { mod: master, index: 1041 }`

master is the top-most master, i.e. `xcom1` in this case

sample mod attached

Thank you.  This fixed the issue.

I wonder, if mods have their own namespace for referencing the graphics indexes?  If not, should I be defining enumeration that is globally unique?

Help / Re: Exceeding 1,000 HandObs in 1 Mod?
« on: September 05, 2022, 02:42:25 pm »

PS: I couldn't test if it compiles without c++11, because my environment has c++11 dependencies already... and Travis checks on Github don't work either, because... you guessed it, it uses yaml-cpp version that requires c++11 too... I did change all c++11 code back to pre-c++11 code when back-porting from OXCE+ to OXC, but 100% certainty can only be achieved if someone actually compiles it on a non-c++11 environment

As for usage:
Just add a new line to your metadata.yml and specify how much space do you want to reserve for your mod... default is 1 (i.e. indices up to 999)

Code: [Select]
name: "My Big Mod"
version: "2.4"
description: "This mod is really big"
author: "Meridian"
id: my-big-mod
reservedSpace: 2                           # you can now use indices up to 1999 (3 => 2999, 4 => 3999, etc.)
isMaster: false
master: xcom1

When is the reservedSpace attribute referenced?  I attempted to add the following
Code: [Select]
isMaster: false
master: x-com-files
reservedSpace: 10
into a mod that depends on X-Com Files, and has some definitions like this
Code: [Select]
    size: 0.6
    costSell: 95500
    weight: 22
    bigSprite: { mod: master, index: 1041 }
    floorSprite: { mod: master, index: 906 }
    handSprite: { mod: master, index: 1896 }
    bulletSprite: { mod: master, index: 4 }
    fireSound: 2
    noLOSAccuracyPenalty: 75
    accuracyAimed: 70
    accuracyCloseQuarters: 66
    tuAimed: 70
      firing: 0.5
      psiStrength: 1.0
      energy: 20
      time: 30
      time: true
    battleType: 1
    twoHanded: true
    blockBothHands: true
    invWidth: 2
    invHeight: 3
    armor: 45
    arcingShot: true
    minRange: 10
    dropoff: 25
    kneelBonus: 300
    experienceTrainingMode: 4
    attraction: 23
    listOrder: 34203
inside of it.  When attempting to load, I'm still getting the error
Code: [Select]
Error for 'STR_AUTO_MORTAR': offset '1041' exceeds mod size limit 1000 in set 'BIGOBS.PCK' at line 75

It appears that the attribute reservedSpace had been entirely ignored in the child mod.  However, it does work in the parent mod.  The X-Com Files has the following in its medata file:
Code: [Select]
name: "X-Com Files"
version: "2.4.1"
enforcedExtendedVersion: "7.4.3"
requiredExtendedVersion: "7.4.3"
author: "Solarius Scorch"
description: "From a humble UN agency to the military power we know, in the vein of the 90's sci-fi paranoia TV series and 80's horror movies."
id: x-com-files
isMaster: true
master: xcom1
reservedSpace: 3

OXCE Wishlists / Re: [WIP] [Suggestion] Solar's wishlist
« on: September 05, 2022, 01:57:40 pm »
DEV update:

Changing default values technically requires either:
1. not changing them at all, store both modded value and modded default value and decide real-time, which one to use... which is inefficient, prone to errors and cannot be generalized... it's used on a few places, but it's an extreme PITA and cannot be used on larger scale
2. creating a completely new secondary mod system that is processed before the current mod system... just to have the default values prepared before any of the primary mod stuff is processed... that's a huge amount of work, for very questionable benefit

You can basically consider this request as rejected.

A workaround/compromise I can offer is to create a few templates and use

What is the current state of the capability to create new definitions in a mod by inheritance?  Let's consider the following example to illustrate what I mean.  Some mod X depends on mod ORIG, and an item X.weapon_nd should be largely the same as the ORIG.weapon_nd, but perhaps with a new ammo type available.  How could I proceed to implement something like this?

In general, I see no particular trouble with hard-coding module version dependencies, and generating new text for the whole definition of an item (in the example above, a copy of ORIG.weapon_nd with the definition for new ammo spliced-in) in the mod X, using whatever template engine, based on the text that was already present in the mod ORIG.  The strict versioning dependency allow me to ensure that the specific versions of X refer to the exact text in ORIG.  While this is the most general approach, that works with all games that have modding and versioning capability, I would like to inquire if there exists a different mechanism to accomplish the same in OXCE, without the reliance on the external templating engine?


You can now define a "interruptPercentage" on alien mission waves (by default 0) that define how likely the mission becomes inactive.

Notes... read CAREFULLY:
- already spawned UFOs will not be removed
- new UFOs won't spawn
- game checks every 30 minutes if a mission can be removed completely (when all flying, landed and crashed UFOs disappear)
- retaliation base attack battleship doesn't have a wave defined in the ruleset! ... for purpose of this feature, it takes its wave definition from the last mission wave in the ruleset instead
- alien bases are created when a UFO from the last wave is spawned... so if you want to prevent alien bases spawning in alien base and infiltration missions, you should add one more dummy wave to the mission definition, so that you have enough time to shoot down UFOs
- interruption check is done when UFO crashes (both land and water), or when it's destroyed (both in dogfight and during base defense by base facilities)

EDIT, see also:,6461.0.html


Code: [Select]
    objective: 4
    spawnUfo: STR_BATTLESHIP # Spawned for the final retaliation run
      - ufo: STR_SMALL_SCOUT
        interruptPercentage: 5        # 5% chance to finish mission when shot down
        count: 1
        trajectory: P8
        timer: 3000
      - ufo: STR_MEDIUM_SCOUT
        interruptPercentage: 10       # 2x 10% chance to finish mission
        count: 2
        trajectory: P8
        timer: 3000
      - ufo: STR_LARGE_SCOUT
        interruptPercentage: 10       # 3x 10% chance to finish mission
        count: 3
        trajectory: P8
        timer: 3000
      - ufo: STR_BATTLESHIP
        interruptPercentage: 80       # 2x 80% chance to finish mission
        count: 2
        trajectory: P8
        timer: 3000

I wonder, whether a similar option exists for the elimination of alien bases?  Particularly, those spawned as a part of an infiltration mission.

In X-Com Files, I see no interruptPercentage option in the waves definition under the infiltration section.  I wonder, if it would merely suffice to add these definitions to make the infiltration mission interruptible.  Also, would it be possible to make the mission interruptible by specifying the percentages on the battleships only?  What is the best way to on the one hand ensure that the mission is guaranteed to set-back, if battleships are eliminated, while also guaranteeing that it won't be completed by the alien side?

Pages: 1 ... 8 9 [10] 11 12 ... 14