Champion text format (DM)
Forum rules
Please read the Forum rules and policies before posting.
Please read the Forum rules and policies before posting.
-
- Neophyte
- Posts: 8
- Joined: Mon Jul 25, 2005 12:18 pm
Champion text format (DM)
I looked through this whole section of the forum but couldn't find anything related, except one post that said nobody knew how to do this yet.
dmweb mentions on the file formats page that the champions' stats are stored in texts. But when it comes to the Champion Texts subsection of the Texts Format section, it says they're stored in the following way, then goes into the List of Doors section. Has anyone ever figured out how this works? I tried examining a few characters, comparing their stats and their text strings, but I couldn't come up with anything at all. If anyone has any idea how to decode these things, I'd very much appreciate it.
-Argent
PS- I am also working with the SNES version Does anyone know if it's safe to use CSBuild to edit the dungeon.dat? (I used one DM_SNES_PCAT_Exchange.exe to extract the dungeon.dat from the ROM, which apparently can also re-insert it.) I haven't come across much info at all on the ROM version - which was actually the first version of DM I ever played.
dmweb mentions on the file formats page that the champions' stats are stored in texts. But when it comes to the Champion Texts subsection of the Texts Format section, it says they're stored in the following way, then goes into the List of Doors section. Has anyone ever figured out how this works? I tried examining a few characters, comparing their stats and their text strings, but I couldn't come up with anything at all. If anyone has any idea how to decode these things, I'd very much appreciate it.
-Argent
PS- I am also working with the SNES version Does anyone know if it's safe to use CSBuild to edit the dungeon.dat? (I used one DM_SNES_PCAT_Exchange.exe to extract the dungeon.dat from the ROM, which apparently can also re-insert it.) I haven't come across much info at all on the ROM version - which was actually the first version of DM I ever played.
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
-
- Neophyte
- Posts: 8
- Joined: Mon Jul 25, 2005 12:18 pm
Um, yeah. Thanks. o.o; *wonders idly what the emulator might do if he tried that* heh...It is perfectly safe. Neither has any explosives. But, once you
edit it with CSBuild, you will never read it again with any other
program except CSBwin.
Define "plainly." I'm not a programmer, you see, especially not a C programmer. I did try downloading both source codes at your suggestion, but sadly I have no idea where to even look for the function. And even if I found it, I probably wouldn't understand it.The source code for both CSBuild and CSBwin are
freely available and contain the encode/decode functions
rather plainly.
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
Horse Hocky. Here is a guidebuook for Dummies.I probably wouldn't understand it. Confused
Look in CSBuild. File EditText.cpp. Find the function
'EncodePortraitDataIntoText'. It is only a dozen
lines long. The Name, the Title, and the Sex. Then
very simple one-line function calls to put in the HP,
Stamina, etc. If it is not obvious, ask again. And you
can be responsible for writing the documentation in english
for publication!!!!
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
-
- Neophyte
- Posts: 8
- Joined: Mon Jul 25, 2005 12:18 pm
*facepalms* I was having trouble figuring out Encode4(). None of my calculations were working out, and it was REALLY hampering my attempts. All of a sudden, I glanced at the + 'A' part.
A=0
Damnit. I knew its binary code was 00000, but when finger-counting up to the letter I was getting the binary code for I was starting off at A rather than B.
See now why I needed to have the function pointed out to me? I actually got the idea that they might be doing it that way before I looked at the function, but I was still writing A as 00000 and counting it as 1 for everything over that (ie, A B C D E F, F = 6 but it shoulda been one less since A was 0 not 1) (MAN am I ever getting bad deja vu, this is eerie), and it was throwing everything off. That's ok though, I'm reasonably sure I can get this now. Thanks. And I'll be happy to write it out in english, once I figure out what stuff is where.
-Argent, feeling ditzy but enlightened
A=0
Damnit. I knew its binary code was 00000, but when finger-counting up to the letter I was getting the binary code for I was starting off at A rather than B.
See now why I needed to have the function pointed out to me? I actually got the idea that they might be doing it that way before I looked at the function, but I was still writing A as 00000 and counting it as 1 for everything over that (ie, A B C D E F, F = 6 but it shoulda been one less since A was 0 not 1) (MAN am I ever getting bad deja vu, this is eerie), and it was throwing everything off. That's ok though, I'm reasonably sure I can get this now. Thanks. And I'll be happy to write it out in english, once I figure out what stuff is where.
-Argent, feeling ditzy but enlightened
-
- Neophyte
- Posts: 8
- Joined: Mon Jul 25, 2005 12:18 pm
Ok, here's the results of my research. if you can call it that.
Let's use Hissssa as an example, because he's cool. His text string is:
HISSSSA/LIZAR OF MAKAN//M/AAFAACGCAAAF/CIDKDACDCDCLDH/EDAAADBAAAAAAAAA
We know what HISSSSA and LIZAR OF MAKAN are. The slashes are just separators, M is his gender. (Incidentally, I noticed Wuuf is female. It's probably just creepy deja vu again but I could swear I've known that for years. Even so, is anyone else really surprised by this?)
Anyway. Hissssa's first section (AAFAACGCAAAF) breaks down into AAFA, ACGC, and AAAF. They represent his max Health, Stamina, and Mana values. Using five bits for each letter, starting at 00000 for A:
AAFA = 00000-00000-00101-00000 = 80 (Health)
ACGC = 00000-00010-00110-00010 = 61 (Stamina)
AAAAF = 00000-00000-00000-00101 = 5 (Mana)
****In the next section I encountered a small problem which I believe will apply to all letter-digits. If the fifth bit (16s place) is 1 it, along with all of the bits in the letter to its left, gets shifted left by 1. I expect this is because 11111 = 31 which is the End of Text marker. How far to the left it extends, or how the program knows the bitshift was performed, I have no idea.
____________________________________________________________
The second section (CIDKDACDCDCLDH) determines Luck, Strength, Dexterity, Wisdom, Vitality, Anti-Magic, and Anti-Fire, breaking down into CI-DK-DA-CD-CD-CL-DH.
CI = 00001-01000 = 40 (Luck)
DK = 00011-01010 = 58 bitshifted (Strength)
DA = 00011-00000 = 48 bitshifted (Dexterity)
CD = 00001-00011 = 35 (Wisdom)
CD = 00001-00011 = 35 (Vitality)
CL = 00001-01011 = 43 (Anti-Magic)
DH = 00011-00111 = 55 bitshifted (Anti-Fire)
____________________________________________________________
The third section (EDAAADBAAAAAAAAA) breaks down thusly:
E = 00100 = 4 = Hidden Fighter 1
D = 00011 = 3 = Hidden Fighter 2
A = 00000 = 0 = Hidden Fighter 3
A = 00000 = 0 = Hidden Fighter 4
A = 00000 = 0 = Hidden Ninja 1
D = 00011 = 3 = Hidden Ninja 2
B = 00001 = 1 = Hidden Ninja 3
A = 00000 = 0 = Hidden Ninja 4
A = 00000 = 0 = Hidden Priest 1
A = 00000 = 0 = Hidden Priest 2
A = 00000 = 0 = Hidden Priest 3
A = 00000 = 0 = Hidden Priest 4
A = 00000 = 0 = Hidden Wizard 1
A = 00000 = 0 = Hidden Wizard 2
A = 00000 = 0 = Hidden Wizard 3
A = 00000 = 0 = Hidden Wizard 4
____________________________________________________________
Hopefully this is all accurate. I'm not completely sure about the shifting-the-16th-bit part, I haven't tested it. Hopefully somebody can use this information, I'm not exactly sure if any of the editors can change starting stats, since I only barely understand DMute any more and CSBuild confuses me. hehe horse hocky
-Argent
PS- Thanks for pointing me to that function. It was actually a huge help knowing the size of the groupings, and I really wouldn't have ever found it by myself.
Let's use Hissssa as an example, because he's cool. His text string is:
HISSSSA/LIZAR OF MAKAN//M/AAFAACGCAAAF/CIDKDACDCDCLDH/EDAAADBAAAAAAAAA
We know what HISSSSA and LIZAR OF MAKAN are. The slashes are just separators, M is his gender. (Incidentally, I noticed Wuuf is female. It's probably just creepy deja vu again but I could swear I've known that for years. Even so, is anyone else really surprised by this?)
Anyway. Hissssa's first section (AAFAACGCAAAF) breaks down into AAFA, ACGC, and AAAF. They represent his max Health, Stamina, and Mana values. Using five bits for each letter, starting at 00000 for A:
AAFA = 00000-00000-00101-00000 = 80 (Health)
ACGC = 00000-00010-00110-00010 = 61 (Stamina)
AAAAF = 00000-00000-00000-00101 = 5 (Mana)
****In the next section I encountered a small problem which I believe will apply to all letter-digits. If the fifth bit (16s place) is 1 it, along with all of the bits in the letter to its left, gets shifted left by 1. I expect this is because 11111 = 31 which is the End of Text marker. How far to the left it extends, or how the program knows the bitshift was performed, I have no idea.
____________________________________________________________
The second section (CIDKDACDCDCLDH) determines Luck, Strength, Dexterity, Wisdom, Vitality, Anti-Magic, and Anti-Fire, breaking down into CI-DK-DA-CD-CD-CL-DH.
CI = 00001-01000 = 40 (Luck)
DK = 00011-01010 = 58 bitshifted (Strength)
DA = 00011-00000 = 48 bitshifted (Dexterity)
CD = 00001-00011 = 35 (Wisdom)
CD = 00001-00011 = 35 (Vitality)
CL = 00001-01011 = 43 (Anti-Magic)
DH = 00011-00111 = 55 bitshifted (Anti-Fire)
____________________________________________________________
The third section (EDAAADBAAAAAAAAA) breaks down thusly:
E = 00100 = 4 = Hidden Fighter 1
D = 00011 = 3 = Hidden Fighter 2
A = 00000 = 0 = Hidden Fighter 3
A = 00000 = 0 = Hidden Fighter 4
A = 00000 = 0 = Hidden Ninja 1
D = 00011 = 3 = Hidden Ninja 2
B = 00001 = 1 = Hidden Ninja 3
A = 00000 = 0 = Hidden Ninja 4
A = 00000 = 0 = Hidden Priest 1
A = 00000 = 0 = Hidden Priest 2
A = 00000 = 0 = Hidden Priest 3
A = 00000 = 0 = Hidden Priest 4
A = 00000 = 0 = Hidden Wizard 1
A = 00000 = 0 = Hidden Wizard 2
A = 00000 = 0 = Hidden Wizard 3
A = 00000 = 0 = Hidden Wizard 4
____________________________________________________________
Hopefully this is all accurate. I'm not completely sure about the shifting-the-16th-bit part, I haven't tested it. Hopefully somebody can use this information, I'm not exactly sure if any of the editors can change starting stats, since I only barely understand DMute any more and CSBuild confuses me. hehe horse hocky
-Argent
PS- Thanks for pointing me to that function. It was actually a huge help knowing the size of the groupings, and I really wouldn't have ever found it by myself.
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
I have changed it as follows. See if you can agree
and then I will put it in my documentation pages.
Give me a name to sign it with.
[/code]
and then I will put it in my documentation pages.
Give me a name to sign it with.
Code: Select all
Ok, here's the results of my research. if you can call
it that.
Let's use Hissssa as an example, because he's cool.
Razz His text string is:
HISSSSA/LIZAR OF MAKAN//M/AAFAACGCAAAF/CIDKDACDCDCLDH/EDAAADBAAAAAAAAA
We know what HISSSSA and LIZAR OF MAKAN are. The slashes are just
separators, M is his gender. (Incidentally, I noticed Wuuf is
female. It's probably just creepy deja vu again but I could swear
I've known that for years.
Even so, is anyone else really surprised by this?)
Anyway. Hissssa's first section (AAFAACGCAAAF) breaks down
into AAFA, ACGC, and AAAF. They represent his max Health,
Stamina, and Mana values. Using four bits for each letter,
starting at 0000 for A:
AAFA = 0000-0000-0101-0000 = 0x0050 = 80 (Health)
ACGC = 0000-0010-0110-0010 = 0x0262 = 61.0 (Stamina)
AAAF = 0000-0000-0000-0101 = 0x0005 = 5 (Mana)
____________________________________________________________
The second section (CIDKDACDCDCLDH) determines Luck, Strength,
Dexterity, Wisdom, Vitality, Anti-Magic, and Anti-Fire,
breaking down into CI-DK-DA-CD-CD-CL-DH.
CI = 0010-1000 = 0x28 = 40 (Luck)
DK = 0011-1010 = 0x3a = 58 (Strength)
DA = 0011-0000 = 0x30 = 48 (Dexterity)
CD = 0010-0011 = 0x23 = 35 (Wisdom)
CD = 0010-0011 = 0x23 = 35 (Vitality)
CL = 0010-1011 = 0x2b = 43 (Anti-Magic)
DH = 0011-0111 = 0x37 = 55 (Anti-Fire)
____________________________________________________________
The third section (EDAAADBAAAAAAAAA) breaks down thusly:
E = 0100 = 4 = Hidden Fighter 1
D = 0011 = 3 = Hidden Fighter 2
A = 0000 = 0 = Hidden Fighter 3
A = 0000 = 0 = Hidden Fighter 4
A = 0000 = 0 = Hidden Ninja 1
D = 0011 = 3 = Hidden Ninja 2
B = 0001 = 1 = Hidden Ninja 3
A = 0000 = 0 = Hidden Ninja 4
A = 0000 = 0 = Hidden Priest 1
A = 0000 = 0 = Hidden Priest 2
A = 0000 = 0 = Hidden Priest 3
A = 0000 = 0 = Hidden Priest 4
A = 0000 = 0 = Hidden Wizard 1
A = 0000 = 0 = Hidden Wizard 2
A = 0000 = 0 = Hidden Wizard 3
A = 0000 = 0 = Hidden Wizard 4
____________________________________________________________
Hopefully this is all accurate.
Hopefully somebody can use this information, I'm not
exactly sure if any of the editors can change starting
stats, since I only barely understand DMute any more
and CSBuild confuses me. Confused hehe horse hocky
-Argent
PS- Thanks for pointing me to that function. It was
actually a huge help knowing the size of the groupings,
and I really wouldn't have ever found it by myself.
-
- Neophyte
- Posts: 8
- Joined: Mon Jul 25, 2005 12:18 pm
Heh... geez. Whoopsie. That looks, much better, yes. I like the fixed-width too, I wish I'd noticed how to do that before. It looks a whole lot nicer. Anway, I don't really think this part needs to be included in the documentation:
My name? ArgentumLupus will do. I THINK I've got something else in there, from quite a while back, so it might as well be consistent.
-Argent
Code: Select all
Hopefully this is all accurate.
Hopefully somebody can use this information, I'm not
exactly sure if any of the editors can change starting
stats, since I only barely understand DMute any more
and CSBuild confuses me. Confused hehe horse hocky
-Argent
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
Umm, DMBuild also shows the champion text string format, and even has a nice little excecutable that created the experience numbers so you could create your own text lines for the champion text (as it has no GUI for charactetr creation, it was all in the text string you wrote yourself).
I recognise your name from ages ago if you are the same ArgentLupus - you will have an account on this board (DME and DM Web accoutn were taken over here)
I recognise your name from ages ago if you are the same ArgentLupus - you will have an account on this board (DME and DM Web accoutn were taken over here)
-
- Neophyte
- Posts: 8
- Joined: Mon Jul 25, 2005 12:18 pm
Yeah, I'm the same one. I've never encountered another ArgentumLupus. Unfortunately I couldn't get into my account - I couldn't remember my password and none of my email addresses worked, so I don't know if something happened to my account (inactivity) or if I just forgot a password AND the email address I used - although I had a problem the very first time I created an account here as ObsidianLupus, I logged in once and it locked me out, my password wouldn't work and it wouldn't recognize my email address either... so hopefully it doesn't happen again, I'm running out of screen names. o.o;
-Argent
-Argent
If you read the 'new users' bit when not logged in you will see what happens with ported accounts - basically the password is reset and the account needs to be reactivated I believe. Trying to create a new account but with an old e-mail address that is already registered might knock the account - not the username itself. Since you made five posts with the old accunt and seven with the new one, I guess it's not worth tryuing to transfer...but that's the deal, anyway!