You are on page 1of 19

Additional technical information to CP 1.

75

Table of contents
1 Modding ................................................................................................................................................... 2
1.1 Handling of .mod and .nod files implemented.................................................................................. 2
1.1.1 Introduction: Basic knowledge about data files ....................................................................... 2
1.1.2 First extension: file ending ".cpt" ............................................................................................. 2
1.1.3 Modding extensions: file endings ".mod" and ".nod" ............................................................... 3
1.1.4 Bonus information: What to consider when modding dialogs ................................................. 3
1.2 New parameters in .info files ........................................................................................................... 4
1.2.1 CondItemAmounts=0 .............................................................................................................. 4
1.2.2 CondHasSkill .......................................................................................................................... 4
1.2.3 CondPlayerKnowsNot ............................................................................................................. 5
1.2.4 CondWearsItem ...................................................................................................................... 5
1.2.5 CondReputGroup, CondReputAmount, CondReputRelation .................................................. 5
1.2.6 CondPAL ................................................................................................................................ 6
1.2.7 CondPlayerPartyMember........................................................................................................ 6
1.2.8 New ConditionTypes............................................................................................................... 6
1.2.9 New InfoType: 7...................................................................................................................... 6
1.2.10 New parameter: SuppressLog ................................................................................................ 7
1.2.11 Erase ...................................................................................................................................... 7
1.2.12 Grant....................................................................................................................................... 7
1.2.13 AddQuestLog .......................................................................................................................... 8
1.2.14 Spawn ..................................................................................................................................... 8
1.2.15 ShowGameMessage .............................................................................................................. 9
1.2.16 ModReputEnc ......................................................................................................................... 9
1.2.17 ModReputPol ........................................................................................................................ 10
1.2.18 Humanize.............................................................................................................................. 10
1.2.19 GiveAll .................................................................................................................................. 10
1.2.20 JoinPlayer ............................................................................................................................. 11
1.2.21 FailQuest .............................................................................................................................. 11
1.2.22 Attack reason "ReactToWeapon" ......................................................................................... 11
1.2.23 Gesture commands (stage directions) for the command "Say" ............................................. 12
1.3 New parameters in .quest files ...................................................................................................... 12
1.3.1 PoliticalFailure, PoliticalFailureAmount ................................................................................. 12
1.3.2 EnclaveFailure, EnclaveFailureAmount ................................................................................ 13
1.3.3 QuestDescription .................................................................................................................. 13
1.3.4 New QuestType: 13 (spell quest).......................................................................................... 13
1.4 General warning regaring the reduction of reputation ................................................................... 13
1.5 NPC behaviour .............................................................................................................................. 14
1.5.1 New PAL "Pirate" .................................................................................................................. 14
1.5.2 NPCs react to armor ............................................................................................................. 14
1.6 Magic............................................................................................................................................. 15
1.6.1 New function "MagicSummonCompanion" ........................................................................... 15
1.7 Objects .......................................................................................................................................... 15
1.7.1 Invisible objects ("ghosts") to trigger info files ....................................................................... 15
1.7.2 Setting GameEvents when using interactive objects ............................................................ 16
1.7.3 New property "KeyAmount" in the Lock_PS (chests, doors) ................................................. 16
1.7.4 New command in item templates .......................................................................................... 16
1.7.5 New property "FullBody" in the Item_PS............................................................................... 17
1.7.6 New TreasureDistribution type "8" for non-random trade inventories ................................... 17
1.8 Graphics ........................................................................................................................................ 17
1.8.1 To consider when changing materials (xshmat files) ............................................................ 17
1.8.2 Color Grading ....................................................................................................................... 18
1 Modding
For those of you who want to develop modifications for Gothic 3, we added a small amount
of new features.

Remark: We already included info files with some of the new features of CP 1.75, but they
are inactive. Some of these dialogs become available if you somehow set the GameEvent
"LardoQuest" to true. Afterwards, you have to click on the NPC with the internal name
"Lardo".
These dialogs are just technical demonstrations, of course, and not meant to be a
meaningful contribution to the gameplay.

1.1 Handling of .mod and .nod files implemented

1.1.1 Introduction: Basic knowledge about data files

You perhaps already know the data organization of Gothic 3: All game data is "stored" in
files with the ending ".pak". Example: "Music.pak".
If you want to change (edit) content of this file, you have two options:
1) replace the entire .pak file (this could be impractical if the file is very big, and you
change only very few of it), or
2) keep the old .pak file and just add a new "generation" of the .pak file.
The next "generation" of the file Music.pak is: Music.p00, followed by Music.p01, then
Music.p02 and so on.

Always make sure that there is no gap in the consecutiveness of the generations, because
the engine will stop reading if it can't find a file with the subsequent ending.
Example: If there are three Music files in the data directory, named Music.pak, Music.p00
and Music.p02, the game will only read until Music.p00 and ignore Music.p02, because
".p01" is missing.

1.1.2 First extension: file ending ".cpt"

With CP 1.70 we introduced the feature "Alternative Balancing" ("AB"). For this, we
needed to separate the modified data of the AB from the original data of the regular game
version. This became possible by establishing the new file ending ".cpt".
All files with this ending will only be loaded into the game if the switch "Alternative
Balancing" is set to "on". If AB is deactivated, .cpt files will be ignored by the game.

