OpenXcom Forum

Modding => OXCE Suggestions NEW => OpenXcom Extended => OXCE Wishlists => Topic started by: Ethereal on October 24, 2020, 10:56:04 pm

Title: Ethereal's wishlist
Post by: Ethereal 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.
Title: Re: What do I expect from OXCE in the future.
Post by: R1dO on October 24, 2020, 11:01:10 pm
Is this expect as in "must be done!" or just a wish list?
Title: Re: What do I expect from OXCE in the future.
Post by: ohartenstein23 on October 24, 2020, 11:22:26 pm

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.
Title: Re: What do I expect from OXCE in the future.
Post by: Meridian 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.
Title: Re: What do I expect from OXCE in the future.
Post by: Ethereal 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.
Title: Re: What do I expect from OXCE in the future.
Post by: The Martian 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.
Title: Re: What do I expect from OXCE in the future.
Post by: Ethereal 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.
Title: Re: What do I expect from OXCE in the future.
Post by: ohartenstein23 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
Title: Re: What do I expect from OXCE in the future.
Post by: Ethereal 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.
Title: Re: What do I expect from OXCE in the future.
Post by: Yankes 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:
Title: Re: What do I expect from OXCE in the future.
Post by: Ethereal 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.
Title: Re: What do I expect from OXCE in the future.
Post by: Yankes on October 26, 2020, 12:22:37 pm
And how you use it? You need mark each weapon to disable reaction.
Title: Re: What do I expect from OXCE in the future.
Post by: Ethereal 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.

