Game-Making Blog

September, 2009: Wrestling with Djinni

In the last month or two, several different people have told me that they couldn't possibly make a new adventure for The Witcher.  Well, that might be true for some people, but I think a lot of folks who think they can't do this actually could if they wanted to.  So I thought I'd post an example of what happens behind the scenes when I'm trying to do something that turns out not to be as easy as I'd hoped it would be.

The people of my village (Riverford) are followers of Melitele.  They're not very religious, but what religion they have is focused on Melitele.  So I wanted a statue of Melitele for the center of my village, and it seemed as if that would be easy.  We've all seen the statues of Melitele in the main game, right? 

User Posted Image

There's one in the swamp forest and one in St. Lebioda's hospital, so having a statue of Melitele in my village should be easy, just grab the right file for the statue and plunk her down.

I guess I should back up a bit and mention a few basic Djinni facts, for those who haven't worked with it before.  The places in the world where Geralt runs around and does things -- outside, inside, cave, crypts -- all of those things are called "areas," and they come with the game.  Most of the buildings, trees, fences, large rocks, and so forth are just part of the area -- they can't be removed.  The smaller things, like furniture, herb bushes, campfires, and so forth are called "placeable objects."  Things that are in Geralt's inventory are called "items," and most items aren't seen in the outside world, only in his inventory.  There are exceptions to this, though -- things like his sword are both in his inventory and in the world.  But in general, big, unalterable things are area, medium-sized movable things are objects, and stuff that's only in the inventory are items.

Well, I thought the statue of Melitele would be an object, and placing an object in Djinni is really easy.  And when I looked through the files of objects, I found one called ob_melitealt01.  That should be the statue, right?  Nope. 

User Posted Image

It turns out to be a small table with a carving of a woman on it -- it's probably a small altar for at-home devotions, but it's certainly not a big, three-part statue.  Hmm. 

So where IS the statue?

I opened up the area of the swamps from the main game in Djinni and tried to click on the statue.  I couldn't click on the statue, though; I could only click on an empty box next to the statue. 

User Posted Image

Opening St. Lebioda's in Djinni showed the same.  Oh, hell.  The statue of Melitele is part of the AREA; that means there's no placeable object statue.

But I WANT a statue.  It will look cool in my game and it will also help to establish a bit of background that's important to the plot. 

Huh.  What to do?

Well, Melitele is a three-part goddess.  There are a lot of three-part goddesses in mythology, and most of them have one part that's Maiden (a young, unmarried woman), one part Mother (a woman of child-bearing age), and one part Crone (an old, wise woman).  Well, we have women of the relevant ages in the game.  How about if I just get three women to stand back-to-back, after first giving them clothing that makes them look as if they're made out of stone?

Made out of stone.  Hell.

I'm no artist -- I mean, I'm really, REALLY no artist -- but I can do some elementary recolors, so I try to find a way to make an ordinary woman look as if she's made of stone.

So I open up the model for the peasant woman (the file, amusingly enough, is named "boob2."  Really!) in PhotoShop, then tell it to remove color.  Okay, now she's grey and looking more stonelike already.  She still looks too alive, though, and not the right texture.  Hmm, texture.  There's a texturizer under the Filter menu in PhotoShop, and one of the possible textures is "sandstone."  Sure, give her a sandstone texture.  Hmm.  That's better, but her face and chest are a lot lighter than her clothes, which would be kinda weird if she's made out of a single block of stone.  So undo the texture.  Select the face and chest and make those a darker grey, more like the color of her clothes.  Reapply the texture.  Hmmm. 

User Posted Image

Not exactly what I was hoping for, but not bad.

Well, let's start again from the grey woman.  How about if we apply the "emboss" filter instead?  That looks sort of statue-like, but it looks kinda like a METAL statue, and we want stone. 

User Posted Image

Well, how about if we combine them?  Go back to the sandstone woman, then apply the embossing on top of it? 

User Posted Image

Hmm.  Not TOO bad, but still not what I want.

Wait, I'm a dolt!  We have plenty of stone textures, all through the game.  I can copy one of those, tell PhotoShop it's a pattern, and apply that to the woman.  Okay, so let's try that. 

User Posted Image

Hmm.  Her facial features are a little too blurry that way. 

Well, what if I apply the stone pattern at 70% opacity, and not 100%? 

User Posted Image

That's not too bad, but the stone texture seems kinda small, compared to the size of the statue.

