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

Pages: [1]
1
Offtopic / Marines vs Aliens (Working Title)
« on: March 30, 2020, 01:31:03 pm »
Yes, yet another turn-based, squad tactics game  ;D

I saw the really great thread of nikita_sadkov and thought I might post my own little side-project here. This is in no way as complicated as his project is or openxcom.

I will start off with what I do not want to do.

This is not a X-Com game and not a simulation.
No 3D or projectile ballistics.
No isometric graphics.
No complicated animations.

Inspiration for this project comes from the tabletop game "Space Crusade".

Also I saw a stream where someone was playing the video game adaption of the board game on the amiga and mentioned how cool it would be to have that on his tablet.

This lead to the main goal: A "Space Crusade" style (without the GW IP!) tactical board game for mobile devices with a hot-seat mode.

I also had modding in mind when starting this project and so I blatantly copied the YAML file modding mechanism from OpenXcom because it is so damn clever ;)

Since I want to do game mechanic development and not engine development, I am using Unity for this project. I am also more used to C# than C/C++. Still, kudos to all the C++ warriors doing their game engines with SDL.

What is working right now?

 - Read rules from YAML files
   - Rules for factions
   - Rules for units
   - Rules for weapons
   - Rules for maps
   - Rules for deployment of units
 - Turns for unlimited faction
 - Small unit movement and attacking
 - Doors
 - Pathfinding
 - Field of View calculation
 - Basic UI
 - Area of Effect weapons
 - Weapon targeting preview
 - Usability on mobile devices (testing on iPad)
 - Basic Hot-Seat gameplay (No win or lose conditions yet ;))

Here are some screenshots of the current state:

----


I am currently ironing out the quirks with big unit movement. Most problems are solved, but one is still there.
You can see it in the second screenshot. My big units have a list of relative grid positions (eg. for a 2x2 it is [0,0],[1,0],[0,1],[1,1]) which are relative to the position I use for referencing the unit. Currently my path preview uses that one square and just puts the other relative positions around it and then highlights them all. This, of course, has the problem which is visible above. If I want to move exactly one square to the north, I can't click there, because an occupied position is no valid click target. It is also not elegant, I really want the user to be able to click the tile to the north and the preview to adjust accordingly. I believe OXC has the behaviour I am looking for, so if I do not find a solution myself I might peek at the source ;)

2
Released Mods / [OXCE][BETA][MAJOR] Vigilo Confido
« on: March 18, 2020, 09:54:36 pm »

Survive. Adapt. Win.

A demake of the remakes - This partial conversion includes the complete EU2012 story line and lets you play through it using OpenXcom. It also adds an extensive class and skill system, thus completely changing the experience.

Mod.io page: https://openxcom.mod.io/vigilo-confido

The mod is feature complete and definitely playable but has only seen testing by me.

=== Features ===

 - 5 soldier classes (Ranger, Grenadier, Specialist, Sniper, Psi Operative)
 - ~50 scripted abilities with unique skills for each class
 - 500+ callsigns for each soldier class
 - 8 new alien units (Cyber Floater, Thin Man, Berserker, Armored Muton, Sectopod Drone, Muton Elite, Andromedon, Outsider)
 - 3 new weapon types in T1, T2 & T3 versions (Swords, Shotguns, Sniper Rifles)
 - Complete new graphics for all T2 & T3 weapons and armors
 - Complete rebalancing of all weapons, armors, units and deployments
 - Status, day & night and hit indicators
 - Laser weapons not reasearchable from the start
 - Laser weapons need recharging and can implode in the field
 - Limited Explosives
 - No Tanks (But the Gremlin drone instead)
 - Bring home alien weapons and research them for progress
 - Ground deployment added with a small research tree for squad size
 - "Killing Aliens destroys their Weapons" option is fixed
 - Additional status effects & Visualisations
 - Weapons can be disabled in combat
 - A buttload of maps (thanks to C.M.P)
 - Training rooms
 - Integrated the Commendations mod
 - Passive bonus items (S.C.O.P.E., etc.)

=== Requirements ===

OpenXcom Extended (OXCE) 6.4

Download release versions of OXCE here:
https://openxcom.org/oxce/release/

NOTE: For the intended experience, make sure you have sound turned on and the intro animation enabled.
At least on your first start.

=== Quickstart (via Ufopedia) ===

