Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Kozinsky

Pages: [1] 2
1
I have a certain number of guns that can only fire with aimed or snap shots. I made a skill that enables to use this weapon in automatic firing. For this weapon I have set the number of shots when firing automatically to 1 (via “autoShots: 1”). Now in the script “hitUnit” I handle a hit from this weapon on the target and I want that after this shot the number of shots is equal to zero. I use the function “damaging_item.setAmmoQuantity 0;”, but it doesn't work properly - after the script finishes, the weapon has one shot left instead of zero.

For example, I have a weapon in which there are three shots, I activate the skill and shoot, while the bullet flies it can be seen that the number of shots in the weapon became equal to two. Then there is a hit on the target and the script “hitUnit” starts working, the function “damaging_item.setAmmoQuantity 0;” is executed and I see that the weapon now has one shot instead of zero.

I tried using “damaging_item.setAmmoQuantity -1;” but the result is the same - one shot remains.

2
OXCE Support / Increase script debug log limit
« on: December 12, 2024, 11:49:20 am »
Is there any way to increase the number of lines available for logging scripts (by script function “debug_log”)? 500 lines is very small for me :)

Also, is there a setting that would clear the entire openxcom.log file when the game reloads the data (for example, when changing the set of activated mods and pressing the OK button) without quitting the game and starting the OpenXcomEx.exe file again?

If these settings do not exist, is it possible to add them?

3
I'm trying to adapt this script to my needs.

What I want to do:
When using skillUseUnit hook, I check for enemy units in a certain radius around the soldier that triggered the hook. Then I need to set a certain tag for all found enemy units and change some values of their characteristics.

Problem:
The Tile.getUnit function returns a pointer to a read-only unit:
Code: [Select]
Name: Tile.getUnit                            Args: [ptr Tile] [var ptr BattleUnit] But to change the tag for that unit, the BattleUnit.setTag function needs a pointer to a unit that is writable:
Code: [Select]
Name: BattleUnit.setTag                       Args: [ptre BattleUnit] [BattleUnit.Tag] [int]        Desc: Set tag of BattleUnit
How can I convert a readable unit (ptr) to a writable unit (ptre)? Or is there some other solution to my problem?

4
Completely different concept of outputting information about soldiers' stats. After a soldier's name, all his stats are always displayed (except for TU, stamina and health). The pilot's special level (depending on his bravery, reaction and firing accuracy) is also displayed, in order to understand whether this soldier should be assigned as a vehicle pilot.

Requires:
    - OpenXcom Extended version 7.2 or higher
      OR Brutal-OXCE any version.
    - The X-Com Files mod version 3.4 or higher.

Compatibility:
    - Not compatible with any submod with stat strings, but compatible with any other submod.

Notes:
    - You can activate this submod at any stage of your game.
    - It is recommended to start a new game to gradually get used to the information displayed.
    - If you have the previous version of this submod (from this thread) installed and enabled, it needs to be disabled.
    - If you play with submods that add new kinds of soldiers, the rules for creating a stat string for them will be applied as if they were a standard human agent, without checking if that soldier can be a pilot or not.

Languages:
    - The submod does not contain strings visible to the player.

Download link:
    - https://mod.io/g/openxcom/m/x-com-files-kozinsky-stat-strings

Changelog:
Spoiler:
    2.0.0 (17.12.2024):
Spoiler:
      - The number of gradations for all stats except psi-skill has been reduced to five:
          Terrible (not changed): from 0 to the average between the minimum and maximum values, with symbols: "." for strength, bravery, reactions, melee, throwing and firing accuracy, "-" for sanity and psi-strength;
          Bad (not changed): from the average between the minimum and maximum values to the maximum value, with symbols: ":" for strength, bravery, reactions, melee, throwing and firing accuracy, "+" for sanity and psi-strength;
          Normal (not changed): from the maximum value to the gym/psi lab training limit, with symbols: "!" for strength, bravery, reactions, melee, throwing and firing accuracy, "=" for sanity and psi-strength;
          Good (changed): from the gym/psi lab training limit to the ground/air combat training limit, with symbols "s b r a m t f p" for strength, bravery, reactions, sanity, melee, throwing, firing accuracy and psi-strength respectively;
          Great (changed): from the ground/air combat training limit to infinity, with symbols "S B R A M T F P" for strength, bravery, reactions, sanity, melee, throwing, firing accuracy and psi-strength respectively;
      - Now the stat boundaries for grades don't take into account bonuses from transformations and commendations (since it turns out the game itself doesn't take that into account).
      - Removed pilot level zero symbol.
      - The number of pilot levels has been reduced to nine.
    1.0.0 (08.10.2024):
