X-wing(DOS-Collector) Portrait Asignment Algorythm Solution

This is the place for chit chat! Everything goes even Star Trek! Just make sure to buy the Moderator a drink!
Post Reply

X-wing(DOS-Collector) Portrait Asignment Algorythm Solution

Reizomonje
Recruit
Posts: 2
Joined: Sat Oct 06, 2012 3:47 pm

Post by Reizomonje » Sat Oct 06, 2012 4:17 pm

X-Wing (DOS & Collector CD-ROM)

In this game, pilots have an apparently random selected portrait based on their names.

I reverse-engineered the algorythm last night, it was quite fun actually.

Here it goes:

--There are 24 portraits in total ranging from number 0 to number 23

--Each symbol in the pilot name has a static numerical value ranging from 0 to 23

--The portrait is calculated by adding the numerical value of each symbol in the pilot name.

-If the computed number is >=24, then substract a multiple of 24 from the number until you get in range 0-23
for example
24 = 0, 26 = 2 (26-24*1), 48 = 0 (48-24*2) ,
50 = 2 (50-24*2), 71 = 23,
72= 0, 73 = 1 (73-24*3).

-The table is as follows:
0 = 0 6 = 6
1 = 1 7 = 7
2 = 2 8 = 8
3 = 3 9 = 9
4 = 4 - = 21
5 = 5 _ = 23

A = 17 B = 18 C = 19 D = 20
E = 21 F = 22 G = 23 H = 0
I =1 J = 2 K = 3 L = 4
M = 5 N = 6 O = 7 P = 8
Q = 9 R = 10 S = 11 T = 12
U = 13 V = 14 W = 15 X = 16 Y = 17 Z = 18

EXAMPLES:

FOX = F+O+X = 22+7+16 = 45 -> 45-24 = 21 portrait n°21 (FOX = XOF = OFX = XFO = FOX0000 = FOXHHHH)

LUKE = L+U+K+E = 4+13+3+21 = 41 --->>>>41-24 = 17 portrait n°17 (( LUKE = UKEL = EKUL = ULKE = LUKEHHHH = LUKE0000 = 17))

SNAKE77 = S+N+A+K+E+7+7 = 11+6+17+3+21+7+7 = 72 -->72-24*3 = 0 portrait n°0 ((SNAKE77=7SNAKE7=77SNAKE=7EKANS7))

And that´s it. Have fun selecting your portraits for you and your squad!!!!!

Dedicated to Alan Turing

User avatar
Fader
Galactic Empire
Posts: 351
Joined: Tue Feb 05, 2008 12:01 am
Contact:

Post by Fader » Fri Nov 16, 2012 1:38 pm

Interesting, good check :)
Work in progress: Clone Fighters, the Rise of the Empire campaign XWA mod
Status: ~60%; 6/13 missions; new music suite
Trailer on Youtube: http://www.youtube.com/watch?v=8BI8afj13sg
Download the pre-release: rev.0.6 at
http://www.maxgames.it/xwa

Fek'LeyrTarg
Cadet 1st Class
Posts: 243
Joined: Mon Mar 03, 2008 12:01 am

Post by Fek'LeyrTarg » Wed Nov 21, 2012 5:46 am

I agree. Thank you for finding this out. :)

Post Reply