View previous topic :: View next topic |
Author |
Message |
RQScott
Joined: 09 Jun 2005 Posts: 6
|
Posted: Tue Jan 30, 2007 19:37 Post subject: Locations: 1.06 to 1.07 Update SQLScript |
|
|
Since i have already used the SetPersistentLocation-Function (I used the SQLLocationToString/SQLStringToLocation) i thought it might be usefull to provide a script to "convert" the old values to the new ones, used from Prototype 1.07.
Using MySQL!
Backup your data before executing any SQL Scripts!
For use with the "pwdata"-table as provided by nwnx:
Code: |
update pwdata set val = replace(val,'#AREA#','#A#'), val = replace(val, '#POSITION_Y#', '#Y#'), val = replace(val, '#POSITION_X#', '#X#'), val = replace(val, '#POSITION_Z#', '#Z#'), val = replace(val, '#ORIENTATION#', '#O#');
|
Recognize, that the script will replace all matching substrings. If you dont use strings like "#POSITION_X#" or the other changed substrings for other data, you dont have to worry about the other records.
For use with custom tables:
Change the above Script:
a) pwdata to your tables name
b) val to the column name used for locations |
|
Back to top |
|
|
Grinning Fool
Joined: 12 Feb 2005 Posts: 264
|
Posted: Sat Jul 21, 2007 5:46 Post subject: |
|
|
I had need of this tonight -- thanks for posting it! _________________ Khalidine, a NWN2 persistent world
Looking for volunteers. |
|
Back to top |
|
|
nosfe
Joined: 25 Apr 2007 Posts: 22
|
Posted: Mon Sep 03, 2007 10:08 Post subject: |
|
|
What is it the good last Location ? the short name or large name ?
|
|
Back to top |
|
|
Urlord
Joined: 17 Nov 2006 Posts: 122
|
Posted: Fri Oct 19, 2007 4:35 Post subject: |
|
|
This may seem really stupid, but did I miss something?
My areas are still in the #AREA#...#POSITION_X#...#POSITION_Y#...#POSITION_Z#...#ORIENTATION# format.
Just checking? _________________ Jim (aka, Urlord)
Visit the Persistent World of Nymri |
|
Back to top |
|
|
Gryphyn
Joined: 20 Jan 2005 Posts: 431
|
Posted: Fri Oct 19, 2007 6:35 Post subject: |
|
|
Urlord wrote: | This may seem really stupid, but did I miss something?
My areas are still in the #AREA#...#POSITION_X#...#POSITION_Y#...#POSITION_Z#...#ORIENTATION# format.
Just checking? |
When you update to 1.08 (the above) old locations - as strings - exceed the length of the buffer (capped at 128bytes). The simple solution is to re-format the encoding to #A#...#X#...#Y#...#Z#...#F#...#E# and shrink the string length. It does mean you need to 'convert' any existing data, and use the new 'seperators'
Cheers
Gryphyn |
|
Back to top |
|
|
|