[bug] Please Give player ship designs an internal serial number to avoid upgrade problems.

I used the designer to create a cargo hull with a bunch of Hyperdrive Plus engines.  I called this design:  "Speedy Cargo I".   Now this design couldn't go anywhere because I had forgotten to include life support.    So I used the designer again, taking the option to use the existing design for "Speedy Cargo I".

I removed one of the "Hyperdrive Plus" engines in the design to add a "life support" module.  Then I saved my new design under the same name: "Speedy Cargo I".   Then I deleted the original "Speedy Cargo I" design.

After this, I tried to upgrade my ship from the old: "Speedy Cargo I" to the new "Speedy Cargo I" design but I could not.   I presume that it is because you are using the name as unique identifier.  

I suggest you create an internal serial number for the ship designs, so that when you enter the upgrade menu, it will show all available designs for that hull size which does not match the internal serial number of the design of the ship you are using.   Display them showing most recent design first.

If using a string:
Some suggestions for format:   XXXXHHHHH:   

XXXX     = Internal date of ship design.  Number of days since January 1st 2013 converted to Hex. 
HHHHH  = Internal time computer when design was saved in seconds.

If using an 32 bit integer:
If the memory required to store this is an issue, you can store this info in a 32 bit integer (or two 16 bit integers).  The first 16 bits can be the internal date of the ship design which gives you 179 years that you can represent in internal date.   The remaining 16 bits, you can use to represent the internal time in rounded off to 2 second units.  There are 43200 2 second units in a day.   So it's 4 bytes for an internal serial number.    

To convert your internal time in seconds (max 86400) to 2 second units just divide your internal time by 2.

49,132 views 7 replies
Reply #2 Top

Thank you for the feedback, I was able to upgrade my custom ship designs in the internal build. So the good news is that this should behave properly in the next update.

Reply #3 Top

After this, I tried to upgrade my ship from the old: "Speedy Cargo I" to the new "Speedy Cargo I" design but I could not.   I presume that it is because you are using the name as unique identifier.

did you enable the shortshipnames in the console? Because that is the only time i have seen this problem.
Note that there are several problems with overwriting and deleting ship designs that are created when in shortshipname mode.
 
I suggest you create an internal serial number for the ship designs
 
Normally the ship designs already have a 32 hex (= 128 bits) serial number (unless disabled by the shortshipnames command). You can see this number appended to the ship name if you look in your "My Games\GalCiv3\Designs" directory.
 
 

 

+1 Loading…
Reply #4 Top

Hey thanks for alerting me to the short ship names thing.  A trap to avoid!

 

Reply #5 Top

Quoting Turkwise, reply 1

Are you.......are you giving them programming lessons?


Not lessons, suggestions that is the point of evaluating the beta.  I've been an analyst programmer for 21 years professionally, but I started programming in machine language, assembly & Basic when I was a kid during the 1980's so I've some experience.  I mostly do work on billing systems, data conversions and dot.net.  So my suggestions tend to be expressed both from a user's perspective who has used many software interfaces over the years and from a programmer's point of view.

There is no need to get offended on behalf of the team that designed the product.

I think it's better to point something out with a possible solution than just complain no ?

I looked in the \My Games\GalCiv3\Designs directory and I do not have the short names active, all my ships have a serial number.  So it must be something else.

I also noticed that when two design exist with the same name, one based on the other, that one of the two ships will not have a graphic representing it in the designer list.

I will try to replicate the problem the next time I play, and will take note of the file names generated after saving both ships.


Reply #6 Top

On a related issue, when you save a ship there is a button to save as template.   But...then it doesn't get saved as a build.   So you have to remember to save first normally then go back and resave it as a template.  That seems like extra, unnecessary work.

Or I am just missing something, as per usual.

 

Reply #7 Top

Quoting Bamdorf, reply 6

On a related issue, when you save a ship there is a button to save as template.   But...then it doesn't get saved as a build.   So you have to remember to save first normally then go back and resave it as a template.  That seems like extra, unnecessary work.

Or I am just missing something, as per usual.

 

 

Nope, not missing anything.  I usually do it the other way around, though: save as template, then add the equipment.

 

JacquesGauthier I wasn't being offended, just, surprised.  But I do usually assume that people on the internet don't know what they are talking about!  That assumption is not often wrong... people here are smarter than the average internet-goer though.