Skip to content

Posts from How to change the damage formula for spells so that it depends on the hero's level.

No ratings yet — be the first to rate!
1 year ago
Auto-translated

I want to change the Earth Shock damage formula so that it depends on the hero's level: 40 + kol*40 * ((lvl/20)**4)

However, I can't figure out how to change the formula itself, but rather the value of the buff from the spell.

Also, there is already a spell in the game that uses the hero's level for casting - Summon Phoenix (Attack and Defense – 10+2*Hero Level)

But in the Summon Phoenix spell file, there are only values from 4 to 1. Where can I see how it works and where is this formula defined? And how can I use the hero's level value in the Chaos damage formula?

User Avatar
1 year ago
Auto-translated
Taske3453

I want to change the Earth Shock damage formula so that it depends on the hero's level: 40 + kol*40 * ((lvl/20)**4)

However, I can't figure out how to change the formula itself, but only the buff value from the spell.

Also, there is already a spell in the game that uses the hero's level for casting - Summon Phoenix (Attack and Defense – 10+2*Hero Level)

But in the Summon Phoenix spell file, there are only values from 4 to 1. Where can I see how it works and where is this formula defined? And how can I use the hero's level value in the Chaos damage formula?

The formulas are hardcoded in the game engine, and the xdb files have a clear structure; violating this structure leads to game crashes or malfunctions of individual elements (like the bug with the instant devastating strike).

Some complex spells have additional parameters defined in DefaultStats; I remember that this applied to Hive summons and Wall of Swords (possibly Phoenix as well).
In reply to fktifzobr@mail.ru
1 year ago
Auto-translated
fktifzobr@mail.ru
The formulas are encoded in the game engine, and the xdb files have a clear structure; any violations of this structure can lead to the game crashing or individual elements malfunctioning (such as the bug with the instantaneous, devastating dive attack).

Some complex spells have additional parameters defined in DefaultStats; I remember that this applied to spells like summoning a Hive and creating Walls of Swords (possibly also Phoenix).

Can I change the formulas in the game engine? And where is the engine located in the files? Is DefaultStats an xdb file?

In reply to Taske3453
User Avatar
1 year ago
Auto-translated
Taske3453

Can I change the formulas in the game engine? And where is the engine file located?

The engine is the "exe" file; I've never changed it because it's program code. It's located in the "bin" folder within the game's directory, and that's what you use to launch the game.
Taske3453

Can I change the formulas in the game engine?


You can change them, but honestly, I haven't kept up with that area of modding. I saw in a card-making chat how one guy used some kind of patcher to increase the number of artifacts in the engine... I don't know how it works.
Taske3453

And where is the engine file located? Is DefaultStats an xdb file?


\GameMechanics\RPGStats, but don't take it from data.pak; take it from a2p1-data.pak.
There's a lot of stuff in there. Of the things I've changed, I can remember modifying starting resources, numerical values for some creature, hero, and specialization abilities, undead raising tables, blood rage bonuses, bank protection, and a lot of other things that I've never touched
In reply to fktifzobr@mail.ru
1 year ago
Auto-translated

fktifzobr@mail.ru

\GameMechanics\RPGStats, but take it not from data.pak, but from a2p1-data.pak

And why specifically from a2p1-data.pak?

In reply to Taske3453
User Avatar
1 year ago
Auto-translated
Taske3453

 

Why specifically from a2p1-data.pak?

This archive contains the patch files (a2p1 is addon 2, patch 1), and the game uses these files. Also, if you take a file from data.pak, it will break the Impale skill, as the delay is not specified there.
In reply to fktifzobr@mail.ru
User Avatar
1 year ago
Auto-translated
fktifzobr@mail.ru
This archive contains the patch files (a2p1 is addon 2, patch 1). The game uses these files, and if you take a file from data.pak, it will break the "Devastating Pike" skill, as the delay is not specified there.
Is this a separate archive? And if so, where is it located? confused
I've been editing things in the regular data and haven't thought about this before.
In reply to Azmadon
User Avatar
1 year ago
Auto-translated
Ismail
Is this a separate archive? And if so, where is it located? confused
I was just editing things in the regular data folder and didn't think about that...
Well, it's located in the data folder.
Attachments 1
1 file attached • Total size: 37.8 KB
In reply to fktifzobr@mail.ru
User Avatar
1 year ago
Auto-translated
fktifzobr@mail.ru
well, it's located in the data folder.
Interesting. For me, everything is the same, except for these two "A2" Archives. Although, the version seems to be 3.1.

Is this a separate fan patch? Or is it like an official one?
In reply to Azmadon
User Avatar
1 year ago
Auto-translated
Ismail
Interesting. I have everything working except for those two "A2" Archives. Although, the version seems to be 3.1.

Is this a separate fan patch? Or is it an official one?
It's official; this is the vanilla game.

Statistics

Welcome our newest member: recijeb

Users Online 3 users 1378 guests