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

Player Data Structure


FilipeBS
 Share

Recommended Posts

Hi folks!

I'm trying to save the player, npcs and itens data into a mysql database and i have some questions. As the server save the player data in a bin format i can't see how the data is stored. There is some way for me to see the data structure?
Link to comment
Share on other sites

modtypes on the server

```

Private Type PlayerRec

' Account

Login As String * ACCOUNT_LENGTH

Password As String * NAME_LENGTH

' General

Name As String * ACCOUNT_LENGTH

Sex As Byte

Class As Long

Sprite As Long

Level As Byte

exp As Long

Access As Byte

PK As Byte

' Vitals

Vital(1 To Vitals.Vital_Count - 1) As Long

' Stats

Stat(1 To Stats.Stat_Count - 1) As Byte

POINTS As Long

' Worn equipment

Equipment(1 To Equipment.Equipment_Count - 1) As Long

' Inventory

Inv(1 To MAX_INV) As PlayerInvRec

Spell(1 To MAX_PLAYER_SPELLS) As Long

' Hotbar

Hotbar(1 To MAX_HOTBAR) As HotbarRec

' Position

Map As Long

x As Byte

y As Byte

Dir As Byte

End Type

```

Player Data for example
Link to comment
Share on other sites

I kown this. I mean for exemple the "Vitals", the "Stat" and the "Equipment" if you remember i old eclipse/elysium we had HP/MP values stored instead "Vitals" we had the Str, Agi, End, Will, Int instead the "Stat". Do you understand what i want to say now?

I want to know if i have to create a collum HP and MP separated or just Vitals. You got it?
Link to comment
Share on other sites

server,modEnumerations under the client/server packets.

```

' Stats used by Players, Npcs and Classes

Public Enum Stats

Strength = 1

Endurance

Intelligence

Agility

Willpower

' Make sure Stat_Count is below everything else

Stat_Count

End Enum

' Vitals used by Players, Npcs and Classes

Public Enum Vitals

HP = 1

MP

' Make sure Vital_Count is below everything else

Vital_Count

End Enum

' Equipment used by Players

Public Enum Equipment

Weapon = 1

Armor

Helmet

Shield

' Make sure Equipment_Count is below everything else

Equipment_Count

End Enum

' Layers in a map

Public Enum MapLayer

Ground = 1

Mask

Mask2

Fringe

Fringe2

' Make sure Layer_Count is below everything else

Layer_Count

End Enum

' Sound entities

Public Enum SoundEntity

seAnimation = 1

seItem

seNpc

seResource

seSpell

' Make sure SoundEntity_Count is below everything else

SoundEntity_Count

End Enum

```
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...