Jump to content

Car from ToW1


AleMichi

Recommended Posts

It should be possible. But this is a difficult task, as a lot of configuration files have to be edited. I would suggest you to have a look at the matilda II tank added by the balance mod to see which files you'll need. the process will be mostly the same (except for any armament that the fiat is lacking and that the tank has).

the biggest change will probably be the way ToW2 handles visibility (I mean the hooks for the crew line of sight in the vehicle)

Link to comment
Share on other sites

It should be possible. But this is a difficult task, as a lot of configuration files have to be edited. I would suggest you to have a look at the matilda II tank added by the balance mod to see which files you'll need. the process will be mostly the same (except for any armament that the fiat is lacking and that the tank has).

the biggest change will probably be the way ToW2 handles visibility (I mean the hooks for the crew line of sight in the vehicle)

Thanks for Your help. Following your tips I have attained to show in the encyclopaedia of ToW2 the ToW1's car polish_fiat_pf_621_tent.

Besides, this item, appears in the lists of units in the battle-generator and in the mission-generator, with all hits features.

I can place it in the battle-generator (and mission-generator), but when I open the new battle in the ToW2 game the polish_fiat_pf_621_tent is not present.

Have You some ideas and tips for this?

Link to comment
Share on other sites

No error message is showing.

The new map with the fiat loads regularly, but when appear the game area, in the place phase, the fiat is not show.

If I click on start the new battle ends (defeat).

The new battle is created with only one italian fiat and one english tank.

I'm checking again the file part.ini (compare with the ones of ToW1opel tent and ToW2opel tent).

Link to comment
Share on other sites

you'll need photoshop and the DDS plug-in from Nvidia to save in the compressed format used by ToW and ToW2. Theses "TGA" files are DDS files with the extension changed to TGA (they are not really TGA, that's the reason why you can't open them as a normal TGA).

To open the "TGA" files from ToW and edit them in a paint editing program, you'll need IMFviewer by Dr Jones. Once you've done your editing, you'll need to convert them again to DDS format.

Link to comment
Share on other sites

Thank Knokke,

This is a big help.

But the true problem for me is: what I must do to play with fiat car in ToW2 game?

The fiat car work in the ToW2 Encyclopaedia (rotate - zoom in/out - hatches open/close), but it don't work in the game.

The question should be: what files and/or file's lines work in the game more than the file working in the encyclopaedia?

Link to comment
Share on other sites

I've no idea which file might be missing/different. If it shows in the encyclopedia, it means that all your mesh files/textures/mat files/hier.him are set correctly. So the problem must be somewhere in the configuration files.

Try to compare what you have for the Fiat to the files of the opel_blitz_tent_afrika.

You might be able to spot something missing. make sure you've added the new fiat car in the file filesid.ini.

Link to comment
Share on other sites

YES!!! I HAVE THE FIAT IN THE GAME!!! THANKS!!!

The mistake was in the Vehicleskin of the fiat's Parts.ini.

We are near to perfection... but now I have a new problem:

The driver is out of vehicle (for half under it).

Do you know where I have to look for the right position of the driver?

Link to comment
Share on other sites

I'm glad you made it!

As for the position of the driver: there should be a hook (called Driver) to position the driver's animation. A problem with the position of the driver could have several reasons that I can think of:

