aliens

Author Topic: [OLD] Old OXCE discussion thread  (Read 779118 times)

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11722
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: [OXCE] OpenXcom Extended
« Reply #1365 on: July 31, 2017, 06:22:13 pm »
It is a good thing Oharty basically plans to rewrite the AI. :D

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 9091
    • View Profile
Re: [OXCE] OpenXcom Extended
« Reply #1366 on: July 31, 2017, 06:35:58 pm »
It is a good thing Oharty basically plans to rewrite the AI. :D

I seriously doubt he is.
And if so, there's no way I'm taking that into oxce+.

Offline Yankes

  • Global Moderator
  • Commander
  • ***
  • Posts: 3350
    • View Profile
Re: [OXCE] OpenXcom Extended
« Reply #1367 on: July 31, 2017, 08:57:21 pm »
Crash in AI code.
Reported here: https://openxcom.org/forum/index.php/topic,5617.0.html
fix is probably add `&& _attackAction->weapon` to `if (_visibleEnemies)` in `psiAction`. This could affect vanilla too because there was no test for alien without weapon.

btw when you show screenshot with null reference exception is better to show place where null object was used not where member function access null `this`.

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1933
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: [OXCE] OpenXcom Extended
« Reply #1368 on: August 01, 2017, 01:21:39 am »
I seriously doubt he is.
And if so, there's no way I'm taking that into oxce+.

Yep, no re-write, just some switches to flip to activate some interesting behavior, like squadsight snipers.

Offline clownagent

  • Colonel
  • ****
  • Posts: 380
    • View Profile
Re: [OXCE] OpenXcom Extended
« Reply #1369 on: August 01, 2017, 09:08:41 pm »
I would like to use the race dependent custom deployment for ufos (meaning I want to give each race their own equipment in their UFOs):

Code: [Select]
ufos:
  - type: STR_UFO_TYPE #default config ...
    raceBonus: #bonus stats per race.
      STR_SECTOID: #name of race that bonus apply.
        craftCustomDeploy: STR_BATTLESHIP_3 #override craft default weapon deploy.


so I tried the following code
Code: [Select]
  - type: STR_LARGE_LIGHTER
    raceBonus:
      STR_GESSERIT:
        craftCustomDeploy: STR_LARGE_LIGHTER_GESSERIT

I defined my custom deployment in the alienDeployment section.

For testing, I tried the new battle option and the custom deployment is used as intended.
However, there is no UFO spawned and the mission became a terror mission which needs custom briefing (see screenshot).

I only wanted to change the equipment for the specific race in a specific UFO and not change the mission type. Is this possible with "craftCustomDeploy"?

EDIT: I did the mission during regular play (shooting down the UFO) and the deployment works fine. However, the mission played with the "new battle" from the main menu is messed up.

« Last Edit: August 01, 2017, 09:50:41 pm by clownagent »

Offline Nord

  • Commander
  • *****
  • Posts: 1746
  • The Gate is open.
    • View Profile
Re: [OXCE] OpenXcom Extended
« Reply #1370 on: August 06, 2017, 05:03:02 am »
fix is probably add `&& _attackAction->weapon` to `if (_visibleEnemies)` in `psiAction`. This could affect vanilla too because there was no test for alien without weapon.

btw when you show screenshot with null reference exception is better to show place where null object was used not where member function access null `this`.
So, what is an issue source? Alien without weapons? Or terror unit without "fixedweapon"? Or psionic alien?
What can i modify in savegame or ruleset to avoid this bug? (Just for now, because no fixes exist)

Offline Yankes

  • Global Moderator
  • Commander
  • ***
  • Posts: 3350
    • View Profile
Re: [OXCE] OpenXcom Extended
« Reply #1371 on: August 06, 2017, 09:09:28 pm »
It look as when game check psi and unit do not have any normal weapon it can crash game on this check. I did not test this fully because I have had trouble with finding time to work on OXC related stuff but I will try in this week fix this bugs.

Offline mumble

  • Colonel
  • ****
  • Posts: 338
    • View Profile
Re: [OXCE] OpenXcom Extended
« Reply #1372 on: August 08, 2017, 02:53:00 am »
Is there a way to adjust shotguns? I often feel multi shot rounds like shotguns are pretty well garbage, because the buckshot spread is either incredibly tight, or incredibly wide : its not so much a full buckshot blast spreading in the direction fired, after being fired, its more the shots all act like individual bullets fired with the spread of the pawns aim as well, giving shotguns ridiculous pellet spread when used by a bad shot, but very tight spread when used by a guy with high skill.  I never rely on shotguns with buckshot for this reason, as pellets end up being a mess often times.

