Is it possible to change damage calculation?

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
Ablomis
Posts: 2
Joined: Sat, 14. Jul 18, 06:34
xr

Is it possible to change damage calculation?

Post by Ablomis » Sat, 29. May 21, 19:32

I had an idea to add armour/penetration values to weapons and ships. To do this I'd need:
1) Add new variables to objects. (I know how to do this)
2) Change damage calculation based on variables? ( I DONT know how to do this?)

Is #2 even possible to change, or not really?

P.S. I have a lot of experience with dll modding but I still struggle to wrap my head around what is possible to mod in X4.

User avatar
Shuulo
Posts: 1629
Joined: Mon, 14. Apr 08, 17:03
x4

Re: Is it possible to change damage calculation?

Post by Shuulo » Sun, 30. May 21, 01:44

not possible, calculations are hidden in C++ code and we dont have access to that.
also, only variables supported by object class can be used, no way to add more due to same reason.

arshiba
Posts: 48
Joined: Thu, 1. Jul 04, 15:30
x4

Re: Is it possible to change damage calculation?

Post by arshiba » Mon, 31. May 21, 16:27

Ablomis wrote:
Sat, 29. May 21, 19:32
1) Add new variables to objects.
To objects - no, only to entities (blackboard).
Ablomis wrote:
Sat, 29. May 21, 19:32
2) Change damage calculation based on variables?
Change - no, but you can try making own "damage shift".
Look for <event_object_shield_damaged>, <event_object_hull_damaged>, <set_object_shield>, <set_object_hull>.

Post Reply

Return to “X4: Foundations - Scripts and Modding”