If AB is switched on, the engine will first load the contents of the .pak files and their
generations, and then all .cpt files. So the contents of the .cpt files will overwrite the
corresponding data of the .pak files.
Further generations of .cpt files, if there should be any some day, will have the endings
".c00", ".c01" etc.

2
1.1.3 Modding extensions: file endings ".mod" and ".nod"

Our request to all modders of Gothic 3 is to keep all .pak and .cpt files as they are now.
Please do not exchange them or add further generations to them!
To enable a strict separation of the files of the "original game" and the files of modifi-
cations, we invented two other new file endings. They should make it easier for the
players/users to keep an overview over the contents of their Gothic 3 data folder and to
identify modifications, and we hope it's helpful for the modders themselves, too. If there
should actually be new real patches some day in the future, these patches will be able to
continue using .pak and .cpt files without risking to delete or overwrite files of
modifications.

There are just three rules you have to understand and keep in mind when deciding how to
name your data files:
- .mod files continue the sequence of .pak files and will be loaded by the engine in any
case.
- .nod files are the modding version of .cpt files, meaning that their contents will only be
loaded by the game if Alternative Balancing is switched on.
- Every file with a "modding" file ending will "win" over every "regular" file ending.

Here's a complete overview of the data loading order of Gothic 3:


(1) .pak files with all generations
(2) .cpt files with all generations (only loaded if "Alternative Balancing" is active)
(3) .mod files with all generations
(4) .nod files with all generations (only loaded if "Alternative Balancing" is active)

Of course, the generations of .mod files must have the ending ".m00", ".m01", etc., and the
generations of .nod files are called ".n00", ".n01" and so on.

1.1.4 Bonus information: What to consider when modding dialogs

To change or add dialogs, it's necessary to edit/add two groups of files: Infos and Strings
(or the stringtable.ini, to be more specific).

In both cases, your modded files will only take effect in the game if you create binary
versions of those files and copy them into the data folder, too. (Or if you delete or rename
the files Projects_compiled.p00 and Projects_compiled.cpt, but this would noticeably slow
down the loading process of the game!)

Here's how it's done:


1) Create a new subfolder "Infos" in the "Data" directory of your Gothic 3 installation.
2) Create a new subfolder "Strings" in the "Data" directory of your Gothic 3 installation.
3) Make sure that your modded stringtable.ini and all info files (the ones you
changed/added, and all unchanged info files!) are in the correct places in the data folder.
4) Rename or delete all generations of the Projects_compiled except the
Projects_compiled.pak itself.
5) Launch Gothic 3, then start a new game
6) Close Gothic 3
7) Open the folder Gothic III\Data\Infos
8) There's a file "_compiledinfos_G3_World_01.bin" now - rename it to
"compiledinfos_G3_World_01.bin" (without the "_")

3
9) Open the folder Gothic III\Data\Strings
10) There's a file "_stringtable.bin" now - rename it to "stringtable.bin" (without the "_")
11) Create a new folder "Projects_compiled" somewhere else on your hard drive
12) Copy or move both .bin files of steps 7 and 9 into this new folder
13) Create a .pak file from the folder with the tool G3PakDir.exe. The result should be a file
with the name " Projects_compiled.pak"
14) Rename the file to Projects_compiled.mod or Projects_compiled.nod - depending on
your intentions with your modification
15) Copy this file to your Data folder, and don't forget to publish it in your mod packet
together with your Infos.mod and Strings.mod (or *.nod...)
16) Delete the subfolders " Gothic III\Data\Infos " and " Gothic III\Data\Strings" again!

1.2 New parameters in .info files

A few modders asked us to expand the possibilities of dialog design. We hope that these
new options are considered to be useful.

New condition parameters

1.2.1 CondItemAmounts=0

The well-known condition "CondItemAmounts" is related to the other parameters


"CondItem" and "CondItemContainer". Example: The entries
CondItemContainer=Markus
CondItems=It_FiremageCup
CondItemAmounts=1
mean that the given dialog would be available if the NPC "Markus" had at least one fire
chalice (It_FiremageCup) in his inventory.
But until now, it wasn't possible to trigger a dialog if a NPC didn't have a particular item
somewhere in his inventory.
With CP 1.70, you'll achieve this by using "CondItemAmounts=0".

Attention: Be careful with traders! They might not have the item of interest in their "loot
inventory", but nevertheless might have it somewhere in their trade inventory. This may
lead to unexpected dialog constellations.

1.2.2 CondHasSkill

The meaning of this new condition parameter should be obvious.


You can concatenate several skills - and spells, by the way -, separated by semicolons.
Syntax:
CondHasSkill=Perk_Barter;Spl_IceBomb
(all perks and spells without the prefix "It_"!)
In this example, the dialog will only be available if the hero learned the skill "barter" and
the spell "ice explosion".

4
Attention: This new condition is always related to the hero, not to any NPC! (NPCs don't
have skills or know spells anyway.)
And: The condition is only fulfilled if the hero has actually learned the skills and spells from
a teacher. Bonuses of armor, weapons etc. don't count!

1.2.3 CondPlayerKnowsNot

