Author Topic: Ethereal's wishlist  (Read 11063 times)

Offline Ethereal

  • Commander
  • *****
  • Posts: 684
    • View Profile
Ethereal's wishlist
« on: October 24, 2020, 10:56:04 pm »
What do I expect from OXCE in the future.
1 - Items: ReactionFire: true / falce
2 - Items: Soldiers: - a list of soldiers that can use.
3 - Sorting ships. Ability to move through the list.
4 - units: allowControl :, allowPanic :, allowBerserk: true / falce.
5 - crafts: CanCarryItems: list.
6 - More than 8 bases. Quantity adjustable by option.
« Last Edit: February 19, 2023, 10:08:24 am by Meridian »

Offline R1dO

  • Colonel
  • ****
  • Posts: 442
    • View Profile
Re: What do I expect from OXCE in the future.
« Reply #1 on: October 24, 2020, 11:01:10 pm »
Is this expect as in "must be done!" or just a wish list?

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1934
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: What do I expect from OXCE in the future.
« Reply #2 on: October 24, 2020, 11:22:26 pm »
  • Scripts exist already to handle this. Or just don't put snap shots on the weapon.
  • Could have some interesting use cases if you have say a soldier type like AI-controlled tanks that need a completely different set of weapons, but there are enough ways to do this without putting it so directly in the item's ruleset.
  • I guess could be QoL, but I don't usually have that many craft. I don't have a strong opinion.
  • Again, scripts/playing with morale recovery/etc. if you want to prevent these. Otherwise no strong opinion on differentiating the low morale effects.
  • Why? Limiting items according to craft just doesn't sound like a fun addition to a mod in general.
  • Already stated by Meridian in other threads that it won't happen.

Edit: Also going to echo R1dO's sentiment - the way you've worded your post comes across poorly. You should either flesh out the suggestions more in separate threads or collaborate with the devs to come up with something, not just throw expectations out into the void.
« Last Edit: October 24, 2020, 11:25:09 pm by ohartenstein23 »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9136
    • View Profile
Re: What do I expect from OXCE in the future.
« Reply #3 on: October 24, 2020, 11:49:52 pm »
The language is rough, but I don't get offended by rough language.
He talks straight, says exactly what he thinks, I'm OK with that.
No harm done.

Offline Ethereal

  • Commander
  • *****
  • Posts: 684
    • View Profile
Re: What do I expect from OXCE in the future.
« Reply #4 on: October 25, 2020, 04:49:49 am »
I'm embarrassed to ask, what is the rudeness? I just expressed my wishes. If something seems rude to you, then it's not my fault, but translate.google.

  • Scripts exist already to handle this. Or just don't put snap shots on the weapon.
  • Could have some interesting use cases if you have say a soldier type like AI-controlled tanks that need a completely different set of weapons, but there are enough ways to do this without putting it so directly in the item's ruleset.
  • I guess could be QoL, but I don't usually have that many craft. I don't have a strong opinion.
  • Again, scripts/playing with morale recovery/etc. if you want to prevent these. Otherwise no strong opinion on differentiating the low morale effects.
  • Why? Limiting items according to craft just doesn't sound like a fun addition to a mod in general.
  • Already stated by Meridian in other threads that it won't happen.

Edit: Also going to echo R1dO's sentiment - the way you've worded your post comes across poorly. You should either flesh out the suggestions more in separate threads or collaborate with the devs to come up with something, not just throw expectations out into the void.

1) For the convenience of modification, it is better to have a built-in option than a script.
2) I just need different, types of soldiers to have restrictions on the use of certain types of weapons. For example, Snipers cannot use rocket launchers.
3) And I have 3 interceptors and 4 transports on each base. And more recently, another +cargo ship.
4) I haven't seen such scripts yet. And it's not about restoring morale. Example: Mouton-never panics, only berserk end psi control. Sectoid-never berserk, only panic end psi control. Ethereal-never psi control, only panic or berserk.
5) For cargo ships, so that they can transport UFO components, ship weapons and armor. Everything that the landing ship does not need to transport.
6) I know, but ... it's just a dream.

It is very difficult for me to navigate without knowing the language.

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: What do I expect from OXCE in the future.
« Reply #5 on: October 25, 2020, 07:23:37 am »
1 - Items: ReactionFire: true / falce

I was just about to ask for this feature as well.

Making it so that a weapon in the items: section can be configured with 'ReactionFire: false' and that when it is activated enemies attacked BY that weapon do not respond with reaction fire.

The use I have for this is that I'm currently making use of several 'ranged' melee weapons (Like spears that can reach 2-3 tiles) and I would like them to operate the same as a normal melee attack in that the enemy does not respond when this fake melee weapon is 'fired' or when they are being struck by that weapon's projectile.

Alternatively if Ethereal's meaning was that the item itself cannot be used for reaction fire by the unit equipping it, I would also enjoy having that as an easy to configure option.

