Author Topic: OXCE (OpenXcom Extended) main thread  (Read 595356 times)

Offline Wild Penguin

  • Sergeant
  • **
  • Posts: 14
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1335 on: March 02, 2024, 03:35:40 pm »
Hi,

I'm having trouble compiling OXCE on Gentoo (albeit a chroot). I've reproduced the problem on an i686 (32-bit) environment and an amd64 environment.

Steps I've taken:

Code: [Select]
git clone https://github.com/MeridianOXC/OpenXcom.git
cd OpenXcom
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DDEV_BUILD=OFF -DBUILD_PACKAGE=OFF
make -j 22

I'm using gcc 11 (I could try gcc-13):

Code: [Select]
# LANG=C gcc --version
gcc (Gentoo 11.4.1_p20240111 p12) 11.4.1 20240111
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

And the failure:

Code: [Select]
LANG=C make -j 40
[  0%] Building CXX object src/CMakeFiles/openxcom.dir/Engine/Script.cpp.o
...
[a bunch of suiccesfully build files]
...
/root/oxce/OpenXcom/src/Engine/Script.cpp: In lambda function:
/root/oxce/OpenXcom/src/Engine/Script.cpp:2616:84: internal compiler error: Segmentation fault
 2616 |                         updateReserved<ScriptText>(pos, ScriptText{ charPtr(start) });
      |                                                                                    ^
0x1745408 internal_error(char const*, ...)
        ???:0
0x7c8ec7 finish_compound_literal(tree_node*, tree_node*, int, fcl_t)
        ???:0
0x78015e c_parse_file()
        ???:0
