Jump to content
  • 0

Plot poles and UID


BetterDeadThanZed

Question

I thought I had read someplace that plot poles were going to be linked to UID's so when you die, you can continue to build without having to remove the plot pole? I've got a player right now that has broken 3 crowbars trying to remove his own plotpole. If this hasn't been done, is there a mod I can put it to change it?

Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0
// Find owner
    _ownerID = _nearestPole getVariable["CharacterID","0"];
 
As long as they don't change their name, I think Character ID stays linked to the same player. You can die and retain the same character ID. I'm not sure if you can change your character and retain it though.
Link to comment
Share on other sites

  • 0

 

// Find owner
    _ownerID = _nearestPole getVariable["CharacterID","0"];
 
As long as they don't change their name, I think Character ID stays linked to the same player. You can die and retain the same character ID. I'm not sure if you can change your character and retain it though.

 

 

What file is this in?

Link to comment
Share on other sites

  • 0

 

// Find owner
    _ownerID = _nearestPole getVariable["CharacterID","0"];
 
As long as they don't change their name, I think Character ID stays linked to the same player. You can die and retain the same character ID. I'm not sure if you can change your character and retain it though.

 

 

I think CharacterID is database table character_data.CharacterID, which changes everytime you die.

Link to comment
Share on other sites

  • 0

 

// Find owner
    _ownerID = _nearestPole getVariable["CharacterID","0"];
 
As long as they don't change their name, I think Character ID stays linked to the same player. You can die and retain the same character ID. I'm not sure if you can change your character and retain it though.

 

Changing character name wont do anything. Your GUID is tied to your PlayerUID. CharacterID is assigned per life, PlayerUID is never changed. If you die you get a new CharacterID. If you want it to retain ownership you must change how it  writes to the DB PlayerUID into the CharacterID field, not if the player is near a plot pole and has the ID. If you change that line, it will break it so that it never looks for the proper ID of the player.

Link to comment
Share on other sites

  • 0

I'm very curious why the epoch development team decided to log the CharacterID in the object_data table instead of logging the PlayerUID or GUID.

 

In the last case, plot poles (or every built element) would stay linked to the player who placed them, even after death. That would also unlock the option for players to remove something they've build.

 

Edit:

It's possible with the current database layout as well, but a little more hassle. Something like this:

 

Scenario: Player has build plot pole near base, dies, goes back to base to build near plot pole again.

 

- Compare characterID from object_data table with characterID from character_data table

- If it's the same, it let's you build.

- If it's not the same:

 

1. check the OLD characterID linked to the plot pole within the object_data table.

2. find characterID within character_data table using the OLD characterID which has been found in the object_data table.

3. compare the playerUID which is linked to the OLD characterID with the playerUID from the NEW characterID.

4. Same playerUID? Let's you build. Not the same playerUID? too bad.

Link to comment
Share on other sites

  • 0

I see 2 problems with this workaround:

 

  • It has to be iterated ofer all old characterIDs (some people die multiple times a day, especially those who fall victim to the new sport: sniping builders).
  • Old characterIDs may be removed by the admin as part of database maintenance.

 

But, as you said, I'd like to know the reason for choosing/keeping the CharacterID over the PlayerUID, too.

I think it's a bad design decision but I know that once made, design decisions are not easily revoked because this means there's work to do in the present, with the hoped for profit in the future.

 

And, please, move the codes out of the ownerID field!

A few days ago we found a blacklisted pipebomb in a safe, an item that on our server can only be spawned by illegal means. But with the OwnerID overridden by the safe combo we have no way of identifying the owner!

 

ceterum censeo: it's the dream of every administrator to be able to identify/remove all items a player built, the only way for this to work is to have a OwnerID field consistently filled with the PlayerUID.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...