Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! Clones, Extensions, Modding » Stars! Nova - Development » Need to move away from using names as IDs
Re: Need to move away from using names as IDs Fri, 24 June 2011 21:28 Go to previous messageGo to previous message
Aeglos is currently offline Aeglos

 
Chief Warrant Officer 1
Stars! Nova developer
Stars! Nova developer

Messages: 142
Registered: May 2011
Location: Chile
Yes, this also extends to races. Sorting everything manually by "RaceName/some#" is cumbersome and hard to mantain. Preferably this variable should be as automatic as possible.

The Item base class has a Key property which returns an already formed <Owner/Name> string for use on collections but it's used mostly on the Design Manager for now and that still poses problems. But it's a starting point. Players are also already asigned a number at game creation.

We can either use something like racename+playernumber to identify each empire, or generate a unique empire number and use racename+empirenumber, which I'm leaning towards to in case we want to implement multiple players per empire as Evil suggested. That solves the duplicate race issue I believe.

EmpireData should hold ShipDesignID (0 to 16), StarbaseDesignID (o to 10) and FleetID (0 to 512) counters to use as part of the unique keys for designs and fleets, and to also keep track of the amount of them.

I'd rather not do this myself yet though, as the refactoring I'm doing now is big enough. If someone else does it I'll still merge it ot the branch and update any conflicts that may arise.

EDIT: This also extends to the methods of comparison we are using now. We use Race.Name to check for ownership everywhere, we should change it to the new ID method we choose to apply, as Owner should be a Key ID and not a simple race name.


[Updated on: Fri, 24 June 2011 22:34]

Report message to a moderator

 
Read Message icon4.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon14.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Turn year
Next Topic: Orders overwriting Star Data
Goto Forum:
  


Current Time: Thu May 02 10:25:23 EDT 2024