Post tutorial Report RSS How to change Geralt's player model

This is a tutorial going over how to replace Geralt's player model in your own custom module using the Djinni editor.

Posted by on - Intermediate Client Side Coding

If you wish to discuss modding TW1 I recommend joining the Redkit central discord server here.

Introduction

CD Projekt released a special editor for The Witcher when it released called the Djinni editor. It's included with every copy of the game. The Djinni editing suite is a robust upgraded version of the Neverwinter Nights editor and uses the same scripting language: NWN script.

One neat thing about the Djinni editor is you can created your own custom entirely modular adventures separate from the main game. And you can populate it with whatever characters you want. As well as changing who the protagonist is. And in this tutorial I'll go over a simple project to replace Geralt's model with a drowner. Similar to the mod John's Diary which I previously reuploaded/preserved to moddb.

What you will need

You'll need to have the game itself and the Djinni editor as well as a basic understanding of creating a new module and a custom area. I'd recommend starting with this video tutorial first.

Prelude

Once we've created a custom module we'll need to create a custom area. In this case right click the areas tab and click "New Area". For the purposes of this tutorial I'm going to use g01. Although you can use any area you want.

1

Next double click "edit area". You should now be previewing the area you created.

2

Next create a player spawn. You can do this by pressing the create player spawn button in the top menu bar. start point

Screenshot 2023 06 04 115506

Now you go up to Game and then click Test Game you should now spawn into your custom area as Geralt.

3

Replacing Geralt's model

If we want to replace Geralt in our custom adventure with another character we need to first find which character to replace him with. That can be found within appearance.2da. .2da files are database files that the game compiles strings in to determine which data goes where. Appearance.2da essentially determines which model goes with which character.

An easy way to view appearance.2da is to create a custom character template. Go up to file->new->template->creature

4

From here double click the 2DA icon next to "appearance"

Screenshot 2023 06 04 120822

This will now open appearance.2da. From here you can find which model you want to swap Geralt with. It may be slightly confusing to find but they typically are designated by name. IE: cr_witch2_c2g2 is Geralt's model. The most important part is the number to its left.

Screenshot 2023 06 04 121029

From here if we scroll down we should find what we've been looking for. The drowner's appearance section.

Screenshot 2023 06 04 121154

Note down that the drowner is #75 in the list. We'll need that for later.

Writing the script

Now we'll need to write a simple NWN script file that triggers as soon as the player spawns into the level. Double click on Module Properties on the left and then scroll down to "Scripts"

Screenshot 2023 06 04 121339

Let's add a name "PlayerSpawn" and then click on the NSS button. It should create a newscript file.

Screenshot 2023 06 04 121714

From here we'll need to tell the game to modify Geralt's model using that number we found earlier. Let's type in the following.

void main()
{
object CKPLAYER = GetFirstPC();
SetCreatureAppearance(CKPLAYER, 75);
}

This script will tell the game to assign the variable "CKPlayer" as the player character and then set its appearance to #75. Which is our drowner model. It will also run this as soon as the module is loaded. Save this script, then save the module then let's playtest it.

5

There we go now Geralt is a drowner and has all of the drowner attacks/animations. This is a fairly basic example of what can be done with simple scripts when creating a custom module. I hope this helps you.

Post comment Comments
LithTechGuru Author
LithTechGuru - - 408 comments

If anyone wants me to setup a discord server for Djinni/REDkit let me know. Most Discords that are Witcher related are TW3 themed so there's not a lot of places to go for TW1 or TW2.

Reply Good karma+3 votes
ambee
ambee - - 2 comments

Did you ever make the server? It feels like the community is dead in the water. :(

Reply Good karma Bad karma+1 vote
LithTechGuru Author
LithTechGuru - - 408 comments

I did not. I can if you want me to.

Reply Good karma+2 votes
ambee
ambee - - 2 comments

DO IT! <3

Reply Good karma Bad karma+1 vote
LithTechGuru Author
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: