Jump to content

[question] SystemUpgrade unique identifier?


Nic_s

Recommended Posts

First, I've never done anything with lua before. I work mostly in C#, js, and html... So excuse my lack of knowledge here.

 

I'm messing around with some ideas when I found something that's kinda got me stuck.

 

I'm getting all the system upgrades in a players inventory using 'getItemsByType', but there doesn't seem to be any kind of unique identifier for these... err... objects?

 

Link to available properties: http://stonelegion.com/Avorion/Documentation/SystemUpgradeTemplate.html

 

 

I want to store information about them for later use. Don't know how I'm going to store it yet, but if I can't identify them in some unique way then it won't matter.

Link to comment
Share on other sites

  • 5 months later...

Sorry for the necro...

 

I've taken a little break from the game, but I am still curious if there is a way to uniquely identify a module in your inventory? An id field of some sorts? It could be as simple as an integer variable. Every time a player picks up a module, the game can look at what int values are already in use and then choose the next available int value.

 

Or maybe GUIDs can work? Then each item will generate with it's own unique ID on the server.

 

New link to existing properties for a system upgrade: https://avorion.gamepedia.com/API:SystemUpgradeTemplate

 

I want to make this: http://www.avorion.net/forum/index.php/topic,2637.msg13832.html#msg13832

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
×
×
  • Create New...