damage.ini (roar is back but just for this topic...)

Posted by roar 
damage.ini (roar is back but just for this topic...)
Date: May 18, 2013 02:43PM
Posted by: roar
Hello everybody,

first of all it's great to pop in after a long time (I guess four years!) and see that the community is still strong, with some familiar "faces" and a lot of great work.
I'm really impressed to see that after more than ten years since its release, GP4 still rocks and there are some massive update such as the GpXPatch 4.something which sounds incredible!

Anyway, back in topic.

Yesterday, stcheyne sent me a PM regarding damage.ini and how to improve it. I saw there's a 3D open here and this is the link to the discussion we started in the old days, but I thought it would be a better idea to start a topic on its own and throw in as much as I can about this issue.

Just to keep short and simple, GP4 has got a "model" for damage and its physics that was pretty cool and "state-of-art" when GP4 was first out on shelves, but now is kind of outdated if we compare it to other sims like RF, which is relatively young (at least younger than GP4). This means that we can tweak it, but we can't change it. In other words:
- we can fix some major stuff like crashing into a wall, get rid of a wheel and suspension and find our way to the pits, where it will be fix in less than ten seconds (which is unrealistic)
- we can't have things like unbalanced behaviour of the car if we keep on "kissing" the wall with the same wheel and suspension, simply because the program behind the game haven't got this option
- we don't know if there is a way to obtain things like better partial damage to the front wing (you know that you can break part of the front wing) and if we can make it in a way that affects handling more realistically

Said that, damages are related to damage.ini, which is available only with CSM, if I can recall well. If you read the old thread, you will find that I came out with these numbers... and the explanation:

DamageCarsBounce =16 ;32
DamageWalls =3700 ;7424
DamageCars =4100 ;8192
DamageWallsBounce =4 ;16

Other numbers are obscure and they don't seem to have an effect on anything. It could be true, because GP4 is full of stuff unused (like the complete set of flags you have stored somewhere, or the red light on the steering wheel...). Or, they have an effect on something, but maybe they are not related to the stifness of the part, they could be related to a position (especially settings for right and left stuff which has half values)... who knows? I admit I wasn't able to understand it and I hadn't got time to have a deeper inspection on this stuff. Take a look at the old 3D if you need.

There two ways to sort out values meaning:
- ring Geoff Crammond... and see if he can help you ;-)
- save some scenarios (like hitting a world sideways, with a wheel and so on...) and play with numbers...

Remember: you can't add features not intended to be in GP4. You can improve performances.

I hope everything is clear. If not, as I log in (not frequently) here, I will try to help you.

Take care,

ROAR
DamageCarsBounce =16 ;32
DamageWalls =3700 ;7424
DamageCars =4100 ;8192
DamageWallsBounce =4 ;16

My investigation definately is all values below these ones, as I too have quickly understood their effects on the track (we can even say to players now - change these values to have the following effect). The obscure ones I found like roar, are difficult to comprehend. These values I believe are the ones everyone else who is thinking about tweaking these settings should focus on as the above values have already been cracked. So with that in mind here is that piece of the config built up by 'casssp'

NoseCone =1 ;2
RightWing =14 ;130
LeftWing =13 ;130
RightWingFence =12 ;66
LeftWingFence =11 ;66
RightFrontSuspension =450 ;136
RightFrontWheel =350 ;136
LeftFrontSuspension =650 ;68
LeftFrontWheel =550 ;68
RightSidePod =2 ;8
LeftSidepod =1 ;4
CarRear =1 ;12
RightRearSuspension =600 ;34
RightRearWheel =500 ;34
LeftRearSuspension =400 ;17
LeftRearWheel =300 ;17
EntireRearWing =5 ;256
RightRearWing =4 ;256
LeftRearWing =3 ;256
TopRearWing =2 ;256
LeftBargeBoard =2 ;8
RightBargeBoard =3 ;4

