Skip to content

Posts from How do I change the color of the effects?

No ratings yet — be the first to rate!
User Avatar
7 months ago
Auto-translated

Hello, esteemed modders! I have a problem: I want to change the eye color of the enhanced zombies, but I can't find the file that controls the green glow of their eyes. Is it even possible to change this, or is this data deeply embedded in the source code?

Thank you in advance for your answer.

2 months ago
Auto-translated
Hello, yes, the eye can be changed, but you'll have to dig a bit.

First, find the path to the creature's visual (data/GameMechanics/CreatureVisual/Creature etc.), then to all the animations (data/Characters/Creature etc.). It, in turn, references the creature's arena animset file; in the case of the zombie upgrade, that's data/animset/creatures/necropolis/zombie-arena.(Animset).

It's best to start with the idle00 animation, that is, roughly speaking, the idle state. This is the one that plays, for example, in the recruitment window. If an effect is attached to the animation, it will be specified in its file; follow that path (data/effects/effect/characters/creatures/necropolis/zombie/idle00). The effect file references a number of other files, whether it's lighting, a model, a Particle instance, etc.
If you need to change specifically the eye color, rather than the general glow/haze, then look further for the file data/effects/ParticleInstance/characters/necropolis/zombie/bone/head_bone, because this file is responsible for the eye glow. Under the PerParticleFog line, you'll see a uid line.

The point is this: the color is indeed baked into the binary.
Copy the specified uid (48645353-DF44-44BE-ADEF-9829FC6F5445), then find it via search in the data/bin/Effects folder.

And here's where it gets interesting: to open it, you'll need any Hex-editor; it displays each byte in hexadecimal. I personally use Hex Editor Neo.

The color is written as RGB, i.e., Red Green Blue, sometimes RGBA. For example, 00 ff 00 is maximum green. That's exactly what you need. In the binary, it appears 8 times; you replace it with your desired color.

Often, you need to find the most frequently occurring triplet (sometimes chatgpt helps; move it to a text file, send it, ask for "most frequent triplets" or "find rgb shades"), change it to the desired color (you can use a converter if needed), save the bin under a new name (you can just change the last character), put it in the same folder you originally took it from, and in the Particle file, set the path to your new binary.
As a rule, this will be enough.
This applies to those effects whose glow is black and white, with all color applied later. There are also some where it's enough to recolor the texture, which is referenced in the Particle Instance.

Don't forget that besides the eye glow itself, the zombie upgrade also has its own model (texture); it should also be recolored around the eyes to avoid a sharp transition and color mixing. I recommend the program gimp for this.
Also, don't forget about the other animations, otherwise the new color will revert back to green as soon as the creature attacks, takes damage, and so on.
In reply to Nargaron
User Avatar
2 months ago
Auto-translated
May God grant you good health!
In reply to Sir Syddan
1 month ago
Auto-translated
I apologize for misleading you.

The color is recorded as BGRA, which means Blue Green Red Alpha. This is exactly the sequence. Why BGRA? The file uses little-endian, meaning it's read from the end. Usually, the color is RGB, but here it's reversed, and then the alpha channel is added. Alpha controls transparency; 0 represents maximum transparency, so the effect won't be visible. But the higher the value, the brighter the glow will appear (due to opacity). In this file, for example, it's 00 ff 00 33.

Statistics

Welcome our newest member: recijeb