If DISE is stuck trying to update, run this command in Command Prompt.

Wednesday, May 30, 2012

Source code: Reading DI Voices&Texts.bin (update)

To make DISE properly support multiple languages, I need to redesign how texts from the game are stored and read. Right now, I've extracted texts via scripts I wrote, and embedded the texts in DISE.

The idea is to simply get text from DI Voices&Texts.bin because there's one for each language supported by the game.

I wrote some code yesterday/today for loading this file and getting text from it (in C++). This code isn't meant to be feature-complete, and isn't even fully documented.

Nothing much to share. The file format is extremely simple, so there's no magic here. :)

Full code after the break below. :)

I've changed the code a bit according to my needs. The .bin file should now be compressed with GZip. Depends on the Boost library.

Saturday, May 26, 2012

Release: DISE (fix 1)

I'm very happy this time because I managed to fix a problem which I have known about for a long time (since the beginning, actually)! :D

  • Fix for adding items: Req.level and rareness is not included in the attributes value.
  • You can finally edit things in your inventory without hitting the Enter-key first (or making the text box lose focus). Because of a window event ordering problem, new items were selected before changes were realized, and the changes would thus be discarded.
  • Changes in fix 1:
    • Some skill tweaks wouldn't be enabled properly if some of the skills in it had enough points already.
MD5: d04e58feadcffc62354709715975b646
SHA1: 91876ba9bfa124f38b68a78d9b69a3fb550eeecd

Assets package (maps and extra icons)

Release: DISE

I posted this right before going to bed. After waking up, I saw that my post was gone. Turns out that I had the post editor open in two different tabs, and both saved automatically. I published the finished post, and the other tab saved over it . :(

I may not be able to rewrite everything, but here's my attempt at it. :)

This release may be a little more prone to crashing because of the mentioned optimization. If you find crashes, please send the bug report and I'll personally take care of the one responsible. There is only one it could be...
... It's probably fine.

  • About dialog:
    • Changed the link to Open Steamworks.
    • Added link to Dead Island Wiki and renamed the previous link to Dead Island @ Wikia.
    • Replaced the image to make more space for credits.
  • Added Max/Reset in the context menu for individual skills. Just right-click them. :)
  • Fixed a bug from a while back, where the program would crash when loading a game-save with Ryder, closing it, then loading one for a different character (or the other way around).
  • Attributes value does not include the required level and color/rareness anymore. You're less likely to create items where damage, force, etc, is 0.
  • Increased items' max required level to 127. Anything more than 60 will however not work in-game (by default).
  • Added an inventory list picker. It replaces the message box telling you to click inside the list you want to add items into.
  • Added more icons (which I made myself, and I know they are not super great).
  • Set theme on some list controls for a more native look on Windows Vista/7.
  • Optimized startup time. Tab pages are loaded the first time you view them. Especially this needs testing!
  • Minor fixes.
  • Fixed crash when trying to import the wrong type of file.
  • Added skill tweak: Boost weapon damage.
  • Anything else I forgot. Sorry.

MD5: 34dfb8e8f6b23b7c1161d6050c0b2768
SHA1: d015e9dbff989b97aec876945a8e4755bb20d6c7

Assets package (maps and extra icons)

Friday, May 25, 2012

More icons for DISE

I've made a few more icons for use in DISE. They're not perfect but better than nothing, I would say. :)

I posted the following icons not very long ago, and will use them as well.

Tuesday, May 22, 2012

Release: DISE

Sorry about things not working earlier.

  • Fixed Immortality bug.
MD5: c966b47c7c30d34871a3720d8ea8e09f
SHA1: d285083ce7c1d6a5750e87524bdf866b95f55e41

Assets package (maps and extra icons)

Release: DISE

In the post for the previous release, I said that the max skill points (for the free edition) for 1-rank skills was -7 to +7, but I had somehow gotten that wrong. I meant original max ± 7, meaning -8 to +8 for 1-rank skills, and -10 to +10 for 3-rank skills. I have updated the post. :)

Edit: Immortality is slightly broken. You know how it is.. Fixing one bug creates 10 more? (I was joking). I will see to fixing this embarrassing bug as quickly as I can.

  • Import/Export skills.
  • Fixed a few skill tweaks which had the wrong amount of points.
  • Fixed saving and loading of skill points with negative values.
  • Chainsaw works! The condition was previously set to -1 when it should have been between 0 and max.
