This system will allow characters to keep a list of locations and targets that they may then view remotely from a Scrying Device or Teleport to.
Please read the documentation for setup and usage. *.erf contains all the required scripts. Sample module shows how the system works.
System is flexible and allows the builder to designate objects that are scying devices with different levels of power - some may provide travel and might even be set to certain locations.
Character's use a widget called the "scrying journal" to select locations and targets they wish to record for scrying later on. Other objects may allow that character to "learn" about a distant target and record that to their journal.
When scrying, the character takes control of a "Sensor" at the viewing location. Their body is still back at the device and may be interacted with - usually resulting in the session ending.
-------------
v.0.5 is the first released version but should still be considered beta. I have tested it just about as much as one person can mess with it. It should work for multi-player games without trouble.
-------------
v.0.6 Adds immunities to the "Sensor" while scrying. Now the scrying PC won't (shouldn't) be triggering traps or hit by AOE spells.
-------------
v.0.7 Adds a number of inventory and item related modifications, improved conversation options, and the option to allow a certain amount of communication to the scry location
This system is fully functional. The persistence process I have added below is supplemental to the Scry System.
5/2012 0.7.1 fixed a couple of small bugs.
..........
v.0.8.2 Hides and protects associates. Teleportation options. Improved Device Items that can move from module to module. Hopefully fixed a few other annoying bugs.
-------------
0.9 Combined Teleport conversation into Scry Conversation.
Added conversation elements to check for needed items and allow creation of Written Accounts of already Recorded Objects or Locations.
Adding copies of Associates, gave them conversation options
-------------
"scry_data" update adds persistence to the system. It is pretty down and dirty, but it works! Recorded Target lists are restored after resets/restarts. If non-unique targets are to be stored, the reset may return another object with the same tag. If you see any glaring errors, let me know - this is my first stab at a persistence script of my own.
Thanks!
Persistence Update. 5 scripts (3 edited, 2 new). To setup, wrap "scry_get_data" into your Module OnEnter event (or put it in a trigger or something so PCs will run the script). Add the variable INT "SCRY_PERSIST" = "1" to your module. This allows the persistence to be turned off if needed.
If you want the persistence to be campaign-wide (not tested) instead of module oriented, add the variable STR "Campaign" to your module with the name you want.
@lordofworms - please feel free to modify as you need! Sorry I was out-of-touch for a bit but I did see your forum postings. My thoughts on the matter: I used local objects mainly to target moving objects iregardless of tag. You are right that I made this in a regular gaming enviroment. I think - for the most part - my update erf persistance will work in most situations, just not for targets that share a tag. I will mess around with it myself to see if there is a way to keep track of a non-unique target over resets.
Posted by lordofworms at on04/26/11
I posted this on the Bioware social forums under scripting since I rather have a better persistant version... Lightfoot made a very clear understanding of LocalObjects and how they are not the best to be used for any persistance on this thread which I thought I should post here for ref. just so you know I am still looking into this.. if possible would it be ok to re-write alot of the store/save data code but use your design as a base? or would you prefer I create a new system..? I would like to use yours because I like it very much but I dont want to 'take over' and step on your toes or anything... _________________________ [Seasonal Forest Tileset] [Fantasy Dungeon Tileset][Scorched Earth Tileset] [Mirkwood Swamp Tileset] [Cypress Bayou Tileset] [Undersea Tileset] [Reworked Werewolf Model] [Helmet Pack] [Remodeled Night Hag][WoRm Head Hands Model][Goblins Override][Zombies Override][Ghouls Override] [Werewolves and Fire Giants remodels][Bugbears Facelifts][Minotaurs Facelift][Wagon Interiors][Arbor Falls~ Downloadable Persistant World]
Posted by Mannast at 2011-05-0908:55:10
Sorry for what looks like spamming myself with unfinished code. I added to the files section two sample scripts which would replace the store and get scripts for persistence. I do not know why they don't seem to work, but I may just be not writing them correctly.
Posted by Mannast at 2011-05-0908:49:58
void StoreData(object oPC) { string sCDKey = GetPCPublicCDKey(oPC)+GetName(oPC); object oMod = GetModule(); string sMod = GetLocalString(oMod, "CAMPAIGN"); if(sMod=="") sMod = GetName(oMod); object oLoc; int nPersist = GetLocalInt(oMod, "SCRY_PERSIST"); object oJournal = GetItemPossessedBy(oPC, "scrywidget"); if(oJournal!=OBJECT_INVALID) { int nNth=1; oLoc = GetLocalObject(oPC, "ScryLoc_"+IntToString(nNth));//get the first recorded target while(nNth
Posted by Mannast at 2011-05-0908:48:48
The problems I had with the StoreCampaign and RetrieveCampaign seem to involve storing the journal correctly. While much simpler than what I ended up with these two scripts didn't seem to store and retrieve the object correctly ///////////storage script void StoreData(object oPC) { string sCDKey = GetPCPublicCDKey(oPC)+GetName(oPC); object oMod = GetModule(); string sMod = GetLocalString(oMod, "CAMPAIGN"); if(sMod=="") sMod = GetName(oMod); object oLoc; int nPersist = GetLocalInt(oMod, "SCRY_PERSIST"); object oJournal = GetItemPossessedBy(oPC, "scrywidget"); if(oJournal!=OBJECT_INVALID) { int nNth=1; oLoc = GetLocalObject(oPC, "ScryLoc_"+IntToString(nNth));//get the first recorded target while(nNth
Posted by Mannast at 2011-05-0908:32:21
The process in the scry_get_data script runs roughly like this: It gets the entering object (oPC) and gathers information for the checking of data. It checks if the SCRY_PERSIST int is set on the module. If so it starts to look for stored data. The first targets it looks for are if the scry location was a PC. If it was, it checks to see if that PC is in the current game. If they are, it records them into the entering PC's list. (this is the section I think you are refering to - it doesn't run the list check for all PCs, it is looking at those PCs online if the entering player had one in their list). The Else section checks for game objects that would have been in the recorded list for the entering PC. If the target was an item or placeable, the location and the tag of the target was recorded and stored. This section reacquires that object. If there was no tag stored, then it was just a location and a marking object is created at that location and recorded in the PCs list.
Posted by lordofworms at on04/26/11
p.s. store campaignobject and retrieve campaign object should work? if you could throw me the script that was giving you issues I could look at it and try and get it to work...seems easier then trying to store TAGs, resrefs, locations and all that... _________________________ [Seasonal Forest Tileset] [Fantasy Dungeon Tileset][Scorched Earth Tileset] [Mirkwood Swamp Tileset] [Cypress Bayou Tileset] [Undersea Tileset] [Reworked Werewolf Model] [Helmet Pack] [Remodeled Night Hag][WoRm Head Hands Model][Goblins Override][Zombies Override][Ghouls Override] [Werewolves and Fire Giants remodels][Bugbears Facelifts][Minotaurs Facelift][Wagon Interiors][Arbor Falls~ Downloadable Persistant World]
Posted by lordofworms at on04/26/11
ok ,looking at the scripts for the new persistance I can see I few things I might have done differently..but you said it was your first time, so really good job nontheless. what I would change.. the OnEnter wrap...it seems to be a little complicated,more so then it should be... basically when you trigger it, it checks first PC and then updates his list then continues for every player logged in, not horrible, but conditions such as 1) player A logs in and all is well. 2) player B logs in and now player A and player B also has his list auto updated...etc, so on so forth...not so good for a server running more than 1 player. I would suggest this. when one creates a scry point. 1) SetCampaign(object,location or however your doing it) when one uses the scry object to actually utilize his scry points use a 2)GetCampaign on the OnConvo script that way its only being populated when needed and not each time someone logs in/out. if I am too vague let me know and I can write it out more clearly for you. _________________________ [Seasonal Forest Tileset] [Fantasy Dungeon Tileset][Scorched Earth Tileset] [Mirkwood Swamp Tileset] [Cypress Bayou Tileset] [Undersea Tileset] [Reworked Werewolf Model] [Helmet Pack] [Remodeled Night Hag][WoRm Head Hands Model][Goblins Override][Zombies Override][Ghouls Override] [Werewolves and Fire Giants remodels][Bugbears Facelifts][Minotaurs Facelift][Wagon Interiors][Arbor Falls~ Downloadable Persistant World]
Posted by lordofworms at on04/26/11
what..wait? you already have one...lol..downloading now..hehe _________________________ [Seasonal Forest Tileset] [Fantasy Dungeon Tileset][Scorched Earth Tileset] [Mirkwood Swamp Tileset] [Cypress Bayou Tileset] [Undersea Tileset] [Reworked Werewolf Model] [Helmet Pack] [Remodeled Night Hag][WoRm Head Hands Model][Goblins Override][Zombies Override][Ghouls Override] [Werewolves and Fire Giants remodels][Bugbears Facelifts][Minotaurs Facelift][Wagon Interiors][Arbor Falls~ Downloadable Persistant World]
Posted by lordofworms at on04/26/11
I am already using this in my live game.I just re-do my scry locations..which yeah kinda bums but hey, its still too cool not to! looking into your code somewhat I see your SettingLocalObjects on the oPC. which yes, wont work for items even if we convert to storing the localobject on the item itself. I am using NWNx and would glady work with you on this for an alternate version for persitence, dont remove your original as I am sure many single player campaigns can use this as is! I will see about using your base mod and setting a nwnx version and get back to you soon.. _________________________ [Seasonal Forest Tileset] [Fantasy Dungeon Tileset][Scorched Earth Tileset] [Mirkwood Swamp Tileset] [Cypress Bayou Tileset] [Undersea Tileset] [Reworked Werewolf Model] [Helmet Pack] [Remodeled Night Hag][WoRm Head Hands Model][Goblins Override][Zombies Override][Ghouls Override] [Werewolves and Fire Giants remodels][Bugbears Facelifts][Minotaurs Facelift][Wagon Interiors][Arbor Falls~ Downloadable Persistant World]