Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Editing players' data


yoshiboy
 Share

Recommended Posts

thanks for the advice, but I need to know where players' data are stored and how does EO read them…

I wish to add attributes to the players.. say if they join a guild, it would make .. for example in the player.bin .. guild=warrior

any advice on this? thanks
Link to comment
Share on other sites

@yoshiboy:

> thanks for the advice, but I need to know where players' data are stored and how does EO read them…
>
> I wish to add attributes to the players.. say if they join a guild, it would make .. for example in the player.bin .. guild=warrior
>
> any advice on this? thanks

The player data is stored in binary format. That is, numbers are converted to their binary equivalent based on their type, and then written into the file. You can open it in a hex editor (preferably with ASCII support) and manually edit it. Alternatively, you can modify Lightning's Account Editor to allow for your format.

But it seems more like you want to add a new type to the PlayerRec, so you can store more data in the account. Am I correct? If so, that is a different method than what I am describing.
Link to comment
Share on other sites

@Soul:

> The player data is stored in binary format. That is, numbers are converted to their binary equivalent based on their type, and then written into the file. You can open it in a hex editor (preferably with ASCII support) and manually edit it. Alternatively, you can modify Lightning's Account Editor to allow for your format.
>
> But it seems more like you want to add a new type to the PlayerRec, so you can store more data in the account. Am I correct? If so, that is a different method than what I am describing.

Ive just seen the PlayerRec, Yes it seems appropriate there. But for that,where do i define it? Can I just add the variable at the top of PlayerRec ?
```
Private Type PlayerRec
    ' General
    Guild As String
```Looking around at the code im curious at some variables… Ive seen the name as Long, and level as Byte? What are Long and Byte? Shouldnt the name be a String?

Also, when a player creates a character, I need to ensure guild=none  when they creates a new account ,where is the appropriate event to catch that?
Link to comment
Share on other sites

@yoshiboy:

> Ive just seen the PlayerRec, Yes it seems appropriate there. But for that,where do i define it? Can I just add the variable at the top of PlayerRec ?
> ```
> Private Type PlayerRec
>     ' General
>     Guild As String
> ```Looking around at the code im curious at some variables… Ive seen the name as Long, and level as Byte? What are Long and Byte? Shouldnt the name be a String?
>
> Also, when a player creates a character, I need to ensure guild=none  when they creates a new account ,where is the appropriate event to catch that?

Refer to [this for datatype information](http://msdn.microsoft.com/en-us/library/aa263420%28v=vs.60%29.aspx).

You should use a fixed length string, so use:

```
    Guild As String * NAME_LENGTH

```
You could change NAME_LENGTH to a number, but NAME_LENGTH is a general standard for all strings in the game that need names.

But yeah, may I suggest [just installing a pre-made guild system](http://www.touchofdeathforums.com/smf2/index.php/topic,78441.0.html)?
Link to comment
Share on other sites

@Soul:

> Refer to [this for datatype information](http://msdn.microsoft.com/en-us/library/aa263420%28v=vs.60%29.aspx).
>
> You should use a fixed length string, so use:
>
> ```
>     Guild As String * NAME_LENGTH
>
> ```
> You could change NAME_LENGTH to a number, but NAME_LENGTH is a general standard for all strings in the game that need names.
>
> But yeah, may I suggest [just installing a pre-made guild system](http://www.touchofdeathforums.com/smf2/index.php/topic,78441.0.html)?

Hello,

It seems that system ideally for clans that are made by players.
I wish to assign new players the value for guild=none; when they spawn, and they can join npc-built guilds later in the game.
Link to comment
Share on other sites

@yoshiboy:

> Hello,
>
> It seems that system ideally for clans that are made by players.
> I wish to assign new players the value for guild=none; when they spawn, and they can join npc-built guilds later in the game.

In order to set the guild, just do:
```
Player(index).Guild = "Guild Name"

```
You'll have to decide where to put that though. If you need help, you can ask.
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
 Share

×
×
  • Create New...