MD5: bd03087c80f4edeb46c7be346e3d5670
SHA1: 4966e451904ac72c9058dd297e6672605cd3b04d

Assets package (maps and extra icons)

Sunday, May 20, 2012

Release: DISE

  • Made skill tweak "Thrown weapons always return" free for everyone!
  • Lifted skill point limits a bit for the free edition. The original limit was 1 to 3, which is the same as in-game. Now, it's original max ± 7. That means -8 to +8 (1-rank skills) or -10 to +10 (3-rank skills). That should be enough to manually make up some of the premium tweaks with a little effort. :)
  • Added "Give max points". If you keep this checked while giving all skills, you will max out skills, not just up to the original in-game limit.
  • Hooked up premium tweaks (and added one) so that they actually work (but boosting damage wasn't ready for this release, so you can see an empty spot).
  • Moved all skill tweaks from the premium tab into the skills tab.
Assets package (maps and extra icons)

SHA1: ed85e1fa17a470438647b246d06d8e789a2302cf
MD5: b76690ac3570cf0899a791ee2b00c1be


Saturday, May 19, 2012

Skill tweaks (update)

Hi there!

I received a suggestion to make at least one of the skill tweaks on the premium tab free. That was your weapons always returning (Boomerang). The reason was to prevent people from stealing your stuff in online games, and I thought it was a good reason. :)

If you think this looks alright, I'll go with this design and keep adding things both here and on the premium tab.. Perhaps keep two sections here instead to keep them in the same place.

In the next version, I'll also raise the max skill points limit a bit instead of only letting you go up to 1 or 3 (original limits). That means you can tweak some your skills to get the similar effects as the premium tweaks (but not all of them).

I hope you like the idea and also the Premium / Donator's Editon idea. :)

I moved all of the skill tweaks over to the Skills tab. I think it's a lot more natural this way. :)

Friday, May 18, 2012

Release: DISE

  • Prepared for new features in the Premium tab. They have no function yet.
  • Fixed a minor bug where the attributes value for newly added items was wrong.
  • Fixed some minor issues with a few skill descriptions.
  • Added link to Dead Island Wiki in the about dialog.
Assets package (extra icons)

SHA1: 3af2f74fd04885829781abdfd19eb8755d980836
MD5: 4f4bf13c57b230fddb4fe34fc37209b0

Release: DISE

A friend helped me realize how annoying it was to not see descriptions for skills when you needed them. I felt quite annoyed, I tell you!

  • Descriptions for skills. Just hover the mouse cursor over them. :)
  • Added/Improved text on the Premium tab.
Assets package (extra icons)

SHA1: ded27aeaf3f278983871a0b46803b7578f781968
MD5: 6c6bd8cb401e62711e23052542e5d7de

Changelog for DISE

Since I skipped the list earlier, here it is. I have left out the things that were not ready to show you. :)
  • Improved unlocking of chapters. No need for having played with a character previously to unlock chapters for that character.
  • Removed the condition field for items when adding them.
  • Allow changing the current chapter, map, location spawn point and active quest.
  • You can add multiple new items to your inventory at the same time (right-click > Add selected).
  • Allow using the quick slot for fists (unlock in Preferences).
  • Improved compatibility with large text/high DPI (dialog boxes).
  • Add custom items to your inventory (does not create new types of weapons).
  • Added more inventory items.
  • Items' color is shown graphically, and the text shows the actual rareness.
  • Make melee weapons unbreakable!
  • Look for the game storage location in more places (you're less likely to need to set it manually).
  • Updates:
    • Automatically checking for updates is disabled by default for new users.
    • The first time DISE starts, asks whether it's allowed to automatically check for updates (before connecting to the internet).
I'm trying to see how a "Donator's Edition" would work out and what you think about that idea. It currently has the features listed in the post for v0.0.55.13, and there will be more convenient functions.

Thursday, May 17, 2012

This is how I study game-saves

I'll try to roughly explain the whole process of understanding game-saves' file structure without getting into great detail, and without making this post very lengthy. This may apply for any file, assuming you have the right tools for the job. This is my own way but there aren't that many different ways to do it. :)

Looking at the file with a hex editor
The first thing I do is open the save in a hex editor. I would say his is a must-have tool for any hacker. Believe it or not, I often open files in a hex editor to peek, just for fun :)

After loading the save, save_0.sav, the data looks garbled; totally unrecognizable!

Lucky me, someone had already figured out that the file was simply GZipped (you may know file names ending with .zip, .rar and .7z; this is .gzip). After unpacking the file (with 7-Zip, WinRAR or something else), it looks much better!