This new instruction is the exact opposite of the well-known instruction


"CondPlayerKnows". This means that the condition is fulfilled if a certain GameEvent has
not been set before, or has already been deleted again (by "ClearGameEvent").
Syntax:
CondPlayerKnowsNot=TheHeroDoesntKnowThis

1.2.4 CondWearsItem

This new parameter is always related to the parameter "CondItemContainer". And in every
info file, there can only be a maximum of one "ItemContainer".
The meaning of this condition should be clear: If a particular NPC is wearing a particular
item, e.g. a weapon, ring, amulet, etc., the dialog will be available.
Example:
CondItemContainer=PC_Hero
CondWearsItem=Body_Druid
Result: The dialog of this info file can only be activated when the hero is wearing a druid's
robe.
Please make sure that there will be no situations where you need more than one
CondItemContainer in one .info file! And please stay aware of the fact that the
CondItemContainer is related to the parameters "CondItems" and "CondItemAmounts" on
one hand and "CondWearsItem" on the other hand now. There's a slight risk of confusing
these two things.

1.2.5 CondReputGroup, CondReputAmount, CondReputRelation

These three condition parameters strictly have to be declared together. They allow you to
make dialogs dependent on the hero's reputation.
- Two kinds of specifications are permitted as "ReputGroup": Political groups (Values: Reb,
Orc, Ass, Mid, Nrd, Nom, Pir) or enclaves (in this case, the internal names of the enclaves
are valid, e.g. MoraSul, KapDun etc.)
- The "Amount" is an integer from 0 up to 100.
- For "Relation" the values "MAX" or "MIN" are allowed.
Syntax:
CondReputGroup=MoraSul;Reb
CondReputAmount=70;12
CondReputRelation=MAX;MIN
Result: The Dialog of this info file is only available if the hero's reputation in Mora Sul is 70
or less, and his reputation with the rebels is 12 or more.
Please be careful with the spelling ("Reb", "MAX", etc.)!

5
1.2.6 CondPAL

This condition only makes sense in info files with "owner=PC_Hero". This parameter was
made to create dialogs which should only be available when talking to NPCs of a certain
political group, e.g. orcs and orc mercenaries. Allowed values are: Reb, Orc, Ass, Mid,
Nrd, Nom, Pir.
Syntax:
CondPAL=Mid;Orc
Result: The dialog of this info file is only available if the hero's dialog partner is a
ranger/druid or an orc/orc mercenary. Again: be careful with the spelling! This parameter is
not called CondPal, for example!

1.2.7 CondPlayerPartyMember

Info files with this condition are only available if all mentioned NPCs are companions of the
hero at that moment. It doesn't matter if these NPCs are unique or not - the neccessary
amount of each companion will always be "1 or more". That means that it won't be
possible to restrict a dialog to a condition like "the hero has to have at least 10 wolves
accompanying him".
Syntax:
CondPlayerPartyMember=Rhobar;Snapper
Result: The conversation can only be held if the hero is accompanied by Rhobar and at
least one snapper in this moment.

1.2.8 New ConditionTypes

There are two new values for the parameter "ConditionType". In both cases, the info file
has to contain owner=PC_Hero.
a) ConditionType=38
The dialog is only available with the hero's current companion(s). "Companion" in this case
only refers to NPCs who follow the hero around (blue name), not to leaders of the hero.
b) ConditionType=39
The dialog is only available with NPCs who are neither companions nor friends of the hero.
"Friend" means NPCs with NPCType_Friend. Again, "companion" only refers to NPCs with
blue names. In addition there's a rule that NPCs will continue to be regarded as
"companions" one hour after they left the hero's party.

1.2.9 New InfoType: 7

InfoType 7 was made for "hurry up" sentences of the hero's "clients". It only makes sense
with parameter Permanent=true. During the quest specified in the info file, dialogs with this
InfoType will be played again and again when talking to the NPC, if the last conversation
with this NPC took place at least two ingame hours ago. So it's useful for reappearing
sentences like "Are you still not done with my task?" or "Any news about the orders I gave
you?"
Syntax:
InfoType=7

6
1.2.10 New parameter: SuppressLog

Usually, all dialog lines of info files with ConditionType 3, 4, 5, 6, 7, 8, 10, 11, or 19 are
automatically transferred to the quest log of the mission mentioned in the "Quest"
parameter. With the parameter "SuppressLog", this can be avoided. But it won't affect the
command "AddQuestLog", of course.
The default of the parameter is "false", to keep the previous standard if the parameter is
missing in the info file.
Syntax:
SuppressLog=true
Result: The dialog lines (Say, SaySVM) of this info file won't appear in the quest log.

New Infoscript instructions

1.2.11 Erase

In contrast to the condition parameters mentioned so far, "Erase" is a new command for
the InfoScript lines. Just like "Say", "Give", "SetGameEvent", etc.
With "Erase", you can silently delete a specified amount of items from the inventory of a
specified NPC. (This command was initially created for the feature "milk cows", to delete
one empty bottle from the player's inventory each time he milks a cow, without a message
being displayed.)
Syntax:
InfoScript_Commands=Erase
InfoScript_Entities1=player
InfoScript_Entities2
InfoScript_IDs1=It_Gold
InfoScript_IDs2=100
InfoScript_Texts
We don't know if this command makes sense in other contexts. Please don't misuse it -
stay fair to the players. :-)