I certainly would like if shotguns were altered : infact, I figure this might be doable by having a firearm accuracy, round accuracy, and then user accuracy : where the firarm / ammo is the CAP of the performance of the weapon, and then the weapon has a curve in performance based on skill : this way a bad shot could fire a shotgun, and the pellet spread would always be more or less identical as when fired from a good shot, but the ability to aim this shot itself would be different.

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1933
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: [OXCE] OpenXcom Extended
« Reply #1373 on: August 08, 2017, 03:03:32 pm »
Check this thread out, these options have been in OXCE+ for quite some time now and are used heavily in Piratez and X-Com Files.  I hope that provides what you're looking for.

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 9091
    • View Profile
Re: [OXCE] OpenXcom Extended
« Reply #1374 on: August 09, 2017, 11:17:46 pm »
@Yankes: a few vanilla melee weapons (e.g. TFTD thermal tazers) and a few modded weapons have stopped working in 3.9 because they don't have "clipSize: -1"...

... do we want to make it somehow compatible again... or should I just PR a ruleset update upstream to supsuper?
In my opinion... unless there is something deeper behind it, we should just update rulesets to contain clipsize: -1 as most melee weapons already do... what's your opinion?

Offline Yankes

  • Global Moderator
  • Commander
  • ***
  • Posts: 3350
    • View Profile
Re: [OXCE] OpenXcom Extended
« Reply #1375 on: August 10, 2017, 12:59:34 am »
Thought question, when I made this changes I look on ufo1 and piratez ruleset and everywhere I saw -1 in melee weapons. This allow me to heavy simplify logic responsible for spending/using ammo. Adding more special checks will made code worse but I see one place where change would be simple and work in 99% cases, simply when item rule is loaded and item type is changed to melee than we can set `clipSize: -1` as default that will be override by typical weapons or ignored by minority. One draw back will be if someone try change item type on existing item, then original clip size will be set to default.

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 9091
    • View Profile
Re: [OXCE] OpenXcom Extended
« Reply #1376 on: August 10, 2017, 09:48:36 am »
As far as I understand:

clipsize = -1 is unlimited "ammo"
clipsize = 0 doesn't make any sense, right? not even for firearms... or is it used for something? (EDIT: it is)
clipsize > 0 is used for firearms and for some exotic melee weapons (like bamboo stick in piratez)

If my assumption about clipSize = 0 not being used at all is true (EDIT: it isn't), I would either:
- just update vanilla rulesets
- or change the default value on RuleItem level to -1 instead of 0 (for everything, not only battletype 3)

EDIT: ruleset reference from ufopedia even says the game crashes when clipsize = 0

https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)#Items

Quote
The amount of ammo stored in each weapon clip. If -1 is specified, this weapon has infinite ammo. If specified for a HWP, clipSize determines the maximum amount of shots which can be loaded into the HWP weapon. Use clipsize -1 for melee weapons. If clipsize is 0 for a melee weapon, the game will crash if an AI unit attacks with it.

EDIT2: so, clipsize = 0 is used for HWPs (means load just one clip)... can't change the default... I'd just update the ruleset and not change the code at all

EDIT3: fixed: https://github.com/SupSuper/OpenXcom/commit/f818e539ffedb5898b41fba372dd01d552d61e95
« Last Edit: August 10, 2017, 11:22:26 am by Meridian »

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 9091
    • View Profile
Re: [OXCE] OpenXcom Extended
« Reply #1377 on: August 13, 2017, 11:50:01 am »

Offline Dioxine

  • Commander
  • *****
  • Posts: 5455
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: [OXCE] OpenXcom Extended
« Reply #1378 on: August 15, 2017, 06:45:09 pm »
I noticed a curious thing (intended? bug?): the
Code: [Select]
isExplodingInHands: flag is not working for BT: 5 items (proxies). Can this function be added (with explosion delay = 0 if no timer set)?

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1933
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: [OXCE] OpenXcom Extended
« Reply #1379 on: August 15, 2017, 08:44:38 pm »
Found a segfault that I think was introduced with this commit.  When an alien that has previously panicked and dropped their weapon attempts at psi attack, _attackAction->weapon->getAmmoForAction(action) on line 2036 is sometimes called with an incomplete type, leading to a crash.  I'm attaching a save and a zip file containing the mods and options.cfg used in that save; after pressing end turn, when the sectoid leader moves into sight of one of the xcom units, the game will often crash.