I’m making a character creation UI and thought it might be a good idea to create some system that would allow for creating character codes and sharing them, so for example the player makes a character, clicks a button that copies all of the values to the clipboard, and then the player can share the code online or whatever. Other players can then click another button, paste the code and if it’s valid set all of the values to the values saved in the code.
An example is here: NCSOFT West and an example code from there is eNrj/cDAwMTAwCAAxIxAvByI2YFYCMoHYZA8JxAzAzEbELMAMStUHUhMEComCcRcUD01PiBdNTwg+f/2IFkvEZAexgY2MAm2wxRk6ll3XiCpe5EPSHbd4geSFUtBrpG6AzJ3nQvIJdNfiIB0HRAFqxEDkv2OEkCyUwoAk/oS0g==
I don’t really know how to create this system though. For example I don’t really know why the above system uses both normal and capital letters, maybe as some kind of deliminator?
My first idea is that you could read two characters and check if the both characters are capital letters or numbers (or some combination of those), in that case read the value as a hex value (useful for a slider or something, also colors). If it was a lowercase letter you could read it like an int (a=0,b=1 etc), useful for options, like hair styles. Booleans could be some special character like / and \ or whatever. Then jump forward to the next value and find out what value that represents. Then you could make a string of all the values of your character in some arbitrary order and read it back in the same order and it should work.
I’m wondering if anyone has experience/ideas regarding a system like this.