Spoiler:
    - Initial release.
Differences from the unreleased version:
      - Different soldier types use their own stat progression scales for different types of soldiers.
      - Piloting levels have been increased to 18.
      - Each type of soldier is checked for the ability to pilot vehicles.
      - For agents who have evolved from human to other forms (Infernal, Spartan, Olympian, Protean, Kyberos), stat bonuses from this transformation are taken into account.

Information for nerds for version 1.0.0 (difference between 1.0.0 and 2.0.0 see in changelog):
Spoiler:
      1. The player's soldiers each have four sets of stats:
        minStats - the minimum stat values a soldier can get when first appearing in the game;
        maxStats - the maximum stat values a soldier can get when first appearing in the game;
        trainingStatCaps - limit values, which can be obtained by training in the gym and psi lab;
        statCaps - limit values that can be obtained during ground and air battles.

      2. As a rule of thumb, the value of each stat gradually grows between sets.
        For example, for a standard human agent, the stat “strength” has these values:
          minimum value: 20;
          maximum value: 40;
          the limit of gym and psi lab training: 45;
          training limit during ground and air combats: 50.
        This means that the agent, when he first arrives at the base, will get a random strength value between 20 and 40. Then he can raise it to 45 in the gym. Then he can raise it to 50 during ground missions. To get values above 50, the agent must earn medals during ground battles or undergo transformations.

      3. The stats at the end of the soldier's name are displayed sequentially and are grouped into groups for better readability:
        the first three characters are non-combat stats: strength, bravery, and reaction;
        the fourth character is sanity;
        the next three symbols are combat stats: melee, throwing, firing accuracy;
        the eighth and ninth symbols are a group of psi abilities: psi strength and psi skill. The group of these symbols will be displayed when the player learns the concept of psionics;
        the tenth symbol is the separator between stats and piloting level;
        the last one or two symbols are the piloting level, which shows the mastery of the pilot's stats (bravery, reaction and firing accuracy).

      4. Each of the displayed stats (except psi-skill) is divided into six gradations, depending on the value of that stat in different stat sets for that soldier:
        Terrible: from 0 to the average between the minimum and maximum values;
        Bad: from the average between the minimum and maximum values to the maximum value;
        Normal: from the maximum value to the gym/psi lab training limit;
        Good: from the gym/psi lab training limit to the ground/air combat training limit;
        Great: from the ground/air combat training limit to one and a half times the ground/air combat training limit;
        Excellent: from one and a half times the ground/air combat training limit to infinity.

        4.1. So, for the example above, the strength grading limits are as follows:
          Terrible: no more than 29;
          Bad: 30 to 39;
          Normal: 40 to 44;
          Good: 45 to 49;
          Great: 50 to 74;
          Excellent: not less than 75.

        4.2. There are exceptions to this rule:
          4.2.1. If two or more stat values of neighboring groups are equal to each other, the average value between the different values is taken:
            For example, a standard human agent's bravery stat has these initial values:
              minimum value: 10;
              maximum value: 60;
              gym and psi lab training limit: 100;
              training limit during ground and air combat: 100.
            Since the gym and ground combat training limits are equal, it is decided to reduce the gym training limit to 80 (as an average between 60 and 100). This reduction is only applied to the calculation of the stat grading limit and does not change in-game. Thus, the bravery gradation limits are as follows (I know that bravery values are always a multiple of 10, but I don't use this multiple for proper math calculations):
              Terrible: no more than 34;
              Bad: 35 to 59;
              Normal: 60 to 79;
              Good: 80 to 99;
              Great: 100 to 149;
              Excellent: not less than 150.
            Another example, the same standard human agent has a psi-power stat with these values:
              minimum value: 0;
              maximum value: 100;
              gym and psi lab training limit: 100;
              ground and air combat training limit: 100.
            Since the maximum value, the gym and psi lab training limits and the ground and air combat training limits are equal, it is decided to reduce the maximum value to 33 and the gym and psi lab training limit to 66 (as averages between 0 and 100). This reduction only applies to the calculation of the stat grading limit and does not change in-game. Thus, the psi power gradation limits are as follows:
              Terrible: no more than 15;
              Bad: 16 to 32;
              Normal: 33 to 65;
              Good: 66 to 99;
              Great: 100 to 149;
              Excellent: not less than 150.

          4.2.2. If the stat values in the sets do not change sequentially, they are arranged in an arithmetic increasing sequence:
            For example, a standard human agent's sanity stat has the following initial values:
              minimum value: 20;
              maximum value: 80;
              gym and psi lab training limit: 0;
              ground and air combat training limit: 120.
            Since the gym training limit is getting out of step with the increasing sequence, it is decided to change the gym training limit to 100 (as an average between 80 and 120). This change is only applied to the calculation of the stat grading limit and does not change in-game. Thus, the sanity grading limits are as follows:
              Terrible: no more than 49;
              Bad: 50 to 79;
              Normal: 80 to 99;
              Good: 100 to 119;
              Great: 120 to 179;
              Excellent: not less than 180.

          4.2.3. If the stat values in all four sets are the same and not zero, some arithmetic increasing sequence from that value is applied:
            For example, for a dog, the psi- strength stat for all four sets is 40. It is decided to change them to these values (this change applies only to the calculation of stat gradation limits and does not change in-game):
              minimum value: 40;
              maximum value: 60;
              training limit in the gym and psi lab: 80;
              training limit during ground and air combat: 100.
            Thus, the limits of psi power gradation are as follows:
              Terrible: no more than 49;
              Bad: 50 to 59;
              Normal: 60 to 79;
              Good: 80 to 99;
              Great: 100 to 149;
              Excellent: not less than 150.

          4.2.4. If the stat values in all four sets are zero, some arbitrary arithmetic increasing sequence is applied:
            For example, for AI, the strength stat for all four sets is 0. It is decided to change them to these values (this change applies only to the calculation of stat gradation limits and does not change in-game):
              minimum value: 0;
              maximum value: 50;
              training limit in the gym and psi lab: 75;
              training limit during ground and air combat: 100.
            Thus, the strength gradation limits are as follows:
              Terrible: no more than 24;
              Bad: 25 to 49;
              Normal: 50 to 74;
              Good: 75 to 99;
              Great: 100 to 149;
              Excellent: not less than 150.

          4.2.5. In case the value of a stat in all four sets is very small or its change is almost imperceptible, some arbitrary arithmetic increasing sequence is used:
            For example, for a dog, the strength stat has these initial values:
              minimum value: 1;
              maximum value: 1;
              gym and psi lab training limit: 1;
              ground and air combat training limit: 2.
            It was decided to change them to these values (this change applies only to the calculation of stat grading limits and does not change in-game):
              minimum value: 2;
              maximum value: 3;
              gym and psi lab training limit: 4;
              training limit during ground and air combat: 5.
            Thus, the strength gradation limits are as follows:
              Terrible: no more than 1;
              Bad: 2 to 2;
              Normal: 3 to 3;
              Good: 4 to 4;
              Great: 5 to 6;
              Excellent: not less than 7.   
     
      5. Symbols with minimal visual width were chosen to display the gradation of each stat to leave as much space as possible for the soldier's name:
        Strength (non-combat skill group) is indicated by the symbols: . : ! l s S
        Bravery (non-combat skill group) is indicated by the symbols: . : ! l b B
        Reactions (non-combat skill group) is indicated by the symbols: . : ! l r R
        Sanity (visually separates the non-combat skill group from the combat skill group) is indicated by the symbols: - + = Ξ a A
        Melee (combat skill group) is indicated by the symbols: . : ! l m M
        Throwing (combat skill group) is indicated by the symbols: . : ! l t T
        Firing accuracy (combat skill group) is indicated by the symbols: . : ! l f F
        Psi-strength (visually separates the combat skill group from the psionic skill group) is indicated by symbols: - + = Ξ p P

        5.1. For psi-skill, the scale consists of eight gradations and is independent of the psi-skill values in the stat sets:
          Total Sucks: no more than 2 and is indicated by the symbol: .
          Terrible: 3 to 4 and is indicated by the symbol: :
          Bad: 5 to 8 and is indicated by the symbol: !
          Normal: 9 to 16 and is indicated by the symbol: l
          Good: 17 to 32 and is indicated by the symbol: †
          Great: 33 to 64 and is indicated by the symbol: ‡
          Excellent: 65 to 128 and is indicated by the symbol: x
          Godlike: not less than 129 and is indicated by the symbol: X

      6. Piloting level is calculated by summing up points, which are determined based on the values of the stats required for piloting (bravery, reactions and firing accuracy):
        A required stat value of 49 or less: no points;
        A required stat value between 50 and 74: gives 1 point;
        A required stat value between 75 and 99: gives 2 points;
        A required stat value between 100 and 124: gives 3 points;
        A required stat value between 125 and 149: Gives 4 points;
        A required stat value between 150 and 174: gives 5 points;
        A required stat of at least 175: gives 6 points.
        Each point gained from each stat increases the piloting level by 1. Thus, the piloting level can be between 0 and 18. This number is indicated after the separator symbol between the psi ability group and the piloting level - '.
        For all existing soldier types, the piloting ability is also checked, and if the soldier cannot be a pilot, the piloting level is not displayed.

Examples:
Spoiler:
      Agent Masoud Sale/.:!-.:!'2
Spoiler:
        Masoud Sale/ agent's name and name and stat string separator symbol
        . terrible strength
        : bad bravery
        ! normal reactions
        - terrible sanity
        . terrible melee
        : bad throwing
        ! normal firing accuracy
        the player has not explored the concept of psionics, so there are no symbols describing psi-strength and psi-skill
        '2 piloting level 2
      Agent !Nasser Zak/s.ra!!f'3
Spoiler:
        !Nasser Zak/ agent's name and name and stat string separator symbol
        s great strength
        . terrible bravery
        r great reactions
        a great sanity
        ! normal melee
        ! normal throwing
        f great firing accuracy
        the player has not explored the concept of psionics, so there are no symbols describing psi-strength and psi-skill
        '3 piloting level 3
      Agent !Martin Tor/s!rΞ!!f'4
Spoiler:
        !Martin Tor/ agent's name and name and stat string separator symbol
        s great strength
        ! normal bravery
        r great reactions
        Ξ good sanity
        ! normal melee
        ! normal throwing
        f great firing accuracy
        the player has not explored the concept of psionics, so there are no symbols describing psi-strength and psi-skill
        '4 piloting level 4
      Agent Keva Agar/sbraltfΞ.'6
Spoiler:
        Keva Agar/ agent's name and name and stat string separator symbol
        s great strength
        b great bravery
        r great reactions
        a great sanity
        l good melee
        t great throwing
        f great firing accuracy
        Ξ good psi-strength
        . total sucks in psi-skill
        '6 piloting level 6
      Agent Papa Mali/s!raltfΞ‡'4
Spoiler:
        Papa Mali/ agent's name and name and stat string separator symbol
        s great strength
        ! normal bravery
        r great reactions
        a great sanity
        l good melee
        t great throwing
        f great firing accuracy
        Ξ good psi-strength
        ‡ great psi-skill
        '4 piloting level 4
      Dog Prince/.!:+...-.
Spoiler:
        Prince/ dog's name and name and stat string separator symbol
        . terrible strength
        ! normal bravery
        : bad reactions
        + bad sanity
        . terrible melee
        . terrible throwing
        . terrible firing accuracy
        - terrible psi-strength
        . total sucks in psi-skill
        dogs can't pilot
      Dog Tarzan/!b!Ξ!:.-.
Spoiler:
        Tarzan/ dog's name and name and stat string separator symbol
        ! normal strength
        b good bravery
        ! normal reactions
        Ξ good sanity
        ! normal melee
        : bad throwing
        . terrible firing accuracy
        - terrible psi-strength
        . total sucks in psi-skill
        dogs can't pilot
      AI Mercury/...-...-.'0
Spoiler:
        Mercury/ AI's name and name and stat string separator symbol
        . terrible strength
        . terrible bravery
        . terrible reactions
        - terrible sanity
        . terrible melee
        . terrible throwing
        . terrible firing accuracy
        - terrible psi-strength
        . total sucks in psi-skill
        '0 piloting level 0
      AI Cetus/...-..!-.'1
Spoiler:
        Cetus/ AI's name and name and stat string separator symbol
        . terrible strength
        . terrible bravery
        . terrible reactions
        - terrible sanity
        . terrible melee
        . terrible throwing
        ! normal firing accuracy
        - terrible psi-strength
        . total sucks in psi-skill
        '1 piloting level 1

5
OXCE Support Y-scripts / [question/suggestion] How to get monthPassed?
« on: September 10, 2024, 01:29:50 pm »
I want to know how many months have passed since the game started (the “monthsPassed” parameter from the save file). As far as I understand, it is currently impossible to know this and I propose to add a new operation that will read this parameter from the game. For my purposes, I just need to know this parameter, although someone may need to change it:
Code: [Select]
Script operations:
Name: GeoscapeGame.getMonthsPassed            Args: [ptr GeoscapeGame] [var int]
Name: GeoscapeGame.setMonthsPassed            Args: [ptre GeoscapeGame] [int]

6
A small submod that changes the stats of enemies and neutral units between 80-120% of their base value at the start of a ground battle. So now you can meet a sectoid who can fight well, or a muton who doesn't have enough strength to use a blaster launcher. Or even a ethereal who is bad at psi.

Requires:
  - OpenXcom Extended any version
    OR Brutal-OXCE any version.
  - The X-Com Files mod any version.

Compatibility:
  - Compatible with any other submod.

Notes:
  - You can activate this submod at any stage of your game.
  - All of the above images are taken in developer mode to show the differences in the modified stats of the different sectoid soldiers.
  - If you want to customize the enemy's stat range to your taste, open the ..\OpenXCom\user\mods\XComFiles_RandomEnemyStats\XCF_RandomEnemyStats.rul file with any text editor (Windows Notepad or Notepad++), find the set minPercent 80; and set maxPercent 120; strings and change the numbers 80 and 120 to your desired values (specify adequate values, otherwise the script will not work without notifying the player).

Languages:
  - The submod does not contain strings visible to the player.

Download link:
  - https://mod.io/g/openxcom/m/x-com-files-random-enemy-stats

Changelog:
Spoiler:
    1.0.0 (27.08.2024):
Spoiler:
    - Initial release.
    1.0.1 (27.08.2024):
Spoiler:
    - Fixed randomization of current TU, health, energy, and sanity.

7
Since the discussion of this problem in the related thread ([Documentation] Soldier Skill Menu) was lost in time, I decided to move it here:

I have a problem: the soldier's skills button is displayed even when the soldier currently has no skills, but may have them in the future.
My idea is this: a soldier has many skills, but each particular skill requires the soldier to have certain transformation bonuses or medal bonuses.  And in the case where the soldier does not have any of the bonuses that the skills require, the skills button is displayed, but nothing happens when you click on it. Is it possible to not display it? Or am I doing something wrong?

The simplest example of my rullset:
Code: [Select]
soldiers:
  - update: STR_SOLDIER
    skills:
      - STR_SKILL_1
      - STR_SKILL_2
skills:
  - type: STR_SKILL_1
    requiredBonuses:
      - STR_MEDIC_TRANSFORMATION_BONUS
      - STR_MEDAL_MEDIC_3
  - type: STR_SKILL_2
    requiredBonuses:
      - STR_MEDIC_TRANSFORMATION_BONUS
      - STR_MEDAL_MEDIC_4
soldierTransformation:
  - name: STR_MEDIC_TRANSFORMATION
    allowedSoldierTypes:
      - STR_SOLDIER
    requiredCommendations:
      STR_MEDAL_MEDIC: 1
    soldierBonusType: STR_MEDIC_TRANSFORMATION_BONUS
commendations:
  - type: STR_MEDAL_MEDIC
    soldierBonusTypes: [STR_MEDAL_MEDIC_1, STR_MEDAL_MEDIC_2, STR_MEDAL_MEDIC_3, STR_MEDAL_MEDIC_4, STR_MEDAL_MEDIC_5]
    criteria:
      totalWoundsHealed: [5, 10, 20, 30, 50]
soldierBonuses:
  - name: STR_MEDIC_TRANSFORMATION_BONUS
    stats:
      melee: 2
      tu: 1
  - name: STR_MEDAL_MEDIC_1
    stats:
      bravery: 10
  - name: STR_MEDAL_MEDIC_2
    stats:
      bravery: 20
  - name: STR_MEDAL_MEDIC_3
    stats:
      bravery: 30
  - name: STR_MEDAL_MEDIC_4
    stats:
      bravery: 40
  - name: STR_MEDAL_MEDIC_5
    stats:
      bravery: 50

So, when a soldier has only the first level of medal "- {commendationName: STR_MEDAL_MEDIC, decorationLevel: 0}" and has no transformation bonus "STR_MEDIC_TRANSFORMATION_BONUS", he logically should not have access to any of the skills, but the skills button is still shown to the player.

8
Is there a good working way to change the ID of a tile during a ground battle? Like changing a tile to its “dead” version.
To realize my idea, at a certain point in the game (at the beginning of a certain turn) certain tiles should change their appearance to other tiles.

I tried to use a pre-detonated special explosive that only deals damage to terrain:
Code: [Select]
terrains:
  - name: XBASE
    addOnly: true
    mapDataSets:
      - BLANKS
      - XBASE1
      - XBASE2
      - XCOMWALL
      - XCOMBITS
      - STARGATE
    mapBlocks:
      - name: STARGA00
        width: 10
        length: 10
        items:
          STR_SWITCH_STARGATE:
            - [2, 4, 0]
            - [3, 4, 0]
            - [2, 4, 1]
            - [3, 4, 1]
        fuseTimers:
          STR_SWITCH_STARGATE: [1, 1]
items:
  - type: STR_SWITCH_STARGATE
    size: 0.3
    weight: 9999
    power: 500
    damageAlter:
      RandomType: 3
      FixRadius: 1
      ToArmorPre: 0.0
      ToArmor: 0.0
      ToHealth: 0.0
      ToWound: 0.0
      ToStun: 0.0
      ToTile: 1.0
    damageType: 3
    battleType: 4
This only works when “FixRadius: 1” is specified, but it plays the explosion animation and sets neighboring tiles on fire or smoke. I tried using a value of “FixRadius: 0”, but in this case nothing happens at all - the explosives just disappear.

Perhaps what I have in mind can be solved with Y-scripts?

9
The X-Com Files / [submod][XCF 3.6] X-Com Files: More UFOs (1.1.0)
« on: April 30, 2024, 11:54:20 am »
An adaptation of the mod Tnarg's and Meson's UFOs adding several new types of small and medium-sized UFOs.
In addition to adapting the UFOs from the original mod, they've added rotated map variants. The new UFOs have special tasks - to escort more important UFOs as guardians. A new alien mission has also been added, during which the UFOs will specifically hunt the player's crafts.

Requires:
    - OpenXcom Extended any version
      OR Brutal-OXCE any version.
    - The X-Com Files mod any version.

Compatibility:
    - There may be problems with submods modifying all alien missions, except retaliation missions.

Notes:
    - You can activate this submod at any stage of your game.

Languages:
    - english (en-US)
    - english (en-GB)
    - russian (ru)

Download link:
    - https://mod.io/g/openxcom/m/x-com-files-more-ufos

If you speak English well, please suggest a more correct translation of the strings that are displayed to the player.

Changelog:
Spoiler:
    1.1.0 (31.12.2024):
Spoiler:
      - Updating to XCF version 3.6 (and OXCE version 8.0): added hull frames for new UFOs.
    1.0.0 (30.04.2024):
Spoiler:
      - Initial release.

10
Air defense systems need ammunition to fire on UFOs attacking the player's base, as well as time to reload their guns.

Requires:
    - OpenXcom Extended version 7.11.1 or higher
      OR Brutal-OXCE version 8.0.2 or higher.
    - The X-Com Files mod version 3.2 or higher.

Recommended for use with:
    - X-Com Files: Air Raids submod version 2.0.0 or higher, which adds ability to aliens to launch missiles or bombs that destroy base facilities without a base defense battle.

Compatibility:
    - Compatible with all other submods.

Notes:
    - You can activate this submod at any stage of your game.
    - If after installing this submod you see white text on the base screen above the air defense systems, but not colored text as in the above pictures, then delete the "standard" and "common" folders from the game directory and copy them again from the OXCE archive of the latest version. Also, if there are "standard.zip" and "common.zip" archives and backup copies of "standart-[folder backup time]" and "common-[folder backup time]" folders in the game folder, then delete them as well.

Languages:
    - english (en-US)
    - russian (ru)

Download link:
   - https://mod.io/g/openxcom/m/x-com-files-realistic-air-defense-systems

If you speak English well, please suggest a more correct translation of the strings that are displayed to the player.

Changelog:
Spoiler:
    1.0.0 (08.02.2024):
Spoiler:
      - Initial release.

11
If you have a lot of veteran agents in your game who have some level 10 medals, this submod is for you. It adds medal levels beyond the 10th. You will have to try very hard to get them, as their requirements grow exponentially.
For example, the Death Dealer medal requires killing a certain number of enemies to get each level of the medal:
Code: [Select]
30, 50, 75, 100, 150, 225, 350, 400, 650, 888And getting levels above 10th will require killing that many enemies:
Code: [Select]
1100, 1300, 1500, 1700, 1900, 2150, 2400, 2700, 3000, 3500
This submod also increases the number of medal levels for “X-Com Files: Arsenal Additions” as a separate submod. Therefore, if you do not play with "X-Com Files: Arsenal Additions", then simply do not activate the "XCFAA: Elite Commendations". sabmod.

Requires:
    - OpenXcom Extended any version
      OR Brutal-OXCE any version.
    - The X-Com Files mod any version.
    - optional: The X-Com Files: Arsenal Additions submod any version.

Compatibility:
    - Compatible with all other submods.

Notes:
    - You can activate this submod at any stage of your game.
    - If you are playing with submod "X-Com Files: Arsenal Additions", then in the list of mods place submod "XCFAA: Elite Commendations" below it.
    - If you played with the old version of submod and your soldiers have already managed to get “elite” versions of medals, then after updating submod to the new version, these awards will disappear with the loss of all bonuses from them. Just send the soldiers who received them to any mission and after its completion they will receive increased levels of regular medals.

Languages:
    - english (en-US)
    - russian (ru)

Download link:
    - https://mod.io/g/openxcom/m/x-com-files-elite-commendations

If you speak English well, please suggest a more correct translation of the strings that are displayed to the player.

Changelog:
Spoiler:
    2.1.0 (31.12.2024):
Spoiler:
      - Updating to XCF version 3.6 (and OXCE version 8.0): added Field Medic commendation.
    2.0.0 (30.04.2024):
Spoiler:
      - Elite medal variants have been replaced by higher levels (11th through 20th) of regular medals.
    1.0.0 (12.02.2024):
Spoiler:
      - Initial release.

12
Is there any way to understand with scripts if a player's soldier has a certain commendation of a certain level?
Similarly for transformations: how can a script understand if a soldier has a certain transformation?

13
I would like to propose an upgraded algorithm for the air defense systems at the player's base.
For example, suppose there is a simultaneous attack on the player's base by multiple alien missiles (see this topic for a description of this mechanic) - on the geoscape it will look like many UFOs flying to the player's base, which will arrive at the base almost simultaneously. Since in the real world the amount of ammunition in air defense systems is limited, air defense systems can only fire a limited number of shots. And if the number of targets exceeds the number of ammo in the air defense system, the latter targets are guaranteed not to be shot down.

The current air defense algorithm in the game does not take this feature into account: every time an attack is made on the player's base (when the screen of reflection of the attack on the player's base is shown), each air defense system has a full ammo supply, which is instantly reloaded between attacks. Of course, using the "ammoItem" and "ammoNeeded" parameters (see this topic) brings a bit of realism, but still does not take into account the reload speed of air defense systems.