You can find information about the classes and their skills in the Ufopedia
under the "MILITARY MOLDING" category.

The changes on weapons and armors can be found under the "WEAPONS AND EQUIPMENT" section.

The category "MISSION OBJECTIVES" will always contain an entry with your current objectives.

=== Goals and influences ===

This started out as some experiments with Yankes scripts and soon got out of hand.
I wanted to have skills, like in the remakes and wanted to see which ones I could do.
Turns out I can do most of them.

So this then turned into a more complex mod with a class and skill system at its core and
with mechanical influences from the remakes (EU2012/XCOM2 and Phoenix Point).

My goal is to extend the vanilla X-Com experience with some
mechanics, items, units & lore references from the newer X-Com titles.

While my focus is on the class & skill system, I also completely rebalanced the
weapons and armors and some other gameplay elements.

I also want to try to add only graphics which keep the X-Com style and which harmonize
with the existing graphics. Each tier of items should be visually distinguishable.

Many thanks to XOps and his Xeno Operations for most of the graphical enhancements.
When looking through his modification of the game, I realized we shared many common goals
and it felt like his work was made with the same visual vision as my mod.

=== Concepts ===

Soldiers of each class can be hired directly by X-COM.
Soldiers can choose to undergo the military molding process, gaining access to their class skills in the process.
Classed soldiers receive additional active and passive skills for each level of training.
The active ones are activated with the special icon and the passive ones are always active.

There are three training phases. The initial molding process is awarded to soldiers when they are
hired by X-Com. The Second Phase (or Advanced Training) and Third Phase (or Elite Training)
add additional skills respectively.

Advanced level training requires: The second "Combat Experience" decoration,
which is awarded for 4 kills and 8 missions.

Elite level training requires: The fourth "Combat Experience" decoration,
which is awarded for 10 kills and 16 missions.

=== Skills ===

For a list of the currently implemented skills per class please refer to the file
Rulesets/classSkills.rul line 10, heading "Class Skill list".