At this point, I'm not really looking for anything specific; just looking around for anything that makes sense. Just by doing this, one can get an idea about how some parts works.

You can for example search for the amount of money you have or the character's level. If you get multiple of results, you can change values and see how it affects the game. If you get lots of results, earn or lose money in-game and search again, then compare the saves. A hex editor can compare them and show you the differences. When you know where that value is stored, it will be possible to make a very simple save editor that changes e.g. your money.

Doing it this way also means that you can't really add or remove anything from the save without corrupting it, unless you fix other things like values keeping track of how long an item's name is, the size of the player state data, etc.

Since DISE doesn't do it this way, it can do so much more!

Analyzing the game while it's running, in a debugger
The next thing I do is to study the game under a debugger on the PC, and checking exactly how the game reads the saves. If you're not familiar with debugging, here's a page on Wikipedia. Had the game been released only for game consoles, debugging would unfortunately not have been an option.

In this screenshot, I've set a few breakpoints where the game reads inventory items. There was actually a lot of pre-work before I even knew that the game read items here. I won't go too much into that but it's tedious work. :)

This is of course just a small portion of all the reads in the file.

Writing the code
After I know how the game reads a part of the file, I write my code to do the same thing.

Of course, there's way more behind this code. Most of the code is just processing the data, and all that is something I have to figure out on my own by experimenting and studying the game's internal files (Inventory.scr, for example). If I'm lucky, some of you may give me tips as well. :)

While I'm at it, why don't I just show you how the attributes are processed as well..

In the above code, item->LoadAttributes() is defined like this...

It basically processes the raw attributes value into something more meaningful.

You can see Color and RequiredLevel here, which are extracted from the raw attributes value. For now, those two are the only values I can really make sense of right now.

In the next piece of code, you can see that there are lots of reads I have yet to figure out.

Final words
I explained my own process for understanding game-saves for Dead Island, and how the game reads inventory items. I won't say it's the best method, but it has helped me understand how it works. I didn't explain how to reach the point where inventory items are read, but that would make this post quite lengthy. I also didn't show you exactly how DISE modifies values, but it's just a matter of reversing the read process to make it write the values instead.

I hope you enjoyed the read, and I hope you liked seeing my code. :)

Wednesday, May 16, 2012

Release: DISE (for testing)

This post will be short, without a feature list. I decided to release this build because it should be stable enough for testing, and syncing should work. You will not receive an update notification in alpha 55, and this test build will not receive updates either right now.

Please note that this is the current work, freshly baked, and things will look a bit off and things will be missing.

I don't plan for things to not work however, so please send bug reports like usually. :)

PS: You can see that I changed the representation of the version string, and I will keep it that way instead of calling it "alpha 55.13", etc. :)

Donator's Edition / Restricted features
Fear not, DISE is still free. All features that were in DISE (and more) are still free. All future features that are not easy to abuse in online games will also be free.

In this release, I am playing a bit with licensing. I'm not doing this just to earn money, nor do I plan to leave out the "good stuff" in the free version. This is partly to avoid abuse in online games while giving modders total freedom, and partly because I have already spent quite a bit of time and money on developing DISE. You should know, I spend more time working on DISE than playing games for fun. :)

Current restricted features:
  • Infinite health and stamina works, but with side effects (not able to kick, and rage mode does not work).
  • You will be able to exceed the skill point limits and go all the way up to 32767 instead of only 1-3 (but it may have the opposite effect).
  • You can add collectible items (blueprints, ID cards, news, tapes) to your inventory as drop-able items (you can still add them as before, from their own tab). These can be dropped and picked up as if you found them.
Make sure to grab the Assets package for DISE!

Assets package (extra icons)

Hashes for paranoid users
SHA1: 7726c6419ad12f06dc34dcd53bde396bbc591b6d
MD5: d4441dc170e8c6842fb0fb54c98aa369

Steam has been updated

I had hoped that I would be finished with the next version of DISE before syncing would be broken again. The next version will not have this problem at all, and I'll keep working hard to release it soon whether it's finished or not. :)

DISE and translations!

I received an offer to have DISE translated into a different language. It's my first time doing it using the wxWidgets C++ framework, but it's coming along!

I translated a few parts into Norwegian to show you that it works. :)

Tuesday, May 15, 2012

What do you think about a donator's edition of DISE?

Note: Poll at the bottom!

