Skip to content

Latest commit

 

History

History
68 lines (47 loc) · 3.19 KB

interactionsmodule.md

File metadata and controls

68 lines (47 loc) · 3.19 KB

Interactions

Updated for version 3.38.

Module Definition

The module is inherited from ItemModuleBase. So base parameters can be found there.

This modules allows you to add custom interactions to be used by custom maps for example.

Module name

The name of the module you use as the meta of the module definition is 'HeistMusic' or 'HeistMusicModule' if _force_search is set to true in the module definition.

If you're writing them in level modules the name of the module is 'interactions'.

XML Structure

<Interactions>
    <interaction id interact_distance/>
</Interactions>

<interaction ...>

Parameter Type Description
id String The ID of the interaction. This has to be unique
interact_distance Number The distance (in centimeters?) the interaction can be interacted from. For example for buttons you'd use something like 100

Additional parameters

Parameter Type Description
based_on String Base your interaction on already existing ineraction data
text_id String Optional text localization id defaults to hud_+id
special_equipment String Optional ID of some pickup/special equipment that you need to have in order to interact
equipment_consume Boolean Should the equipment be "consumed" after interaction? Like imagine some key that can only be used once
equipment_text_id String Optional text localization id of the equipment that is needed. This will need to be localized if it isn't already
sound_start String Optional sound ID of the sound that should play when starting interaction
sound_interupt String Optional sound ID of the sound that should play when the interaction is interrupted
sound_done String Optional sound ID of the sound that should play when the interaction is done
required_deployable String Like special_equipment but requires a deployable instead
deployable_consume Boolean Like equipment_consume but for deployables
requires_upgrade Table Table that looks like this . Checks for required perks/skills
force_update_position Boolean Determines if the interaction should constantly check for position to update. Useful if the interaction moves around

And any other interaction tweakdata value. There are more that are not listed here yet.

Example

This example is what you would put inside your main node within your mod config

<Interactions>
    <interaction id="my_interaction"/>
</Interactions>

This will add the interaction my_interaction. You will still need to localize the name of the track. In this case hud_my_interaction will need to be localized (LocalizationModule).

Functions

Function Description
AddInteractionsDataToTweak(Table i_self) Inserts the interaction data to the tweak_data. Called by the PostHook inside RegisterHook or by RegisterHook itself if interaction tweakdata is available