The numbers that are given to the ships are not static, as you allreadyStormsorter wrote:Loving it so far but one personal annoyance. So far all I have done is make one clipboard entry "*DN *KOCompany name" and ad it to the front of all defaults. I then used the rename all with defaults option. The first thing I noticed was whenever I got a new ship and used "rename selected ship/station with defaults" it would become number 1 instead of a new highest number for its class. Then when *DN updates the *ZN numbers for the class group they get mixed up. A simple example would be I have 5 TS's and get a new one, but instead of getting the #6 when DN updates it becomes #3 and the previous #3 becomes #6.
Would it be difficult to add a static number option that worked per class or even better per model or am I just overlooking one? Of course it would need a sister option to fill the lowest missing number with a new ship when one gets destroyed.
found out, they are given by the number of ships processed.
as example you have 5 TS numbered, the first TS processed gets the one,
the third get the three and the fifth gets the five.
The order of processing the ships is the order they are packed in the
ship-array by the command
Code: Select all
get ship array: of race {Player} class/type=$class
ones out which should not be renamed and send the remaining to
the renaming process.
the order of the ships inside the list are given by the command, i never
found out a defined order, it seems a semi-random kind of process,
maybe the ship idcode has influence on the order but can't confrim that.
to make a static list I would need to save the last known number, and
sort the shiplist by that order.
this would not be too hard but it has a flaw which i need to compensate.
so lets play with the 5 TS again
we rename them from 1-5, but then we remove the number two, and add
a new TS.
If we got lucky the new one gets the number two, now we add
the old number 2 again to group, so now we have two 2's and it would
bring my sorting functon in an infinite loop, which we only can avoid if
we set which one stays number 2 and which one have to draw a new
number.
you might ask why it would end in an infinite loop?
well lets say the order of the ships is 1 4 2 2 3 5
if i start at the beginning and move each number to it place the computer
will do it like this
first number 1 allready on place -> 142235
second number 4 to place four -> 122435
third number 2 to place two -> 122435
fourth number 4 to place four ->122435
fifth number 3 to place three -> 123245
sixth number 5 to place five -> 123254
so after one sorting we get 123254 since you CAN THINK you would
have sorted 123452 but the computer CAN NOT so there we got a flaw,
we could run it again and we would get 122345 which is good for this
short number of ships but lets say we have 256 ships in disorder, i doubt
it would be enough to sort it twice. so we have to let the computer go
back in the list to point where it put the last number if it was smaller then
the current position.
so in my example with 1 4 2 2 3 5
the computer would work like this
first position allready on place -> 142235 next number 1+1 -> 2
second position 4 to place four -> 122435 number higher than position next number 2+1 -> 3
third position 2 to place two -> 122435 number lower than position goback and next number 2+1 -> 3
third position 2 to place two -> 122435 number lower than position goback and next number 2+1 -> 3
third position 2 to place two -> 122435 number lower than position goback and next number 2+1 -> 3 and so on
we could say the older ship should get the two and the newer
ship should draw a new number, but i found no function regarding the
age of the ship.
so we say if the number at the position got the same number as
one we want to move there we could delete one of the numbers and add it to the end of the list.
But then there is still the chance that the current number two is send
to the end of the list instead of the added number two, which is what you
complained about and you would ask me why the static lists still change.
So if you could not follow everything i wrote above i would summarize it like this:
I could add a semi-static list which should not change BUT which can
change in certain situations!
if you like i can add it like that would not be too hard
Greetings Medevel