There is also in-game description available in the Ufopedia (if you don't want to read some spoilers..).

=== Tiers ===

Weapons and armors all follow the three Tier concept.

T1 is available from the start.

T2 depends on alien alloys.
 - You should aim at researching "Laser Weapons" and "Predator Armor" until April.

T3 depends on Elerium-115.
 - You should aim at researching "Plasma Weapons" and "Warden Armor" until August.

Armor & Weapon Tiers
T1 - Kevlar Armor   & Conventional Weapons
T2 - Predator Armor & Laser Weapons
T3 - Warden Armor   & Plasma Weapons

3
Tools / Ruleset tools for the command line
« on: March 17, 2020, 11:08:38 am »
I will dump some tools I use for modding here.

They need Python3 and ruamel.yaml installed.

Install ruamel.yaml:
Code: [Select]
pip install ruamel.yaml

DISCLAIMER: These tools come as is, no warranty. If they wreck your rulesets, you have been warned. Try them on copies first. Have backups.

rul2csv - extract information from rulesets as CSV

Usage:

Code: [Select]
rul2csv "TOPLEVELKEY:FIELDNAME1(,...)" FILENAME_OR_DIRECTORY
Where the fieldnames support lists and key/value pairs with the following syntax:

Code: [Select]
SUB.FIELDNAME for key/value pairs
SUB-FIELDNAME for lists

You can override the automatic id-field detection by specifying it on the toplevel key like this (eg. for research):
Code: [Select]
TOPLEVELKEY-IDFIELD: FIELDNAME1,..

Example usage:

Code: [Select]
rul2csv "items:power,clipSize,confSnap.shots,confAimed.shots,damageAlter.ArmorEffectiveness,tags.GUN_TYPE,tags.CRIT_CHANCE" .

rul2csv "research-name:points,cost" . > csv_data/research.csv

rul2csv "armors:frontArmor,sideArmor,rearArmor,underArmor,damageModifier-none,damageModifier-projectile,damageModifier-incendiary" . > csv_data/armors.csv


Example Output

Code: [Select]
$ cat test1.rul
items:
  - type: STR_PISTOL
    power: 10
    accuracy: 20

$ rul2csv "items:power" test1.rul
type,power
STR_PISTOL,10

csv2rul - Creates rulesets from CSV data

Usage:

Code: [Select]
csv2rul items.csv

Example Usage:

Code: [Select]
$ csv2rul items test.csv
items:
  - type: STR_PISTOL
    power: 10

mergerules - Merges multiple rule files using one top-level key

Code: [Select]
mergerules items file1.rul file2.rul file3.rul (...)
mergerules items path

Example Usage:

Code: [Select]
$ cat test1.rul
items:
  - type: STR_PISTOL
    power: 10
    accuracy: 20
$ cat test2.rul
items:
  - type: STR_PISTOL
    power: 100
    tuCost: 15
$ mergerules items test1.rul test2.rul
items:
  - type: STR_PISTOL
    power: 100
    accuracy: 20
    tuCost: 15

splitrules - Split rule item lists in two, defined by some fields

Usage:

Code: [Select]
splitrules [OUTPUTMODE] "TOPLEVELKEY:FIELDNAME1(,...)" filename.rul

Example usage:

Code: [Select]
$ mergerules items test1.rul test2.rul > merged.rul
$ splitrules "items:power" merged.rul
items:
  - type: STR_PISTOL
    accuracy: 20
    tuCost: 15
------------------------------------
items:
  - type: STR_PISTOL
    power: 100
$ splitrules 1 "items:power" merged.rul
items:
  - type: STR_PISTOL
    accuracy: 20
    tuCost: 15
$ splitrules 2 "items:power" merged.rul
items:
  - type: STR_PISTOL
    power: 100

patchrules - Modify existing ruleset with delta from CSV

Usage:

Code: [Select]
patchrules TOPLEVELKEY patchData.csv targetRules.rul

Exmaple Usage:

Code: [Select]
$ cat merged.rul
items:
  - type: STR_PISTOL
    power: 100
    accuracy: 20
    tuCost: 15
$ cat test.csv
type,power
STR_PISTOL,66
$ patchrules items test.csv merged.rul
items:
  - type: STR_PISTOL
    power: 66
    accuracy: 20
    tuCost: 15

4
OXCE Suggestions DONE / [Documentation] Soldier Skill Menu
« on: March 03, 2020, 01:01:13 pm »
Soldier Skills Docs

So, there is a new feature in OXCE: Soldier Skill Menus.

It allows for skill menu to be defined via rulesets. An icon will be displayed, for soldier types which have skills assigned, in the battlescape, where the the special weapon icon is, in the top right corner. This of course means, that only one of these icons can be shown at the same time. So no special weapon icon and skill menu item at the same time.

So what is a skill as defined in this feature?

A skill is a battlescape action that can be selected through the skill menu and is usually tied to an item. So a skill menu entry can act as any item action.

But a skill can also be used as a trigger for a script, using the new "skillUseUnit" script hook.

As opposed to item usage, skills can have a zero TU activation cost, but need at least a non-zero mana cost then. So no zero cost skills, it's at least some TU or some Mana for activation.

Since skills are a distinct object in terms of the rulesets, they can also have tags and scripts assigned to them.

Here is a small ruleset example which I will discuss:

Code: [Select]
mana:
  enabled: true
  battleUI: true
  trainingPrimary: false
  trainingSecondary: false
  replenishAfterMission: true

skills:
  - type: STR_RUN_AND_GUN # script activated
    tags:
      SKILL_ID: 1
    costUse:
      time: 0
      mana: 12
    flatUse:
      mana: true
  - type: STR_SLASH
    tags:
      SKILL_ID: 2
    costUse:
      time: 5
      mana: 5
    flatUse:
      mana: true
    targetMode: 10
    compatibleWeapons: [STR_STUN_ROD, STR_ALLOY_SWORD]
  - type: STR_HEAL
    tags:
      SKILL_ID: 3
    costUse:
      time: 5
      mana: 6
    flatUse:
      mana: true
      time: true
    compatibleWeapons: [STR_MEDI_KIT]
    checkHandsOnly: true
  - type: STR_RAPID_FIRE
    tags:
      SKILL_ID: 4
    costUse:
      time: 50
      mana: 5
    flatUse:
      mana: true
      time: false
    targetMode: 7 # auto
    battleType: 1 # firearms
    requiredBonuses: [STR_MY_SOLDIER_BONUS1, STR_MY_SOLDIER_BONUS1]
  - type: STR_REAPER # script activated
    requiredBonus: [STR_RANGER_ELITE_BONUS]
    isPsiRequired: true
    tags:
      SKILL_ID: 5
    costUse:
      time: 0
      mana: 12
    flatUse:
      mana: true

soldiers:
  - type: STR_SOLDIER
    minStats:
      mana: 100
    maxStats:
      mana: 100
    statCaps:
      mana: 100
    skillIconSprite: 1
    skills:
      - STR_RUN_AND_GUN # script activated
      - STR_SLASH
      - STR_HEAL
      - STR_RAPID_FIRE
      - STR_REAPER # script activated

items:
  - type: STR_RIFLE
    tuAuto: 0
    confAuto:
      shots: 4

extended:
  tags:
    RuleSkill:
      SKILL_ID: int
  scripts:
    skillUseUnit:
      - offset: 22
        code: |
          var int skill_id;

          skill.getTag skill_id Tag.SKILL_ID;
         
          battle_game.flashMessage "SkillUse triggered {0} {1}" skill_id have_tu;

          if eq have_tu 0;
            debug_log "No Resources. Aborted.";
            set continue_action 0;
            return;
          end;

          # do stuff here

          return;

So, I start out with enabling mana, since I will use that resource for some of the scripted skill activations.

Then there is a new block "skills:", which will globally define all skills which are available.

We have: name (type), tags, cost of use and the flags for flat vs. percentage. All of these attributes should be well known from item definitions.

One of the most important attributes is called "targetMode". This tells the game which battleaction will be carried out and what kind of targeting behaviour should occur. So let's talk about them for a bit.

There are:
Code: [Select]
# 0   = No target needed (Just activation, script takes over) - BA_NONE
# 10  = Melee Range Targeted (1 Tile) - BA_HIT
# mul = Firearm (Default firarm targeting) - SNAP = 8, AUTO = 7, AIMED = 9
# mul = Psi Targeting (Default PSI Targeting, with or without LOS) - BA_USE = 11, BA_MINDCONTROL = 13, BA_PANIC = 14
# 6   = Thrown Targeting (Default Thrown targeting, uses throwing arc) - BA_THROW
# 12  = Waypoint Targeting (Default blaster launcher targeting) - BA_LAUNCH

0 is the one you want to use for completely scripted skills.
All the other modes will tell the game to switch to a specific targeting behaviour you will know from the weapons already in the game.

Every targetMode, except mode 0, expects an item to present in order to work. After all, a melee action needs at least a stick and if you want to fire a gun.. you better have one.

There are currently two ways to tell the game which item to use: "compatibleWeapons" and "battleType".

"compatibleWeapons" takes a list of item names and will look for them in the hands of the respective soldier and will use the first weapon it finds.
There is a switch called "checkHandsOnly", defaulting to true, which you can switch off, in order to enable the skill to search through the whole inventory of the soldier for a compatible weapon. When "checkHandsOnly" is disabled, also special weapons of the soldier will be checked, this can be used to great effect.

You can also define a compatible "battleType":

Code: [Select]
0 - None (Geoscape-only item)
1 - Firearm
2 - Ammo
3 - Melee
4 - Grenade
5 - Proximity Grenade
6 - Medi-Kit
7 - Motion Scanner
8 - Mind Probe
9 - Psi-Amp
10 - Electro-flare
11 - Corpse

And the skill would look through the soldiers inventory (this time ignoring checkHandsOnly) for an item which matches the battletype and will use the first one it finds. This is currently the only check carried out, so it won't check if the specified targetMode is available, for example.

Now we have some skill defined, what can we do with them?

You can see, that the "soldiers:" section in the ruleset allows for two new attributes: "skillIconSprite" and "skills".

"skillIconSprite" works just like "specialIconSprite" with the same syntax and semantic just applying to the soldier type's skill menu.

"skills" is a list of names of skills this soldier type should have available. There is currently a limit of 5 skills so don't expect more entries than this to show up.

I have also included a rifle item to show what skills can do: You may notice that I disabled auto-shot on the rifle by assigning a TU cost of zero. That means it won't be selectable by the player when he clicks on his gun. But a skill can still use that action: The "STR_RAPID_FIRE" skill defined above has its "targetMode" set to auto and will use any item with a "battleType" of firearm. So if a player has the rifle equipped and activates that skill, the auto shot of the rifle will be triggered. The action costs will be as defined by the skill.

This is already pretty powerful, but with some additional scripting, even more can be done.

There is a new script called "skillUseUnit" which receives the unit currently acting ("actor"), the selected "battle_action" the item being used (if any) and the skill itself which triggered the script.

The script implementation itself can now decide wether to spend the TU for the action and carry on or not to spend any TU and cancel the action.

This enables scripts to act as a battle action in their own rights and is a useful addition to a modder's toolkit.

Additionally, the "hitUnit" and "damageUnit" script now also receive a reference to the script which initiated the action, if applicable. Thus enabling skill based "on hit" and "on damage" effects.

Hope I covered everything, questions please  8)