In that case perhaps the syntax could be:
reactionFire: true / false (The weapon can be used by the one holding it for reaction fire.)
enemyReactionFire: true / false (Enemies will, or won't, react to this weapon being fired.)

Code: [Select]
  - type: STR_EXAMPLE_RANGED_MELEE_WEAPON
    reactionFire: true # <=== This weapon will fire back at enemies
    enemyReactionFire: false # <=== Enemies will not fire back when this weapon is used to attack.
    size: 0.1
    costSell: 36900
    weight: 5
    bigSprite: 810
    floorSprite: 833
    handSprite: 3920
    bulletSprite: -1
    fireSound: 80
    hitSound: 112
    hitAnimation: 116
    power: 50
    strengthApplied: true
    damageType: 7
    damageAlter:
      ToTile: 0.0
    accuracyAimed: 100
    accuracyMultiplier:
      firing: 0.0
      melee: 1.0
    tuAimed: 25
    clipSize: -1
    battleType: 1
    twoHanded: true
    blockBothHands: true
    invWidth: 1
    invHeight: 3
    attraction: 9
    maxRange: 5
    powerRangeThreshold: 4
    powerRangeReduction: 100
    confAimed:
      shots: 1
      name: STR_ACTION_SLASH
      ammoSlot: 0
      arcing: true
    listOrder: 2004800
    categories:
      - STR_CAT_ALL_MELEE_WEAPONS

Scripts exist already to handle this.
Can scripting be used to stop the weapon from firing, or enemies from firing back? (Or both?)

If a script based solution is already available I would be very interested in making use of it.

Could you please provide a link if there is an example on the forum?

2 - Items: Soldiers: - a list of soldiers that can use.

I would also like to make use of this feature, and if possible please add the exact same feature but instead of restricting weapons to only function based on just the unit type the ability to also make equipment usable only by soldiers equipped with specific armors as well would be of much use.

Perhaps the syntax could be something like this:
Code: [Select]
  - type: STR_HEAVY_CANNON
    compatibleUnits:   # <=============== Can only be used by these Units
      - STR_SOLDIER
      - STR_HYBRID
    compatibleArmors:  # <=============== Can only be used by soldiers equipped with these Armors
      - STR_POWER_SUIT
      - STR_FLYING_SUIT
    size: 0.3
    costBuy: 6400
    costSell: 4800
    weight: 18
    bigSprite: 11
    floorSprite: 11
    handSprite: 24
    bulletSprite: 4
    fireSound: 12
    compatibleAmmo:
      - STR_HC_AP_AMMO
      - STR_HC_HE_AMMO
      - STR_HC_I_AMMO
    accuracySnap: 60
    accuracyAimed: 90
    tuSnap: 33
    tuAimed: 80
    battleType: 1
    twoHanded: true
    invWidth: 2
    invHeight: 3

In the above code example only normal X-Com soldiers and Hybrid soldiers can fire the 'Heavy Cannon', and only while wearing either a 'Power Suit' or 'Flying Suit'.

A message displayed in a similar manner to the "No Line of Fire!" message could read something like "Cannot Use Item!" when a soldier attempts to activate equipment they cannot use.


4 - units: allowControl :, allowPanic :, allowBerserk: true / falce.

Having better control of the specific mind control effects that different types of soldiers can be afflicted with would be a welcome addition to the modding options.

For example what if you wanted 'tank' units not to be able to be Berserked or Controlled but you still wished for enemy psi/moral attacks or moral loss to be able to cause them to 'panic' and freeze up for a turn.
« Last Edit: October 25, 2020, 08:17:19 am by The Martian »

Offline Ethereal

  • Commander
  • *****
  • Posts: 684
    • View Profile
Re: What do I expect from OXCE in the future.
« Reply #6 on: October 25, 2020, 09:18:23 am »

In that case perhaps the syntax could be:
reactionFire: true / false (The weapon can be used by the one holding it for reaction fire.)
enemyReactionFire: true / false (Enemies will, or won't, react to this weapon being fired.)

Good addition. I fully support it.

I would also like to make use of this feature, and if possible please add the exact same feature but instead of restricting weapons to only function based on just the unit type the ability to also make equipment usable only by soldiers equipped with specific armors as well would be of much use.

A good idea.

Having better control of the specific mind control effects that different types of soldiers can be afflicted with would be a welcome addition to the modding options.

For example what if you wanted 'tank' units not to be able to be Berserked or Controlled but you still wished for enemy psi/moral attacks or moral loss to be able to cause them to 'panic' and freeze up for a turn.

That is, for both units and soldiers. Then it is easier to implement such a function in the armor.
« Last Edit: October 25, 2020, 09:27:46 am by Ethereal »

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1934
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: What do I expect from OXCE in the future.
« Reply #7 on: October 26, 2020, 02:13:12 am »
I apologize for jumping to the conclusion that this post was rude, sorry about that.

For preventing reactions (besides just removing snap shots from a weapon):

This is equivalent to what I presume is your enemyReactionFire: false, that is, when you shoot an alien with the pistol, it will not react to you:
Code: [Select]
items:
  - type: STR_PISTOL
    scripts:
      reactionWeaponAction: |
        return 0;

If you want a weapon to not reaction fire (reactionFire: false), you would need to include something like this in the mod:
Code: [Select]
extended:
  tags:
    BattleItem:
      WEAPON_CANNOT_REACT: int

  scripts:
    reactionUnitReaction:
      - offset: 1
        code: |
          var ptr RuleItem weaponRuleset;
          var int weaponCannotReact;

          weapon.getRuleItem weaponRuleset;
          weaponRuleset.getTag weaponCannotReact Tag.WEAPON_CANNOT_REACT;

          if neq 0 weaponCannotReact;

            set reaction_chance 0;

          end;

          return reaction_chance;

items:
  - type: STR_PISTOL
    tags:
      WEAPON_CANNOT_REACT: 1

Although I would still recommend doing this instead:
Code: [Select]
items:
  - type: STR_PISTOL
    tuSnap: 0 # removes snap shots and any possibility of reaction fire from the pistol

Offline Ethereal

  • Commander
  • *****
  • Posts: 684
    • View Profile
Re: What do I expect from OXCE in the future.
« Reply #8 on: October 26, 2020, 09:34:30 am »
I apologize for jumping to the conclusion that this post was rude, sorry about that.

For preventing reactions (besides just removing snap shots from a weapon):

This is equivalent to what I presume is your enemyReactionFire: false, that is, when you shoot an alien with the pistol, it will not react to you:

If you want a weapon to not reaction fire (reactionFire: false), you would need to include something like this in the mod:

Thank you very much.

EDIT: Oops, hurry up. The script doesn't work. The aliens react.

Code: [Select]
[26-10-2020_11-07-41] [ERROR] Can't match overload for operator 'RuleItem.getTag' for:
[26-10-2020_11-07-41] [ERROR]   [var ptr RuleItem] [var int] [BattleItem.Tag]
[26-10-2020_11-07-41] [ERROR] Expected:
[26-10-2020_11-07-41] [ERROR]   [ptr RuleItem] [var int] [RuleItem.Tag]
[26-10-2020_11-07-41] [ERROR] Error in parsing script 'reactionUnitReaction' for 'Global Event Script': invalid operation in line: 'weaponRuleset.getTag weaponCannotReact Tag.WEAPON_CANNOT_REACT;'
[26-10-2020_11-07-41] [ERROR] Error in tags: 'WEAPON_CANNOT_REACT' unknown tag name not defined in current file
[26-10-2020_11-07-41] [ERROR] Error in tags: 'WEAPON_CANNOT_REACT' unknown tag name not defined in current file

    tuSnap: 0 # removes snap shots and any possibility of reaction fire from the pistol

I already used it, but I noticed that the AI is very dull in the absence of the Snap mode (it prefers to go into melee, shoots only at the maximum distance). Yes, and I need both Snap and aiming in rocket launchers, since auto shooting will be used in them for arcing shooting.
« Last Edit: October 26, 2020, 10:30:28 am by Ethereal »

Online Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3374
    • View Profile
Re: What do I expect from OXCE in the future.
« Reply #9 on: October 26, 2020, 11:24:01 am »
Code: [Select]
extended:
  tags:
    BattleItem:
last line is wrong, it should be:
Code: [Select]
extended:
  tags:
    RuleItem:

Offline Ethereal

  • Commander
  • *****
  • Posts: 684
    • View Profile
Re: What do I expect from OXCE in the future.
« Reply #10 on: October 26, 2020, 12:16:49 pm »
Code: [Select]
extended:
  tags:
    RuleItem:

Thanks. In the Log the error disappeared, but the script continues to not work.

Online Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3374
    • View Profile
Re: What do I expect from OXCE in the future.
« Reply #11 on: October 26, 2020, 12:22:37 pm »
And how you use it? You need mark each weapon to disable reaction.

Offline Ethereal

  • Commander
  • *****
  • Posts: 684
    • View Profile
Re: What do I expect from OXCE in the future.
« Reply #12 on: October 26, 2020, 12:42:06 pm »
I know. I set it to check:

Code: [Select]
  - type: STR_PLASMA_PISTOL
    tags:
      WEAPON_CANNOT_REACT: 1

No effect. The aliens are reacting.


Online Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3374
    • View Profile
Re: What do I expect from OXCE in the future.
« Reply #13 on: October 26, 2020, 12:49:50 pm »
Ok, another bug in script, current version make opposite, when you shoot with pistol nobody can react to it.
correct script should use `reaction_weapon` instead of `weapon`

Offline Ethereal

  • Commander
  • *****
  • Posts: 684
    • View Profile
Re: What do I expect from OXCE in the future.
« Reply #14 on: October 26, 2020, 01:05:04 pm »
Ok, another bug in script, current version make opposite, when you shoot with pistol nobody can react to it.

It's not bad too. I checked. It works. Long live the silent weapon!

correct script should use `reaction_weapon` instead of `weapon`

Thank you very much.

EDIT: It fails. Does not work.
« Last Edit: October 26, 2020, 02:20:32 pm by Ethereal »