aliens

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
1
You can now define events, that won't be "scheduled", but will pop up instantly for selected triggers:

1. `successEvents` = mission success
2. `failureEvents` = mission failure (does NOT include mission site despawn)
3. `despawnEvents` = mission site despawn

Each attribute is a weighted list.
One item is picked from the list randomly (considering weights).

Example:

Code: [Select]
alienDeployments:
  - type: STR_TERROR_MISSION
...
    successEvents:
      STR_TEST_EVENT1: 100
    despawnEvents:
      STR_TEST_EVENT2: 50
      STR_TEST_EVENT4: 50
    failureEvents:
      STR_TEST_EVENT3: 100
...

2
All 3 script types now have access to 3 different kinds of counters:

1. mission script `varName` counter... you can find it under `alienStrategy:` in the save file

2. global object counter... you can find it under `ids:` in the save file
- this contains the number of various generated game objects, most notably mission markers

3. custom global object counter... this is also under the same `ids:` in the save file
- this contains modder-defined counters, that can increase or decrease after mission success/failure/despawn

The `varName` can be accessed via `missionVarName`.
Global counters (both default and custom) can be accessed via `missionMarkerName`.

The counter is then compared against the limits defined via `counterMin` and `counterMax`.

IMPORTANT: please note that `ids:` in the save file hold a value of the counter plus 1. For example if the game generated 2 terror site, the save will contain `STR_TERROR_SITE: 3`.

Example for an event script (same syntax is valid for mission scripts and arc scripts):

Code: [Select]
eventScripts:
  - type: STR_TEST
...
    missionVarName: shippingLanes           # varName from mission scripts
    missionMarkerName: STR_TERROR_SITE      # marker name from alien deployment
    missionMarkerName: CUST_TERROR_SUCCESS  # custom counter name from alien deployment
    counterMin: 3
    counterMax: 3                           # -1 = infinity/unlimited
...

Please only use one of the `missionVarName` and `missionMarkerName` at a time; they share the `counterMin` and `counterMax` values.
Default for `counterMin` is 0 (zero).
Default for `counterMax` is -1 (unlimited).

3
OpenXcom Extended / [DONE][Suggestion] More constraints on craft crew
« on: January 09, 2022, 08:08:51 pm »
Craft ruleset now has 8 more fields:
`maxSmallSoldiers` = maximum allowed number of 1x1 soldiers, default -1 (unlimited)
`maxLargeSoldiers` = maximum allowed number of 2x2 soldiers, default -1 (unlimited)
`maxSmallVehicles` = maximum allowed number of 1x1 vehicles, default -1 (unlimited)
`maxLargeVehicles` = maximum allowed number of 2x2 vehicles, default -1 (unlimited)
`maxSmallUnits` = maximum allowed number of 1x1 soldiers and 1x1 vehicles, default -1 (unlimited)
`maxLargeUnits` = maximum allowed number of 2x2 soldiers and 2x2 vehicles, default -1 (unlimited)
`maxSoldiers` = maximum allowed number of 1x1 soldiers and 2x2 soldiers, default -1 (unlimited)
`maxVehicles` = maximum allowed number of 1x1 vehicles and 2x2 vehicles, default -1 (unlimited)

Of course there are still the two existing fields:
`soldiers` = total of all imaginable units, default 0
`vehicles` = all units minus 1x1 soldiers (i.e. 1x1 vehicles, 2x2 vehicles and 2x2 soldiers), default 0

4
OpenXcom Extended / [DONE] AoE explosion animation radius
« on: January 02, 2022, 10:20:33 am »
Small question:
When we use "FixRadius: 1" for super-powerful weapon, the explosion animation still showed over whole screen, not just normal blast. Is it intended?

It's both intended and not. Kinda. Hard to say.

But it is a thing that could use more modding options.
I will add something in the next release... just need to figure out what exactly.
Stay tuned.

5
In OpenXcom, all site type missions (the ones with `objective: 3`) work only with point areas (representing cities).

Since OXCE v7.3, it is now possible to use also non-point (i.e. rectangular) areas and the exact mission site coordinates will be chosen randomly from that rectangle area.

Please note that for mission sites spawned directly, the entire area is considered valid and no additional checks are performed:
- no check for ocean texture
- no check for fake underwater texture
- no check for being inside the region

