In OpenBOR a child entity is an entity spawned for or by an existing entity. Child entities are used for a variety of in game functions including projectiles, NPCs, and particle effects.
Contents
Model
Following
Behaviors to set up following a parent. Typically used for NPC helpers.
Follow Offset
child_follow_offset_x <int>
child_follow_offset_y <int>
child_follow_offset_z <int>
#default
child_follow_offset_x 0
child_follow_offset_y 0
child_follow_offset_z 0
If following a parent, this adjusts the target position from parent. The X axis is relative to parent’s facing, meaning a negative number adjusts toward the parent’s back, while positive numbers adjust toward the front.
Follow Range
child_follow_range_base_max <int>
child_follow_range_base_min <int>
child_follow_range_x_max <int>
child_follow_range_x_min <int>
child_follow_range_y_max <int>
child_follow_range_y_max <int>
child_follow_range_z_max <int>
child_follow_range_z_min <int>
#default
child_follow_range_base_max MAX_INT
child_follow_range_base_min MIN_INT
child_follow_range_x_max See description
child_follow_range_x_min See description
child_follow_range_y_max See description
child_follow_range_y_max See description
child_follow_range_z_max See description
child_follow_range_z_min See description
Range entity uses to follow. If the target position falls outside of any range axis, the NPC will attempt to move toward the target position. X axis is relative to NPC’s facing. For legacy compatibility, default values are as follows:
- Base value: If entity has a valid Idle with non 0 Minimum X range, default is Minimum X range. Otherwise, 100.
- Base value applied as negative default to Min X/Y and positive default to Max X/Y.
- Base value * 0.5 applied as negative default to Min Z and positive default to Max Z.
Follow Run Range
child_follow_range_run_base_max <int>
child_follow_range_run_base_min <int>
child_follow_range_run_x_max <int>
child_follow_range_run_x_min <int>
child_follow_range_run_y_max <int>
child_follow_range_run_y_max <int>
child_follow_range_run_z_max <int>
child_follow_range_run_z_min <int>
#default
child_follow_range_run_base_max MAX_INT
child_follow_range_run_base_min MIN_INT
child_follow_range_run_x_max See description
child_follow_range_run_x_min See description
child_follow_range_run_y_max See description
child_follow_range_run_y_max See description
child_follow_range_run_z_max See description
child_follow_range_run_z_min See description
Range entity uses to follow by running. Entity will run toward its parent target position if the the following criteria are met:
- Entity is already following.
- Entity has running set up.
- The target position is outside of a range axis.
- Entity is facing toward the target position.
Default values for X, Y and Z axis use the base value of Follow Range X setting +100. For example, if the base value of Follow Range is 100, then the default is -200 for X, Y and Z minimums and 200 for X, Y and Z maximums.
Recall Range
child_follow_range_recall_base_max <int>
child_follow_range_recall_base_min <int>
child_follow_range_recall_x_max <int>
child_follow_range_recall_x_min <int>
child_follow_range_recall_y_max <int>
child_follow_range_recall_y_max <int>
child_follow_range_recall_z_max <int>
child_follow_range_recall_z_min <int>
#default
child_follow_range_recall_base_max MAX_INT
child_follow_range_recall_base_min -MAX_INT
child_follow_range_recall_x_max Special, see description.
child_follow_range_recall_x_min Special, see description.
child_follow_range_recall_y_max MAX_INT
child_follow_range_recall_y_max -MAX_INT
child_follow_range_recall_z_max Special, see description.
child_follow_range_recall_z_min Special, see description.
Range for auto recall. If the target position falls outside of any range axis, the NPC will instantly return to target position and play its recall animation.
Recall Offset
child_follow_recall_offset_x <int>
child_follow_recall_offset_y <int>
child_follow_recall_offset_z <int>
#default
child_follow_recall_offset_x 0
child_follow_recall_offset_y 0
child_follow_recall_offset_z 0
Adjust target position for instant recall. The X axis is relative to parent’s facing.
Recall Animation
child_follow_recall_animation <animation name>
# default
child_follow_recall_animation respawn
Animation to play during recall. Accepts any valid animation name, or none
for no recall animation at all. If the provided (or default) animation is invalid, Spawn will play instead. If there is no valid Spawn animation, nothing plays.
Direction Adjust Config
child_follow_direction_adjust_config <direction>
#default
child_follow_direction_adjust_config toward
Facing behavior within direction adjust range and idle. Accepts one of the following:
none
– No direction adjustment.same
– Face same direction as parent.opposite
– Face opposite direction as parent.left
– Face left.right
– Face right.away
– Face away from target.toward
– Face toward target.
If the entity is out of direction adjust range and idle, it will always face toward the parent.
Direction Adjust Range
child_follow_direction_adjust_range_base_max <int>
child_follow_direction_adjust_range_base_min <int>
child_follow_direction_adjust_range_x_max <int>
child_follow_direction_adjust_range_x_min <int>
child_follow_direction_adjust_range_y_max <int>
child_follow_direction_adjust_range_y_max <int>
child_follow_direction_adjust_range_z_max <int>
child_follow_direction_adjust_range_z_min <int>
#default
child_follow_direction_adjust_range_base_max MAX_INT
child_follow_direction_adjust_range_base_min MIN_INT
child_follow_direction_adjust_range_x_max MAX_INT
child_follow_direction_adjust_range_x_min MIN_INT
child_follow_direction_adjust_range_y_max MAX_INT
child_follow_direction_adjust_range_y_max MIN_INT
child_follow_direction_adjust_range_z_max MAX_INT
child_follow_direction_adjust_range_z_min MIN_INT
If parent falls within this range, entity applies direction adjustment config. Note the default X/Y/Z axis values are intentionally backward by default to effectively disable direction adjustment range.
Setup
UNDER CONSTRUCTION – Documentation and features below are in progress. Use at your own risk!
Child spawn is a combination of commands on an animation frame. You may configure multiple child spawns on a single frame with the child_spawn_index.
child_spawn_preset_shot
child_spawn_color
Controls color of child spawn. Accepts one of the following:
parent_index
– Assumes same color index as parent.parent_table
– Child uses same color table as parent. Make sure child sprites and parent sprites have matched color tables or this will produce weird looking results.0+
– Child spawn assumes supplied color index. If child spawn does not have the specified index, it instead uses index 0 (default).
Child_Spawn_Config
Miscellaneous flags to configure behavior of the spawning process and child behavior. Accepts one or more of the following:
- none
- autokill_animation
- autokill_hit
- behavior_bomb – The spawn uses bomb behavior. See below for details.
- behavior_shot
- explode –
- faction_damage_parameter
- faction_damage_parent
- faction_hostile_parameter
- faction_hostile_parent
- faction_indirect_parameter
- faction_indirect_parent
- faction_member_parameter
- faction_member_parent
- gravity_off
- launch_throw
- launch_toss
- offense_parent
- position_level
- takedamage_parameter
- relationship_child
- relationship_owner
- relationship_parent
Bomb
Bomb is a type of projectile.
- Thrown in an arc determined by projectile model’s jump height. Affected by gravity.
- Apply the projectile velocity setting (see below, default X = 2, Y = projectile model jump height, Z = 0). When moving the projectile model’s X, and Z speed setting controls velocity. Y is used for initial vertical toss velocity.
- If a bomb touches ground without hitting a target, it will play its ATTACK1 animation if available.
- If a bomb hits any eligible target or gets hit by any attack, one of the following occurs (in order):
- It will play its ATTACK2 animation if available.
- If there’s no ATTACK2 animation, and the remove flag is set, the bomb disappears.
- The bomb loses velocity and falls in place. It will remain on screen until its animation is complete.
- After a bomb hits or lands and current animation is complete (which animation doesn’t matter), the bomb disappears.
direction_adjust