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

Offline Mathel

  • Colonel
  • ****
  • Posts: 204
  • Do not mistake Muton for mutton.
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #510 on: May 13, 2020, 07:41:56 pm »
I tried looking at it. I do not know YAML, but if I understand this line from SavedBattleGame.cpp correctly,
Code: [Select]
_turn = node["turn"].as<int>(_turn);then _turn is an integer.
So presumably something strange would happen if the mission took as long, as is integer in that YAML. Which is presumably either 2 147 483 647 or 4 294 967 295, depending on whether or not the integer is signed.

Offline Yankes

  • Moderator
  • Commander
  • ***
  • Posts: 2789
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #511 on: May 13, 2020, 08:02:27 pm »
Save file is only small part possible "crash" sources, you can easy play game not saving at all.
To see if any thing crash you need track all use of this variable and see if any use handle correctly big numbers.

Theoretical example could be "Next Turn Screen" have hardcoded space for only 4 characters to display, then if you send value 10000 it could crash.
This could probably happens if we would use C but in C++ many buffers automatically grown to meet required space.

Offline Shiroi Bara

  • Colonel
  • ****
  • Posts: 310
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #512 on: May 15, 2020, 04:47:15 pm »
How experience system working when you use grenades - who get experience, aquanaut who prime it or aquanaut who pick it and threw? Instant grenades mode  is off and enemy hit by blast radius.

Offline vadracas

  • Colonel
  • ****
  • Posts: 280
  • Just another player/modder combo.
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #513 on: May 15, 2020, 04:51:42 pm »
aquanaut who threw, no skills are needed to prime in this game.

Offline Shiroi Bara

  • Colonel
  • ****
  • Posts: 310
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #514 on: May 15, 2020, 06:01:19 pm »
Ok, thank you, forget ask about disturbance grenades - same algorithm I assume? When enemy step on and it triggered experience goes to person who threw? 

Offline vadracas

  • Colonel
  • ****
  • Posts: 280
  • Just another player/modder combo.
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #515 on: May 15, 2020, 06:18:41 pm »
Pretty sure throwing exp comes from grenades in this way: In the ruleset, the grenade is tagged to give throwing Exp, then, once the grenade is primed, when you throw the grenade it will give throwing Exp.

I think-but this has been modified before and I'm not 100% sure this is how it works.

Offline Yankes

  • Moderator
  • Commander
  • ***
  • Posts: 2789
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #516 on: May 16, 2020, 08:02:23 pm »
I added new functionality to OXCE nightly:

For many list like `requires` or `requiresBuy` you can use new syntax like:

Base mod:
Code: [Select]
items:
  - type: STR_PISTOL
    requiresBuy:
      - STR_X
      - STR_Y
  - type: STR_PSI_AMP
    requires:
      - STR_X
      - STR_Y

Another mod:
Code: [Select]
items:
  - type: STR_PISTOL
    requiresBuy: !add
      - STR_Z
  - type: STR_PSI_AMP
    requires: !remove
      - STR_Y
Now `STR_PISTOL` need have additionally need `STR_Z` AND `STR_X`, `STR_Y` to buy
But `STR_PSI_AMP` need only `STR_X` from research.

With this you can easier add or remove some positions from list without know full lists.
This reduce many cases where mods extension could easy break by small change in main mod.

For now only two `!add` and `!remove`  basic operations are supported but in future it will be more complex too available (like `!replace`).

As some list have very strick order I could not add for now way to override them but in future depending on demand I could add ways to override them too.

Offline mechasdasd

  • Squaddie
  • *
  • Posts: 2
    • View Profile
    • Email
Re: OXCE (OpenXcom Extended) main thread
« Reply #517 on: May 17, 2020, 03:48:32 pm »
Hello, I joined because I wanted to ask something: are smoke grenades supposed to hurt units with normal and personal armor? (and some of the weaker aliens like Sectoids?) They don't in the vanilla game/OpenXcom and I haven't been able to find anything about it online. Power Suit units and Tanks don't get damaged at all, so I'm not sure if this is a bug or an intended feature of OXCE.

Online Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 7604
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #518 on: May 17, 2020, 06:58:35 pm »
Hello, I joined because I wanted to ask something: are smoke grenades supposed to hurt units with normal and personal armor? (and some of the weaker aliens like Sectoids?) They don't in the vanilla game/OpenXcom and I haven't been able to find anything about it online. Power Suit units and Tanks don't get damaged at all, so I'm not sure if this is a bug or an intended feature of OXCE.