For mission sites spawned from a landed UFO (only since OXCE v7.3.3), there are additional checks performed if `objectiveOnTheLandingSite: true` (see below)
- check for ocean texture is done
- check for fake underwater texture is done
- but the check for being inside the region is not done (intentionally)
Note that if a valid landing site is not found after 100 random attempts, UFO will still land (on water or invalid texture).


More technical details below, just copypasted from the source code comments:


// -----------------------------------------------------------
// Summary of mission site spawning algorithms (objective: 3)
// -----------------------------------------------------------

// Type 1:
// - no UFOs involved
// - only 1 wave
// - the wave specifies the alien deployment directly (e.g. `ufo: STR_ARTIFACT_SITE_P1 # spawn this site directly`)
// - example (1): STR_ALIEN_ARTIFACT (TFTD)
// Support for non-point areas: yes, without any additional ruleset changes required

// Type 2:
// - no UFOs involved
// - only 1 wave
// - the wave does NOT specify the alien deployment directly (e.g. `ufo: dummy #don't spawn a ufo, we only want the site`)
//   -> option A: alien deployment is chosen randomly = from the area's texture definition
//   -> option B: alien deployment is specified by the mission's `siteType` (overrides option A if both are defined)
// - example (2A): STR_ALIEN_SHIP_ATTACK (TFTD)
// - example (2B): none in vanilla, only mods
// Support for non-point areas: yes, without any additional ruleset changes required

// Type 3:
// - with UFOs waves
// - only 1 wave with `objective: true`
// - the wave does NOT specify the alien deployment (because it already specifies the UFO type)
//   -> option A: alien deployment is chosen randomly = from the area's texture definition
//   -> option B: alien deployment is specified by the mission's `siteType` (overrides option A if both are defined)
// - example (3A): STR_ALIEN_SURFACE_ATTACK (TFTD)
// - example (3B): none in vanilla, only mods
// Support for non-point areas: yes, but it is recommended to use one more wave attribute: `objectiveOnTheLandingSite: true`
//   -> false: UFO always lands in the top-left corner of the area; site spawns randomly inside the area
//   ->  true: UFO lands randomly inside the area; site spawns exactly on the UFO landing site



Minimum required OXCE version for non-point areas:
------------------------------------------
since OXCE v6.8: support for 2a and partially 3a
since OXCE v7.2.1: support for 3b and 2b, full support for 3a
since OXCE v7.2.2: support for 1

since OXCE v7.3: support for old save conversion (i.e. older saves can be loaded even if modders remove/delete technical mission regions used previously... for example XcomFiles v2.2 and higher)
since OXCE v7.3.3: support for checks for valid land point for site spawns by a landed UFO



Don't hesitate to ask if unclear.


PS: also when defining areas in your mission zones, keep each individual mission zone either with 100% point areas or 100% non-point areas... don't mix them (in some uncommon cases, this will lead to unexpected behavior and/or crashes)

6
OpenXcom Extended / How NOT to ask for help, new features, etc.
« on: December 20, 2021, 02:07:19 pm »
Effective immediately, every question aimed at me, that begins with "Would it be possible to..." will be answered with "Yes." and immediately forgotten.

If you want to suggest something, suggest something.
If you want to request something, request something.
If you want to ask if something is (already) possible, ask if it is possible.
If you want to ask if I like something, ask if I like something.
If you want to ask what do I think about something, ask what do I think about something.
etc.

Don't ask if something would be possible, because 99.999% of things you can think of are technically possible and the question as such is completely pointless.
I cannot read minds (thank God), and cannot guess that you wanted to ask something else.

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

8
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)

9
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.

10
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.

11
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.

12
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.

13
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: https://openxcom.org/forum/index.php/topic,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.

14
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).

15
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.

Added.

Example:

Code: [Select]
items:
  - type: STR_LASGUN
    compatibleAmmo: [STR_LASGUN_CLIP]
    confAimed:
      spendPerShot: 4        # 4x battery consumption for 2x power
      name: STR_BIG_BOOM
    confSnap:
      name: STR_SMALL_BOOM
    tags:
      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.
Example:

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

  scripts:
    hitUnit:
      - 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;
            end;
          end;
          return power part side;


Full sample mod is attached.

Pages: [1] 2 3 ... 10