I suggest adding the following parameters for the base modules (similar to the "craftWeapons" parameters):
ammoMax - the maximum amount of ammo that can be loaded into this air defense system. According to the "ammoNeeded" parameter, this parameter can indicate either the amount of ammunition required to operate the air defense system, or the number of shots. For example, with "ammoNeeded: 5" and "ammoMax: 15", in the first case it will mean that the air defense system will be able to fire 15/5=3 shots until the ammo is fully discharged, or in the second case - 15 shots (each of which requires 5 ammo).
rearmRate - how much ammunition will be loaded into this air defense system per game hour. If possible, it is better to make this parameter to describe the amount of ammunition loaded during a game minute.

In addition to the technical implementation of the new algorithm, I think it will be a big problem to display information about the presence or absence of ammunition for each air defense system on the base. At the moment I think it will be enough to display this information in text form on top of the picture of the air defense module on the base screen.

In the attached image, the text "-/-" means that this air defense module has infinite ammunition and does not require rearming (as it works now).

14
OXCE Suggestions OK / [Suggestion] "Kamikaze" UFOs
« on: January 10, 2024, 12:08:15 pm »
A small addition to the alien missile attack functionality from this thread.
I propose to add a new parameter to UFOs, indicating that this UFO during dogfight with the player's aircraft will self-destruct and cause the specified damage (from the parameter "power") to the player's aircraft. For example:
Quote
ufos:
  - type: STR_SMALL_ROCKET
    isKamikaze: true #default - false