1.2.12 Grant

"Grant" is the exact opposite of "Erase": You can secretly put items into the inventory of
the hero or an NPC. Attention: This instruction has no effect on quests! No internal quest
counters are increased. So you can't succeed quests with this.
Syntax:
InfoScript_Commands=Grant;Grant
InfoScript_Entities1=player;npc
InfoScript_Entities2=;
InfoScript_IDs1=It_Bread;It_Plant_Booze
InfoScript_IDs2=10;2
InfoScript_Texts=;
Result: The hero gets ten loaves of bread, his dialog partner gets two boozeberries. No
message will be displayed.

7
1.2.13 AddQuestLog

This instruction allows you to add a text to the mission log without anybody (hero or NPC)
actually vocalizing it.

Syntax:
InfoScript_Commands=AddQuestLog
InfoScript_Entities1=
InfoScript_Entities2=
InfoScript_IDs1=Abe_BringMeat
InfoScript_IDs2=63#64
InfoScript_Texts=INFO_BPANKRATZ31
Result: In the mission log of the quest mentioned in the IDs1 line ("Abe_BringMeat" in this
case), a new entry is added without voice output. The text INFO_BPANKRATZ3163 will be
displayed as red subheading (the ending "63" comes from the first part of the IDs2 entry),
and INFO_BPANKRATZ3164 (which is the second part of the IDs2 entry) will be displayed
as the actual "diary entry" in white. The ending of the subheading line is separated by an
"#" from the ending of the diary entry line.
If you don't want to print a subheading, you have to include a blank line in the stringtable.
Something like this:
INFO_BPANKRATZ3163=;;;;;;;;
If there is no "#" in the IDs2 line, the entry in the "Texts" line (in this case
"INFO_BPANKRATZ31") will be interpreted as subheading - without suffix. The actual
diary entry will still be compiled from the Texts entry and the IDs2 entry.

1.2.14 Spawn

With the Spawn command, you can place an object at a denoted location in the world.
Syntax:
InfoScript_Commands=Spawn;Spawn;Spawn;Spawn
InfoScript_Entities1=Jens;Jens;;player
InfoScript_Entities2=;;;
InfoScript_IDs1=VFX_Magic_TimeBubble_Burst_01;It_Bread;It_Milk;It_
Plant_Health
InfoScript_IDs2=lpos=0.0/0.0/0.0;lposg=0.0/300.0/0.0#lrot=0.0/-
150.0/0.0;wposg=57427.25/3195.21/-24901.26#wrot=-
45.0/90.0/0.0;lpos=0.0/0.0/0.0
InfoScript_Texts=;;;
Result: In this example, four things will be spawned:
- The graphic effect "time bubble" will appear around Jens,
- a loaf of bread appears directly above Jens' head,
- a bottle of milk now stands at a given location in the world,
- a healing plant is placed at the very point where the hero is standing in the world.
Explanation of the syntax:
IDs1 denotes the object that is about to be spawned.
IDs2 contains the details regarding the position:
- If you use "wpos" (=world position), you have to specify the coordinates in the world. The
object will simply be spawned at these coordinates.
- If you use "wposg" (=world position on ground), the engine will additionally try to put the
spawned entity on the ground.

8
- If you use "lpos" (=local position) or "lposg" (=local position on ground), the position of
the spawned object will be related to an existing entity instead. This entity has to be unique
and has to be mentioned in the line "Entity1". The figures after lpos and lposg specify the
position of the new object in relation to the existing object on the x-, y-, and z-axis.
- You can also turn objects around all three axes by using the parameters "lrot" and
"wrot". The figures behind them will be interpreted as degrees. So "-180.0/-180.0/-180.0"
will result in the same position as "180.0/180.0/180.0". "lrot" belongs to "lpos" and "lposg",
of course, and "wrot" belongs to "wpos" and "wposg". Instructions that belong together
have to be concatenated and separated by "#".

Attention: At least when spawning NPCs and effects, it makes a difference whether the
spawned objects are located in the hero's ROI or not. "Living" objects (effects are also
alive in a way..) are only "ticked" by the engine if they are located in a range of less than
25 or 50 meters around the hero. Please take this in consideration while using the spawn
command. When the hero talks to somebody in Cape Dun and triggers a graphic effect in
Gotha during this dialog, this effect probably won't start before the hero arrives near the
spawn location in Gotha.

1.2.15 ShowGameMessage

Serves to print a text on the screen.


Syntax:
InfoScript_Commands=ShowGameMessage
InfoScript_Entities1
InfoScript_Entities2
InfoScript_IDs1
InfoScript_IDs2=5
InfoScript_Texts=FO_Milten
Result: The text "Milten" (taken from the stringtable) scrolls upwards across the screen in
green color. The color is encoded in the IDs2 line. Useful valules are 0 (yellow), 2 (white),
5 (green), 12 (orange), and 13 (red). Default is yellow.
The neutral sentence "New questlog entry" is already included in the stringtable, by the
way (INFO_QUESTLOG_MESSAGE).