The idea is to include extra features in DISE for people who donates or contributes enough to receive it in exchange for the work. Those features would be aimed at modders, those who like to play around with things, go beyond limits, etc, while most of the things you can do will still be free (only slightly more experimentation needed).

Those who donate would have even more flexibility when editing things. Convenient functions/tricks and in general, more open for experimentation.

DISE would still be free, of course, and would continue to receive updates. Free edition wouldn't have a lower priority.

Until now, I didn't really have enough ideas that would justify paying (or donating), at least in my opinion. Even the idea to include advertisements in DISE without bothering you (the user)... I'm not really sure about it.

The whole plan isn't completely decided yet but I would love to hear your opinions about this. I have however been playing with licensing already to get familiar with it. :)

If you think that my work is worth something, you can give it some though. I do spend a great amount of spare time working on DISE instead of playing games and doing other fun things. Web hosting costs money, development tools costs money, code signing costs money, and time is its own cost.

Regardless, I don't work on DISE to earn money. I don't expect anyone to contribute with anything, whether it involves money or not. :)

I'm very thankful towards those who have already given me ideas, suggestions, game-saves for testing, friendliness or contributed in other ways. Thank you very much! :D

What do you think? Would you donate?

Monday, May 14, 2012

Preview of the next version of DISE

Here are the promised screen shots.

New tab icons. I designed these myself, so it's legal to embed them within DISE. They can be improved, though.

Change the chapter, map, location, spawn point and active quest. Still, pretty basic, though.

More items you can add to your inventory, add custom items by name, make weapons unbreakable, unlock the quick slot for Fists, rareness is in color (can show as text as well).


Your fists are locked by default to prevent you from deleting them accidentally. Rareness can be shown by color, text or both.

Click numbers to edit directly.

Right-click skills and copy the skill points to other skills!

The processes of syncing with Steam Cloud. DISE finishes more quickly, and Steam takes care of the rest.
My own icons for use in DISE.

Talk about the next version of DISE

Hello from the monkey cage!

It has been a while since the last release of DISE. I've wanted to release it so much. At the same time, I was working really hard on solving the problem that happens when Valve releases updates to Steam; it breaks syncing in DISE, you send bug reports, I fix it, etc...

I'll talk a bit about how the project (and I included) have been doing so far.

Warning: The rest of this post uses some geek-terms.

My original solution for the problem
I moved all of the Steam-related code into its own library (I called it Steam Helper). The idea was to provide a copy of this library (DLL file) for each version of Steam. When your Steam client would update, I would build a new copy of Steam Helper for that version of Steam. DISE would then be notified and download the copy of Steam Helper that would work with your Steam client. I thought it was a great idea. For me, at that time, it was the best way to secure the future of DISE with syncing.

I got to work
All this would require redesigning my online database and building the backend (I didn't really have one before), web service and everything web-related. A lot of work went into this. Still, I knew that by doing this, I would have to support DISE and/or Steam Helper forever... Or at least as long as Steam didn't shutdown. Deep down, I had to admit it would be impossible.

A better solution?
I got an idea that could solve the problem... I made DISE search for the steam_api.dll shipped with Dead Island and call some functions it exports. I was so happy to see it work! That was until I realized that Steam wasn't actually syncing. It only looked like it.

You may know the feeling when you've worked so hard on something to learn that it was to no avail in the end.. You know there's "that other fishy method" you can use which will require your submission to the dark side. In my case, it would be 1) using a leaked Steamworks SDK, and 2) embedding the steam_api.dll file with DISE. It would unfortunately be illegal but would completely solve the problem. Believe me, it was tempting. I'm a very honest person, so it would haunt me in this life and even afterlife. Still, so temping, because it would make your life and my life easier.

Maybe I didn't look at all the possibilities
I decided to run the game in a debugger again. If you remember, I wrote about OllyDbg before. I put breakpoints on various exports in the steam_api.dll file, and tried to find out which functions the game called in the interface(s) created by the steam_api.dll. I got it! Now I knew which interface it used (ISteamRemoteStorage). It was a bit different from the one I used before (IClientRemoteStorage).

After some more studying, I wondered if I even needed the steam_api.dll after all. Good thinking! The DLL was eliminated and I was on the road to success!

It worked
Relieved and still sane. The dark side had not consumed my soul. No matter how much efforts I put into this, it worked out in the end. Nothing else mattered.

The next version
More features, allegedly more stable, several things have been improved. I won't give the whole list of changes yet, but I'll post some screen shots of the current development build in another post! :)