The behavior of this UFO during air combat: it tries to approach the player's aircraft at the highest possible speed (as if it had the parameter "range: 1", or even less than 1 but greater than 0). The "range" parameter itself is ignored because it has no meaning. As soon as the distance between the UFO and the airplane is equal to 0, the UFO is detonated, the player's aircraft is damaged and the air combat ends.
If during the dogfight the player destroys this UFO at a distance greater than 0, the combat ends as if it was just a normal UFO, i.e. without any consequences to the player's aircraft.
If the player destroys a UFO at distance 0, the UFO also self-destructs, causing damage to the player's aircraft.

With this feature, I hope, it is possible to realize a kind of air defense system protecting alien bases from the player's attack.

15
OXCE Suggestions DONE / [DONE][Suggestion] More retaliation variants
« on: August 08, 2023, 07:40:18 pm »
A few suggestions for further development of this functionality:
1. Now the attacking UFO appears instantly and immediately on the player's base. I would like to be able to customize the trajectory of the UFO so that it flies to the player's base as it does the last UFO in the original retaliation mission (generated in "spawnUfo"): from a random point in a straight line to the player's base. This way, the player may have the possibility to intercept such a UFO before attacking the base.
For example, the "spawnOnPlayerBase" parameter: when it is in the "true" state, the UFO will be generated instantly at the player's base (as it works now). When it in "false" state, the UFO is generated away from the base and flies to the player's base.
Code: [Select]
alienMissions:
  - type: STR_ALIEN_RETALIATION_INSTANT
    points: 0
    objective: 6                # the new objective type