1.2.16 ModReputEnc

Serves to increase (up to a maximum of 100) or decrease (down to a minimum of 0) the


hero's reputation in the specified enclave.
Syntax:
InfoScript_Commands=ModReputEnc;ModReputEnc
InfoScript_Entities1
InfoScript_Entities2=Gotha;Ishtar
InfoScript_IDs1
InfoScript_IDs2=10;20
InfoScript_Texts=INC;DEC
Result: The hero gets 10 reputation points in Gotha and he loses 20 reputation points in
Ishtar.
If DEC isn't used, INC will be assumed by default.

9
1.2.17 ModReputPol

Serves to increase (up to a maximum of 100) or decrease (down to a minimum of 0) the


hero's reputation with a specified "political" group. Allowed values in IDs1 are: Reb, Orc,
Ass, Mid, Nrd, Nom, Pir.
Syntax:
InfoScript_Commands=ModReputPol;ModReputPol
InfoScript_Entities1
InfoScript_Entities2
InfoScript_IDs1=Reb;Nrd
InfoScript_IDs2=2;4
InfoScript_Texts=DEC;INC
Result: The hero loses two reputation points with the rebels and receives four reputation
points in Nordmar.
If DEC isn't used, INC will be assumed by default.

1.2.18 Humanize

With this command, NPCs can be made "unkillable" - or lose this feature again. These
NPCs can still be defeated in battle, but neither the hero nor any NPC can actually kill
them with a "finishing move".
"Humanize=false" makes NPCs unkillable, "Humanize=true" makes them mortal again.
Syntax:
InfoScript_Commands=Humanize;Humanize
InfoScript_Entities1=Hamlar;Milten
InfoScript_Entities2=;
InfoScript_IDs1=false;true
InfoScript_IDs2=;
InfoScript_Texts=;
Result: Hamlar can not be murdered anymore, and Milten loses his former immonrtality.

1.2.19 GiveAll

This commandwill transfer the "loot inventory" of an object or NPC into the "loot inventory"
of another object or NPC - all in one go and completely. Trade inventories and pickpocket
inventories are excluded. No message will be displayed during this transaction!
Please keep in mind:
- All NPCs and objects should be non-ambiguous (unique).
- All involved entities have to be referred to with their full internal name. That means
that the key words "player", "npc" and "owner" can not be used here.
Syntax:
InfoScript_Commands=GiveAll;GiveAll
InfoScript_Entities1=PC_Hero;Hamlar
InfoScript_Entities2=;
InfoScript_IDs1=Ali_Chest;PC_Hero
InfoScript_IDs2=;
InfoScript_Texts=;
Result: First, all of the hero's belongings are transferred into Ali's chest, including equipped
weapons etc. Then the hero receives all of Hamlar's items - except his trading goods.

10
1.2.20 JoinPlayer

This command makes a NPC join the player's group of companions or leave this group
again. The info file doesn't need a special ConditionType, and it will not be checked
whether the hero already has companions.
The PartyMemberType of the companion will always be "Slave". This means amongst
others that the hero can't get rid of these companions with common dialog options (e.g.
"Go back now")

Syntax:
InfoScript_Commands=JoinPlayer;JoinPlayer
InfoScript_Entities1=Milten;Lares
InfoScript_Entities2=;
InfoScript_IDs1=true;false
InfoScript_IDs2=;
InfoScript_Texts=;
Result: Milten becomes the hero's companion, whereas Lares leaves the group.

1.2.21 FailQuest

With this command you can change the status of a quest to "failed". (In contrast to the
known command "CloseQuest" which sets the status "cancelled".)
Example:
InfoScript_Commands=FailQuest
InfoScript_Entities1
InfoScript_Entities2
InfoScript_IDs1=KapDun_Treasure
InfoScript_IDs2
InfoScript_Texts
Result: The mission "Steal 3 golden goblets from Urkrass's warehouse" ends unsuccess-
fully, can't be restarted and appears in the mission log in the category "Quest failed".

1.2.22 Attack reason "ReactToWeapon"

This is no instruction, but a possible IDs1-value for the "Attack" command. It is an addition
to the previous values "Enemy", "Duel", "Revolution", and the default "Kill".
Example:
InfoScript_Commands=Attack
InfoScript_Entities1=npc
InfoScript_Entities2=player
InfoScript_IDs1=ReactToWeapon
InfoScript_IDs2
InfoScript_Texts
Result: The NPC will attack the hero as if the hero had threatened him by drawing his
weapon.

11
1.2.23 Gesture commands (stage directions) for the command "Say"

This is also no new instruction, but a new parameter for an existing command - in this case
"Say".
Up to now, the stringtable contained all instructions about the gestures (animations) that a
certain NPC has to make when saying a certain line. Unfortunately, the stringtable
contained many lines with wrong entries that could not be interpreted by the code (e.g.
because they were translated by mistake). With CP 1.75, the "stage directions" have been
transferred to the info fils and can now be found in the line InfoScript_IDs2. Here's the full
set of normalized gesture instructions you can use:
SD_Preach
SD_Proud
SD_Threaten
SD_Point
SD_Beg
SD_Approve
SD_Ambient
SD_Angry
SD_Nervous
SD_Sad
SD_Thoughtful
SD_Mocking
SD_Thankful