Hi,

smoke grenades are not supposed to hurt anyone.

They also don't hurt anyone in OXCE, same as in OpenXcom and in the original... unless you have specifically modded them to do some damage.

M.

Offline Bobit

  • Colonel
  • ****
  • Posts: 186
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #519 on: May 17, 2020, 07:10:19 pm »
Smoke itself causes small amount of stun damage to units in it at the start of their turn which ignores armor but not resists. So if an armor says it takes 0% smoke damage, it will take 0% smoke damage. If it doesn't mention smoke damage, it will take 100% smoke damage, even if it has 50 armor. Tanks also have resists, they're just not shown in the UFOpaedia in vanilla. The grenade does no damage, only the smoke it causes.
« Last Edit: May 17, 2020, 07:13:26 pm by Bobit »

Online Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 7604
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #520 on: May 17, 2020, 07:17:54 pm »
Smoke itself causes small amount of stun damage to units in it at the start of their turn which ignores armor but not resists. So if an armor says it takes 0% smoke damage, it will take 0% smoke damage. If it doesn't mention smoke damage, it will take 100% smoke damage, even if it has 50 armor. Tanks also have resists, they're just not shown in the UFOpaedia in vanilla. The grenade does no damage, only the smoke it causes.

Which is exactly the same as in the original and in OpenXcom.
It was really not necessary to write it here and confuse the poor guy who asked even more.

Offline Bobit

  • Colonel
  • ****
  • Posts: 186
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #521 on: May 17, 2020, 08:13:49 pm »
On a reread he said "They don't in vanilla" so yeah "same as vanilla" is the best answer.

Offline mechasdasd

  • Squaddie
  • *
  • Posts: 2
    • View Profile
    • Email
Re: OXCE (OpenXcom Extended) main thread
« Reply #522 on: May 17, 2020, 08:35:17 pm »
Hi,

smoke grenades are not supposed to hurt anyone.

They also don't hurt anyone in OXCE, same as in OpenXcom and in the original... unless you have specifically modded them to do some damage.

M.

Alright, I did a little bit of testing (downloaded latest OXCE version 6.5, got the files from steam, installed on a clean computer so no mods or previous saves). And it seems like the 'instant grenades' option turns smoke grenades into normal grenades in OXCE (the damage is applied on hit, same as normal grenades, and the ground gets visually scorched alongside the smoke).

I then downloaded OpenXcom on another computer and the instant smoke grenades seemed to work properly there (no damage, no visual changes other than the smoke).

Disabling instant grenades in the OXCE version of the game makes smoke grenades work 'properly' again (not sure if it affects any other weapons, I only started playing a week ago and haven't gotten very far).

This is all in the base game, I have no other mods installed and haven't really touched the other options (yet).

Offline Mathel

  • Colonel
  • ****
  • Posts: 204
  • Do not mistake Muton for mutton.
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #523 on: May 18, 2020, 11:26:00 am »
Alright, I did a little bit of testing (downloaded latest OXCE version 6.5, got the files from steam, installed on a clean computer so no mods or previous saves). And it seems like the 'instant grenades' option turns smoke grenades into normal grenades in OXCE (the damage is applied on hit, same as normal grenades, and the ground gets visually scorched alongside the smoke).

I then downloaded OpenXcom on another computer and the instant smoke grenades seemed to work properly there (no damage, no visual changes other than the smoke).

Disabling instant grenades in the OXCE version of the game makes smoke grenades work 'properly' again (not sure if it affects any other weapons, I only started playing a week ago and haven't gotten very far).

This is all in the base game, I have no other mods installed and haven't really touched the other options (yet).

This seems to be a bug with special grenades in general. I was playing Equal Terms and discovered, that incendiary grenades from it do a large explosion when on instant grenades, while without instant grenades, they just create a small patch of fire.

Online Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 7604
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #524 on: May 18, 2020, 12:13:09 pm »
...it seems like the 'instant grenades' option turns smoke grenades into normal grenades in OXCE (the damage is applied on hit, same as normal grenades, and the ground gets visually scorched alongside the smoke).

Thanks for the report. This is indeed not intended.
(I've never used the instant grenades option, so I never noticed.)

It will be fixed.