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

Offline zx_79

  • Squaddie
  • *
  • Posts: 6
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1200 on: October 06, 2022, 12:19:14 pm »
Hello,

Please kindly consider the following:

2. Same tier "Master of %weapon%" and "Bane of %race%" commendations do not stack, with only one of each tier being applied, thus the soldier can actually decrease stats with new kills - say, racking 100 Zombies to get tier 6 will cancel out the existing tier 6 from 100 cultists, so -2 for three relevant stats, despite being technically more experienced. Would be a welcome change if that is possible.

Couple UI/Quality of Life suggestions:

1. To reveal commendation progress counter somewhere, probably on personal files page. Like, if clicking soldier`s Trooper award details, aside from stat bonus provided, also see "current count is X, next level is on Y".

1.1. To add number of kills with weapon to the damage tooltip shown when Alt is pressed in Inventory screen. Saves the player from going to Agent List, then Files > Combat to see which weapon the soldier progressed with and memorizing who gets what gun.

1.2. To get the same info - damage and kill count - also for an unarmed attack when Alt is pressed on the empty hand.

2. To keep currently equipped items on the squad selection "Preview" screen, to be able to quickly see potential accuracy and TU cost for all fire modes available not having to bring the gun in actual combat and then find out you don`t shoot it really well. Or Alt-Tab to the wiki, do calculations manually and memorize everything.