Title: Re: What do I expect from OXCE in the future.
Post by: Yankes 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`
Title: Re: What do I expect from OXCE in the future.
Post by: Ethereal 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.
Title: Re: What do I expect from OXCE in the future.
Post by: Yankes on October 28, 2020, 06:02:08 pm
How?
Title: Re: What do I expect from OXCE in the future.
Post by: Ethereal on October 28, 2020, 06:57:20 pm
There is no effect. Check with yourself. If it works for you, then I'm wrong and I'm a fool. I will try to experiment further. But if you think that I understand scripts, then I assure you that I am not.
Title: Re: What do I expect from OXCE in the future.
Post by: Yankes on October 28, 2020, 07:09:33 pm
Simply saying "Does not work." do not give me any information what could go wrong, you could simply not enable this mod or innocrecy edited this script or any other thing. You need say what you exactly did and what result is.
Title: Re: What do I expect from OXCE in the future.
Post by: Ethereal on October 28, 2020, 09:15:14 pm
Yes, I made a mistake and installed "reaction_weapon" in the wrong place. I tried again - it works. One problem... I wrote that I also need a silent weapon script. I tried to duplicate it and there I have already set "reaction_weapon" with a new tag "WEAPON_NO_REACT".

Code: [Select]
    reactionUnitReaction:
      - offset: 1
        code: |
          var ptr RuleItem weaponRuleset;
          var int weaponNoReact;

          reaction_weapon.getRuleItem weaponRuleset;
          weaponRuleset.getTag weaponNoReact Tag.WEAPON_NO_REACT;

          if neq 0 weaponNoReact;

            set reaction_chance 0;

          end;

          return reaction_chance;

Where is the mistake?
Title: Re: What do I expect from OXCE in the future.
Post by: Yankes on October 28, 2020, 10:00:19 pm
In script there are two values that point to different game objects, one is `reaction_weapon` and second one is `weapon`.
`weapon` is battle item that was used in original action that caused reaction
`reaction_weapon` is battle item that is used by unit that is reacting.

This mean this second script need use original weapon that was used and check on it how reactions should behave.
This mean you need have change line to:
Code: [Select]
          weapon.getRuleItem weaponRuleset;
this mean getting item rule set config from that item.
Title: Re: What do I expect from OXCE in the future.
Post by: Ethereal on October 28, 2020, 10:15:38 pm
You obviously don't understand me. Here's what happens in the complex:

Code: [Select]
    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;

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

          reaction_weapon.getRuleItem weaponRuleset;
          weaponRuleset.getTag weaponNoReact Tag.WEAPON_NO_REACT;

          if neq 0 weaponNoReact;

            set reaction_chance 0;

          end;

          return reaction_chance;

  tags:
    RuleItem:
      WEAPON_CANNOT_REACT: int
      WEAPON_NO_REACT: int

I need both effects.
WEAPON_NO_REACT - doesn't work. Where is the mistake?
Title: Re: What do I expect from OXCE in the future.
Post by: Yankes on October 28, 2020, 11:06:13 pm
In this case you duplicated yaml nodes, you have two with same name: `reactionUnitReaction`, yaml only allow one node with same name.
To fix it you need remove second one `reactionUnitReaction:`

It should look like:
Code: [Select]
    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;
      - offset: 2
        code: |
          var ptr RuleItem weaponRuleset;
          var int weaponNoReact;

          reaction_weapon.getRuleItem weaponRuleset;
          weaponRuleset.getTag weaponNoReact Tag.WEAPON_NO_REACT;

          if neq 0 weaponNoReact;

            set reaction_chance 0;

          end;

          return reaction_chance;

  tags:
    RuleItem:
      WEAPON_CANNOT_REACT: int
      WEAPON_NO_REACT: int

but you can even reduce it more, because both script could be done at once:
Code: [Select]
    reactionUnitReaction:
      - offset: 1
        code: |
          var ptr RuleItem weaponRuleset;
          var int weaponCannotReact;
          var int weaponNoReact;

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

          if neq 0 weaponCannotReact;

            set reaction_chance 0;

          end;


          reaction_weapon.getRuleItem weaponRuleset;
          weaponRuleset.getTag weaponNoReact Tag.WEAPON_NO_REACT;

          if neq 0 weaponNoReact;

            set reaction_chance 0;

          end;

          return reaction_chance;

  tags:
    RuleItem:
      WEAPON_CANNOT_REACT: int
      WEAPON_NO_REACT: int
Title: Re: What do I expect from OXCE in the future.
Post by: Ethereal on October 28, 2020, 11:49:49 pm
but you can even reduce it more, because both script could be done at once:

Thank you for help. Both functions now work. Thank you very much!
Title: Re: What do I expect from OXCE in the future.
Post by: Meridian on February 20, 2021, 10:49:36 am
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.
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.

1/ Use scripts. Ruleset is convenient for you, but it is inconvenient for us. Once script support is added for something, adding hardcoded ruleset attributes is harder to do, harder to maintain and can break existing scripts.

2/ I know it from other games, e.g. Xcom2012, but I think it is total bullshit.

I can hold a sniper rifle,
my grandmother can hold a sniper rifle,
Britney Spears can also hold a sniper rifle.

I am not going to implement limits on who can hold what.

What if I just killed an enemy who had a sniper rifle and want to steal it and abort the mission... I cannot?

I can imagine modding accuracy on specialized weapons for untrained people... so that Britney Spears has only 5% accuracy with a sniper rifle, but I'm not going to disallow her using it.

5/ Same argument. If an item fits into the ship's cargo space, I'm not going to disallow loading it.

Also, why are we even talking about this? If you need to transfer something from one base to another, just send it via Transfers... cargo ships in Xcom are useless and I don't see any reason to implement them.

6/ No.
Title: Re: What do I expect from OXCE in the future.
Post by: Meridian on February 20, 2021, 10:50:47 am
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.

3/ Done. Use right mouse click to move a craft up in the list.

4/ Done.

Code: [Select]
units:
  - type: STR_SECTOID_SOLDIER
    canPanic: true
    canBeMindControlled: true
    berserkChance: 0
  - type: STR_MUTON_SOLDIER
    canPanic: true
    canBeMindControlled: true
    berserkChance: 100
  - type: STR_ETHEREAL_SOLDIER
    canPanic: true
    canBeMindControlled: false
    berserkChance: 33
Title: Re: What do I expect from OXCE in the future.
Post by: Ethereal on February 20, 2021, 12:32:54 pm
Also, why are we even talking about this? If you need to transfer something from one base to another, just send it via Transfers... cargo ships in Xcom are useless and I don't see any reason to implement them.

Cargo ships in Xcom Very helpful. Great advantage in speed and cost of delivery. Well, these are the problems of the modmaker, how to implement it correctly. Strictly speaking, in my modification I created such a situation that cargo ships are vital. It looks monstrous and there is a possibility of flying on a mission in a transport with aveational fuel instead of ammunition, but need to be careful.

3/ Done. Use right mouse click to move a craft up in the list.

4/ Done.

Thank you very much for the work!
Title: Re: What do I expect from OXCE in the future.
Post by: Ethereal on February 20, 2021, 09:19:56 pm
2/ I know it from other games, e.g. Xcom2012, but I think it is total bullshit.

I can hold a sniper rifle,
my grandmother can hold a sniper rifle,
Britney Spears can also hold a sniper rifle.

I am not going to implement limits on who can hold what.

What if I just killed an enemy who had a sniper rifle and want to steal it and abort the mission... I cannot?

I can imagine modding accuracy on specialized weapons for untrained people... so that Britney Spears has only 5% accuracy with a sniper rifle, but I'm not going to disallow her using it.

I agree with you. The system of bonuses / penalties in weapons for the type of infantry is much better.
Title: Re: What do I expect from OXCE in the future.
Post by: Ethereal on February 27, 2021, 07:16:47 am
As far as I know, at the moment we do not have tools for regulating the number of simultaneously conducted "alienMissions" and their maximum number. We also know that at the beginning of the month at least 2 missions are generated.

My suggestion is to create such tools. Options that would regulate the maximum and minimum number of missions, depending on the difficulty level and the duration of the game. In addition, RETALIATION missions need to be categorized separately. That is, the total number of missions = regular missions (RESEARCH, HARVEST, ABDUCTION, BASE, TERROR, INFILTRATION, SUPPLY) + monthly generated missions without UFOs + RETALIATION.
Title: Re: What do I expect from OXCE in the future.
Post by: Meridian on February 27, 2021, 08:49:47 am
Number of generated missions at the beginning of the month is fully under your control via mission script.

Provoked retaliations are limited to one per region.
Title: Re: What do I expect from OXCE in the future.
Post by: Ethereal on February 27, 2021, 09:09:06 am
I'm not talking about that. RETALIATIONS are already actively generated, since they depend, basically, on the activity of the player. I looked at the save and often from the entire array of missions, only 2-3 were not RETALIATION.

As a matter of fact, I would like to know exactly the mission generation periods, the number of possible and simultaneously current missions. And how does it depend on the level of difficulty?
Title: Re: What do I expect from OXCE in the future.
Post by: Meridian on February 27, 2021, 09:37:54 am
As a matter of fact, I would like to know exactly the mission generation periods, the number of possible and simultaneously current missions. And how does it depend on the level of difficulty?

There are no periods for retaliation mission generation.

Number of possible and simultaneous retaliation missions is equal to the number of regions, since you can have only one retaliation mission per region.

Difficulty determines the chance of retaliation mission spawning when you shoot down a UFO, starting at 4% for beginner up to 20% for superhuman (in your mod 24% for superhuman based on difficulty coefficients).
Title: Re: What do I expect from OXCE in the future.
Post by: Ethereal on February 27, 2021, 10:36:11 am
Retaliation has nothing to do with it. I am interested in ordinary missions.
Title: Re: What do I expect from OXCE in the future.
Post by: Meridian on February 27, 2021, 11:02:13 am
Then fu*king learn to ask fu*king questions!
My patience is big, but not unlimited.

For ordinary missions I have already answered the question:
There are no hardcoded generation periods, no hardcoded number of possible missions and no hardcoded number of simultaneous missions. There is also nothing hardcoded based on difficulty. There is NOTHING hardcoded in the generation of ordinary missions whatsoever. The mission generation is completely in the hands of the modder using the available features of the mission script.

That's all I have to say.