Now casssp said to me he wanted his car and others to lose their full suspension so they are forced to retire, and he succeeds with this config, parts break off as he wants and rather easily too. I have one problem with it though, no matter what side or part is the point of impact, every suspension will buckle even if parts weren't involved with the impact point. This is something I am trying to avoid, my goal is to match as close as possible to GP4Tweakers 400% damage coefficient setting (now if ZaZ or anyone who knows can tell me if CSM can force the damage coefficient setting on the main program of GP4Tweaker, then I may be willing to abandon damage.ini, but for now I havn't found anything to do this). Collisions that result from this setting is the best damage physics I have ever seen in a F1 game, even compared to the modern games, most F1 sims now focus on the eye candy instead of physics thats why GP4 never gets beaten year after year, because it was given that special attention for realistic physics, and because of the decent mod community it never ages. I disagree with the damage physics aging, if you actually compare the damage physics to recent games, you'll see that the damage evolution hasn't changed in fact I would say it got worse (sure they have recently added little pieces of carbon fiber spraying off in an impact but it doesn't matter when the collisions look like two tractors crashing into each other). Right back on topic though, with the obscure values. What I found was they are that, strange in behaviour. I sometimes felt there was a system to making the car parts weaker or stronger, the way the defaults are numbered, I sometimes thought to myself - Is there a ratio in there to determine damage coefficient? For example maybe if you increase the right front suspension value by double (272), then you are changing a ratio? I mean one would assume that these values are based from stiffness or robustness of the part involved because of the first 4 lines of the config reacting in this way but it seems to not be the case. I myself haven't really noticed a value that didn't change the damage in some way, I may have overlooked such a thing but I am fairly certain anything I changed would give me a result, albiet one that is difficult to understand and not really giving me an idea on what the value did. If there are values in there that do nothing, this can make the situation even more difficult, maybe even futile. As far as I've read this whole thing, ZaZ is the one who found these values within GP4. I PM'd him about it which he replied but havn't yet got much info to use here yet.

ROAR do you think these values are what GP4Tweaker changes for it's Damage Coefficient setting? I mean if these are the sole values within the game that deals with the damage, then surely someone with programming abilities could apply the GP4tweaker damage coefficient at 200% or 400% and then go into the code to see what the values were changed to? Maybe GP4Tweaker programmers can tell us what the setting actually changes? This would sort this whole thing out right now as we would be able to see what the values mean in accordance with what GP4Tweaker changed to gain the desired effect, and if they are not related to Damage.ini, we or I can seperate this config with whatever GP4Tweaker changes. If these turn out to be the values GP4Tweaker changes then this would give us an understanding and write up a few templates for people to use with their CSM mods. A dedicated file for full customization of your damage preferences.

Sorry about the huge post but thought I'd get most of what I needed to say in the first post, also I would love to contact Geoff Crammond but I do not have or know his details or how I could be forwarded to him. I know you were kinda kidding but I would do it if I could.
Anyway that's all from me the now.



Edited 2 time(s). Last edit at 05/18/2013 08:16PM by stcheyne.
As far as I know I haven't got any idea about how this numbers works and if they are related in any way to the physics file (in which you can configure even the mass of the car, if I remember well). In my opinion they are related in some way, but to be really sure about it you should ask to someone who coded the game: ZaZ in the old days said he discovered these numbers, but it's impossible (or at least very difficult) to understand how they works walking on the reverse path. We can only guess.

In my opinion things like

RightRearSuspension = 34
RightRearWheel = 34
LeftRearSuspension = 17
LeftRearWheel = 17

are not related with stifness of the part, so if you double it the element is twice stiff, because it doesn't make any sense in the gameplay to have half of the car more rigid.
It could be a position, but it would be interesting to understand where is the 0, if it is limited and if it's related to an x-axis, y-axis or z-axis position. To me, this is probably the right path, because playing with these values (especially with unbalanced stuff, like right = 0 and left = 100) I saw strange stuff like the mentioned hit-the-wall-on-the-left-break-right-suspension.
It could be anything else.
Or it could be nothing at all, since GP4 had to be equipped with some features that in the final release weren't involved in the package. Who knows?

Take care,

ROAR
It's been a long time since I discovered those values. There's a few things I remember.
I was debugging gp3 and discovered them there.
Then I looked at gp4 and found it was there as well.
Lot's of pieces of code from gp3 are still in gp4, but some of them are 'skipped'
Another thing I remember was that I was a bit short on time, so I figured it was more efficient to just put it in CSM and let the community discover the exact meaning of them values instead of working on it myself for weeks.

Also, are you asking for the equivalent of the damage coefficient in tweaker?
It should be in CSM. The setting is called damage under the [Misc] section
If it not already there, adding it should be sufficient.
So doing something like this

[Misc]
Damage=500

Should result in a 500% damage coefficient.
I think there's no real sane limit. It's a signed short int
If you set it too high weird stuff probably happens, like parts falling of when the road is a bit bumpy.


[edit]
That setting should go in the csm.ini file, not in the damage.ini
[/edit]





I'd rather have a bottle in front of me than a frontal lobotomy




Edited 2 time(s). Last edit at 05/20/2013 12:41AM by ZaZ.
roar Wrote:
-------------------------------------------------------
> It could be a position, but it would be
> interesting to understand where is the 0, if it is
> limited and if it's related to an x-axis, y-axis
> or z-axis position. To me, this is probably the
> right path, because playing with these values
> (especially with unbalanced stuff, like right = 0
> and left = 100) I saw strange stuff like the
> mentioned
> hit-the-wall-on-the-left-break-right-suspension.

Hm, position of what though...damage point?

All values from above:


If we think of the values as a Z-axis position, it could be possible, rear wings have the biggest number and the rear wing is the furthest away from the bottom of the car (as far as what can fall off the car). higher right side can be because most tracks are clockwise which means the weight is put on the left most of the time, just a guess though.
Either way, I don't see how changing the positions will change the damage unless we know where zero is and what it means.
[Misc]
Damage=500

There is a bug with this though, for some reason it makes the AI cars invulnerable. Otherwise it would be perfect.
That's the problem: we don't know and based on what ZaZ said, those values reported in the figure could be useless, because they could be related to the GP3, which is possibly a totally different world compared to GP4.
The only way to discover what they are for is to hit the wall in the same way using different values for these variables, so you load GP4, go out on track and plan to skid on the four wheels and hit the wall sideway. Just before you hit, save the game and reload it with different values and see what happens.
Unfortunately I haven't got any other tip to share on this matter, maybe these values are related to different type of collision, maybe not with the walls but with other drivers or objects on the track like kerbs and off-road running.
Or they could be unrelated at all.

Take care,

ROAR
Sorry, only registered users may post in this forum.

Click here to login

Maintainer: mortal, stephan | Design: stephan, Lo2k | Moderatoren: mortal, TomMK, Noog, stephan | Downloads: Lo2k | Supported by: Atlassian Experts Berlin | Forum Rules | Policy