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 - Meridian

Pages: [1] 2 3 ... 10
Troubleshooting / Fixed `maxRange` calculation for 2x2 player units
« on: March 06, 2021, 04:29:37 pm »
Fixed in OXC nightly build 2021-02-26; and in OXCE v7.0.

The maxRange for 2x2 units was calculated only around the "main" tile of a 2x2 unit.
Now all tiles of a 2x2 unit are considered.

Attached picture illustrates the change:
- pink color = 2x2 unit
- pink and green color = range 1 around the unit
Old behavior on the left, new on the right.

Until now this information was not saved.

Since OXCE v7.0, it is saved as well... which means you don't have to manually reload fixed weapons before each mission... the ammo assigned to the weapon in the base equipment will be remembered and applied automatically.

This applies to:
- automatically saved last equipment layout of a soldier
- temporary soldier templates (hotkeys C and V)
- personal soldier templates (hotkeys S and L)
- global soldier templates (hotkeys F5 and F9)

The saves are backwards-compatible with older OXCE versions and also with OXC.
(meaning the newly saved information is ignored and doesn't cause a crash)

OpenXcom Extended / Info about special weapons saved in the savegame
« on: March 06, 2021, 02:56:08 pm »
Special weapons are weapons that are not part of the unit inventory, for example ALIEN_PSI_WEAPON or STR_LOBSTERMAN_MELEE_WEAPON.

Until now, these weapons were not saved in the savegame.

Since OXCE v7.0, these weapons are also saved.
This means you can make limited-use special weapons (without resetting the remaining ammo when reloading the game), or use script tags.

The saves are backwards-compatible with older OXCE versions and also with OXC.

OpenXcom Extended / User option for multi-slot battlescape autosaves
« on: March 06, 2021, 01:32:19 pm »
You can now have multiple battlescape autosaves (up to 10).

Default is 1.

OpenXcom Extended / New Battle selectors and quick search
« on: March 06, 2021, 12:58:05 pm »
In big mods, it was dificult to find a mission or an alien race in a combobox.

There is now a new option to select from a bigger listbox and also to use quick search.

The new selectors appear when the mod contains more than 22 different missions.

Standard functionality:
- Left mouse button: open selector, select an item
- hotkey Q: activate quick search

Additional functionality for modders:
- Right mouse button: open selector with technical names instead of translations
- Right mouse button: display technical name of the selected item
- Middle mouse button: dsplay translation of the selected item

Attached video illustrates the functions.

OpenXcom Extended / Renamed and reordered scale modes
« on: March 06, 2021, 12:35:11 pm »
To prevent never-ending confusion and frustration with scale modes, I have renamed the scale modes in OXCE v7.0

The new names correspond to the actual functionality behind them and are not translatable, so that they cannot be incorrectly translated.

Options 1x, 2x, 3x, 4x, 5x and 6x correspond to fixed zoom and fill... e.g. 2x is double zoom.
I strongly recommend using these options.

Options 320x200, 480x300 and 640x400 correspond to fixed resolution and stretch.
I strongly advise AGAINST using options 480x300 and 640x400, use them only as the last resort. And probably even then not, just don't use them at all, zoom options above are better in every aspect.

I hope that this small naming change will have a HUGE impact on people's experience while playing this awesome game.

OpenXcom Extended / [Documentation] Touch buttons
« on: March 06, 2021, 12:21:49 pm »
Hi everyone,

on desktops, this functionality is available via keyboard modifiers (Ctrl, Alt and Shift) and mouse buttons (RMB and MMB).

On mobile platforms, some functions are simulated via long press:
- right-click on a base facility
- right-click on a soldier in a craft to open soldier info UI
- right-click to turn a soldier and to open/close doors
- right-click to zeroize the soldier's TUs
- right-click to prime grenades in the inventory

Since OXCE v7.0, many other battlescape functions are also available via on-screen touch buttons.
The touch buttons can be activated via extended links, see:,9506.0.html

The buttons can be used for the following functionality:
- shift: ignore spotted enemies/mutual surprise
- ctrl: running
- ctrl: strafing
- ctrl: force-fire
- ctrl+shift: spray targeting
- alt: cursor damage preview
- alt: motion scanner arrows
- alt: unit facing preview
- alt: temporarily turn off camera following projectiles
- alt: minimap borders preview
- RMB: unit turning
- RMB: door opening
- RMB: next unit icon click = select previous unit
- RMB: weapon click = reaction fire preference (yellow dot)
- ctrl+RMB: tank turret turning
- MMB: unit/alien inventory preview
- MMB: weapon/special weapon click = Ufopedia

Big thanks to robin to the button artwork.

Hi everyone,

on desktops, all this functionality is available via hotkeys.

on mobile platforms (Android, iOS), this was available only via additional software (forced on-screen keyboards).

Since OXCE v7.0, the most frequently used stuff is available also via buttons.
The buttons can be enabled via Options > Advanced > Extended links.
The option is enabled by default on mobile platforms.

There is also a hidden option in options.cfg (`oxceFatFingerLinks`), which can be used to switch between long+thin buttons and short+thick buttons.
On mobile platforms, short+thick buttons are enabled by default.

Modders can change the battlescape and inventory button graphics using sprites called `oxceLinks` (32x16) and `oxceLinksInv` (23x22).

The inventory links are fully available in the base, partially available before the mission (briefing), and not available during the mission.

For debug purposes, the battlescape link `Multi-level View` can be replaced by links to activate debug mode and a link to kill all aliens (requires `debug: true` in options.cfg).

OpenXcom Extended / [DONE][Suggestion] Battery-powered weapons
« on: January 23, 2021, 03:26:41 pm »
Hey Yankee!

I told you something about weapons using different amount of ammo per shot years ago. You said it would be simple but then stopped because it will be hard to change it without something about default game.

So let me repeat what i want to have. Mostly for energy weapons which uses battery like magazines, a weapons should able to use different amount of ammo per shot. So for example you got a heavy laser and it has a low power shot and high power shot.. so high power shot would consumes "3" ammo rather then one. It makes this kind of weapons very special.



Code: [Select]
  - type: STR_LASGUN
    compatibleAmmo: [STR_LASGUN_CLIP]
      spendPerShot: 4        # 4x battery consumption for 2x power
      name: STR_BIG_BOOM
      name: STR_SMALL_BOOM
      BPL_AIMED_2X_POWER: 1  # custom script

I've been thinking about a similar option for the lasguns in the 40k mod - all of them should, for the most part, use the same power cell, but one of the more rare variants should use more energy charges per shot and do more damage.

One possible way of doing this would be to use a "onFiring" script that Yankes has been experimenting on. The weapon doesn't actually fire the ammo, but the loaded ammo is checked on firing with this script and consumed to give the shot more power. That way either certain shot types or different weapons could consume the energy cell faster or slower depending on how the script is written.

"onFiring" script is not easy, and not very well definable either.
I've added bullet consumption via ruleset; tested only on player-controlled units so far.

Help testing on AI would be appreciated.

The second part can be solved via standard "hitUnit" script.

Code: [Select]
# Battery Powered Lasgun script by Meridian
      BPL_AIMED_2X_POWER: int

      - offset: 0.1
        code: |
          var int temp;
          if eq battle_action battle_action_aimshoot;
            weapon_item.getTag temp Tag.BPL_AIMED_2X_POWER;
            if neq temp 0;
              # debug_log "hitUnit: yo, double up!";
              mul power 2;
          return power part side;

Full sample mod is attached.

OpenXcom Extended / Configuration for UI window backgrounds
« on: January 09, 2021, 02:21:55 pm »
Added also alternative background image for windows that can be displayed both in geoscape and battlescape, e.g.
- soldier armor UI
- soldier avatar UI
- select music UI
- abandon game UI
- notes UI
- save/load UI
- etc.


Code: [Select]
  - type: soldierArmor
    backgroundImage: BACK14.SCR     # geoscape background
    altBackgroundImage: TAC00.SCR   # battlescape background

Missions as you now them from xcom2012.

1. "Escort the VIPs" - you need to escort VIPs to exit area; killing all enemies is not enough

2. "Protect the VIPs" - you need to protect the VIPs; killing all enemies ends the mission, but if you didn't save enough VIPs it will count as failure

"Escort the VIPs" sample:

Code: [Select]
    vip: true
    escapeType: 2                                    # craft/entry tiles serve as exit
    vipSurvivalPercentage: 100                       # all VIPs must survive
    missionCompleteText: "STR_MARAZUKI_SUCCESSFUL"   # if he escapes (and at least 1 xcom unit with him)
    missionFailedText: "STR_MARAZUKI_FAILED"         # anything else happens
    abortPenalty: 0                                  # must be 0 since mission can only be finished by aborting

More description on how to make the VIP a player-controlled summoned unit:,6535.0.html

More description how to recover VIPs as scientists, engineer, custom soldiers, items, etc:,5185.msg134201.html#msg134201

"Protect the VIPs" sample:

Code: [Select]
    escapeType: 0                                    # no need to escape, just defend them
    markCiviliansAsVIP: true                         # just mark all civilians as VIPs, alternatively you could only mark some of them using unit-level vip flag as seen in the above example (Dr. Marazuki)
    vipSurvivalPercentage: 10                        # at least 10% of VIPs must survive
    missionCompleteText: "STR_XXX_SUCCESSFUL"        # if you win and enough VIPs survive
    missionFailedText: "STR_XXX_FAILED"              # anything else happens
    abortPenalty: 5000                               # so that aborting on turn 1 is discouraged :)

OpenXcom Extended / Options to disable some ugly and hated OXCE features
« on: November 22, 2020, 04:01:23 pm »
In options.cfg, but modders can also disable them via fixed user options.

Code: [Select]
  oxceDisableAlienInventory: false
  oxceDisableHitLog: false
  oxceDisableInventoryTuCost: false
  oxceDisableProductionDependencyTree: false
  oxceDisableStatsForNerds: false
  oxceDisableTechTreeViewer: false

OpenXcom Extended / [EXPERIMENTAL] Melee terrain damage
« on: October 08, 2020, 03:55:28 pm »
Latest OXCE nightly has a feature that allows melee weapons to destroy terrain.

Can be enabled using the following ruleset:

Code: [Select]
  extendedTerrainMelee: 4    # 0 = turned off;  1 to 11 turned on (higher number means that it only applies to taller objects/walls)

Code: [Select]
  Compass directions

         W  /\  N
           /  \
           \  /
         S  \/  E

How it works:
- if there is no unit to attack, game tries to find a wall or an object to attack (floors cannot be attacked)
- only N/W/S/E attack directions are supported; diagonal NW/SW/NE/SE directions are not supported
- only 1x1 units can perform such attack, 2x2 units are not supported 2x2 units are also supported since OXCE v6.8.3
- only the player can use it, AI is not capable of using it
- the game first tries to find a wall, if not found then tries to find an object:
1. North direction: first North wall on the same tile, then object on next tile
2. East direction: first West wall of next tile, then object on next tile
3. South direction: first North wall of the next tile, then object on the next tile
4. West direction: first West wall on the same tile, then object on the next tile
- walls that don't block movement (e.g. rubble walls) are ignored... with the exception of doors and UFO doors
- objects and walls that are not tall enough are ignored... minimum height is defined using `extendedTerrainMelee` global constant
- terrain melee never misses; and doesn't support scripting of melee accuracy
- if the attacker is on elevated terrain of height 16 voxels or more (e.g. upper part of stairs), the attack is performed as if the attacker was one tile higher
- damage to terrain is calculated using standard terrain damage formulas, see: `TileDamageMethod`, `ToTile` and `RandomTile` attributes in the ruleset reference:
- (if you didn't know already) terrain damage is all or nothing, terrain doesn't have any HP that could be decreased by multiple attacks

- for melee weapons, if primary damage type has ToTile = 0.0, terrain melee is not attempted (e.g. stun rod)
- for other weapons (e.g. rifle gunbutt), if secondary (melee) damage type has ToTile == 0.0, terrain melee is not attempted

`extendedTerrainMelee` refers to 12 LOFTemps of map tile parts, see attached picture.
(btw. each LOFTemp is 2 voxels high, for a total of 24 voxels in one tile)

Constructive feedback welcome.

Tests welcome:

I don't even know what to write about this...

It allows XCOM dudes that have built-in non-fixed weapons to have 2 weapons equipped, just like aliens and civilians.

Code: [Select]
    allowTwoMainWeapons: true        # default false

OpenXcom Extended / Added 'unmanned' UFO flag
« on: May 14, 2020, 07:07:40 pm »
Unmanned UFOs (e.g. missiles, drones, etc.) cannot crash land after dogfight and cannot be forced to land by a tractor beam. They fight until 0% HP (not 50% HP).


Code: [Select]
    unmanned: true

Pages: [1] 2 3 ... 10