0x8556dd c_common_parse_file()
        ???:0
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.
make[2]: *** [src/CMakeFiles/openxcom.dir/build.make:2232: src/CMakeFiles/openxcom.dir/Engine/Script.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:116: src/CMakeFiles/openxcom.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Is this some obscure compiler bug or any idea what is going on?

Offline Yankes

  • Global Moderator
  • Commander
  • ***
  • Posts: 3350
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1336 on: March 02, 2024, 03:41:38 pm »
Code: [Select]
internal compiler error: Segmentation faultOk, you find bug in compiler probably installing different version of GCC should fix it.
I will look on it when I will have more free time to see if I can workaraund this bug.

Offline Wild Penguin

  • Sergeant
  • **
  • Posts: 14
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1337 on: March 02, 2024, 04:01:35 pm »
Switching to gcc-13, I can indeed compile OXCE.

I gather I could report this to Gentoo, as it is a compiler bug?

Offline Yankes

  • Global Moderator
  • Commander
  • ***
  • Posts: 3350
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1338 on: March 02, 2024, 04:11:22 pm »
If you could reduce this to small test case, as I see GCC 11 is still supported, it possible that they still could fix it on this version.
But there is chance that before anybody get ready to fix it, that version get removed from supported versions (as now is first on chopping block).

Offline _Raven_

  • Captain
  • ***
  • Posts: 53
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1339 on: March 17, 2024, 09:27:44 pm »
Files:
- terrains.rul
- facilities.rul
There is one very annoying problem in the "terrains.rul" file, I cannot specify the size of the location of the .map and .rmp files
Spoiler:
Code:
###terrains:
###  - name: XBASE
###    mapBlocks:
###      - name: XBASE_VeryLargeGeneralStores_01 #3x3 size
###        width: 10
###        length: 10
###  - name: XBASE_VeryLargeGeneralStores_02
###        width: 10
###        length: 10
###  - name: XBASE_VeryLargeGeneralStores_03
###        width: 10
###        length: 10
###  - name: XBASE_VeryLargeGeneralStores_04
###        width: 10
###        length: 10
###  - name: XBASE_VeryLargeGeneralStores_05
###        width: 10
###        length: 10
###  - name: XBASE_VeryLargeGeneralStores_06
###        width: 10
###        length: 10
###  - name: XBASE_VeryLargeGeneralStores_07
###        width: 10
###        length: 10
###  - name: XBASE_VeryLargeGeneralStores_08
###        width: 10
###        length: 10
###  - name: XBASE_VeryLargeGeneralStores_09
###        width: 10
###        length: 10
This is very inconvenient when you create such large modules as 3x3 and the location .map file is not convenient to draw, the .rmp file is not yet more convenient to create, and you end up with a lot of .map and .rmp files.
Why can I specify any size of xcom aircraft or UFOs, or can even specify a .map size for the alien base, but cannot specify any size of the .map file for xcom base modules?
Spoiler:
Code:
###terrains:
###  - name: UBASE
###    mapBlocks:
###      - name: ALIENBASE
###        width: 20
###        length: 20
Code:
###ufos:
###    battlescapeTerrainData:
###      name: UFO_110
###      mapBlocks:
###        - name: UFO_MEDSCOUT
###          width: 20
###          length: 20
Code:
###crafts:
###    battlescapeTerrainData:
###      name: SKYRANGER
###      mapBlocks:
###        - name: SKYRANGER
###          width: 20
###          length: 20
« Last Edit: April 07, 2024, 10:42:52 pm by _Raven_ »

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1933
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1340 on: March 18, 2024, 03:21:38 am »

Offline _Raven_

  • Captain
  • ***
  • Posts: 53
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1341 on: March 18, 2024, 12:30:06 pm »
The verticalLevels feature can do exactly that: https://openxcom.org/forum/index.php?topic=5316.0
Thank you for the useful link to an interesting topic, these vertical levels are very interesting information, now I can not only combine large modules into 1 file, but if I wish, I can even create an open location above the underground base.
« Last Edit: April 07, 2024, 10:43:47 pm by _Raven_ »

Offline aziza

  • Colonel
  • ****
  • Posts: 136
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1342 on: March 26, 2024, 06:42:13 pm »
Why are shots so slow in OXC and OXCE?
The speed of the bullet is ok, but after the bullet touches the wall, the ground, the enemy - then 8 small blue drops jump in different directions. And while these blue drops are falling, I have to wait sooooo long after each bullet. In the original XCOM, shots were quick.

Offline _Raven_

  • Captain
  • ***
  • Posts: 53
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1343 on: March 27, 2024, 09:21:28 am »
The speed of the bullet is ok, but after the bullet touches the wall, the ground, the enemy - then 8 small blue drops jump in different directions. And while these blue drops are falling, I have to wait sooooo long after each bullet.
You can speed up this bullet animation yourself "8 small blue drops" in the file "items.rul" as I did and created a separate file for this purpose "itemsBulletSpeed_RAVEN.rul"
Spoiler:
Code:
###items:
# ═════════════════════
# hyper & velocity
# ═════════════════════
# ═════════════════════
# VELOCITY
# ═════════════════════
###  - &VELOCITY_GLOBAL
###    type: HYPERVELOCITY_GLOBAL
###    confAuto:
###      followProjectiles: false
#    explosionSpeed: 2
#    bulletSpeed: 5
# ═════════════════════
# SPEED
# ═════════════════════
###  - &NORMAL_SPEED
###    type: NORMAL_SPEED
###    refNode: *VELOCITY_GLOBAL
###    explosionSpeed: 50
#    bulletSpeed: 10
###  - &HIGH_SPEED
###    type: HIGH_SPEED
###    refNode: *VELOCITY_GLOBAL
###    explosionSpeed: 100
###    bulletSpeed: 50
# ═════════════════════
# WEAPONS
# ═════════════════════
#BEGIN STR_OLD_WEAPONS
###  - type: STR_AK47
###    refNode: *NORMAL_SPEED
###  - type: STR_AK47_CLIP
###    refNode: *NORMAL_SPEED
#END STR_OLD_WEAPONS
Now my weapon shoots with standard single fire and accelerated bursts without a strong delay for animation (auto shots look realistic and, most importantly, without a delay between shots; for machine guns, an ultra-fast animation setting and acceleration of bullet speed are used). Also disabled is bullet tracking in automatic shots (enabled only for single shots), as this function may not work correctly at very high speeds of shots or at a short distance from the target (the screen may flicker and cause epileptic seizures).
With these settings:
- single shot "Single"
- auto shot "burst from a machine gun"
- machine gun "a rapid hail of bullets from 10 or more shots"
« Last Edit: March 27, 2024, 09:24:38 am by _Raven_ »

Offline aziza

  • Colonel
  • ****
  • Posts: 136
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1344 on: March 27, 2024, 02:02:26 pm »
You can speed up this bullet animation yourself "8 small blue drops" in the file "items.rul" as I did and created a separate file for this purpose "itemsBulletSpeed_RAVEN.rul"
nice
can anybody make a separated mini-mod for OXCE ?

Offline _Raven_

  • Captain
  • ***
  • Posts: 53
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1345 on: March 28, 2024, 01:37:23 pm »
can anybody make a separated mini-mod for OXCE ?
Here I created a mini-mod "Blues_and_Bullets" for xcom1 which speeds up the animation of auto shots for all automatic weapons (the mod uses the function "refNode: *" for the mod to work, you need to use the OXCE version, the newer the better).

You can download it from the site "mod.io"
https://mod.io/g/openxcom/m/blues-and-bullets
« Last Edit: April 04, 2024, 03:49:07 pm by _Raven_ »

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 9098
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1346 on: March 28, 2024, 02:25:24 pm »
Installation:
Just unpack the mod and move it to other mini-mods in the "standard" folder to activate it just like other mini-mods.

DO NOT UNPACK ANYTHING INTO THE "standard" FOLDER!

Standard folder is for devs only.
Players and modders should not make any modifications there.
Only mods delivered with OXCE will be recognized in the standard folder, other mods will be ignored.

All custom mods belong to the "mods" folder and nowhere else.

Offline aziza

  • Colonel
  • ****
  • Posts: 136
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1347 on: March 28, 2024, 03:01:23 pm »
I created a mini-mod "Blues_and_Bullets"
nice, working good! speed like almost original
poster is cutie

Offline _Raven_

  • Captain
  • ***
  • Posts: 53
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1348 on: March 28, 2024, 06:10:19 pm »
Dear OXCE developers, I have new ideas and features that need to be added to the game.
Spoiler:
File "items.rul"
The shot animation replacement function is assigned to all firing modes of one weapon at once
Code:
###items:
###  - type: STR_RIFLE
###    explosionSpeed: 50
###    bulletSpeed: 10
###    confAuto:
###      followProjectiles: false
###  - type: STR_RIFLE_CLIP
###    explosionSpeed: 50
###    bulletSpeed: 10
###    confAuto:
###      followProjectiles: false

It is necessary to make sure that these functions are assigned not to the weapon or its clip, but to the shooting mode (as well as the "followProjectiles" function) or to the weapon clip in a separate shooting mode
Code:
###items:
###  - type: STR_RIFLE
###    confAuto:
###      followProjectiles: false
###      explosionSpeed: 50
###      bulletSpeed: 10
###    confSnap:
###      followProjectiles: true
###      explosionSpeed: 10
###      bulletSpeed: 5
###    confAimed:
###      followProjectiles: true
###      explosionSpeed: 25
###      bulletSpeed: 7
###  - type: STR_RIFLE_CLIP
###    confAuto:
###      followProjectiles: false
###      explosionSpeed: 50
###      bulletSpeed: 10
###    confSnap:
###      followProjectiles: true
###      explosionSpeed: 10
###      bulletSpeed: 5
###    confAimed:
###      followProjectiles: true
###      explosionSpeed: 25
###      bulletSpeed: 7

Such settings will allow you to more smoothly configure individual firing modes for individual types of weapons, for individual, special types of bullets for these weapons, while assigning different animation speeds for different types of shots.

There is another idea, to add new shooting modes for the machine gun.
Various mods add this type of weapon under the name “minigun”, but to be honest, it is no different from a machine gun, the weight and number of shots are simply increased, and the bullet animation is accelerated, but in fact this type of weapon does not have its own shooting mode, such as a shotgun that fires shot.
I suggest looking at the description of this version of the game

https://mod.io/g/openxcom/m/enemy-unknown-extended-130

The author says that in this game, the machine gun fires its own types of shooting:
1) Burst mode:
- you select 3 target points, and the soldier will shoot a 5 shots burst (on each and between points). Recharge time: 2 turns.
2) Full auto:
- you select 2 points, the soldier will spray the area inbetween with 8 shots. Recharge time: 3 turns.

I suggest taking a few ideas and mini-mods from this version of the game and adding new features to OXCE or better yet BOXCE (OpenXcom Extended Brutal).
Also think about how to expand the capacity of .MCD .PCK .TAB files (sometimes there is not enough space for animated sprites in a PCK file, sometimes you even want to add many different sprites in one texture pack, but for this you need to expand the capacity of these files). If there is at least 10% chance of successfully expanding the texture pack, then you should think about how to do it, if not, then give a reason why exactly this amount fits in this file and why these files cannot be modified in any way. I would like to know what and why.
« Last Edit: April 04, 2024, 03:47:55 pm by _Raven_ »

Offline aziza

  • Colonel
  • ****
  • Posts: 136
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1349 on: March 28, 2024, 07:55:39 pm »
mistakenly indicated the "standard" folder
maybe it is better to:
move \OXCE 7.12.0\common\ to \OXCE 7.12.0\OXCE\common\
move \OXCE 7.12.0\standard\ to \OXCE 7.12.0\OXCE\standard\
so it will be more intuituve