Legion Studios
HomeDiscord
  • Welcome
  • Features
    • Introduction
    • Impulsor
    • Lighting (Headlamps)
    • Active Camo
    • Weapons
      • Attachment Swapping
      • Aim Down Sight Sounds
    • Equipment
      • Rangefinders
    • Vehicle-In-Vehicle Loading
  • Frameworks
    • Introduction
    • Biology
    • Impulsor
    • Lighting (Headlamps)
    • Active Camo
    • Weapons
      • Attachment Swapping
      • Aim Down Sight Sounds
    • Equipment
      • Rangefinders
    • Vehicle-In-Vehicle Loading
Powered by GitBook
On this page
  • 1. Getting a unit's biology
  • 2. Configuration
  • 2.1 Creating a custom biology
  • 3. Examples of using biologies
  1. Frameworks

Biology

Legion Studios' biology framework, including how to use it and how to add your own biologies.

The biology framework won't do much on its own, and is primarily intended for third party modders to use in their own mods.

1. Getting a unit's biology

To check the biology of a unit, use the ls_common_fnc_getBiology function.

Here we get the biology of the current unit that the player is controlling (ls_player) and display a groan sound if the player is a zombie.

private _biology = ls_player call ls_common_fnc_getBiology;
_biology params ["_type", "_species", "_isOrganic", "_bloodModels"];

// _type will be the "group" that a species belongs to
// _species will be the exact type.

// Example: Humans have the _type of "nearhuman", but a species of "human".

if (_type == "zombie") then {
    systemChat "rurrgghhh";
};

2. Configuration

2.1 Creating a custom biology

You can easily create your own custom biology via config. Here is a biology already included in Legion Studios: Core as an example.

class ls_biologies {
    class biology_base; // default biology class, contains default values
    class hologram: biology_base {
        scope = 2; // Only biologies with scope > 0 are used
        species = ""; // Exact species type. Optional, class name is used if empty
        type = "hologram"; // The type, such as human, an alien species, droid, etc.
        isOrganic = 0; // 0-Non-organic being, 1-Organic being
        // Condition for a unit to be this biology.
        // Passed params: [_unit]
        condition = "call ls_common_fnc_biologyCondition_isHologram";
        // Array of models to use when this unit bleeds.
        // A hologram doesn't bleed, so this stays empty.
        bloodModels[] = {};
    };
};

3. Examples of using biologies

Biologies can be used for lots of different systems, such as "ion" or "emp" ammunition not doing anything, or having a lesser effect on organic beings.

Legion Studios: Core also uses the blood models when ACE Medical is loaded. Normal blood drops will be replaced with custom ones defined in the unit's biology.

PreviousIntroductionNextImpulsor

Last updated 3 months ago