CRES.DLL

Lithtech Jupiter engine

Post Reply
User avatar
Spawn
Admin
Admin
Posts: 1310
Joined: Sun Jul 25, 2004 12:50 am
Location: Norway
Contact:

CRES.DLL

Post by Spawn » Thu Mar 17, 2022 12:51 pm

CRES.DLL

This file is the text language file used in nolf, it contains all the conversations, objectives text, subtitles, name of objects etc. The reason why this file is a stand alone file is that nolf was released in many languages. The idea with this tutorial is to add new lines of text to the cres.dll file and recompile it.
I find VS2019 very sluggish and confusing to deal with in this case, and use notepad++ instead


Finding the strings in the source code

Image

So let's find the text "Sleeping Gas Grenade" and its reference id as an example:

ClientRez.h is the referense file used to localize the actual language string
Image

The defined this as IDS_WEAPON_29 and with the referanse id 4028
The name IDS_WEAPON_29 has no special significance other than that it needs to be the same in both files.

ClientRes.rc
Image

There are 5 versions of this file German [DE], Engligh [EN], Spanish [ES], French [FR] and Italian [IT]
I went for the English one, and it tells me that IDS_WEAPON_29 refers to "Sleeping Gas Grenade"

So in a nutshell:
Image

For example to send a missiontext to the player, you would use this id
Image


Adding a new string

Let add a new string shall we, my creative mind came up with this:
This is a new string, containing some text
Open up the ClientRes.rc for the language you want to use, english in this case

Invent a creative unique reference, and type in your text.
Image

Then make a referance to it in ClientRes.h
Image

All you need to watch out for here is that you pick a ID that doesn't already exist, 33700 seemed like a good place to start. My next id would have been 33701 and so on.


Finishing up

All you need to do then is rebuild the source code (Final,x86)
and create a new (English*) CRES.DLL to put inside your mod.

For more about building the source code, click here.

Your newly built CRES.DLL can be found in:
nolf2-modernizer-master/Game/built/Final/ClientRes/TO2/

Note: If you are going all the way and making your mod avaiable in every language,
this will result in 5 different CRES.DLL files and 5 different rez files.
To create a German CRES.DLL, you would choose Final DE, x86 when building.
The source is however only set up to build Final/Debug right now.
Image

Post Reply
jedwabna poszewka 50x60