1.3 New parameters in .quest files

1.3.1 PoliticalFailure, PoliticalFailureAmount

These new parameters have exactly the opposite effect of the well-known instructions
"PoliticalSuccess" and "PoliticalSuccessAmount". The values of "PoliticalFailure" are the
same as the values of "PoliticalSuccess":
1 = Orc
2 = Nordmar
3 = Rebel
4 = Ranger/Druid
5 = Hashishin
6 = Nomad
9 = "Pirate"
Syntax:
PoliticalFailure=3
PoliticalFailureAmount=2
Result: When finishing the quest, the hero will lose two reputation points with the rebels.
The hero's reputation will never become less than zero, of course.

12
1.3.2 EnclaveFailure, EnclaveFailureAmount

These new parameters have exacly the opposite effect of the well-known instructions
"EnclaveSuccess" and "EnclaveSuccessAmount".
Syntax:
EnclaveFailure=MoraSul
EnclaveFailureAmount=5
Result: When finishing the quest, the hero will lose five reputation points in Mora Sul. The
hero's reputation will never become less than zero, of course.

1.3.3 QuestDescription

The quest log usually only displays the dialogs between the hero and NPCs. The new
parameter allows you to start each quest with a description.
Syntax:
QuestDescription=QUESTDESC_Example
Result: The first text that can be seen in the quest log window for the given quest will be
the lines found in the stringtable to the reference "QUESTDESC_Example".

1.3.4 New QuestType: 13 (spell quest)

Spell quests are solved successfully if the hero casts a defined spell on a certain NPC. If
this NPC is not unique (e.g. Cow or Wolf), the quest will be succeeded if the hero uses the
spell on any of these NPCs. It's possible to concatinate several different NPCs.
Remark: A spell quest can only be succeeded if the quest was actually given to the hero
beforehand. So the hero can't solve a spell quest by accident.

Syntax:
Type=13
DeliveryEntities=Diego;Orc_Warrior_01
DeliveryAmounts=1;5
SpellName=Spl_Charm
Result: The quest ends successfully if the hero casts the spell "Amnesia" on Diego as well
as on five Orc_Warrior_01 (or five times on the same Orc_Warrior_01 - that's the same for
the engine).

1.4 General warning regaring the reduction of reputation

We now provide the possibility to decrease the hero's reputation points, but this doesn't
mean that we consider this feature to be reasonable or even recommendable! We only
implemented it because modders asked us to do so.
We would like to warn you against using this feature without a carefully and well thought
out, stable concept. Depending on the amount of reputation points you want to take away,
you can trigger some drastic consequences for the "normal" game. In some cities
(especially in Montera and Mora Sul), it's already quite hard to receive the needed
reputation of 75% in the first place. If an injudicious decision of the player will result in a
reduction of these reputation points due to a mod, the player won't be able to play all

13
quests of those cities, some of which may be important. So please try to make sure to offer
(new) opportunities to regain the lost reputation points.

1.5 NPC behaviour

1.5.1 New PAL "Pirate"

In addition to the well-known political alignments like "Orc", "Rebel" etc., there is a new
possibility: "PAL_Pirate" (value in templates: 9). Don't take the name to literally - it could
just as well have been called "PAL_New".
NPCs with this PAL behave as follows:
a) Pirates and outlaws react neutral against each other. They don't attack one another, but
they also won't help each other if an NPC of the other PAL is under attack.
b) Pirates team up with other pirates. If you attack one of them, the others will help him.
c) When pirates have to react on other NPCs than outlaws or other pirates, they will
acquire the attitude of their enclave. "Pirates" who belong to Nemora see themselves as
rebels, "pirates" of the enclave Wolfclan behave like Nordmarians, etc. If you attack a
citizen of their enclave, they will defend him; they fight against the hero in revolutions; they
become "green" if the hero has more than 74 reputation points in their enclave; and if the
hero travels around with a companion from Nemora, the NPC will be attacked by orcs and
hashishins.
The new PAL can also be used in info files (e.g. "CondReputGroup=Pir", see above).

1.5.2 NPCs react to armor

