Modding FOGD part II

Hi and welcome to the second mod-lesson for a Family of Grave Diggers!

Well, the first post was just an overview so we could consider this one to be the first real mod post, but enough talking, lets dive in and get to work! Now, now, not too fast, lets start with something easy just to check things out.

A potion that adds 1 point of attack permanently, the Strength Potion (Graphics Credits Ail)!

So what do we need:

  • A 34×34 icon for the item (right click, save link as…)
  • A text editor (for example Notepad++)
  • Around 20 minutes



  1. Open your game folder, the copied one (see post 1 for instructions where you have copied it), open Mod/gfx/item and copy the icon in the two folders /mapsize and /slotsize.
  2. Move up two levels (or back if you prefer) to the  /Mod folder and open /Script/Item/potion
  3. Create a new file named “strength potion.lua” (if you can’t see the extension, see this post!)
  4. Open the file with your favourite text editor (or another if you feel rebellious).

The items in a Family of Grave Diggers are all made up like this, a graphic part and a “code” (or script) part.

Come back, it’s really easy to script things!

The file needs 6 functions, this is what make the item tick and moreover it tells the game what to do with it (I put what we’ll use in parentheses).

  1. What type is it? (see below, but it’s “USE”)
  2. What kind of characteristic does it give when equipped (we can’t equip it so nothing)
  3. How many charges does it have if any. (It’s just a one shot so no charges)
  4. An ingame description. (That’s the hard one!)
  5. The variation, so for example a weapon can have different variations (no need here though!)
  6. The scary Function that gets called when the item is used! (see below…)

For the type, there are a bunch of types: USE, EAT, SHOES, HEAD and so on, we’ll use the “USE” type as the player will actually use the item.

The only other specificity is the sixth bulletpoint, the USE function!

Here we can do whatever we want to, spawn a new map, invoke monsters, remove all the hitpoints except one, but lets not do that and instead, add +1 to the players attack:

(Hint: right-click and choose “save as” to download the whole .lua file)

Almost done!

Well, we are done actually but the item will never drop so we can’t test it…

Let’s insert it in the random drops! Go up two steps to /Mod/Script and open droprandomitem.lua.

It’s a fairly powerful item so lets make it a level 2 item!

Search for “itemlevel2arr” and add it to the list of drops, with a half-low droprate (droprates are just important comparing to other items in the same level, they are not percentages).

Note: the name is the filename without the .lua extension.

Done! Now just play for hours and hope the monster you just killed will drop it!

Or maybe we’ll cheat a little bit to check if we didn’t make some typo when we wrote all those script lines right?

So hold your hat because we are going to cheat!

A little bit.

In the folder where GravbeDiggers.exe lives (one step below /Mod), once you have ran the game and exited normally  at least once, you will have 3 save files;

  • maps.bin for the maps
  • data.xml for running monsters, items, bonuses et al.
  • and finally glob.txt which is the most hideous one but it’ll do our deed.

Now just a word of caution, you don’t want to break any of those three files, so

Back them up!

I mean it! If you mess it up, you’ll loose all your progress and the game will just go bananas.

You have been warned!

Let’s calm down and open glob.txt, which is just a ton of variable names and numbers and stuff and search for SHOPITEMS_FOOD

On the line following SHOPITEMS_FOOD, you’ll find a list of all the things the first shopkeeper (the green guy with the cheesy cubes on his head) sells.

The line (warning, never erase or insert a newline in this file!) is composed of a name, a comma, a number (the variation) and a semicolon. Now lets add our potion to the line!

So before it looked like something like this:

And after it will look like this: (you add a semicolon, the name, a comma and a zero)

Save the file, take a deep breath and start the game.

And voilà, the shopkeeper now gives away free potions!

Have fun with an abnormous attack and see you in the next episode!



Ludvig Larsson aka Valmond @ Mindoki Games



Modding FOGD part I

Hi everybody!

You remember that a Family of Grave Diggers was specifically built to enable easy modding right? So today I’ll start talking about how you can dive in and mod the game!

Step 1:

Find the game:

If you bought it on Steam:

  • Open the Steam client
  • go to your [Library]
  • scroll down to a Family of Grave Diggers (yeah, it’s under ‘F’)
  • right click and select ‘Properties’.
  • Select the tab [Local Files]
  • click the button [Browse local files...]

If you bought it elsewhere then I can’t know where it’s installed but as you most probably launch the game with an icon, do this!

  • Right click icon
  • Click ‘Properties’
  • Click the button [Open File Location] (or ‘Find Target’ on XP)

If you don’t have an icon, then you’ll know where GraveDigger.exe lives, just open that folder.

Found it? Phew! Lets copy it over somewhere so we won’t meddle with the ‘original’ game files as it will be overwritten by any new Steam update for example, so go up one level and copy the folder [a Family of Grave Diggers] somewhere else on your computer.

Enter the freshly copied folder and you should now see all of the compiled code and data, it should look something like this (plus a couple of save files probably):

This is the root folder, and it’s filled with terrifying files mortals shouldn’t meddle with (just kidding) but don’t fret, we won’t touch anything in there with the exception of the ‘Mod’ folder and eventually, save files. And of course launch the GraveDiggers.exe to check out our newly brewed mod!

But enough talking, open the Mod file and you’ll find something like this:

Doesn’t seem like a lot eh, but here we actually have all the nifty things that we’ll want to modify or add to. Or delete if there is something you dislike!

  • font : here we store fonts for the game (lets skip this for now)
  • gfx : All the graphics are stored here
  • map : All the fullblown maps, like the map where you start or the wizards tower
  • mapparts : the Schrödinger map parts, it’s like puzzle pieces that’s get stuck together to generate the maps
  • music : hmm hmm ta daaa!
  • Script : here lives all the scripts who control about everything in the game
  • sound : Bang crash, sound effects here!

So lets dive in shall we?

Follow me to part two then!


Beta version 0.74 out now!

With, among other things:
Big GUI overhaul, text should be readable now (please comment on color & font!).
Pad support (I only have a XBOX 360 pad) starts today (You need to activate it in the menu), Alpha though, same here, please do tell how/if it works (Pad-button “Y” to calibrate analog stick)!
Auto-Popups in pickup-slots (activate in the menu) for keyboard-only play.
Music is the same old but wonderful music is in the makings!
Lots of new rooms & tunnelparts have been added, like the secret room…
Actually secret rooms, which you might find sometimes. And the secret shopkeeper, have I told you about the secret shopkeeper?

And last but not least some not at all secret stuff; bugfixes, polishing, tweaks and fixes!

Please enjoy this version 0.74.

Valmond aka Ludvig Larsson @ Mindoki Games
ps. Oh yeah, Groupees actually excused themselves, paid me double which I must say is some nice goodwill…

LIVE on Steam! (Early Access)

Aand … a Family of Grave diggers is Live on Steam (Early Access)!

I got over a hundred new twitter followers in twenty minutes, lots of hi quality streaming demands (around ten) counting several hundred thousand followers!

I’m not yet off to bed.

Early Access means that the game isn’t really finished. So what does that mean?

My game is around 80% finished content wise, there should (well well) be no more big bugs and you can actually play the whole game, there are just some endgame content left to do.

And some tweaking of course!

Enjoy! Come enjoin the Family of Grave Diggers!

A small video of new gameplay

All obvious bugs has been ironed out and it seems there might not be too many unknown ones, the game plays well and I’m starting to be quite satisfied with the engine itself.

I have reorganized the mountains-level and even if it isn’t finished, it’s already better. I will most probably tweak that level when the dungeons, at least the two first, are finished as in the mountains you can, with different difficulties, unlocks 4 shop keepers.

I also started to work on the first dungeon (after the tutorial dungeons, which are about ready), the fire dungeon. Got to find a better name for that one!

And finally, I now have some better looking trees.

Check out some small game play, and of course the trees!

OBS!! The quality of the video is rather bad, I have added a screen below for comparison…

This is how the game look in action (not deteriorated by the video, but still resampled, click to see full image):