I have read the suggestion guidelines (why they are being rejected), this doesn`t seem contradictory to them, so.

Thanks!

Offline Rangerh

  • Colonel
  • ****
  • Posts: 126
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1201 on: October 06, 2022, 02:40:15 pm »
A question about modding with the latest OXCE

On a ruleset for a megamod there are a lot of soldiers defined. by example
Code: [Select]
  - type: STR_SOLDIER_1
    race: STR_SECTOID
    rank: STR_LIVE_SOLDIER
    stats:
      tu: 54
      stamina: 90
      health: 30
      bravery: 80
      reactions: 63
      firing: 52
      throwing: 58
      strength: 30
      psiStrength: 40
      psiSkill: 0
      melee: 76
    armor: SECTOID_ARMOR0
    standHeight: 16
    kneelHeight: 12
    value: 10
    deathSound: 10
    intelligence: 3
    aggression: 2

  - type: STR_SOLDIER_2
blablabla, lots of lines

  - type: STR_SOLDIER_3
blablabla, lots of lines

But i want to make a minimod for such megamod that just change a line for each of those units, can my minimod do the following :
Code: [Select]
units:
  - type: STR_SOLDIER_1
    aggression: 6
  - type: STR_SOLDIER_2
    aggression: 6
  - type: STR_SOLDIER_3
     aggression: 6
  - type: STR_SOLDIER_4
    aggression: 6
  - type: STR_SOLDIER_5
    aggression: 6

Or am forced to copy the complete soldiers definitions (with all their lines of code) in the minimod, not just the changed line ?
« Last Edit: October 06, 2022, 02:51:24 pm by Rangerh »

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 9084
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1202 on: October 06, 2022, 03:46:43 pm »
You can (and should) just define the changed attributes.

You don't have to (and shouldn't) copy everything.

Offline Rangerh

  • Colonel
  • ****
  • Posts: 126
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1203 on: October 06, 2022, 04:49:22 pm »
Thank you a lot, that will simplify things for me :)

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 9084
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1204 on: October 09, 2022, 04:13:56 pm »
Thank you Meridian, much appreciated.

I noticed another minor thing with the soldier sorting. By design, if you hold Ctrl while sorting, the soldier list doesn't sort but only shows the values for the sorting criterion you selected. However, if you then open the sort dropdown again and click somewhere outside the list to close the dropdown without selecting a sort criterion, the soldier list is sorted as per the criterion selected (unless again Ctrl is held). I think that closing the dropdown this way should not apply any sort action.

Done.

Test all comboboxes everywhere carefully if I didn't break something.

Offline Alpha Centauri Bear

  • Colonel
  • ****
  • Posts: 466
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1205 on: October 21, 2022, 05:19:21 pm »
Fellow players,
Please check my suggestion about parametrizing UFO size accuracy modifier for armaments.
https://openxcom.org/forum/index.php/topic,10819.msg149842.html#msg149842

The main driver is that vanilla formula is pretty crude and senseless with UFO size in denominator. That makes armament accuracy multiplier jumping from 1.25 for large to 2.00 for extra large making Dreadnaught much easier to fight which is pretty questionable feature by itself. On top of it precise weapons like missiles do not benefit from this multiplier at all as they are already at the cap which breaks intuitive perception for comparative armament strength.

Please approve/reject or make a counter suggestions. Thank you.

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 9084
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1206 on: October 29, 2022, 07:39:59 pm »
New OXCE v7.8 is up.

2022-10-29
QoL:
- Award sorting: https://openxcom.org/forum/index.php/topic,10493.0.html

Features:
- Alternate craft equipment management: https://openxcom.org/forum/index.php/topic,10452.msg149914.html#msg149914
- Combobox change events now triggered only by list item selection: https://openxcom.org/forum/index.php/topic,6586.msg149718.html#msg149718

Modding:
- Soldier name pool weights and hiring by location: https://openxcom.org/forum/index.php/topic,10845.0.html
- Instant retaliation: https://openxcom.org/forum/index.php/topic,10808.0.html
- Option for retaliation UFO to ignore base defenses: https://openxcom.org/forum/index.php/topic,10809.0.html
- Mission sites at xcom base locations: https://openxcom.org/forum/index.php/topic,10810.0.html
- Option to disable transfer of units to next stage: https://openxcom.org/forum/index.php/topic,10194.msg149818.html#msg149818

Scripting:

Bugfixes:
 - one memory leak
 - forward-compatibility for c++20 compilation
 - workaround for VS 2022 compiler bug v17.2+

Download: https://openxcom.org/forum/index.php/topic,5258.0.html

Ruleset validator was not updated. Will be done in a few days.
Wiki ruleset reference was not updated. Will be done in a few days.
Auto-update will be available on Windows in a few days.
« Last Edit: October 30, 2022, 11:38:35 am by Meridian »

Offline Ostrich-Hungry

  • Sergeant
  • **
  • Posts: 21
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1207 on: October 30, 2022, 02:42:56 am »
Thank you!!! Really, this is amazing!

Offline Nord

  • Commander
  • *****
  • Posts: 1746
  • The Gate is open.
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1208 on: November 08, 2022, 08:42:00 pm »
Wonderful work, thank you.

Question:
is armor movement cost accessible via scripts?
Thanks.
« Last Edit: November 08, 2022, 08:53:17 pm by Nord »

Offline Yankes

  • Global Moderator
  • Commander
  • ***
  • Posts: 3349
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1209 on: November 08, 2022, 11:13:02 pm »
Yes, and editable by it.

Offline Yankes

  • Global Moderator
  • Commander
  • ***
  • Posts: 3349
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1210 on: November 13, 2022, 01:39:36 am »
I making some improvements to updating lights on big maps, I would like people to check if everything is working correctly on test branch:
https://lxnt.wtf/oxem/builds//ExtendedTests/Extended-7.8.3-test-e6dcfc177-2022-11-12-win64.7z
Another thing is how faster it work for you.

Offline psavola

  • Commander
  • *****
  • Posts: 827
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1211 on: November 21, 2022, 05:58:41 pm »
With 7.8.1 and TFTDRework 1.13 I noticed something I have not seen before. On an artifact site mission, one of the aquanauts was knocked out in the first phase of the mission. The unconscious body appeared on top of second phase downstairs access lifts with all the loot. So you couldn't abort the mission without losing all the equipment or moving all of it manually. I don't think there are any changes in the mod, so I suppose this also affects the vanilla. I was planning to abort the mission and this was rather annoying. I wonder if anything  could be done about this. Unfortunately, no save because I was playing IM and wasn't smart enough to stop playing immediately.

Offline Juku121

  • Commander
  • *****
  • Posts: 1798
  • We're all mad here.
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1212 on: December 01, 2022, 03:06:44 pm »
I am stoopid and messed up the script. :-[

Script question. I'm doing (or understanding) something wrong, but damned if I know what.

What I'm trying to do is to modify the dormant portable (energy) shield item script in XCF (and that script apparently works in other mods). It goes like this:


Spoiler:
Code: [Select]
    hitUnit:
      - offset: 0.1 #Anti-psiker weapon
        code: |
...
      - offset: 1
        code: |
          # Handle item energy shields on hit

          var ptre BattleItem shieldItem;
          var ptr RuleItem shieldRule;
          var int shieldCapacity;
          var int shieldNeedsPriming;
          var int shieldTimer;
          var int shieldType;
          var int shieldResistCoeff;
          var int shieldHp;
          var int temp;

          battle_game.flashMessage "STR_DEBUG_1" 1;

          # Script to handle item energy shields on hit
          # Check for item in left hand
          unit.getLeftHandWeapon shieldItem;
...
      - offset: 2
        code: |
          # Handle energy shields on armor on hit

          var ptr RuleArmor armorRuleset;
          var int shieldHp;
          var int shieldType;
          var int shieldResistCoeff;
          var int temp;

          battle_game.flashMessage "STR_DEBUG_4" 1;

          unit.getTag shieldHp Tag.UNIT_ENERGY_SHIELD_HP;
I don't seem to get the 'offset 1' code to activate. I do get STR_DEBUG_4 displayed for all hits (and armour shields have been working for a long while), but I never seem to reach STR_DEBUG_1 nor anything below that.

I did change the later 'offset 1' for repair items to 5, hopefully avoiding any overriding. Now I'm kinda stumped. Any advice? It's of course possible that I've inadverdently changed something else, but it seems very strange that one node works and the other does not.
« Last Edit: December 01, 2022, 09:41:45 pm by Juku121 »

Offline Yankes

  • Global Moderator
  • Commander
  • ***
  • Posts: 3349
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1213 on: December 01, 2022, 08:27:49 pm »
you could simply mess up script and it did not compiled at all.

Offline Juku121

  • Commander
  • *****
  • Posts: 1798
  • We're all mad here.
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #1214 on: December 01, 2022, 09:40:46 pm »
Yeah, I figured that out after some trial and error. :-[

When does 'recolorItemSprite' run, only at the start of the battle? I'm not getting that part to work even as written by whoever's the author of the original script. Whoever it was, they were pretty thorough, so thumbs up.

Edit: Yeah, more mistakes on my part. Works constantly if you don't mess up.
« Last Edit: December 01, 2022, 10:25:25 pm by Juku121 »