5
OXCE Suggestions DONE / [Documentation] Show Soldier type in inventory
« on: February 04, 2020, 10:44:18 pm »
H there, today a new OXCE feature was merged and will become available in future builds.

With the following flag set in your ruleset, the soldier type of your soldiers will be displayed in the inventory screen.

Code: [Select]
soldiers:
  - type: STR_HEAVY
    showTypeInInventory: true

The type name will be displayed as a prefix to the armor name tooltip when you hover over the armor of the soldier in the inventory screen.

6
Hi there,
a new OXCE feature has been merged and will become available in future builds: New targeting options for the PSI Amp.

You can now define which factions can be targeted with the PSI Amp.

An example looks like this:
# 1 = player, 2 = hostile, 4 = neutral

Code: [Select]
items:
  - type: STR_FRIENLDY_FIRE_PSI_AMP
    psiTargetMatrix: 1    # 1= player faction only, defaults to 6 (hostile + neutral)

This would define a PSI Amp which can target only allied units. You can disallow targeting of your own or other factions explicitly with this.

7
OXCE Suggestions DONE / [Documentation] SpecialWeapons per Soldier Type
« on: February 04, 2020, 10:35:12 pm »
Three days ago a new OXCE Feature was merged, allowing for special weapons on soldiers.

A ruleset example would look like this:

Code: [Select]
soldiers:
  - type: STR_HEAVY
    specialWeapon: STR_ROCKET_LAUNCHER

8
Enables scripts to communicate strings with integer values back to the user using the battlescape warning text feature.

Example usage, display hit information:

Code: [Select]
extended:
  scripts:
    damageUnit:
      - offset: 99
        code: |
          if gt to_health 0;
            battle_game.flashMessage "STR_DAMAGE_DEALT" to_health to_armor;
          end;
          return;

extraStrings:
  - type: en-US
    strings:
      STR_DAMAGE_DEALT: "HP: {0} / Armor: {1}"

9
OXCE Suggestions DONE / [Documentation] Moddable Callsigns
« on: January 26, 2020, 07:55:26 pm »
Hi folks,

another recent feature that has been added to OXCE are callsigns (soldier nicknames).

They are implemented as an extension to the *.NAM files used for soldier naming.

It will now be possible to specify a list of callsigns for males and females from which the game randomly assigns to the soldiers.

An American.nam file could look like this:

Code: [Select]
lookWeights: (...)
maleFirst: (...)
femaleFirst: (...)
maleLast: (...)

maleCallsign:
  - "Odin"
  - "Papa Bear"
  - "Yeti"
  - "Moose"
  - "Kong"

femaleCallsign:
  - "Athena"
  - "Mama Bear"
  - "Goose"
  - "Peach"

Callsigns can additionally be specified by nationality, just like names.

There are however two fallback mechanisms:
  • If no female callsigns are defined, male ones are used for both genders.
  • If no callsigns are found for a given nationality, the first defined nationality is used. Depends on load order.

The fallbacks make it possible to define one set of callsigns to be used for all soldiers, regardless of gender or nationality or specify them based on these criterias.

The current implementation displays the callsign in the battlescape if they are enabled. To enable them, they just have to be defined in the *.NAM file.

You can switch between the classic name + statstring display and the callsign by right-clicking the soldier stat area in the bottom.

I have attached a small sample mod, that adds some callsigns for testing purposes.

10
OXCE Suggestions DONE / [Documentation] New Script hooks / data access
« on: January 26, 2020, 07:33:17 pm »
So, I have the honor to present some new features which have been added to OXCE ModScripts.

  • Getters for BattleUnit position - Enables scripts to check distances and allows for Area-of-Effect
  • getTurnsSinceSpotted exposed to scripts - Allows to check if enemies have spotted this unit
  • TimeUnits spent for action now exposed to scripts - Example use case: (Partially) refund TU for an action
  • New healUnit script hook - Gets executed whenever a medikit is used

