Editing Character skills, levels hit/mana levels
Moderator: Zyx
Forum rules
Please read the Forum rules and policies before posting.
Please read the Forum rules and policies before posting.
Editing Character skills, levels hit/mana levels
Hi there!
I have just downloaded the great rewritten Dungeon Master and Chaos Strikes back for Windows and Linux by Paul Stevens.
I am currently playing Dungeon Master. Does anyone know how to edit the characters to change their skill levels and hit points etc? Is in the the saved game?
Thanks!
I have just downloaded the great rewritten Dungeon Master and Chaos Strikes back for Windows and Linux by Paul Stevens.
I am currently playing Dungeon Master. Does anyone know how to edit the characters to change their skill levels and hit points etc? Is in the the saved game?
Thanks!
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
You are out of luck. The savegames created by CSBwin
are not currently editable by anything except CSBuild
(or a hex editor). And I do not want to create an editor
for the characters.
The champions exist in the savegames in the form of
four 800-byte structures. I have offered to provide
an Export and Import feature in CSBuild if anyone wants
to write a character editor. So far, nobody has convinced
me that they are serious about creating such a thing.
You can use CSBuild to edit the champions before they are
selected from their portraits.
are not currently editable by anything except CSBuild
(or a hex editor). And I do not want to create an editor
for the characters.
The champions exist in the savegames in the form of
four 800-byte structures. I have offered to provide
an Export and Import feature in CSBuild if anyone wants
to write a character editor. So far, nobody has convinced
me that they are serious about creating such a thing.
You can use CSBuild to edit the champions before they are
selected from their portraits.
Editing characters
Hi Paul,
Thanks. I actually have a hex editor and took a look but there were no ASCII inidcations of the names I have used for my characters to locate them. Do you know the offset or location of the characters?
I'm not an expert in programming though I have dabbled with Visual Basic. I'm more than happy to try and build a character editor if I know where the character locations and the characteristics are in the saved games.
Thanks!
Frodo
Thanks. I actually have a hex editor and took a look but there were no ASCII inidcations of the names I have used for my characters to locate them. Do you know the offset or location of the characters?
I'm not an expert in programming though I have dabbled with Visual Basic. I'm more than happy to try and build a character editor if I know where the character locations and the characteristics are in the saved games.
Thanks!
Frodo
- Gambit37
- Should eat more pies
- Posts: 13720
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
Hi Frodo, welcome to the forums!
Just a quick note -- please avoid quoting the full message of something you're replying to especially if your reply is directly after the original post -- it's unnecessary and makes the forum messages longer than they need to be. We like to keep things efficient around here. I've deleted the quote in this case.
Thanks and have fun!
Just a quick note -- please avoid quoting the full message of something you're replying to especially if your reply is directly after the original post -- it's unnecessary and makes the forum messages longer than they need to be. We like to keep things efficient around here. I've deleted the quote in this case.
Thanks and have fun!
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
Editing characters.
Wow- no wonder no-one has written a character editor for it! So it sounds impossible to do then? Presumably, the characters in the Hall of Champions are embedded within the dungeon.dat file rather than the saved game file?Paul Stevens wrote:the data is commonly 'hashed' to prevent
straightforward editing or cheating. It ain't my idea. That
is the way it came from FTL.
I remember back in the ATARI days, I used to use Monkey Wrench (a cartridge based memory tool) to examine and change memory whilst Dungeon Master was actually playing. This was at the stage where the character information was obviously unhashed. I then saved the game with the newly changed attributes in memory. I assume the actual saved game file format is the same as it was for the Atari.
One thing I dont' understand though Paul is how you can write an import facility of characters if we don't know where the information is kept in the saved game. Hmm. I've probably got this all mixed up.
Oh, and by the way- my jaw dropped when I saw Dungeon Master on my Pocket PC for the first time! Wow- you're amazing! Well done! I can now play my all time favourite game on the move without having to pay for a full blown laptop! Thanks!!!!
Frodo
- Gambit37
- Should eat more pies
- Posts: 13720
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
You've misunderstood Paul's information, Frodo:
However, CSB4Win changes the format of the save game, and it's associated editor, CSBuild, is the ONLY one that can read these save games. Because CSBuild does not have a character editor, and Paul does not want to make one (presumably to discourage cheating), then you can't use any editor to modify your champions.
Of course, as you point out, you CAN modify your save game using a Hex editor -- if you know where to look and can decode the data. Perhaps Paul can help on that one?
The location of data for the champions in a save game is, of course, known by anyone who has cracked the format -- Paul Stevens, George Gilbert (who wrote DMute), Sphenx, Rain etc... There are several tools out there that can edit the stats of champions in a save game.The savegames created by CSBwin are not currently editable by anything except CSBuild (or a hex editor). And I do not want to create an editor for the characters
However, CSB4Win changes the format of the save game, and it's associated editor, CSBuild, is the ONLY one that can read these save games. Because CSBuild does not have a character editor, and Paul does not want to make one (presumably to discourage cheating), then you can't use any editor to modify your champions.
Of course, as you point out, you CAN modify your save game using a Hex editor -- if you know where to look and can decode the data. Perhaps Paul can help on that one?
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
As I said:
I have offered to provide an export/import capability
for CSBuild if anyone will demonstrate an editor that
can use it. I am not going to do this work until I see that
someone is willing to do the work of writing the editor.
When I see the editor in action, then I will do it.
Then you can load any game with CSBuild, export the
characters, edit them, and import them.
The reasons I am not willing to write the editor myself have
nothing to do with cheating. I have already written such
an editor for the portraits themselves and it would not be
too difficult. But someone else needs to get in this game
before it becomes a one-man show.
I have offered to provide an export/import capability
for CSBuild if anyone will demonstrate an editor that
can use it. I am not going to do this work until I see that
someone is willing to do the work of writing the editor.
When I see the editor in action, then I will do it.
Then you can load any game with CSBuild, export the
characters, edit them, and import them.
The reasons I am not willing to write the editor myself have
nothing to do with cheating. I have already written such
an editor for the portraits themselves and it would not be
too difficult. But someone else needs to get in this game
before it becomes a one-man show.
Editing characters.
Hi Gambit and Paul!
Thanks for your replies. I think I'm nearly there now! Sorry about that! I hadn't realised that the saved game format that CSBWin produced was different to the original Atari format.
Any character editor I would try and write would be using the saved games from CSBWin. If either of you could let me know where the location of the character data is in that saved game and how to decode it, I'd be more than happy to try and write a character editor. It would also mean Paul that you wouldn't need to write an export or import facility as it would be directly on your CSBWin saved game format.
Thanks guys!
Frodo.
Thanks for your replies. I think I'm nearly there now! Sorry about that! I hadn't realised that the saved game format that CSBWin produced was different to the original Atari format.
Any character editor I would try and write would be using the saved games from CSBWin. If either of you could let me know where the location of the character data is in that saved game and how to decode it, I'd be more than happy to try and write a character editor. It would also mean Paul that you wouldn't need to write an export or import facility as it would be directly on your CSBWin saved game format.
Thanks guys!
Frodo.
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
Sorry. I won't tell.where the location of the character data is in that saved game and how to decode it
It is not constant. It is subject to change. It can
move around as new versions of CSBwin/CSBuild are
released.
You are welcome to examine the code in CSBuild. It
is published at dmweb.free.fr. It can read any version
of PC, Atari, or CSBwin savegames. Study the code and
you, too, can read those games. But I am not going to
invest enough energy to teach it to you. Because then
I would have to worry about you every time I make a
change to CSBuild/CSBwin. I already spend enough of
my time worrying about such non-productive things.
Another thing you could do is take my code, add a dialog
to edit the characters, and convince me to include it in
CSBuild. If it is nice, the convincing should be easy.
Christophe is pretty much an expert in the decoding of
the various files. He might be able/willing to help you.
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
Editing characters.
Hi Paul,It is not constant. It is subject to change. It can move around as new versions of CSBwin/CSBuild are
released
Don't worry about that. Once I've built a character editor for your saved games, then I guess I can always look elsewhere in the saved games as and when they change. (If I know what the codes look like then that's a fairly easy task using a hex editor to find the new location of the string...)
I like your idea of actually building the facility into CSBWin and certainly it would make the whole thing more coherent. My problem is that whilst I would love to tinker into your CSBWin program, I don't know C++ and only know Visual Basic. That's why I thought I'd write the character editor in Visual Basic.
I can understand not wanting to spend time telling me the ins and outs of all the character codes and how they map on to what attribute. Let me try and do that. If you could just let me know where the start of the character info is then at least that gives me a starting point. Howzat?
Thanks,
Frodo
- Gambit37
- Should eat more pies
- Posts: 13720
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
@Paul: DMute reads Amiga save games, so George Gilbert must know the differences. Perhaps you could exchange notes?
EDIT: Seems I'm wrong about that -- DMute will open Amiga CSB save games, but with all the DM Save games I tired I get a "unknown format" error. I think these are saves from version 3.4 of Amiga DM.
EDIT: Seems I'm wrong about that -- DMute will open Amiga CSB save games, but with all the DM Save games I tired I get a "unknown format" error. I think these are saves from version 3.4 of Amiga DM.
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
I don't know where it starts. It starts in various places. It isIf you could just let me know where the start of the character info is
not at a fixed position. It depends on the length of the data
that comes before it. I cannot think of any way to say this
differently. I cannot tell you where it is at without describing
all the data that preceeds it in the file. And doing that is
approximantely equivalent to describing the code in CSBuild
that reads the files. The code is available. You can look at it.
Then, every time the file format changes, you can update your
code to accomdate it
-----OR----
You can edit an 'exported' version of the characters and
let CSBuild worry about the file format. Then the offset will,
indeed, be fixed. I can tell you now that it will be zero.
Editing Characters.
Hi Paul.
You can edit an 'exported' version of the characters and
let CSBuild worry about the file format. Then the offset will,
indeed, be fixed. I can tell you now that it will be zero.
OK- I'm happy to try that approach. However, I noted from your previous thoughts on this that you aren't inclined to write an export facility for CSBuild until you see an editor. But then an Editor can't be written for it till there's an exported file. Chicken and egg!
Or have I (still) not got this right?
Frodo
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
Hmmmm. Did I predict that you would say this?But then an Editor can't be written for it till there's an exported file
I suggest that you first write the 'Make New Character'
capability. All nice editors have a 'New' capability to start
from scratch. After creating and editing four new characters
you simply write them in binary to a file. 800 bytes per
character for a total of 3200 bytes.
I will try out your editor and if it seems to work I will add
an 'Import' feature. You can then test your characters
playing a game using CSBwin. When it all seems to
work OK then I will provide an 'Export' capability.
Does that make sense?
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
Editing characters.
Hi Paul,Paul Stevens wrote:Just to make things easy.....
I posted chEdit.zip
It has a savegame and a 3200-byte binary dump of the
characters from that game.
OK- thanks. I'm away for several days now but I'll definately take a look at it. Must dig out my Visual Basic manual.....!!!!
Frodo.
I know this is exceedingly old, but to Paul, if you're still willing to add an export/import function to CSBuild, I wrote a character editor based on the format specified in "chEdit.bin".
Download it here.
A few things. First, it's built on .NET 2.0, so if you don't have Windows or haven't been keeping up with the automated downloads, you probably can't run it. .Net comes with lots of software nowadays, so could you have the framework installed and not realize it. But it is Windows only.
Next, it's *very* beta; just about anything can cause it to spit ugly messages at you and crash. It's also one of the ugliest pieces of software ever. I'll fix the color scheme at some point.
I didn't add a "Create New..." feature, because I'm very lazy and didn't feel like building a method of creating and encoding the portrait data stored in the file format. So, to test it, I added an "Open from memory..." instead.
To use it, you have to have a later version of CSBwin running (there's a dialog to let you select which version, but it's short on choices - the latest version, 10.013, should work fine, though). Either restore a saved game or go pick up some characters from portraits. You need people in your party for it to work.
Then switch over to CSBhedit (this definitely needs a new name...) without closing down CSBwin, go to the menu 'File'->'Open from memory...', select your version from the dialog box, and pray it works. It *should*, but then, lots of things *should* that *don't*.
Obviously, it's very beta, and lots of things need to be added (like error handling), which I'll happily do if CSBuild supports it (and I'll probably do it anyway, 'cause I'm really bored...).
Anyway, thanks for taking a look, either way.
Download it here.
A few things. First, it's built on .NET 2.0, so if you don't have Windows or haven't been keeping up with the automated downloads, you probably can't run it. .Net comes with lots of software nowadays, so could you have the framework installed and not realize it. But it is Windows only.
Next, it's *very* beta; just about anything can cause it to spit ugly messages at you and crash. It's also one of the ugliest pieces of software ever. I'll fix the color scheme at some point.
I didn't add a "Create New..." feature, because I'm very lazy and didn't feel like building a method of creating and encoding the portrait data stored in the file format. So, to test it, I added an "Open from memory..." instead.
To use it, you have to have a later version of CSBwin running (there's a dialog to let you select which version, but it's short on choices - the latest version, 10.013, should work fine, though). Either restore a saved game or go pick up some characters from portraits. You need people in your party for it to work.
Then switch over to CSBhedit (this definitely needs a new name...) without closing down CSBwin, go to the menu 'File'->'Open from memory...', select your version from the dialog box, and pray it works. It *should*, but then, lots of things *should* that *don't*.
Obviously, it's very beta, and lots of things need to be added (like error handling), which I'll happily do if CSBuild supports it (and I'll probably do it anyway, 'cause I'm really bored...).
Anyway, thanks for taking a look, either way.
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
I was actually referring to an export/import feature for all the character data, as specified in 'chEdit.bin', not just the portraits.
But that's neither here nor there, since the reason it won't run is not a single missing DLL - it means the .NET framework isn't installed on your comp, which is roughly a 20 mb download (and a 88 mb harddrive footprint). Hardly worth it for a program you don't intend to use.
Guess I'll have to fill my idle time doing something productive, instead.
But that's neither here nor there, since the reason it won't run is not a single missing DLL - it means the .NET framework isn't installed on your comp, which is roughly a 20 mb download (and a 88 mb harddrive footprint). Hardly worth it for a program you don't intend to use.
Guess I'll have to fill my idle time doing something productive, instead.
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
Wow, that was fast.
Okay, other than a few misplaced bits (now fixed), the basic editor works. I also tested a few things that I was worried would be a problem, and there are a couple of quirks that can happen if you import characters exported from another save-game, having to do with position in party and direction the characters are facing (both of these are seperate attributes stored in the character data, but are associated with the overall direction the party is facing, which is not).
Example: If you open 'csbgame1.dat' in CSBuild and export the character data, then open 'csbgame2.dat' and import it (whether or not you use the editor), there's a chance the characters will be in different positions and turned to face a different direction (this occurs if in 'csbgame1.dat' the party is facing, say, north, and in 'csbgame2.dat' the party is facing east). This can't be corrected, but it's nothing serious. You'll have to rearrange your party by hand, but they will all turn back to face forward after a few seconds.
The major issue in swapping character data is the inventory. You could end up with a lot of duplicated objects (if both save-games are from the same 'dungeon.dat') or invalid objects (if you swap between different 'dungeon.dat' files). The editor has a 'Clear Inventory' command in the "Edit" menu to help rectify this. Since the editor doesn't allow access to the inventory data (at least not yet - messing with that data would just cause problems, so I'm leaving it out for now), you won't see a difference, but the currently selected character's inventory will be emptied.
I'll be adding a few things over the next couple of days, but my big question now is has anyone managed to even get it to run?
And, again, thanks for your work on this, Paul.
Okay, other than a few misplaced bits (now fixed), the basic editor works. I also tested a few things that I was worried would be a problem, and there are a couple of quirks that can happen if you import characters exported from another save-game, having to do with position in party and direction the characters are facing (both of these are seperate attributes stored in the character data, but are associated with the overall direction the party is facing, which is not).
Example: If you open 'csbgame1.dat' in CSBuild and export the character data, then open 'csbgame2.dat' and import it (whether or not you use the editor), there's a chance the characters will be in different positions and turned to face a different direction (this occurs if in 'csbgame1.dat' the party is facing, say, north, and in 'csbgame2.dat' the party is facing east). This can't be corrected, but it's nothing serious. You'll have to rearrange your party by hand, but they will all turn back to face forward after a few seconds.
The major issue in swapping character data is the inventory. You could end up with a lot of duplicated objects (if both save-games are from the same 'dungeon.dat') or invalid objects (if you swap between different 'dungeon.dat' files). The editor has a 'Clear Inventory' command in the "Edit" menu to help rectify this. Since the editor doesn't allow access to the inventory data (at least not yet - messing with that data would just cause problems, so I'm leaving it out for now), you won't see a difference, but the currently selected character's inventory will be emptied.
I'll be adding a few things over the next couple of days, but my big question now is has anyone managed to even get it to run?
And, again, thanks for your work on this, Paul.
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
Version 255 attempts to import all the
interesting stuff without breaking anything.
interesting stuff without breaking anything.
Code: Select all
void CCSBuildDoc::ImportChar(int chIdx, CHARDESC *chData)
{
memcpy( m_Characters[chIdx].name,...
memcpy( m_Characters[chIdx].title, ...
memcpy(&m_Characters[chIdx].ouches,...
memcpy(&m_Characters[chIdx].HP, ...
memcpy(&m_Characters[chIdx].maxHP,...
memcpy(&m_Characters[chIdx].mana, ...
memcpy(&m_Characters[chIdx].maxMana,...
memcpy(&m_Characters[chIdx].stamina,...
memcpy(&m_Characters[chIdx].maxStamina,...
memcpy(&m_Characters[chIdx].food, ...
memcpy(&m_Characters[chIdx].water,...
memcpy( m_Characters[chIdx].Attributes,...
memcpy( m_Characters[chIdx].skills92,...
memcpy( m_Characters[chIdx].portrait,...
}
Excellent!
That makes things much simpler on my end. Thanks for the extra work (and quick replies!).
The editor can edit everything that CSBuild now imports (except portraits) without any quirks. I guess its time to clean up my code and try to make a prettier interface.
There was a minor overflow error that cropped up (I forgot food and water values could go negative), so if you downloaded a copy of the editor, you should probably replace it. Same link as above:
CSBhedit
That makes things much simpler on my end. Thanks for the extra work (and quick replies!).
The editor can edit everything that CSBuild now imports (except portraits) without any quirks. I guess its time to clean up my code and try to make a prettier interface.
There was a minor overflow error that cropped up (I forgot food and water values could go negative), so if you downloaded a copy of the editor, you should probably replace it. Same link as above:
CSBhedit