-wrong position of the Driver hook (not likely if you didn't modify the position of the hook yourself and just used the model from ToW as is).

-It could be be a problem if you used a different animation than the one that was in ToW1 for the driver (it could be that there is an offset in the animation). Does the animation of the driver match the car when entering/exiting, or is the position offset at all times?

try to have a look in the part.ini's [CrewPlacement_Driver] section, to see if everything seems correct.

-third solution that I can think of: this might be related to a bug in ToW2: I've noticed already that sometimes, the driver of the Opel_tent car is wrongly positioned inside the cab (but not all the time, so I don't know where the problem comes from). There is also a problem with the animation of the door (it stays opened after the driver/crew exited the car. it doesn't close again after the driver embarks again)

Check the node for the driver (HierNode Hook_driver) to see if it is positionned correctly. There are also two other hooks to get in and get out of the car (Driver_in Driver_out). if theses two are correct and only the position of the driver while seated inside is wrong, it might be that the Driver hook is wrongly positionned.

I hope this will be of help to you.

Link to comment
Share on other sites

I have copy from ToW1 the lines of the PFiat621 from the files

Ai\Animator\Animetor.rc

Ai\Animator\HMesh\Animations.ini

Ai\Animator\HMesh\VehicleTables.ini

Ai\Animator\SMesh\Animations.ini

Ai\Animator\SMesh\VehicleTables.ini

and add/paste in the same files of ToW2 (without any change)

I have add the line

Mesh4 3dobj/Cars/Ita/Polish_FIAT_PF_621_tent/hier.him PFiat621 Commander Driver

to the file Ai\Animator\vehicle.rc.

Do you know if there are other files that I can work to?

Maybe that this lines of the original files of ToW1 don't work in ToW2?

In the original ToW1 parts.ini (and hier.ini) there is not a line with hiernode hook_drive, I have add it (parts.ini and hier.ini), but the drive in the game is out of the cab in the left side (stand up and flashing).

The animations of the drive don't match the car when entering/exiting.

Link to comment
Share on other sites

First thing you should do is check in the Fiat 3D model to see if the hooks for the entering,exiting and driving position of the driver seems correctly placed (Body.msh check hook Driver, Driver_in, Driver_out).

I've not yet looked into the animation configuration files, so I've no idea how they're working; you know much more than me about that, so I can't tell you for sure if there is a problem with that.

Also, is only the position of the driver wrong, or is also the orientation wrong (does he seat toward the front of the car, or in an other direction?

Also, what about the animation of the other crew member? are the passengers position OK?

From what I see when opening the Body.msh of the Fiat_tent in MshConverter, the Driver hook seems to be offset to the right at ground level (almost the same position as the Driver_in hook.

Did you work in any way on the mesh using MshConverter? If you didn't I would expect your driver to be standing seated on the ground, outside the right side of the car if there was any problem with an offset of the hook.

It could be that your problem comes from the orientation and position coordinates of the hook in the mesh file. try saving it in msh/text format in mshConverter, so that you can edit it with notepad, and modify the coordinates of the hook to see if that can fix the problem.

Also, you could try to use an other hook name in the part.ini file for the driver position, to see if it changes the position of the animation (for example, renaming the Driver hook to visible_hook_01 might position the driver a bit more inside the cab - giving you an hint of the coordinates you should use for your Driver hook)

Link to comment
Share on other sites

I might have found where the problem lies:

in ToW1 fiat body.msh, there are the following hooks:

Driver

Commander

commander_hook

In ToW1 fiat hier.ini is a reference to a driver_hook as well, but no such hook exist in the 3D model

Where as in the opel_blitz_tent_afrika in ToW2, the following hooks are to be found:

Commander

Driver

There is no longer a commander_hook hook, and no driver_hook hook.

in ToW1 fiat model, the commander_hook hook is located inside the car (at the position where he would normally be seated)

My supposition is that it is this hook that should be used in your model instead of the Driver hook (try to use something like this in your hier.ini:

[Hook_Commander]

Type HOOK

Parent Hull

Hook Commander

[Hook_Driver]

Type HOOK

Parent Hull

Hook commander_hook

If this doesn't work, I'm out of ideas for now...

Link to comment
Share on other sites

I'm working step by step about your hints.

I have save the body.msh in the msh/txt format.

Then, I have create a new hook (called driver_in) in the body.msh of the fiat_tent and editing the correspondig set for this hook (it seem to be in the right driver-position on the MshConverter 3Dviewer).

Now, how can I take back the old .msh format to the msh/txt?

I think that the game don't work with the msh/txt format (I have try but the game crash loading the mission).

Link to comment
Share on other sites

it must come from some other problem than msh/txt format; The typhoon I've made for ToW1 was converted with MshConverter and is in msh/text format. It works without major flaw (only thing I can think of is MshConverter not being able to handle smoothing as well as the meshtools utilities)

You said you created a new driver_in hook? do you mean you added a hook in 3DSmax and exported back the file in MshConverter via 3DS format? or did you simply rename one of the other hooks to driver_in? There's something here that I don't quite understand. It might be the reason why the msh/txt file is no longer working.

Just do a test; import the default fiat body.msh fom ToW into MshConverter. don't change anything, and save it as msh/txt. It should then work without problem in ToW (at least in ToW1). And what do you mean by it doesn't work? is there an error message in MshConverter, or in ToW?

Link to comment
Share on other sites

I have not 3DSmax (...). I Have add two lines in the bodi.msh (txt format) as follow (red color):

[Hooks]

engine_01 <BASE>

driver_out <BASE>

driver <BASE>

driver_in <BASE>

commander <BASE>

commander_out <BASE>

commander_hook <BASE>

etc...

[HookLoc]

-0.0275243 -0.00039426 0.999621 0.997175 -0.0699313 0.0274255 0.0698826 0.997553 0.00231628 0.0553 -1.46501 0.79957

1 0 0 0 1 0 0 0 1 1.58921 -0.31839 -0.78652

-1 0 0 0 -1 0 0 0 1 1.40186 -0.16688 -0.79318

-1 0 0 0 -1 0 0 0 1 -0.32957 -0.21045 -0.79318

1 0 0 0 1 0 0 0 1 -1.43496 -0.11035 -0.79318

-1 0 0 0 -1 0 0 0 1 -1.42526 -0.26931 -0.78706

etc...

Then I can see in the viewer of MshConverter 1.18 the new hook_in in the drive position.

I have made this test:

1 - I have save the body.msh of the ToW1 fiat_tent in msh/txt format in ToW1 and run it (without changes) in ToW1 game, the body.msh(txt) works.

2 - I have save the body.msh of the ToW1 fiat_tent in msh/txt format in ToW2 and run it (without changes) in ToW2 game, the game start, I select battles and new battle, after about half loading, crash to deskop.

Never there is an error message (MshConverter or ToW).

These are the files parts,ini and hier.ini that I have used in this test:

[Root]

Type UNIT

[Hull]

Type BONE

Parent Root

Bone Body

AxesOrientation VHR

Min +1 +1 +1

Max -1 -1 -1

Speed 0 0 0

[Hook_Commander]

Type HOOK

Parent Hull

Hook commander

...........

[CrewPlacement_Driver]

Type CrewPlacement

Name Driver

Job Driver

Dispatcher infantry.cpp

Hatch DriverHatch

Animator PFiat621_Driver

OffsetMode Anim

FreeCrew AnimFalse

AlignMode None

DamageType Normal

External True

Hook_In driver_in

Hook_Out driver_out

My supposition: the msh/txt format works in ToW1 but not in ToW2.

From this my supposition rised my old question,

"Now, how can I take back the old .msh format to the msh/txt?"

Link to comment
Share on other sites

If you're stuck with mshconverter, and are sure that the problem lies with the msh file and not the configuration files, then there is an other solution: I can use the Meshtools for you to import the modified mesh in TOW2.

Blender is a freeware 3D package that you can use to import/export models in 3DS format (so, you don't need to use 3DSmax)

Export the fiat model from MshConverter as a 3DS file (rename the nodes so that they have 10 characters maximum if you need, as 3DS format is limited in the number of characters in an object name). if you don't rename them yourself, during the convertion, the names might be truncated if they're to long, and you might wish to give them a name easy to remember instead. You can take this opportunity to modify further the 3D model in Blender if you feel you need to make it more like the Fiat used by the Italian army.

Then modify the hooks as you see fit.

rename back the nodes with the name they should have in TOW2

Save the modified file in 3DS format.

Then send me the file, and I'll use the Meshtools scripts to export the model back to 1C msh format.

This should be pretty easy to do, and might solve your problem if it comes from the mesh format (but I'm more inclined to think the problem might be in the configuration files)

The crash is probably occuring when the game engine is looking for something that is missing (or wrongly named) in your configuration files. The 3D model displays correctly in the encyclopedia, because the game checks only the hier.him, mat files, texture files, skin.ini and msh files, and theses are OK. Then, when the model is loaded in a mission, it could be crashing because this time, it is looking for something that it must use (it could be a problem happening when the game tries to generate the driver inside the car, for example)

As for the hook names in MshConverter, you wrote:

[Hooks]

engine_01 <BASE>

driver_out <BASE>

driver <BASE>

driver_in <BASE>

commander <BASE>

commander_out <BASE>

commander_hook <BASE>

etc...

I suppose it is for simplification, but make sure the names are really like this:

[Hooks]

engine_01 <BASE> Body HK

driver_out <BASE> Body HK

driver <BASE> Body HK

driver_in <BASE> Body HK

commander <BASE> Body HK

commander_out <BASE> Body HK

commander_hook <BASE> Body HK

etc...

Also, you might wish to rename the visible_hook_01 to 03 nodes to comply with the new naming conventions of ToW2 (Vdriver_0 to Vdriver_4 - you'll need to add a fourth hook, as there is only three of them in ToW1)

Perhaps this is not compulsory (for the tanks, if the crew vision related hooks are missing, the game engine is using the Gun_01 hook instead; it might be the same with the cars... they might use also an other hook), but doing this would ensure your Fiat is up to date with the new vehicles, and you'll be sure there is nothing fishy here.

I hope the problem isn't related to the animations, because I did'nt have a look at this yet, so I'm not sure to be helpful in this area. Did you test using one of the driver animations of ToW2 Africa instead of the Fiat driver animation from ToW1, to see if it is working? It could help to identify if the problem comes from there.

Good luck! don't get discouraged by the hassle to get this working; I believe you're almost there; there must be only a little something wrongly set.

Link to comment
Share on other sites

NO, I am not sure that the problem lies with the fiat_tent ToW1 body.msh and its hooks.

It is a further test on the way.

Probably the problem lies in the animations (but I'm not sure too), because, as you suggest, I tryed with the willys_driver and the opel_tent_driver of ToW2 and these options work in the game, although the positions of these drivers don't match with the cab; besides, (with all the drivers that I had tested - Fiat, Willys and Opel) the crew and passengers are in the right positions.

I have check many times the parts.ini, hier.ini and the unit.ini to try to find some edit errors without success.

However, I have noticed that in the game the glasses of the cab are white and not trasparents... is this means something for you?

I must thank you, knokke, for your helps, and I hope to be useful for you in the future.

I am downloading the blender program and, after learning it, I'll prepare the file to send you.

The script that I had posted is complete, it is not a simplification, in my msh/txt there are not the "Body HK".

I have add "Body HK" to all the lines of [hook] in the original body.msh (with and witout the lines I had added) and run the game, but it don't works anyway.

Link to comment
Share on other sites

The script that I had posted is complete, it is not a simplification, in my msh/txt there are not the "Body HK".

This is strange... the hooks being related to the body.msh, their coordinate information should be stored inside the body.msh, and MshConverter should show the relationship by the "Body HK" bit at the end of the line.

I tested loading both hier.him file and Body.msh for the Fiat in MshConverter, and in both case, the "Body HK" bit at the end of the hook name is there to be seen.

Check that the hooks are correcly identified as such in mshConverter (the icon at the beginning of the line should be a hook icon, and not a mesh icon or collision icon). If it is wrongly identified in MshConverter, you can force it to be of the correct type by right clicking on the hook and setting it to hook type if needs be.

Link to comment
Share on other sites

Escuse me, Knokke, may be that I had not spell out.

1. If I open the fiat_tent body.msh file in MshConverter I can see in its Hierarchy window (under the voice hook) the "Body HK" in every line after <BASE>.

2. If I open by notepad the fiat_tent body.msh (converted in text format), the "Body HK" is not presents in the hook's lines under the voice [hook].

Bear with me

Link to comment
Share on other sites

×
×
  • Create New...