Okay, so I'll go back to the stone texture and blow it up, then save that as a new pattern.  Okay, apply this bigger stone pattern to the grey woman. 

User Posted Image

Better.  Yes, I like this one.  It's not perfect, but it will do.


Okay, so I have a woman who looks like she's made of stone; I'll just add a line to the appearance.2da file, and that'll give me a new set of clothes for good ole Boob 2, one where she looks like stone.

Now, if I want her to be a statue, I don't want her wandering around or even fidgeting; I want her to stand still in one spot and NOT MOVE.  That sounds mean, but she's only pixels; she won't get thirsty or get muscle cramps. :-)  So, let's look at the character template.  Yes, there's a "movement" line, with several possibilities to choose from, one of which is "Immobile."  Perfect.  Okay, Melitele-to-be, you're immobile.

I need to give her an "action" in her Story NPC file; is there a stand-still-and-don't-even-breathe action?  Hmmm.  Here's something called "monster pause," maybe that would do it.  Okay, let's put her in the game.

Yes!  She looks like stone, and she's standing perfectly still.  Okay, I have the Mother for the three-part Melitele statue; now to make the Maiden and the Crone.

The Crone is fairly obvious.  There's only one old lady in the game, so we'll use her -- the Vaska, Shani's Landlady, Old Woman model.  Okay, recolor her to look like stone.  That's a lot faster, now that I don't have to try a hundred things that don't work.  Apply large stone texture, 70% opacity -- wham, she's done.

Okay, how about the Maiden?  The little girls are too young; it needs to be definitely a woman, but one who's kinda just old enough to get married.  Hmm, the Maiden in the real Melitele statue is naked; I never noticed that before.  Well, if we take Shani or Triss or Adda in her nightgown and remove the nightgown....  She's older than the standard Maiden age, but once her face is stone, we won't be able to tell much about how old her face is, and her body certainly looks young in that model.  Or maybe Morenn's model?  Check Morenn's model -- no, she's wearing lots of jewelry and stuff, which doesn't really work for the simplicity of the Maiden.  Shani's hair is shorter than is usual for the Maiden, and Adda's wearing that headpiece.  Okay, naked Triss it is, then.

Okay, apply stone texture to naked Triss, and she's all set.  Make character template for her and for the Crone.  Make NPC story file for her and for the Crone.  One spawnpoint for the three of them, and three action points, arranged in a back-to-back circle. 

Damn, I hope this works!

Hell.  It doesn't.  They spawn fine, and each of them is immobile and stone-like if I put her by herself, but they won't stand close enough together to look like a three-part statue.  If I put the action points that close together, one of them stays at the spawnpoint so that she doesn't have to get that close to the others.  What, have they got lice or something -- why won't you stand back-to-back with them?

Okay, so that won't work.

Well, I can still use the character models to make a statue, though.  Instead of using them in a character template, I can use them in a placeable object template.  The placeable woman!  But if I do that with the existing character models, then I can't specify an outfit, the way I can for a character.  That means that the default outfit would have to be stone.  Hmm.  That's not so good.

Well, I can COPY the character models, rename them to something else, and edit the internal specifications to match the new name.

All right, so now we have Boob 3 and Grand 2 and Naked 6.  And they're things, not people, so I can place them however I want, even one half inside of another one or something.

Does that work?  It works! 

User Posted Image

Oh, it doesn't look like the Melitele statue in the swamp forest or in St. Lebioda's, but it doesn't have to.  It's not like there's some factory that turns out identical Melitele statues; in the medieval era, each statue would be made by an individual sculptor, and it would make sense that different sculptors would have somewhat different visions.  Heck, it even makes sense that the sculptor would use models from the village when working on the stone, so if the faces look rather a lot like the locals, that's not just okay, it's even good.

This took me three days.  It involved much flailing about, a lot of trial-and-error, and a lot of telling myself that I'm awfully stupid, and why didn't I think of this or that or the other thing SOONER.  And what I ended up with isn't fabulous, but it will do.

Three days.  And the average player will probably walk right by the statue and never even notice it's there.  :wall:

Why am I telling you all this?  Well, people see the finished product, and they think, "Wow, *I* could never do that."  They don't realize how many false starts and blind alleys are involved before one stumbles across something that will do.  So I thought I'd give you a behind-the-scenes peek at how this works -- or at least, how it works for me; it's possible that all of the other modders are smarter   :-[.

It's all about not giving up, really.  There WILL be a statue of Melitele in Riverford, damn it!