PW helper - persistent world helper scripts. I have included a set of scripts and methodologies to help PW designers get full use of the NESS spawning system and make their worlds more persistent. Including: automatic placed creature/object to NESS waypoint conversion; True PW traps (scripts & methodologies for putting real disarmable, one-shot traps in a PW); smashable & trapped doors for PWs; area error checking (& auto 'plotting' of non-spawning objects); anti-cheat code (for login/logout cheat); and area reset scripts (clean & reset a set of areas x minutes after last PC leaves). I have included a sample module that test all the features. NOTE: This requires NESS 8.1 !!
I downloaded it but I didn't get all the sources for it.....
Maybe its just my pc being a bitch, I dunno but I would like that anti cheat code....since on my module I encounter so many cheaters! _________________________ Head DM of The Forgotten Islands
Posted by sdragonblood at 2009-03-26 20:24:02 Voted 8.50 on 03/26/09
Not bad...
Posted by _martigan_ at 2007-08-06 20:00:02 Voted 8.00 on 08/06/07
Great system, but I normally just strip it to use the anti-cheat stuff _________________________ It is by caffeine alone I set my mind in motion, it is by the beans of Java that thoughts acquire speed, the hands acquire shaking, the shaking becomes a warning, it is by caffeine alone I set my mind in motion.
Posted by Galefer at 2007-05-13 22:42:32 Voted 10.00 on 05/13/07
2137 Download 11 votes, this is a great tool, it's just TOO bad that all these downloaders are lame and forget to vote!
Nicely done, great content, excellent documentation another piece of work worthy of the hall O fame. _________________________ Don't be ridiculous...
Posted by borojb at 2006-11-25 09:54:22 Voted 9.50 on 03/12/05
Hi, I'd like to say thanks for your help in the past and for creating such a great community resource. I have an additional question at this time though. In the mod that I've been working on there are a lot of area transitions that are internal to an area (i.e. a door on the lower level leads to a door on a rampart). This results in a "Too Many Instructions"
message, so for the time being I've commented out the execution of the transition checks. I was just wondering whether you had some work around for this. I've been looking through the previous comments and the documentation, but didn't see this specific issue addressed. Thanks for your time.
Posted by mbaucco ( 129.79.xxx.xxx ) at 2005-09-16 09:55:01
never mind, I moved that part of the client_enter script to my area's onenter, forgot about that little wrinkle.
Posted by mbaucco ( 129.79.xxx.xxx ) at 2005-09-15 14:36:15
Looks good so far, but the client enter script is not moving the pc to the initial_start or other_start waypoints, and I can not figure out why.
Posted by borojb at 2005-03-12 11:07:07 Voted 9.50 on 03/12/05
Posted by borojb at 2005-03-12 11:05:00 Voted 9.50 on 03/12/05
I sent you a copy of the scripts I'm having trouble with earlier this morning.
Thanks for taking the time to look at it. I really appreciate the help and advice.
Posted by borojb at 2005-03-12 11:05:00 Voted 9.50 on 03/12/05
I sent you a copy of the scripts I'm having trouble with earlier this morning.
Thanks for taking the time to look at it. I really appreciate the help and advice.
Iron Crown: Glad it is working again. I noticed the persistant location code wasn't working myself recently. I will have to look into that. (maybe also save the location during area OnEnter - in case the server has a hard crash.
borojb: I'm going to need some more information so that I can help you. Any chance you can email me the script?
I am currently adding an option to convert merchants into respawning merchants - clean out inventory. (Still not sure how to have the designer decide between a persistant merchant and a respawning one - no plot flag for them)
Posted by borojb ( 64.198.xxx.xxx ) at 2005-03-10 10:05:00
Thanks for putting a great set of tools out there for those of us who don't know any better.
I am having one issue where you may be able to point me in the correct direction, however.
I'm trying to use a script that I have used in other modules to randomly spawn some encounters. Basically the script is placed in the OnEnter of a trigger and returns a random value for which creature (1-20) to place at which waypoint (1-4). The waypoints are tagged wp_randomx. From viewing the logs the waypoints are being created properly, so it seems like there is an issue placing the info at the waypoint. I tried putting a script into the trigger that displays text showing the trigger fired and that the waypoint is receiving information. The trigger is diplaying the text, but the waypoint is not. Unfortunately, I can use this script in any mod I've tried except those using PW Helper.
I thank you in advance for any help or insight that you can give me.
I've been using PW Helper since it was first posted. Recently I updated to 1.8 and then 1.9
The problem now is areas containing NESS spawns don't reset. Other areas will reset fine, as long as they dont contain a NESS spawn.
Im using standard NESS spawns with the NESS code in the name of the waypoint and the resref in the tag field.
I first updated my NESS to the newest version before upgrading the PW Helper.
Also, I noticed you changed the name of one of the area files from "user" to "ude". I didnt want to change the file for 500 areas, so I just pasted the new one into the old.
Any ideas why the areas containing NESS spawns are not resetting?
There are some good "tag based scripting" tutorials out there, but the simplest thing to do is use the bioware onActivate script, x2_mod_def_act, and the other x2_mod_def_* scripts. They all call a script based on the item's TAG. See x2_it_example for an example. Or at least have your OnActivate: ExecuteScript("x2_mod_def_act",GetModule());
Posted by Obbehobbe ( 85.224.xxx.xxx ) at 2005-02-21 17:12:00
Thanks for your work in helping me!
I did run some "try & test" debug on my own, actually with your module (and later my own!)
First I tried to just kill the Boy and Girl, and it occured that only the boy left a corpse. The second time both left a corpse. (This was when changing the default script)
It appears I must reload the module some times before the system realize the change! It doesn't even help with a Full Rebuild!
I'am using Jasperres AI aswell, along with NESS and SiliconStouts treasure system. Firstly I was sure it was the treasure system (that goes OnSpawn) that causes the error... but when removing all relating variables and script, and the error still occured... It was not!
So... it works now! I don't know how and why... but It do works! When I tried to solved the problem I tried several variations (Change the default script/change the premade variable on the waypoint/Change the variable ON the creature itself), so It seems that the system never had a chance to "work it out properly"...!?! Stupid stuff.. maybe my NWN playing tricks with me...
...and about the ST (sit)... my placeable chairs tag was "Chair" and not "Seat".. thats why! *blink* =)
I have some questions thou...
I'am a good scripter... but I CAN'T get the stupid fish to work in the TAG based way (activating tagbased act_items!) I cheated to get it to work (adding it to the item related "OnActivateItem" script on the Module load)
And I do feel like a retard because you pointed out in the PDF that "if you don't know what it means you have alot of reading to do" =)
I have more or less copied your script from the PW demo mod, but with no success! Actually It's no big deal because it works now.. but just for fun? What is the trick?
And about the DS0... I use DS1 aswell! Just wrote wrong, didn't thought you'll notice! =)
Thanks for a good script! I use it to hopefully reduce the lag, AND to prevent the logout/login cheat, and to reset areas (that negates the "clean area" script I never implemented yet)
I can't say I've always got the NESS corpses to work. (I handle the corpes myself in the demo module) But, I just tried your example in the demo module (using the default nw_c2_default7 death script, not my own & not one that reports the death to NESS). I created 3 spawns and 3 chair spawns. They all appeared and behaved exactly the same.
For the chairs, I just placed the chair from my demo mod (with the TAG changed to "Seat" to make NESS happy)
elf #1: placed waypoint with name = SP_DS0_SF_CD120T0R7_ST
elf #2: placed elf with NESS=SP_DS0_SF_CD120T0R7_ST
elf #3: placed elf with NESS=*_CD120T0R7_ST (with default=DS0_SF)
The two placed elves were replaced with NESS waypoints with NESS=SP_DS0_SF_CD120T0R7_ST (SP2_DS0_SF_CD120T0R7_ST for #3). All three elves spawned, sat down, and turned into corpse+body bag & eventually faded away. If you set the module int variable DEBUG = 2, you can see what waypoints the creatures get turned into. (or use the debug item's "info" option)
I normally use DS1 because multiple creature spawns do not work in a PW like manner (you have to kill all of them or they respawn) But then, the coprses don't seem to ever fade out using your CD120T0R7 flag. ?
Posted by Obbehobbe ( 85.224.xxx.xxx ) at 2005-02-19 13:19:00
Is there any problem with the Corpse decay and corpse flags?
On a creature, I put the variable: NESS -> String -> *_CD120T0R7_ST, but the creature doesnt create a corpse on death... (and it doesnt sit either (ST is the "sit))
Then I tried to change the "pw_inc_init_vars" and change the default "DS0_SF" to "DS0_SF_CD120T0R7" but that didn't worked either!
It DO work if I put a waypoint (as the old fashioned way)
I am using CEP and DC Tiles v304. Would those cause any problems. I could email you my mod but want to make sure you know that I have those hakpacks installed.
From your log I can see that the objects near your transitions are getting "SP1_" NESS flag. Those should spawn right away. In my demo mod, the little boy and girl are spawned so quickly that I've never seen them spawn in.
Posted by TheClaus ( 68.238.xxx.xxx ) at 2005-02-11 07:24:00
.ncs is compiled script and all the pw_inc files are just include files, so that warning is expected. Make sure you rebuild after importing. (.nss is source script, which is what you need)
The log file looks fine for the OnModuleLoad. The NESS waypoints are getting created. Your area's OnEnter (pw_area_enter) should start up the psuddo HB script, which should call spawn() and spawn the creatures.
If you still can't figure it out, you can email me your mod ([email protected] or upload it to epolson.is-a-geek.com/EEG/atm) I can take a closer look.
Posted by TheClaus ( 68.238.xxx.xxx ) at 2005-02-10 21:58:00
Hey I am wanting to try out your wonderful package and having issues. The first issue is when I import your ERF I get the following.
The Following resources were required but not in the package.
It will import though so I continue on and when I make the changes I try to get creatures to spawn and get nothing on the map. Here is what the log shows.
[Thu Feb 10 21:37:52]---- Server Options ----
Max Players: 6
Char Levels: (1-40)
Player Password: NO
DM Login Enabled: YES
Server Admin Login Enabled: YES
Post Game To Internet: YES
Game Type: Action
Difficulty: 2
PVP Setting: NONE
Vault: LOCAL
Only One Party: YES
Enforce Legal Characters: NO
Item Level Restrictions: NO
Player pausing: ENABLED
Auto Save: Enabled
Saving Characters in Saved Game
---- End Server Options ----
[Thu Feb 10 21:37:52] Player [] () Joined as Server Admin 1
[Thu Feb 10 21:37:52] Player () Joined as Player 1
[Thu Feb 10 21:37:52] Loading Module: Odus
PWH Info - pw_mod_trans area: Toxullia Forest
PWH Info - Initilizing 1 Areas onModuleLoad:
PWH Info - Toxullia Forest: Init@ 0.2660s
* 'Kobold' {NW_KOBOLD001} (Creature) => NESS: nw_kobold001 SP3_DS1_SF
* 'Fire Beetle' {NW_BTLFIRE} (Creature) (seen by transition) => NESS: nw_btlfire SP1_DS1_SF
* 'Dire Spider' {NW_SPIDDIRE} (Creature) => NESS: nw_spiddire SP3_DS1_SF
* 'Area Information' [info sign]
* waypt: Transition Destination TAG=PW_TRANS_DEST
* 'Archway, Stone Grey' [Plot]
* 'Archway, Underblock Grey' [Plot]
* 'Archway, Underblock Grey' [Plot]
* 'Archway, Underblock Grey' [Plot]
* 'Fire Beetle' {NW_BTLFIRE} (Creature) (seen by transition) => NESS: nw_btlfire SP1_DS1_SF
* 'Dire Spider' {NW_SPIDDIRE} (Creature) => NESS: nw_spiddire SP3_DS1_SF
* 'Fire Beetle' {NW_BTLFIRE} (Creature) (seen by transition) => NESS: nw_btlfire SP1_DS1_SF
* 'Dire Spider' {NW_SPIDDIRE} (Creature) => NESS: nw_spiddire SP3_DS1_SF
* 'Fire Beetle' {NW_BTLFIRE} (Creature) => NESS: nw_btlfire SP3_DS1_SF
! Kobold {emptied} {stripped} => destroyed
! Fire Beetle {emptied} {stripped} => destroyed
! Dire Spider {emptied} {stripped} => destroyed
! Area Information => destroyed
! Fire Beetle {emptied} {stripped} => destroyed
! Dire Spider {emptied} {stripped} => destroyed
! Fire Beetle {emptied} {stripped} => destroyed
! Dire Spider {emptied} {stripped} => destroyed
! Fire Beetle {emptied} {stripped} => destroyed
PWH Info - LoadPlayerInfo for Merrick du Pelades{Player Merrick du Pelades}
I thought that it was the ModuleOnLoad but I put your pw_mod_def in it so I don't know what is up. I do know that your demo module works though.
This release greatly reduces the time spent figuring out transitions, so it should help fix any problems caused by OnModuleLoad running too many instructions. It places a waypoint at the transition destination so we can fine tune our NESS spawns to delay if they are not seen by any transitions.
I also added more healing door support (scripts and reset)
// +++ Version 1.9
// 01/21/05 EPOlson - pulled mod_trans_check out of pw_mod_trans (added a transition destination waypoint
// so I can process it later during area init)
// 01/27/05 EPOlson - changed pw_area_init: added dest. waypoint check for SP1/SP2/SP3.
// 01/27/05 EPOlson - reset x0_i0_treasure "do once" vars on plot placed containers
// 01/30/05 EPOlson - add pw_door & scripts (changed pw_doorbash, added pw_door_open, pw_door_damaged)
// pw_doorbash: STR check to unlock plot doors
// pw_door_damaged: record damage & heal door, unlock if total damage > (MaxHP-1000)
// pw_door_open: auto close/lock door (nearness check, NPC closes door, etc)
// 01/30/05 EPOlson - pw_area_init: set doors to plot ONLY if HP < 1000
// 01/30/05 EPOlson - pw_area_reset: heal all doors (& reset pseudo "DAMAGE" counter)
// 01/30/05 EPOlson - clean up log messages a little
// 02/08/05 EPOlson - Added MODULE_EVENT_INIT user event call to pw_moduleload
// 02/08/05 EPOlson - Added module user defined event script template
// 02/08/05 EPOlson - add PW_DISABLE_SPAWN area variable (disable spawn in pw_area_pseud_hb) for DM events
(sorry, messages getting chopped off, trying again)
It is a bit of a hack, but you go into the area's properties -> advanced -> variables, and set an int called INITIALIZED to 1 (TRUE). This will stop an area from getting initialized because it thinks that it already has.
I am almost positive that you are running out of instructions during the onModuleLoad event. (I ran into that problem) As a temporary measure (and as a check) comment out the call to "pw_mod_trans" on line 58 for pw_moduleload. That will cut out most of the calculations. You already have all the area markers around anyway. I'll work on a transition search that does its work outside of the onModuleLoad event.
Posted by Gomi(san) ( 203.87.xxx.xxx ) at 2005-01-17 15:23:00
Hi, Gomsian here..
I re-arranged things so I could get a better grasp of what was running, and added a few more debug strings to what gets dumped into the log.
I've put the PW module load script as the last one called at startup, and all my other scripts now report succesful completions.
Yours however starts, runs the loops through the areas.. and never seems to exit!
I put a debug statement immediately after the loop through the areas, and it is never logged. My next trick will be to put a small counter in your loop and have it increment every time it loops and record that. I have a suspicion that my daily server crashes are being caused by a rogue script or memory leak, and it's possible this is it.
I'll let you know how it goes anyway, but in the meantime, any other suggestions would be appreciated.