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

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11408
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: [EXE] OpenXcom Extended
« Reply #1095 on: January 14, 2017, 01:58:10 am »
Yankes, how do I disable Panic and Mind Control on a psi weapon? I want to only use psi damage.

Offline Yankes

  • Moderator
  • Commander
  • ***
  • Posts: 3194
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #1096 on: January 14, 2017, 06:28:44 pm »
set time units to zero for each action e.g. `costMindControl`and `costPanic`.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11408
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: [EXE] OpenXcom Extended
« Reply #1097 on: January 14, 2017, 07:08:59 pm »
set time units to zero for each action e.g. `costMindControl`and `costPanic`.

I tried it before and it crashes my game...

Here's the item:

Code: [Select]
  - type: STR_STAFF_OF_HEART_GRIP
    categories: [STR_HUMAN_TECH, STR_PSI, STR_OTHER, STR_UNDERWATER]
    requires:
      - STR_STAFF_OF_HEART_GRIP_USE
    size: 0.3
    costSell: 50000
    weight: 5
    bigSprite: 537
    floorSprite: 438
    handSprite: 1136
    hitSound: 250
    hitAnimation: 156
    psiAttackName: STR_CRUSH_THE_HEART
    damageType: 5
    damageBonus:
      psi: 0.02
    damageAlter:
      ResistType: 6
      RandomType: 6
      ArmorEffectiveness: 0
      ToArmor: 0
      ToMorale: 3.0
    accuracyUse: 15
    costUse:
      time: 28
      energy: 20
      stun: 7
    costThrow:
      energy: 10
    costMindControl: 0
    costPanic: 0
    clipSize: -1
    battleType: 9
    twoHanded: true
    invWidth: 2
    invHeight: 3
    maxRange: 20
    attraction: 10

Offline Yankes

  • Moderator
  • Commander
  • ***
  • Posts: 3194
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #1098 on: January 14, 2017, 07:45:28 pm »
this is complex property like `costUse` it should look like:
Code: [Select]
    costUse:
      time: 28
      energy: 20
      stun: 7
    costMindControl:
      time: 0
    costPanic:
      time: 0
btw "crashes" is not correct word in that context, probably better would be "its fail to load" or "yaml throw a error" :)

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11408
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: [EXE] OpenXcom Extended
« Reply #1099 on: January 14, 2017, 08:29:30 pm »
Thanks, it works!

btw "crashes" is not correct word in that context, probably better would be "its fail to load" or "yaml throw a error" :)

Yeah, sorry, it was really late when I wrote that. :P

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1931
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #1100 on: January 16, 2017, 09:24:15 pm »
Hey Yankes!  Meridian and I have been trying to track down a bug with the auto-equip key, first reported in this thread: https://openxcom.org/forum/index.php/topic,5047.msg77589.html#msg77589

When pressing "Z" or whatever key auto-equip is bound to, the game Segfaults sometimes when trying to move or interact with an item that was moved by the auto-equip function.  I've tested this in a clean Ubuntu build of your OpenXcomExtended branch, no mods loaded.  This seems to be an issue with how the items are moved between classes when auto-equipping, and I think it has to do with the 'dummy' SavedBattleGame you use when calling this function (https://github.com/Yankes/OpenXcom/blob/OpenXcomExtended/src/Battlescape/InventoryState.cpp#L821).  I was able to prevent the CTD by changing 'dummy' on this line to '_battleGame,' but this causes issues later when the SavedBattleGame is cleaned up.  My guess is that when the dummy SavedBattleGame is removed at the end of InventoryState::onAutoequip, this re-allocates the memory for the pointers to the BattleItems (dummy's _items list is deleted), and so the pointer to the item may or may not be available after this function call.

To replicate:
  • Delete options.cfg and battle.cfg
  • Run game and load quick battle
  • Click 'OK' to bring up the briefing, then inventory screen
  • Press 'X' to clear the current soldier's inventory, then 'Z' to autoequip
  • Either trying another action (clicking or key press), or even waiting for a few seconds, causes Segfault for me

The above does not work in all cases though - Meridian hasn't been able to reproduce the bug this way, and some other Windows users have been able to use it just fine, but I get CTD on Linux every time I try using auto-equip.  Would you mind testing this?

Edit:  As a matter of curiosity, what was the reasoning behind moving addItem from BattlescapeGenerator to SavedBattleGame during the merge with the nightly to include this feature?
« Last Edit: January 16, 2017, 10:16:10 pm by ohartenstein23 »

Offline Yankes

  • Moderator
  • Commander
  • ***
  • Posts: 3194
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #1101 on: January 17, 2017, 01:07:15 am »
For end:
Because you can add items during battle too. Extended can spawn any item on new crated unit not only terror weapons like basic version.

Windows is probably in exactly same way broken, difference is how systems handle released memory if it not send back to operating system you can still access values in it even if object is deleted.

