Skip to content

Configs

PRXPHET edited this page May 27, 2025 · 1 revision

Using regular expressions in trade lists

First the section name is looked for, as before. If not found, regular expressions are checked one by one. The first one that matches is used. Regular expressions are anything that starts with / and ends with /. For example

/^wpn_/

in the buy section means that the NPC will not buy items whose section name begins with wpn_. Or

/^wpn_/ = 0.5, 0.8

in the same section means that items whose section name begins with wpn_ will be bought with coefficients 0.5, 0.8. etc.

  • Added to the trade lists the minimum state at which an item will be purchased

This is the third parameter. If it is not present, it will be the default, i.e. 0, i.e. the item will be bought in any state. For example:

/^wpn_/ = 0.5, 0.8, 0.3

All weapons will be bought at 0.5 to 0.8 if their condition is at least 0.3. Otherwise it will not be purchased. It will be painted in red color.

If this parameter is not present, nothing changes.

Substitution of parameters

  • Added possibility to swap userdata in ogf models. To do this, create a file next to the model file with the same name but with the extension .ltx. For example:
Original model: gamedata\meshes/actors/hero/stalker_novice.ogf
New userdata file: gamedata/meshes/actors/hero/stalker_novice.ltx.
  • Added ability to override omf-animation files in models. To do this in customdata, in .ltx for example, you need to do the following:
[omf_override]
stalker_animation1 ;Path to omf file relative to meshes folder without extension
stalker_animation2
...
stalker_animationN

As a result, the specified animation files will be used instead of those specified in ogf. This is done to allow CoP models to use animations from CoP without replacing all PM models with their PM animations.

  • Support for userdata_override.ltx to swap userdata. The idea of dropping the ltx next to the model file is not very convenient, so there will be a file. To enable:
[visual_userdata_override].
file = userdata_override.ltx

Example file:

[data]
physics\vehicles\niva\include_test_niva = models\vehicles\niva_engine.ltx
equipments\light_night = models\light_night.ltx
equipments\light_night2 = models\light_night.ltx

Models are defined by the start with principle.

  • Added the ability to specify additional names for bones. This is necessary in the case when, for example, the model is taken from CoP and PM script can not find the necessary bones.

To enable:

[visual_bones_override].
file = visual_bones_override.ltx

Example file:

[monsters\burer\burer\burer_normal] ; - visual.
head = bip01_head ; new bone name = old bone name
  • Added possibility to replace shaders in visuals via config (to enable tessellation without editing models for example):
; Changing shaders in visuals
[vis_shaders_replace].
; Tessellation shader: models\model -> models\model_pn. Must be present in shaders.xr!
actors = models\model,models\model_pn, models\weapons,models\model_pn, models\artefact,models\model_pn, models\artefact2,models\model_pn
new = models\model,models\model_pn,models\weapons,models\model_pn,models\artefact,models\model_pn,models\artefact2,models\model_pn.
monsters = models\model,models\model_pn
dynamics\weapons\wpn_hand = models\model,models\model_pn,models\weapons,models\model_pn.
; I.e. all visuals with `dynamics\weapons\wpn_hand` in their path are processed here. The value pairs what to change to what.

Other changes

  • Added reading of level.ps_static.ltx and level.snd_static.ltx files similar to level.ps_static and level.snd_static binary files for easier editing. The ltx files have a higher priority than the binary files. Example.
  • Added reading of level.env_mod.ltx similar to level.env_mod. If there is no ltx file, it is created automatically in gamedata folder after loading binary one.
Clone this wiki locally