#    ignoreBaseDefenses: true
    spawnUfo: STR_BATTLESHIP    # this is the UFO that will be spawned
    spawnOnPlayerBase: false    # true by default
    waves:
      - ufo: STR_BATTLESHIP     # just put something here, doesn't matter
        count: 1
        trajectory: P8
        timer: 3000
    raceWeights:
      0:
        STR_SECTOID: 20
        STR_FLOATER: 20

2. I would like to specify the number of UFOs attacking the player's base, not just one.
For example, their number should be specified in the new parameter "spawnUfoCount", and the interval of their generation would be set in the parameter "spawnUfoTimer". This is true for both the regular retaliation mission and this new instant retaliation mission.
Code: [Select]
alienMissions:
  - type: STR_ALIEN_RETALIATION_INSTANT
    points: 0
    objective: 6                # the new objective type
#    ignoreBaseDefenses: true
    spawnUfo: STR_BATTLESHIP    # this is the UFO that will be spawned
    spawnUfoCount: 2            # 1 by default
    spawnUfoTimer: 320          # 0 by default. How long after the previous UFO should this UFO arrive? (in minutes)
    waves:
      - ufo: STR_BATTLESHIP     # just put something here, doesn't matter
        count: 1
        trajectory: P8
        timer: 3000
    raceWeights:
      0:
        STR_SECTOID: 20
        STR_FLOATER: 20

3. How about adding retaliation UFO generation to the "waves" section (in addition to "spawnUfo")?
For example, a wave that should generate UFOs to attack the player base could be labeled with "isRetaliationWave: true". UFOs from such a wave would not be generated if previous "normal" waves have not found the player's base. The "trajectory" parameter in this wave is ignored: UFOs fly in a straight trajectory to attack the base. This opens up the possibility to make several waves to attack the player's base, between which there can be normal waves searching for the player's base.
Code: [Select]
alienMissions:
  - type: STR_ALIEN_RETALIATION
    points: 0
    objective: 4
    spawnUfo: STR_BATTLESHIP
    waves:
      - ufo: STR_BATTLESHIP
        count: 1
        trajectory: P8
        timer: 3000
      - ufo: STR_BATTLESHIP
        count: 2
        isRetaliationWave: true        # false by default
        trajectory: P8
        timer: 3000
      - ufo: STR_BATTLESHIP
        count: 3
        trajectory: P8
        timer: 3000
    raceWeights:
      0:
        STR_SECTOID: 20
        STR_FLOATER: 20

Pages: [1] 2