Example script for BattleUnit position:
Code: [Select]
    newTurnUnit:
      - offset: 31   # for aim
        code: |
          var int is_kneeling;
          var int pos_x;
          var int pos_y;
          var int pos_z;
          var int aim;
          var int kneeling;
          if eq side 0; # xcom turns
            unit.getTag aim Tag.AIM_STATE;
            unit.isKneeled kneeling;

            if and gt aim 0 gt kneeling 0;
              unit.getPosition.getX pos_x;
              unit.getPosition.getY pos_y;
              unit.getPosition.getZ pos_z;

              unit.setTag Tag.AIM_STATE 2; # was kneeling at the beginning of the turn
             
              unit.setTag Tag.AIM_X pos_x;
              unit.setTag Tag.AIM_Y pos_y;
              unit.setTag Tag.AIM_Z pos_z;
            end;
          end;
          return;

Example Script for getTurnsSinceSpotted

Code: [Select]
    hitUnit:
      - offset: 32   # for shadowstrike
        code: |
          var int camo_state;
          var int shadowstrike_state;
          var int turns_since_spotted;
          var int temp;

          attacker.getTag camo_state Tag.PHANTOM_STATE;
          attacker.getTag shadowstrike_state Tag.SHADOWSTRIKE_STATE;
          if and gt shadowstrike_state 0 gt camo_state 0;
            attacker.getTurnsSinceSpotted turns_since_spotted;
            if or eq turns_since_spotted 255 le turns_since_spotted -1;
              # shadowstrike activate
              debug_log "Shadowstrike Crit Chance (inc.):" shadowstrike_state;
              attacker.getTag temp Tag.CRIT_CHANCE_NEXT_HIT;
              add temp shadowstrike_state;
              attacker.setTag Tag.CRIT_CHANCE_NEXT_HIT temp;
            end;
          end;
          return power part side;

Example code for Action TimeUnits

Code: [Select]
    hitUnit:
      - offset: 37   # for guardian
        code: |
          var int guardian;
          var int activation_chance;
          var int turn_side;
          var int action_time_units;
          var int current_time_units;

          set activation_chance 50;
          battle_game.getTag turn_side Tag.TURN_SIDE;

          attacker.getTag guardian Tag.GUARDIAN_STATE;

          if and gt guardian 0 eq turn_side 1; # guardian only activates on enemy turn
            battle_game.randomChance activation_chance;
            if gt activation_chance 1;
              damaging_item.getActionCost.getTimeUnits action_time_units attacker battle_action;
              attacker.getTimeUnits current_time_units;
              add current_time_units action_time_units;

              attacker.setTimeUnits current_time_units;
              debug_log "Guardian Activated! Reaction TU refunded.";
            end;
          end;
               
          return power part side;

Example code for healUnit

Code: [Select]
    healUnit:
      - offset: 24   # for savior
        code: |
          var int savior;
          var int health_to_heal;

          actor.getTag savior Tag.SAVIOR_STATE;

          if gt savior 0;
            if eq medikit_action_type 1; # heal
              debug_log "Savior activated.";
              debug_log " - Health recovered (org.):" health_recovery;
              set health_recovery savior;
              debug_log " - Health recovered (adj.):" health_recovery;
            end;
          end;

          return;

11
OXCE Wishlists / memmaker's wishlist
« on: January 23, 2020, 10:48:15 am »
So I will drop this here in order to find out which of these features might one day become reality and which ones would get flagged as "Never ever" by our Devs. I am also interested in helping the implementation, if I am able to.

