View previous topic :: View next topic |
Author |
Message |
chris421
Joined: 07 Apr 2005 Posts: 53
|
Posted: Mon Apr 25, 2005 7:42 Post subject: Anyone saving characters as objects vs. BICs? |
|
|
My PW currently uses the traditional Bioware export functions to periodically update the character BIC files. To prevent logout/server crash exploits, I also store variables to a MySQL database. I capture & write things like last HP, remaining Feats, Spells, Appearance, and Location.
Is there a better way?
Now that we can Set/GetPersistentObject, can players be saved as objects and recalled at login using just the BIC for the NWN character selection screen?
Got encouraged to ask this about player objects after I got MBHK saving Henchmen to MySQL instead of the Bioware DB. Really happy with that. However creating creature objects apparently is a lot easier than replacing pc objects. Tried a bunch of funky things...destroying the PC and copying in a new one, overwriting oPC with the BLOB. But it always seems to just pull from the BIC. I'm really lost. |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Mon Apr 25, 2005 8:13 Post subject: |
|
|
I am pretty sure you can not replace the player's object after he has logged in. I have not tried it, but this seems just unlikely given how Bioware does things. _________________ Papillon |
|
Back to top |
|
|
Senalaya
Joined: 29 Dec 2004 Posts: 82 Location: Germany
|
Posted: Mon Apr 25, 2005 9:46 Post subject: |
|
|
Another problem is, that PCs will be turned into NPCs, when saved with SCO. (IsPlayer=0) |
|
Back to top |
|
|
Primogenitor
Joined: 08 Jan 2005 Posts: 88
|
Posted: Tue Apr 26, 2005 14:22 Post subject: |
|
|
You could use Letoscript to output the blob to a .bic file, but that wouldnt be easy. Id love to use such a script, but I dont have time to write it. I could help you though if you wanted to go down that path. In any case, it wouldnt solve HP,spells,feats, etc since thats recalculated on Login. |
|
Back to top |
|
|
chris421
Joined: 07 Apr 2005 Posts: 53
|
Posted: Thu Apr 28, 2005 8:59 Post subject: |
|
|
I may re look at Leto next time I need a gargantuan list of something made. Not running it in the mod atm though.
Still, players stored & recalled from the database would definitely change things. Vaultster for one would benefit. Instead of file transfers you could have a few VPN tunnels connecting remote MySQLs. Synchronization would be cleaner.
Would be even nicer if we had some go-between driver between MySQL and NWN that could emulate a filesystem. So that the engine actually thought it was reading and writing directly to & from a BIC.
Way beyond my skillset. I'm still struggling with persistent Henchmen. GL to the rest of you.
If anyone wants to take a look, it's the Action PW "Thirdage. Champions of Middleearth". Requires CEP151+PRC22c+the merge HAK/TLK from the vault. "Bree" is the testbed for Henchmen atm. |
|
Back to top |
|
|
Kosmous
Joined: 10 Jan 2005 Posts: 44
|
Posted: Sat May 07, 2005 12:27 Post subject: |
|
|
doesnt seem to be a problem to export from the database. Ive trid this myself even with mosnter blueprints (u need to turn off ELC and make sure the monster "character" is either level 0 or has somehow been given the appropriate xp... otherwise NWN thinks its corrupt). Someone helped me out with the proper SQL steatement too.
SELECT bic_blob_column INTO DUMPFILE "/path/to/where/you/want/it/saved"
FROM table |
|
Back to top |
|
|
|