Author Topic: Turd List (Player Turds) - Yes - Thats right - Dont laugh  (Read 996 times)

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
Turd List (Player Turds) - Yes - Thats right - Dont laugh
« on: December 03, 2010, 11:45:21 am »


               Anyway..
I have a question, which is probably best answered by someone who has knowledge of the internals of nwn.
eg - Plugin creation, or application creation.


My question is in regards to the Player Turd List - which is basically as I understand it, a cache of every player who has joined the server, in that server instance, all of their data etc.

eg - Areas Explored
      - Locally Stored variables
      - Their location when they logged out etc.


The reason I ask my question, is because I am using the 'ClearPlayerTURDS()' method, introduced via nwnx, this is a kind of necessity for me, in order to work around a bug in another plugin.

While I know that Locally stored variables on the players are LOST when this is called, can anyone confirm what happens to variables stored on the module or objects in the game?

Is it JUST  player variables lost, or is it ALL variables that get wiped with this method call?
               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
Turd List (Player Turds) - Yes - Thats right - Dont laugh
« Reply #1 on: December 03, 2010, 06:06:24 pm »


               I laughed. What plugin is CearPlayerTURDS in? Never heard of it.



Funky
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Turd List (Player Turds) - Yes - Thats right - Dont laugh
« Reply #2 on: December 03, 2010, 06:42:02 pm »


               This is certainly wrong forum for question like this. Anyway, im not sure if I understand, you mean some internal variables like player list? thats gone with leaving the game, or what.



And whats the difference if it would be true? I can't see one. I had something similar on my arena gameworld (where the consequeces of this are suitable for), but we dropped that because of memory leak.
               
               

               
            

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
Turd List (Player Turds) - Yes - Thats right - Dont laugh
« Reply #3 on: December 03, 2010, 07:45:34 pm »


               The Function is in nwnx_funcs for windows.

The function clears the Turds for all players who are currently offline.

It allows you to simulate the player arriving for the first time in the server.

Eg - player would arrive at start location, as if it was first time.



However, while I know that this would wipe local vars for players, which are technically stored on the module.   eg GetLocalInt(oPC,"var_name");  is actually retrieved from the module object, hense why a LocalVar is not stored with players persistently.



I was just wondering if LocalVars stored on objects, such as the module directly (as the targetted entity), would these too be wiped on a turd wipe?



The reason I use ClearTurds  is to work around the bug present in the version of nwnx_areas I use, which causes an area blackout when a player logs out, then returns to a generated instanced area.



I theorized that the cause of the blackout was because the minimap data was not being stored properly in the turd for players who visit that area.



This was confirmed, because if I clear the player turds, on ClientExit, the player can then visit the area again, and not be affected by the area blackout effect.





In any case, never mind, I guess I will just have to test it out and find out.
               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
Turd List (Player Turds) - Yes - Thats right - Dont laugh
« Reply #4 on: December 03, 2010, 08:05:10 pm »


               I know why you use it, since I saw your thread on the NWNX boards. Curiously, searching for that function name only turned up the single post by you, nothing in the dev boards. I don't see why it would clear anything but player data, but it should be easy to test and see.



Funky
               
               

               
            

Legacy_virusman

  • Sr. Member
  • ****
  • Posts: 448
  • Karma: +0/-0
Turd List (Player Turds) - Yes - Thats right - Dont laugh
« Reply #5 on: December 04, 2010, 06:41:35 pm »


               CNWSPlayerTURD stores only PC-specific information, like reputation and area exploration data.

Clearing it won't affect other objects in the game.