So here we go:
Code: [Select]
# memmaker's oxce/modscript wishlist:
# - Ability to change the map from scripts
# - Ability to overlay tiles with bitmaps/animations from scripts
# - Ability to count visible units from scripts (eg. BattleUnit.getVisibleUnits.getLength)
# - Script Hook for missed shots? I want to know when a soldier fired but didn't hit his target.
# - Script Hook for movement? I want to know if a soldier has moved this turn or not.
# - A reference to the current weapon being used in the accuracyMultiplierBonusStats hook
# - Which faction's turn is it? Expose TURN_SIDE or sth. on BattleGame.
# - Ability to spawn units and items at will from scripts
# - A submenu on soldier transformation screens?
# - Allow specialWeapon on soldiers (currently only possible on armor)
# - Force explosions/fire/smoke from scripts
# - Force a unit to move from scripts
# - Force a unit to fire from scripts
# - Force a unit to use an item from scripts
# - Enable changing armor during missions
# - Enable scripts to make aliens forget XCOM units, effectively reverting being spotted and making the concealed again.
# - getUnitById, getItemById, etc. for scripts
# - A switch for the PSI_AMP to allow targeting friendly units.
# - A better way to define general use actions (preferably also more than one per item) than to use a self-targeting medikit.
# - Allow scripts to display text messages in the battlescape

12
Hi folks,

I'd like to have an additional callsign for my soldiers. So that in addition to the name "John Smith" the game would generate a nickname like "Snake" or "Bombshell" for my soldiers. The callsigns could be modded exactly like names currently can: By nationality and gender.

Callsigns would be assigned at random on soldier generation and the current plan is to only display them in the BattleScape if they are defined. Reverting to default behaviour if not.

I am looking for people who support this idea and if there are enough I would go and implement it.

So: Opinions, please  ;D

13
OXCE Support Y-scripts / [Examples] More Y-Script examples
« on: January 07, 2020, 07:52:42 pm »
So, I've been working on some ModScripts for OXCE+ and wanted to share what I have so far.

I am actually aiming for some documentation of the various scripting possibilities but did not yet find the time to write something meaningful. So examples will have to do for know.

I will start of with two of my debug scripts which I used for some damage scaling and understanding how XCOM applies damage. (See attached file debug.rul)

I am using two hooks which are part of the hit and damage calculations: hitUnit and damageUnit.

Both are called in quick succession after each other, every time a unit will potentially receive damage.

The first hook (hitUnit) receives power, part and side and is expected to also return these values. So we have the opportunity to change the power of an attack, the body part which was hit or the side of the armor where the hit connected.

The second hook (damageUnit) has variables for all the damage that is applied after a succesful hit (like to_health, to_armor, to_stun, etc.). Here you can change the amount of damage that is applied to the respective type.

One potential use of this would be a weapon which enables for body part targeting. I have included such an example as bodypart_targeting.rul.

We define three new Tags: AUTO_IS_KNEESHOT, AUTO_IS_ARMSHOT & AUTO_IS_HEADSHOT. When applied to a gun, the scripts will check for that tag on the weapon and apply fatal wounds to the bodypart which has been targeted.

(My meal is getting cold, so I will add more information later..;)

14
OXCE Support / Introduction of myself, Code feedback & questions
« on: December 16, 2019, 01:32:49 pm »
(Hope this board is the right place to post. If not, please move.)

Hi everyone, thanks for this place.

I really like the enthusiasm and spirit here. Also I really respect how much work and love has been put into this old game in order to keep it alive and enhance it.

My first UFO Defense playthrough was finished last week with OXCE as the engine. I had a blast.

So I grabbed my MacBook today (I already know that the X-Piratez Author does despise Apple and I thus cannot play his Mod on my Machine..;P) and downloaded the OXCE source repository in order to browse the code a bit.

And again I am impressed. I was able to compile and launch the project on my second try and it just works.

When reading the source I was pleasently surprised to find it neatly structured and using OOP paradigms, also the UI code looks quite modern and understandable.

Also the space-walkie-talkie and Leeroy comments had me smiling while reading more than once.

Still trying to understand some of the particularities of the code base and thought I might ask some questions here:

Is there some kind of big picture documentation for the source code? I know that the folders already tell a good story and most filenames are self-explanatory, but I wonder if there may be some conventions or concepts I should be aware of while browsing the code.

I found some state-changing code in a class called SavedBattleGame (e.g. fire/smoke spreading), so I guess this class is not just for the savegames (as I first assumed from the name) but does some grunt work for the world space?

Every meaningful state change is accomplished via an Action object instance? Is this true for all states?

I just found the class BattlescapeGame where some really interesting stuff seems to happen. For a quick test I modified the TU cost of the kneel action.

Thanks for all the great work, so that other people like me can have a look and learn and maybe even contribute ourselves.

Pages: [1]