Armors can now be assigned to a specific political group by editing the armor templates.
For reasons of compatibility we didn't insert a new variable. Instead we abused the existing
variable "Quality" for the PAL.
Allowed values are 0 to 9 and mean:
0 = None
1 = Orc/Orc mercenary
2 = Nordmarian
3 = Rebel
4 = Ranger/Druid
5 = Hashishin
6 = Nomad
7 = Outlaw
8 = Slave
9 = Pirate (new, see 1.5.1)
Usage: If the hero wears an armor with a Quality > 0, he will trigger the same antipathies
as if he was an actual member of the assigned political fraction. This means that orcs will
react aggressive if the hero wears an armor with Quality 2, 3, 6 or 7, or if the Quality is 5
and the engine has been set to chapter 2. (Chatper 2 begins when the hero gives away
the five Adanos artefacts.) All NPCs react aggressive to armors with Quality 7 - except
"pirates".
Effect: If an NPC sees the hero wearing an armor of an opposing political group, he will
attack immediately with the attack reason "ReactToWeapon". (The same reason is used
when the hero fidgets with a drawn weapon too long and ignores the NPC's warnings.)
14
This rule can't be inverted (like "if the hero wears an armor with the NPC's PAL, this NPC
will react particularly friendly"). The hero won't become more popular by wearing a
sympathetic armor.

The decision, whether and when NPCs attack, follows quite the same rules that apply for
the situation "hero holds a weapon in his hand". In detail:
- NPCs don't react if the hero is more than seven meters away.
- Friends (Diego etc.) don't react.
- Companions and leaders of the hero don't react.
- NPCs who have been defeated by the hero (or witnessed this defeat) won't react for quite
a while after this.
- If the hero has at least 75 reputation points in an enclave, the citizens know him well
enough to accept any armor.
- Gate guards and slaves don't react.
- NPCs who can't see the hero don't react (e.g. if the hero is behind a wall or behind the
NPC).
In addition, there's the rule that former companions of the hero don't react aggressive on
armors for one hour after they left the hero's group.

1.6 Magic

1.6.1 New function "MagicSummonCompanion"

This function was made to enable new scrolls to summon companions.


For new magic scrolls, you need two templates: the scroll template itself, and a spell to
which the scroll template refers. In this new spell template, the variable "FuncOnTargetHit"
has to contain the word MagicSummonCompanion. You declare the kind of companion to
in the variable "Spawn". Just insert the GUID from the template of the creature you want to
summon.

Example: The spell template "Magic_Spells_Adanos_Spl_SummonGolem.tple" contains


the ID of "Golem_Golem.tple": "59B9C7A6FCB85B49A526538958F4B989".

1.7 Objects

1.7.1 Invisible objects ("ghosts") to trigger info files

You can place objects ("ghosts") in the world. Their technical attributes are a mixture of
freepoint and NPC. You can assign info files to these objects. The files will be executed if
the hero comes across the "ghost" and all conditions of the info file are fulfilled. This way,
you can set GameEvents, spawn NPCs, give experience points, play sounds, etc.
The InfoType should always be "1", and the parameter Permanent should always be
"false".
In addition, the engine treats these objects in the following way:

15
- The info files will also be executed although the hero is jumping, swimming, drawing a
weapon etc.;
- the hero won't be stopped when walking or running; and
- the activation radius is not 5 meters (as usual with NPCs), but 20 meters.
You can find examples for "ghosts" in the Templates.pak:
Navigation/Navigation/ World_Spawn_Points
One of them is used in the actual game.

1.7.2 Setting GameEvents when using interactive objects

Now you can prepare some interactive objects in a way that a GameEvent will be set if the
hero uses this object successfully. This is the case for the following object types: chests,
doors, anvils, whetstones, cooking pots, campfires, stools, benches, waterpipes, and
lecterns. You have to insert the GameEvent into the Interaction propertyset, in the property
"ScriptUseFunc".
The GameEvent can be queried in info files as usual (CondPlayerKnows). It won't make
sense to delete (clear) these GameEvents afterwards, because they will be set once more
when the hero uses the object again. The only exception to this rule are lecterns.
Two more rules:
- When including a GameEvent into a lectern (G3_Object_Interact_Bookstand_01), or
more generally into any interactive object with the UseType "Bookstand", you have to
write a "#" behind the GameEvent - as a signal that this text is in fact a GameEvent and
not a real function that has to be executed by the engine (like BS_Alchemy, for
example). This means that the GameEvent "TestThisFeature" has to be written
"TestThisFeature#" if used in a lectern.
- Your interactive objects should be unique, because the ScriptUseFunc will be loaded
from the template. Example: If you want to set a GameEvent when the hero uses a
certain whetstone to sharpen his blade, you shouldn't simply change the template
G3_Object_Interact_Animated_GrindStone_01. If you did that, the GameEvent will be
set on any of these objects in the whole G3 world. Instead, you'll have to clone the
object (G3_Object_Interact_Animated_GrindStone_02) and place it in the world.

1.7.3 New property "KeyAmount" in the Lock_PS (chests, doors)

A new attribute "KeyAmount" was added to the propertyset "Lock" which is attached to
chests and doors. If the Lock_PS contains the ID of a key (Lock.Key), the engine checks if
the property "KeyAmount" contains a value greater than 1. If so, the chest or door can only
be unlocked if the hero has the requested amount of this specific key in his inventory. (The
default amount "0" will be interpreted as "1").
Of course, when changing Lock.Key and Lock.KeyAmount you also have to take a look at
the Lock.Difficulty. With Difficulty 1 to 3 it's still possible to open a chest with a lockpick.
And with Difficulty 1 to 4 it's also possible to open the chest with a spell. The hero will only
be forced to use the key(s) when the Difficulty is <= 0 or > 4.

1.7.4 New command in item templates

The command set in the Item propertyset has been expanded. It was always possible to
include commands after the attribute Item.ActivateSkill2, quite similar to the instructions in
info files. They are executed if the player clicks on them in the hero's inventory. For

16
example, ever since the first G3 version the quest "Secret dealings" was started by clicking
on "Bernado's letter" (It_Bernado_Letter), using the command "RunQuest".
Commands in items are interpreted by another part of the code than the commands of info
files, so the set of possible commands is not identical. Until CP 1.75, the following
instructions could be used in items:
PlaySound, Attack, Give, GiveXP, SetTeachEnabled, SetTradeEnabled, SetPartyEnabled,
SetRoutine, SetGuardStatus, SetGameEvent, ClearGameEvent, SetSectorStatus,
RunQuest, CloseQuest, StartEffect.
The new commands are:
ShowGameMessage, AddQuestLog.

1.7.5 New property "FullBody" in the Item_PS

The Item propertyset was extended by the attribute "FullBody". It's only relevant for armor,
just like the attribute "Robe".
If this property is "true", the hero is not allowed to wear a helmet to it. And vice versa, he
can't wear this armor as long as the hero is wearing a helmet. This restriction was included
for armors that already contain a helmet or any other headdress. Armor like this can be
found in "Gothic 3 Forsaken Gods".

1.7.6 New TreasureDistribution type "8" for non-random trade inventories

There's a new value to the attribute "TreasureDistribution" in the TreasureSet_PS:


"TreasureDistribution_Trade_NotRandom". The numerical value is 8. It is an alternative to
value 4 (TreasureDistribution_Trade_Generate), which means he can be applied to the
"usual" trade inventories of NPCs. (Not to refresh inventories!)
The difference between the values 4 and 8 is: From treasuresets with
TreasureDistribution_Trade_Generate, traders will receive random items in random
quantities. When using TreasureDistribution_Trade_NotRandom, every single item of the
treasureset will be generated into the trade inventory exactly in the defined quantity. In
other words, it provides an invariable basic trading stock of the trader.

1.8 Graphics

1.8.1 To consider when changing materials (xshmat files)

1) The _compiledMaterial.pak contains a file _ShaderCacheMaterialList.ini. This is a list of


