User Tools

Site Tools


building:placeables:transportable

Transportable Placeables System

This system make it so that when an item is dropped, it creates a placeable base on variables set on the item and it is possible to grab back the object by using the player tool. The object don't need to be useable as you can target the ground with your player tool and it let you select an object close to the targeted location. The placeables created by this system are persistent (they remain there after a reset, until someone destroy them or pick them up).

It is all in this ERF: https://nwn.sinfar.net/res_list.php?erf_id=437

How To

  1. Create the placeable blueprint
  2. Create the item blueprint
  3. Add the following variables on the item:
    Varaible NameVariable TypeVariable ValueRequired or Optional
    EVENT_UNACQUIREStringtps_ev_unacqitemRequired
    TPS_PLC_RESREFStringResRef of the placeableRequired
    TPS_NAMEStringoverride the name of the palceableOptional
    TPS_DESCRIPTIONStringoverride the description of the placeableOptional
    TPS_PLC_APPEARANCEIntegeroverride the appearance of the placeableOptional
    TPS_MAX_HPIntegeroverride the max hit points of the placeableOptional
    TPS_HARDNESSIntegeroverride the hardness of the placeableOptional
    TPS_PLACED_SCRIPTStringscript to run when the placeable is createdOptional
    TPS_FLAGSIntegersum of all options that you want to activate:
    1: PCs can rename the placeable
    2: PCS can change the description of the placeable
    4: Only the PC that dropped the placeable can manipulate it (grab it, move it, rename it….) - Transportable placeables with this flag shouln't be sold in stores

    For example, if you set the variable to 7, all the options above will be activated. If you set it to 4, it wont be possible to change the description of the item or rename it and only the owner of the item will be able to move it and grab it back.
    Optional

  4. Add the following variables on the placeable blueprint:

    Varaible NameVariable TypeVariable ValueRequired or Optional
    TPS_NAMEStringoverride the name of the itemOptional
    TPS_DESCRIPTIONStringoverride the description of the itemOptional
    TPS_ITEM_TYPEIntegeroverride the type of the item (line number in baseitems.2da)Optional
    TPS_ITEM_APPEARANCEStringoverride the item appearance (value returned by the GetEntireItemAppearance function)Optional

Restrictions

  • If an hostile creature get close to a transportable placeable, the placeable is automatically destroyed.
  • Transportable placeables can't be placed in areas that have one of those variables:
    • IS_ARENA
    • IS_OOC
    • NO_PERSISTENT_LOCATION
    • NO_TPS
  • Transportable placeables with the flag #4 and above (Only the owner can manipulate them) are reserved for DM rewards

Publicly Available Templates

There's premade transfportable placeables blueprints in those ERFs:

building/placeables/transportable.txt · Last modified: 2023/06/28 19:16 by Carcerian

phpBB Appliance - Powered by TurnKey Linux