User Tools

Site Tools


en:modulebuilding:generaladvices

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:modulebuilding:generaladvices [2025/11/13 18:58] – [Area Variables] shadooowen:modulebuilding:generaladvices [2025/11/16 23:50] (current) shadooow
Line 3: Line 3:
 ===== Resrefs and tags ===== ===== Resrefs and tags =====
  
-  * tag and resref should match unless it is specifically needed for scripting +Resrefs should start with two letters as a shortcut of its creator (so I am using "sh"), underscore character and whatever. This is important so we know who to blame later. 
-  * newly created blueprints and area gets default resref, to change it you need to make a copy of that blueprint/area+ 
 +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
 + 
 +There is no need to change tag of ordinary placeables you place into area unless you want to do something special with them via scripting. Unordinary placeables like treasures needs unique tag though.
  
 ===== Object Names ===== ===== Object Names =====
Line 18: Line 23:
 **//mod_area_enter//** in OnEnter event **//mod_area_enter//** in OnEnter event
 **//mod_area_exit//** in OnExit event **//mod_area_exit//** in OnExit event
 +
 +Area tag should match resref. Exceptions are when you have multiple variants of same area, then they should share same tag so they count towards number of visited areas just once.
  
 ==== Area Transitions ==== ==== Area Transitions ====
Line 39: Line 46:
   * SECRET_AREA int X - marks the area as "secret", X is number of experiences gained for finding this area   * 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")   * DISABLE_HINTS int 1 - disables dungeon hints (like "you can use grapple in this area")
 +  * TICHO int 1 - applies a silence to every player entering this area
 +  * KOUZLO_VSE int X - percentual chance of spell failure for all spells, typically 100 (other values are misleading imo)
 +  * KOUZLO_Y int X - percentual chance of spell failure applied to specific spell of ID Y (see [[https://nwn.fandom.com/wiki/Spells.2da_(contents)|NWN Wiki]] for vanilla spell ID values)
 ==== Area Terrain Setting ==== ==== Area Terrain Setting ====
  
Line 72: Line 82:
 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. 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 =====+Pre-placed NPCs in areas (merchants and other friendly NPCs in towns) that aren't supposed to move and roam should have their scripts cleared out like this to preserve server resources: 
 +{{:en:modulebuilding:emptyscripts.png?400|}}
  
-...+===== Placeables =====
  
 +Container placeables (various boxes and chests from base palette) should be static, unless they are supposed to contain loot. If they exist solely for the purpose of decoration just make them static. And if they mustn't be static for some reason, then remove their scripts that they have, otherwise they will drop vanilla loot and we don't want that.
  
-===== Placeable Flickering Workaround =====+Placeables that are not supposed to respawn and that aren't static for a reasons (placeables with lights or animated ones mustn't be static for example) needs to be plot, so the first griefer doesn't destroy them. 
 + 
 +If you use Community Patch, then all chair-type placeables from vanilla palette should have a script to sit on them. If not, or if you choosed non-vanilla placeable and you want to make it sit-able, then put script named **//x2_plc_used_sit//** into placeable's OnUsed event. The placeable must be useable of course. 
 + 
 +Absolutely avoid using a tree canopy placeables. I absolutely hate them as a top-down player. They obstruct vision and do not tilefade. Which is a basic feature of NWN, but these placeables are missing it. This is not a roleplay server with focus on pretty areas with no other functionality but being beautiful. Also never place placeables into positions where they would block movement, unless you want to block movement on purpose (a blockade that needs to be destroyed). 
 + 
 +==== 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. 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.
 +
 +===== Exporting =====
 +
 +Lets say you made a bunch of creature blueprints to be spawned inside dungeon or outside of it, whatever. Now how do you export them all? Doing it one by one and appending to previous export is annoying. But there is a better way. If you are also exporting an area, then you make a vanilla encounter inside that area in a spot where no player can trigger it and put all the creatures you want to export into this encounter. Then save the area and export the area and it will automatically include all those creatures inside the encounter as well. If you do not export any area, then just create a new encounter blueprint, put all those creatures inside it and then right click on that encounter and select Export.
 +
 +On the contrary, creatures and items directly placed inside area will not be exported with area export!!!
 +
 +The export will always also include all scripts and items that are in module used by all blueprints you exported and/or all objects inside areas you exported. That might be often unwanted because you didn't change any scripts for example. To avoid sending bloated ERF with files you never touched, you can open the *.erf file in nwhak.exe and delete those files externally.
en/modulebuilding/generaladvices.1763060334.txt.gz · Last modified: 2025/11/13 18:58 by shadooow