all materials that are incorporated when compiling the shader cache. If you want to add
new materials to the game, you have to add the file names to this ini file.

2) After changing shaders or materials and after adding new materials, the complete
shader cache file has to be built anew. To achieve this, you have to delete the file
"Shader.Cache" from your savegame folder. The next time you start Gothic 3, it will
compile a new "Shader.Cache". This will take several minutes.
If only textures are modified, it's not necessary to rebuild the cache file.

17
1.8.2 Color Grading

"Color Grading" is a post processing effect that changes the colors of a rendered ingame
image (frame) according to a certain color scheme. Common changes concern brightness,
contrast, saturation, luminance, hue, etc.

For Gothic 3, these schemes ("look up tables", short LUT) are located in the subfolder
_special of the file _compiledImage.pak. These LUTs are TGA images that contain all
necessary information for the manipulated color mapping.

LUTs will only be regarded by the game if the switch "Color Grading" in the details menu is
set to "on". If HDR is activated, the file G3_Color_LUT_HDR.tga will be used as the color
scheme, otherwise the file G3_Color_LUT_LDR.tga.

Here are instructions how to create own LUTs. We refer to photoshop as image editing
software, but the principle should apply to other advanced image editing applications as
well.
1) Start Gothic 3 and shoot representative snapshots of places / scenes which show a
wide range of colors.
2) Choose one screenshot (or combine several picture to one) and open it with
Photoshop.
3) Extract the file G3_Color_LUT_Template.tga from the _compiledImage.pak, subfolder
_special. This is the neutral model for schemes. It's content looks like this:

4) Open the extracted TGA with Photoshop.


5) Mark all (CNTL+A) and copy it into the clipboard (CNTL+C).
6) Switch to the G3 screenshot and paste the copied TGA image (CNTL+V). Photoshop
will put it in an own layer.
The result should look similar to this picture:

7) Later on, you will have to copy the isolated color scheme again, so you should avoid
joining the color scheme layer with the background picture layer.

18
8) Instead of reducing the layers, add adjustment layers (menu layer => new adjustment
layer). Please make sure to click on the color scheme layer in the layer window before
adding other layers, so all adjustments will also affect the LUT image.
9) In these new adjustment layers, you can apply all changes you want to the coloring,
brightness, contrast, etc. It's recommended to avoid extreme levels of saturation.
Here's a (rather ugly) example for an altered image:

10) If the result is okay, the color scheme has to be saved again - in it's changed form, of
course. One of several ways to do so is:
- Delete the layer "background" (the one with the screenshot).
- After that, reduce all visible layers to one (layer menu).
- Menu "Select" => load selection. Confirm with OK.
- Copy the marked image into the clipboard (CNTL+C).
- File menu => New. The width should be preset with 256 pixels, the height with 16.
Use the file name " G3_Color_LUT_HDR" or "G3_Color_LUT_LDR" resp. (depending
on whether you used HDR or not when taking the screenshots).
- Paste the image (CNTL+V).
- Save the file - at all costs as TGA (G3 won't accept other formats) with a color depth
of 24 bit and without compression (RLE). Otherwise you may face color loss.
11) The final TGA has to be copied back to the Data folder _compiledImage/_special to
overwrite the color schemes there. Best use a new pak generation of _compiledImage
(p00, p01 etc.).

Explicit note: Color Grading will generally alter the appearance of all colors in the whole
game. If you only want to change single objects, you still have to change the respective
textures one by one.

19

You might also like