News:

Herr Otto Partz says you're all nothing but pipsqueaks!

Main Menu

Wanting to make an update of Wiki article "Car parameters"

Started by Cas, January 09, 2022, 01:27:04 AM

Previous topic - Next topic

Cas

I have been wanting to make an important change to the mentioned article ("Car parameters") for a long time, but because of its significance, before doing it, I would like to explain what it is about and the reasons to check your opinions, guys, and probably I'd also get suggestions to do it some other way or anything helpful... So here I go:

The problem I find with the current form of this article is that it describes the structure of the CAR*.RES files by giving absolute pointers (relative to the beginning of the file) for each parameter. This is OK for original, unmodified car files, but the truth is that the format is much more general than that. These files are composed of four chunks and one of these chunks, "simd", contains virtually all of the parameters. While on original cars, "simd" is always located at the same position, this varies widely when Stressed or CarWorks are used and because these other files work just as well in Stunts, in my opinion, it makes more sense for the parameter positions to be expressed relative to the beginning of the "simd" field.

A note could be added that, for original cars, the beginning of this chunk always lies at the same position and that you can just add that to obtain where each field can be found and the chunk structure should be described. This would make the article valid for every case, not just for original cars.

If you guys think it's fine, I'll proceed to make the changes carefully and making sure it remains perfectly easy to understand and very clear, but I'll take into account any suggestions.
Earth is my country. Science is my religion.

afullo

I agree, provided that the particular case of original cars remains well documented, and not only a possibly not so obvious consequence of the more general case.

Duplode

In principle, that would be the right thing to do. The one drawback of the change would be Car Blaster compatibility: since Car Blaster assumes the original cars file layout, if we were to use the article alongside Car Blaster, we'd have to constantly add/subtract 26h from the offsets. In any case, the "Car parameters" article not all that suitable for quickly checking offsets, being as long as it is. I think it would be fine to change "Car parameters" to simd-relative offsets while keeping both absolute and relative offsets in the "Car files" summary chart.

Daniel3D

I think it is useful information to add. but also express that it is good practice to keep chunks in the same original order to ensure compatibly with other tools.

Stunts doesn't care. It doesn't read the full file. Only the chunk it needs.
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

Cas

Yes, I agree with you, guys. The simple fact that all original cars share a particular structure (in addition to what the format and Stunts allow) is enough to make it worth it to keep this structure well documented and described.

Perhaps the best would be to create a table or chart, as Duplode suggests, containing just the basic description of each parameter (parameter names) as well as their SIMD and absolute pointers, with an explanation also of how to use these pointers. Then, the rest of the article would contain as it does now, the description of each of these parameters qualitatively.

Anyway, don't worry, guys, I'll be careful. I know articles can be reverted, but just in case, I'll first make a copy of its current form and then very carefully design its new shape and have you take a look.

EDIT:

I've been taking a look and I've found that the article "Car files" was more important to change in this respect. I updated the table there to display the simd offsets. Take a look. I've also been working on "Car parameters", where I merely added the simd offsets without removing the absolute addresses. But I do see that there are things that could be simplified and didn't want to touch them because they weren't part of the original plan.

The article refers to each integer word as a pair of bytes, expressly specifying both of its addresses. For some parameters, these were already lots of numbers and now it's twice as much. I think it'd be clearer if this were changed to a starting address and then, for those parameters that are complex, a description of the sub-structure, but I have to plan this carefully. As I said, I've saved a copy of the original article. Later, I'll try some variations and check with you guys to see what you think. No information will be lost.
Earth is my country. Science is my religion.