Mods in KCD

I did more digging last night on what all they are doing exactly with this engine, and it left me with a lot of questions sadly.
There are a lot of misleading files in the Scripts.pak.

Take this simple task I tried to do

Print something to the console when an NPC dies

I was under the impression that all NPCs and well, actors, were related to this guy
KingdomComeDeliverance\Out\Scripts\Scripts\Entities\actor\BasicActor.lua
I tested this by adding some prints to the console at various functions like OnDeath and OnHit
None of those ever made it to the console when I got in a fight with some Cumans.
This makes me think they are using another system entirely for NPCs like Cumans and such.
This is not their design after all, this BasicActor seems to come as boilerplate for new Cryengine projects, and the code in there seems unchanged, as tons of references to NanoSuit variables and guns.

So my big question is WHERE is the code for handling combat events and all that logic? I canā€™t seem to find it anywhere in Scripts.pak, which makes me think itā€™s somewhere elseā€¦like the WHGame.dll sitting next to gameā€™s .exe?

Iā€™m so tempted to try and track down one of their programmers on Twitter :expressionless:

Look under the Tables.pak\Libs\Tables\rpg under one of the Soul specific xmls it seems that they refere to alive/dead condition as a soul condition

Hmm, I tried looking but couldnā€™t find anything concrete. I do see a lot of flow graph like logic. Perhaps similar to the AI behavior trees.
The be more specific, Iā€™m trying to locate where the code is that handles applying the blood decals when you strike an enemy say, on the shoulder. A wound decal appears at the location of impact. Iā€™d imagine the thing doing this would be actual code, not an xml/graph.

If not a .lua file than maybe they are doing all this in C++ land aka some .dll file.

A framework to work with that AI, would be useful (we could learn a lot of things in the process), I see the game needs improvements on animals and on stealth-detection, robbery-detection among other things (overall is good AI, for a game like this, no doubt, good work, but could be improved, as always), for a more persistent world, random events like (bandits assaults to any NPCs, travelers being robbed, killers, assasins, robbers in cities and towns), vigilantes, executions, etc
In other order of thingsā€¦ mods must support localization:

About localization of mods, it is a need, like The Witcher 3 has, because otherwise any mod which adds text, will overwrite main english.pak, and translating mods is difficult if a diff patch is necessary to see ā€œwhat is changed from original filesā€ in any mod. (I donā€™t know if is currently planned or something, but would be useful), for example: for perks mods, like this

@mercuito: Did you turn logging on?

No, you can print to the console inside lua files, to bypass log levels, you can simply use the System.LogAlways(AlwaysLog?) function. I got other code paths to print to the console, but the code in the npc related lua files does not get executed for people you fight. This makes me believe some other in house solutions is controlling their actions, and handling combat events. Most likely inside the WHGame.dll. Most likely written in C++, most likely reeeaaallly hard to reverse engineer. Reading machine code is not my thing lol.

Waiting for the mod to return the beautiful graphics from the beta version (trees, foliage, grass, shrubs and volumetric lighting) If possible return this beauty.


Stop spamming this everywhereā€¦

2 Likes

Just wrote what mod wanted to see for the game, why you are complaining.

Youā€™ve been spamming on almost every thread about the Beta graphics, other people already asked you to stop doing it.

1 Like

These topics are similar, so I wrote a few topics that would have had more resonance and the developers have paid attention to it. In the future, if possible, they can return the beauty of the beta version.

Thatā€™s not going to happen, youā€™re either incredibly naive or have zero understanding of game development.

3 Likes

No need to be pessimistic, to scatter the trees and grass on the map is not as difficult as writing the story quests and to make scripts for NPC

Yes, it is. Level design is a thing that exists and is hard. And heā€™s right: stop spamming. Modders canā€™t do anything about it, and the more you post about it, the less any of us are willing to listen to you.

1 Like

Is the chap responsible for the tougher enemies mod around here? I would love to have a word with him.

Yeah this dude is very annoying with his beta graphics. If you want them so much try and mod them yourself, you will give up before you even started, modding is not that easy and people arenā€™t your personal modding army. Modding in this game, for now, is pretty much dead and unless they release some good modding tools, it will stay that way.

Kudos to Feynman and your superb HUD mod!

Just to enquire (as I havent found anyone who did as of yet), but did anyone of you manage to put NEW models in the game?

clarification; Placing the files in the correct folders and updating the xml files and axtually be able to get the item ingame using the cheat mod commands?
(i tried but it seems the game cannot find the item i added)

I dont think anyone could till now but everyone is digging.Lastest we got are mods with face swapping.

Remember, more info about technical Modding here :wink: