User Tools

Site Tools


en:modulebuilding:generaladvices

This is an old revision of the document!


General Building Advices

Resrefs and tags

  • tag and resref should match unless it is specifically needed for scripting
  • newly created blueprints and area gets default resref, to change it you need to make a copy of that blueprint/area

Object Names

Never change a Door and Trap names, the name is visible to player if they attack it or get damaged by it. There is no reason to change area transition name either, although that is not visible to player at all.

Creature and item names should be upper cased (in English at least).

Base Area Settings

Every area needs to have following scripts set:

mod_area_enter in OnEnter event
mod_area_exit in OnExit event

Area Transitions

  • make sure that waypoints to which area transition leads is not inside area transition trigger back. This is common building error
  • it is not needed to change tag of area transition triggers, don't do that
  • neither is needed to change tag of invisible doors if they are not linked from elsewhere (which for invisible door is not needed, read below)
  • doors should be linked with doors otherwise they won't open from the other side, unless you want exactly that behavior
  • if the doors are leading to subarea with no return back link them to waypoint or use invisible door

Area Variables

  • DUNGEON int 1 - set to 1 for areas that are part of a dungeon
  • DARKAREA int 1 - set to 1 if exterior area, but dark; such area won't penalty ligh-vulnerable races
  • UNDERDARK int 1 - marks the area as underdark (required for achievement)
  • X3_MOUNT_OK_EXCEPTION int 1 - will allow to ride horses in the area
  • NO_EXPLORATION int 1 - will not count the area towards number of areas visited (this is needed if there are variations of same area)
  • QUEST string quest_tag - area with this variable will update player's quest status when players enter it
  • QUEST_CHECK int X - quest state number required for the quest to advance, will be 1 if not set
  • QUEST_SET int X - new quest state number, will be 2 if not set
  • SECRET_AREA int X - marks the area as “secret”, X is number of experiences gained for finding this area
  • DISABLE_HINTS int 1 - disables dungeon hints (like “you can use grapple in this area”)
  • AREA_FLAG_DISPELTRAPS int 1 - will display a hint about dispel traps when entering the dungeon
  • AREA_FLAG_RANDOMTRAPS int 1 - will display a hint about random traps
  • AREA_FLAG_SECRETDOORS int 1 - will display a hint about secret doors
  • AREA_FLAG_TIMEDTRAPS int 1 - will display a hint about timed traps
  • AREA_FLAG_GRAPPLE int 1 - will display a hint about grapple

Area Terrain Setting

By default an area terrain is based on used tileset. For example tileset mines and caves will be treated as underground by default. But sometimes you want to change this or expand this, for example if the cave is flooded etc.

To do that, add a variable to the area:

  • TERRAIN string terrain_list - this is list of terrains separated by comma (if more than one terrain is required) that overrides the default terrain type that is based on used

Keywords for the terrains are:

  • AQUATIC
  • DESERT
  • FOREST
  • JUNGLE
  • MOUNTAINS
  • PLAINS
  • RUINS
  • SWAMP
  • UNDERGROUND
  • URBAN
  • ABYSSAL
  • CELESTIAL
  • COLD
  • ETHEREAL
  • SHADOW

So for example, if I want the area to be both of underground and aquatic terrain, I set variable:

  • TERRAIN string AQUATIC,UNDERGROUND

Creatures

Never use the creature wizard. If you want to make a creature, find a creature closes to what you want by strength or/and race and make a copy then adjust it. That will allow you to set its resref. Creature wizard and level up wizard too tends to give NPC starting gear for its class and tons of useless feats.

Since there is not an immunity to stun and since mind-spells immunity doesn't include stun anymore, if you want to make creature immune to stun you need to grant her feat Tough as Bone.

Encounter Trigger Painting and Spawn Points Placement

Placeable Flickering Workaround

This happens when multiple flat-type placeables like carpets or some floor-overriding ones are placed over each other. To avoid this, you need to make sure their Z position (right-click Adjust Location) isn't same. Make the second placeable to be at +0.01 Z, third at +0.02 Z etc., that should fix this.

en/modulebuilding/generaladvices.1763059763.txt.gz · Last modified: 2025/11/13 18:49 by shadooow