Overall your analyst is probably right, I will try fix it tomorrow.

[ps]
did you trying clearing `_items` without deleting them?

[ps2]
commit with fix for cherry pick: https://github.com/Yankes/OpenXcom/commit/a4d390083ca5ce0fd2d9c175a6026f5b52e7efc2
« Last Edit: January 18, 2017, 05:45:08 pm by Yankes »

Offline HelmetHair

  • Colonel
  • ****
  • Posts: 360
  • He who laughs last thinks fastest.
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #1102 on: January 20, 2017, 05:12:42 pm »
Hello Yankes

I was curious to know if there was a few things that could be added as features eventually. I've searched the forums, so if this has been mentioned before, I'm sorry but the search can be picky about terms.

Have you considered the possibility of adding a second ammo type(s) for alternate fire possibilities?

For example an M4 with a grenade launcher or underslung shotgun

https://en.wikipedia.org/wiki/M203_grenade_launcher
https://en.wikipedia.org/wiki/KAC_Masterkey

Thanks


Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11408
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: [EXE] OpenXcom Extended
« Reply #1103 on: January 20, 2017, 05:28:31 pm »
That would probably be hard, code-wise... But I would certainly welcome such an addition.

The problem from the modder side would be limited space for firing selection menu. If a weapon has all three firing modes and a melee attack, and of course it can be thrown, it already takes pretty much the entire screen. Adding more would only be possible for higher resolutions, but that would go against vanilla.

But it would be a cool feature to play with. I do miss it sometimes.

Offline HelmetHair

  • Colonel
  • ****
  • Posts: 360
  • He who laughs last thinks fastest.
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #1104 on: January 20, 2017, 08:22:50 pm »
If a compromise had to be made, why not let it be if there is an alternate fire mode then melee is disallowed?

Offline Yankes

  • Moderator
  • Commander
  • ***
  • Posts: 3194
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #1105 on: January 20, 2017, 08:26:31 pm »
After some thoughts I decide that I will implements it after 3.6. One important aspect will be that you will be still limited to only 3 attacks, and each one will have option to decide what "ammo slot" it will use. This will require small unification of each attack type. Another thing is how will be second ammo reloadable, I think best way will be "hot swap", when you drop new ammo item on weapon in hands then it will unload current one and load new one.

Offline HelmetHair

  • Colonel
  • ****
  • Posts: 360
  • He who laughs last thinks fastest.
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #1106 on: January 20, 2017, 09:16:24 pm »
Very Clever!

I think a hot swap is a great idea... but would that mean the unload button does nothing?

or

would that mean that if you "unload" a weapon that only the primary ammo would come out leaving the secondary until you pressed unload again, where then the secondary ammo would come out?

also

Two, with hot swap ammo if you were to attempt to reload an HE grenade on top of a Smoke grenade we would seamlessly see a swap and pay the cost of unload and reload? or reload only, or something else?

You know.

I actually think this will be REALLY cool.


Yankes, as I'm writing this you've got me thinking.... What about a "tactical" reload option that I guess would piggy back on the back of the idea hot swap.

That is to say. If you drop a fresh magazine onto a weapon it swaps the magazines for reload cost. You know for like when you have 2 bullets left and know there are lots of dudes in a building so you pop in a fresh magazine but with less hassle since you don't have to Unload and then reload.

thoughts?


Offline Yankes

  • Moderator
  • Commander
  • ***
  • Posts: 3194
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #1107 on: January 20, 2017, 11:42:50 pm »
For unload button I think best would be that it will try first remove normal ammo and if is already removed it will do it for second one.

For "hot swap" I think about this as combination of unload & load in one move with cost equal of sum of both.

Tactical will probably need to wait for another time :)

Offline Thirsk

  • Captain
  • ***
  • Posts: 62
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #1108 on: January 24, 2017, 01:21:43 pm »
Hi Yankes, I have to say this is an awesome mod! But sadly I can't seem to get it working right.. For some reason it conflicts with the Equal Terms 2.0 mod by KingMob4313 (https://openxcom.org/forum/index.php/topic,3680.0.html). Whenever I enter a soldier's inventory, all the grenades or explosives seem to be tagged with a massive black shadow. Strangely the smoke grenades seem to be untouched. Is there any way around this? Really hope to be able to play through a campaign with both mods operating!

Ps. I tried it with various nightlies and various versions of OXCE+ from Nov 16 till today but no combination seems to solve it  :'(

Online Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 8597
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #1109 on: January 24, 2017, 01:43:58 pm »
Ps. I tried it with various nightlies and various versions of OXCE+ from Nov 16 till today but no combination seems to solve it  :'(

Well, if you tried vanilla nightlies, OXCE and OXCE+... and none worked... then the problem is in the Equal Terms 2.0 mod, no?

EDIT: yup, images in the mod have wrong palette, sample attached
« Last Edit: January 24, 2017, 02:08:10 pm by Meridian »