Log in

View Full Version : Alternate aircraft skins


Jace11
05-08-13, 02:06 PM
I made a couple of skins for the heavy bomber in the game (something I also did for SH3 a long time ago...)

So, I kinda want to get the liberator model to use 1 skin for US version and one for the british VLR liberator version. The VLR is a proxy though... thus it uses the same models at the US version. I can't get it to switch using cfg files, roster files etc. One plane in the game, the float plane, manages this ok, it has two skins, one for UK and US. However even this is broken as the LOD version seems to only have the US skin, thus in game, a UK floatplane (catalina) will appear blue then switch to grey white once it gets very close.

To do this would require adding new texture references to the GR2 file of the heavy bomber (for UK version) and a also a second to the floatplane LOD model to fix the texture swap as it closes...

But im stuck at working out how to do this in the GR2 editor. Also, noticed another LOD model problem with the dithmarchen oiler, it appears black until close up.

gap
05-08-13, 05:00 PM
I made a couple of skins for the heavy bomber in the game (something I also did for SH3 a long time ago...)

Cool stuff. Are you thinking to release them as a mod? :up:


So, I kinda want to get the liberator model to use 1 skin for US version and one for the british VLR liberator version. The VLR is a proxy though... thus it uses the same models at the US version. I can't get it to switch using cfg files, roster files etc.

As far I can see, the Liberator and the Liberator VLR use different models: the liberator got its own model (LongRange_Bomber.GR2) and the VLR liberator is a proxy of the Sunderland (Sunderland.GR2). Maybe this is the problem? :hmmm:


One plane in the game, the float plane, manages this ok, it has two skins, one for UK and US. However even this is broken as the LOD version seems to only have the US skin, thus in game, a UK floatplane (catalina) will appear blue then switch to grey white once it gets very close.

This is probably because the LOD model uses the first texture by default. Or at least I hope so...

You can try this: make a proxy copy of the US catalina (from what I read, you seem quite familiar with this kind of stuff), and move the second texture (FloatingPlane_T02.dds, used by the British version of the plane) into the new folder. Replace then the catalina in British roster with the recently created unit (don't forget to update Names.cfg with its name), and see what happens in game...


To do this would require adding new texture references to the GR2 file of the heavy bomber (for UK version) and a also a second to the floatplane LOD model to fix the texture swap as it closes...

Too complicated: if you set the texture in the GR2 file instead of assigning it through cfg file, you won't be able anymore to assign custom textures to different versions of the same plane, and you would be forced to create physical clones of the GR2 model for each new texture you want to give it.


But im stuck at working out how to do this in the GR2 editor. Also, noticed another LOD model problem with the dithmarchen oiler, it appears black until close up.

Ships are actually a bit different. Their diffuse maps are defined in the GR2 file, and different camouflages are painted on the occlusion map (assigned through cfg file). This probably means that something is wrong with Dithmarchen's LOD model.

Jace11
05-08-13, 05:45 PM
I forgot to mention I might have changed the proxy to the heavybomber model for the VLR already. It makes sense to, it is meant to represent a liberator and that model is closer than the sunderland.

I'm not keen on releasing a big JSGME mod or anything (I dont use JSGME) but I will release what ever I come up with for people to integrate into other mods, or their own installations. There are a couple of mods that already cover planes I think (OH is one).

I've already added extra bomb hardpoints to many of the stock patrol planes and edited all configs so that they carry the new DC models. They all drop their DCs etc in game. Some turrets needed fixing too. I found the front turret on the heavy bomber and other planes will fire aimlessly sometimes, as if its controller is trying to switch to the rear turret but cant (for some reason) I havent fixed that yet. Also damage to aircraft (via zones.cfg and plane.zons) is still an issue for me.

Core to it all is the AI behaviour, the script that controls bomb aiming seems to have not changed in 7 years, I encountered similar problems then. IRAI changes some behaviour but for the actually act of bombing the same script has to be called "Plane:SetCourseBombs" which seems to have many constraints which the AI has trouble with (speed, angle, and crew veterancy being just some).

The kind of things I've altered in my air folder:

All aircraft now use bomb models from ship parts rather than the old bombs.dat this requires all .cfg and eqps to change. This was inconsistant in stock. I found that adding bombs to Basic loadouts actually borks the AI and they dont attack!!. So all basic loadouts are empty, while anti-sub (type5) is the one that seems to affect campaign gameplay the most.

Added possible small dc loadouts to most patrol craft and allied fighters / fighter bombers early war... so they are a threat early war.

changed US CVLate proxy to use buccaneer instead of mosquito model etc.
changed VLR proxy to use heavy bomber model (with new skin) but this is WIP...

larger patrol craft have slightly increased dcs (eg floatplane has 4 underwing, centerline removed, heavy bomber has 2 underwing dcs while centerline removed (though I plan to increase it to 4) - I thought maybe planes with centerline bombs were not dropping and only 1 dc for a liberator was pretty poor). Also this model appears as though the bomb bays were going to be animated.. who knows...

The sunderland was really broke. Its front cannon rarely fired so I increased its turret azimuth and elevations slightly. It now carries 4 underwing DCs and no longer uses the level bomber AI (so it can dive and drop)

Many aircraft have altered .sim files to adjust their min altitudes as some would come in too steep and end up crashing, or drop their DCs and crash after the resulting explosion hit them...


I'll do the cloning thing for the VLR and reassign textures in the roster, that should work. If I can remember how to it... You have to clone but everything need new IDs right? I think I saw an option in TDWs GR editor to clone models, I'll check it out right away.

Cloning GR2s? Is it possible, can you just save it under a new name?

gap
05-08-13, 07:34 PM
I forgot to mention I might have changed the proxy to the heavybomber model for the VLR already. It makes sense to, it is meant to represent a liberator and that model is closer than the sunderland.

Yes, it makes sense, though in this case I don't know what is wrong with your new textures not being applied. Have you checked that cfg settings and general file structure are corret?


I'm not keen on releasing a big JSGME mod or anything (I dont use JSGME) but I will release what ever I come up with for people to integrate into other mods, or their own installations. There are a couple of mods that already cover planes I think (OH is one).

I have read the list of changes you have done over vanilla game, and I am really amazed by them :up:

How can I convince you to release your stuff as an independent mod? :D
If you need it, I can help you making it compatible with OHII and other popular mods. :03:


I've already added extra bomb hardpoints to many of the stock patrol planes and edited all configs so that they carry the new DC models. They all drop their DCs etc in game. Some turrets needed fixing too. I found the front turret on the heavy bomber and other planes will fire aimlessly sometimes, as if its controller is trying to switch to the rear turret but cant (for some reason) I havent fixed that yet. Also damage to aircraft (via zones.cfg and plane.zons) is still an issue for me.

What do you need to know? Having worked on naval guns during the last months, I have become quite familiar with turret settings and damage zones.


Core to it all is the AI behaviour, the script that controls bomb aiming seems to have not changed in 7 years, I encountered similar problems then. IRAI changes some behaviour but for the actually act of bombing the same script has to be called "Plane:SetCourseBombs" which seems to have many constraints which the AI has trouble with (speed, angle, and crew veterancy being just some).

Going by what TDW has stated on many occasions, aircraft AI is very limited, and there is little space for improving it. Anyway, have you seen the pictorial account on a kamikaze attack that Trevally has posted today in OH's thread? :cool:


All aircraft now use bomb models from ship parts rather than the old bombs.dat this requires all .cfg and eqps to change. This was inconsistant in stock. I found that adding bombs to Basic loadouts actually borks the AI and they dont attack!!. So all basic loadouts are empty, while anti-sub (type5) is the one that seems to affect campaign gameplay the most.

I haven't ever understood how different plane's loadouts work in game. I mean, how are they triggered? Are they related with their veterancy level, or to the setting of the airfiled from where they spawn?

Also, why have you replaced bomb models of bombs.dat? What was wrong with them?


Added possible small dc loadouts to most patrol craft and allied fighters / fighter bombers early war... so they are a threat early war.

Stock plane's equipment definitions are missing start/end date settings. Can they be added anyway?


changed US CVLate proxy to use buccaneer instead of mosquito model etc.
changed VLR proxy to use heavy bomber model (with new skin) but this is WIP...

:up:


larger patrol craft have slightly increased dcs (eg floatplane has 4 underwing, centerline removed, heavy bomber has 2 underwing dcs while centerline removed (though I plan to increase it to 4) - I thought maybe planes with centerline bombs were not dropping and only 1 dc for a liberator was pretty poor). Also this model appears as though the bomb bays were going to be animated.. who knows...

I guess you have used TDW's GR2 editor for adding the required new bones...



The sunderland was really broke. Its front cannon rarely fired so I increased its turret azimuth and elevations slightly. It now carries 4 underwing DCs and no longer uses the level bomber AI (so it can dive and drop)

Many aircraft have altered .sim files to adjust their min altitudes as some would come in too steep and end up crashing, or drop their DCs and crash after the resulting explosion hit them...

:up:


I'll do the cloning thing for the VLR and reassign textures in the roster, that should work. If I can remember how to it... You have to clone but everything need new IDs right? I think I saw an option in TDWs GR editor to clone models, I'll check it out right away.

Cloning GR2s? Is it possible, can you just save it under a new name?

When possible, it is better using the cheap method of creating proxy units through cfg files, rather than actually cloning their GR2/dat model, as the cloned units would occupy precious memory.

As for your question on cloning GR2 units, yes it is possible. You must change their file name and, using GR2 Editor (bones tab), rename accordingly the model, the skeleton and the main bone. The tedious part is that bones ID will be messed up in the process, and you will need to remap accordingly parent ID's of sim, zon, dsd, etc. fcontrollers :dead:

Jace11
05-08-13, 10:01 PM
Thanks for your advice and help, the more I look, the more I see things I want to fix. It's in a terrible state really. Erm, I'm ok on zons and zones. I just made a zones.cfg for ships and planes. But if I release a mod that changes zones.cfg it will clash with about 10 other mods.

Skin switching is confusing me now... in the museum I view the US floatplane and it uses the US skin, the BR version uses the coastal command skin.. fine... but then I make a single mission and add one of each, both appear in the US skin until close range then both switch skin to the UK version. This is with stock models. How can this be happening!!! Is it hardcoded or hidden in the GR2? The LOD file has nothing to do with it as I tested deleting it and replacing it with the full model... same thing happened. I am stumped on this at the moment.

The turrets on the float plane work well, they fire front and back no problem. I cant get rear turrets on the other search planes to fire. When they should fire, the front one fires instead. Aircraft guns are good though, they are an effective deterrent against the human player staying on the surface and as the AI for bombing is botched for player subs moving faster than ~10 knots, they are often all the player is up against. They don't do much damage but they do whittle away at hull integrity which will hamper a player in the campaign, so forcing him to dive.

Plane loadouts, well alot is guess work...

Loadouts are in the Air/plane/plane.cfg They seem to be divided into types, looking at them I would say..

Type1=Light bombs (maybe recon)
Type2=Moderate bombs (either for long range or maybe anti-ship)
Type3=Heaviest bomb load (maybe shorter range / anti-ship / anti-base)
Type4=Torpedo
Type5=Depth Charges (anti sub)

Aircraft with bomb loadouts (type 2,3) will still attack player sub though (just tested that). I am guessing here but I think the game picks a loadout for a given situation so if the player is on patrol and is detected a Type 5 mission is launched if available, but maybe types are considered too.

Air missions are configured in airstrike.cfg in the cfg folder..

Maximum Aircraft Range=2050
Poor Airbase Modifier=0.12
Novice Airbase Modifier=0.26
Competent Airbase Modifier=0.4
Veteran Airbase Modifier=0.6
Elite Airbase Modifier=1
Night Modifier=0.12
Default Air Strike Probability=15
Enemy Air Strike Probability Increase on Radio Messages Sent=20
Friendly Air Strike Probability Increase on Contact Report Sent=60
Enemy Air Strike Probability Increase on Player Detection=40
Atenuation Factor=10
Logic Steps Between Air Sessions=20

Range: obvious really but I also remember something like if you are closer then the probability of an air mission against you increases proportionately.
Base modifiers: multipliers based on airbase veterancy level. In SH3 I don't think bases went up in veterancy level as the war progressed. It was modded in I think, I seem to remember that. In SH5 I have no idea, will have to check airbase layers in the campaign at a few dates. Could well be botched again...

Night multiplier so much less likely to get attacked at night.. (though that sounds like fun with the new leighlight mod!)

Probabilities are pretty self explanatory, the attenuation factor is the reduction in prob. per time interval and the Logic Steps Between Air Sessions determines how long each interval is. It shows how to calculate this in the airstrike.cfg file


The bombs.dat models are really old and naff compared to the new ones. Open it and have a look, also not sure if they are fully functional. Stock game loadout cfgs contained a mix of each type e.g Bomb250kg (old model) and Bomb_250kg (new model). It seemed completely random. Both have their own sets of damage, AP, MaxEF etc. I think mods for air dropped bombs may have missed that their are actually two sets of bombs in game.. not sure.. I just got rid of all the old ones cause they look 10 times worse and it simplifies editing damage etc to one set of files.

Yup added many new bones in GR2 editor. I think it helps the AI a little

Heavy bomber has 1 bomb in stock game and that is in the bomb bay, which was presumeably intended to open looking at the meshes.

He now has 4 underwing though none dropped on this pass.

http://imageshack.us/a/img407/9261/sh52013050903450372.jpg

This one does release one but I was reversing so it overshot.

http://imageshack.us/a/img199/5453/sh52013050903454009.jpg

This guy was loaded with 4x500kg bombs and dropped all of them.. :( I was doing 7.5 knots at the time and died instantly...

http://imageshack.us/a/img543/8059/sh52013050903465360.jpg


Anyway, Ill upload some files for people to play with soon. I kinda switch from one thing to another, Im looking at effects too, though I have finished making my TDC now.. woohoo!!!

Main things to look at:

Fix broken top and rear turrets on some large aircraft.
Skin swapping in the floatplane model.
Cloning VLR or enabling skin switching in that model.
Maybe alter some other things to help the AI...

gap
05-10-13, 12:47 PM
Thanks for your advice and help, the more I look, the more I see things I want to fix. It's in a terrible state really. Erm, I'm ok on zons and zones. I just made a zones.cfg for ships and planes. But if I release a mod that changes zones.cfg it will clash with about 10 other mods.

Mostly with Fx Updates, but if you have designed your modifications over this mod, there shoudn't be problems :03:


Skin switching is confusing me now... in the museum I view the US floatplane and it uses the US skin, the BR version uses the coastal command skin.. fine... but then I make a single mission and add one of each, both appear in the US skin until close range then both switch skin to the UK version. This is with stock models. How can this be happening!!!

Is it hardcoded or hidden in the GR2? The LOD file has nothing to do with it as I tested deleting it and replacing it with the full model... same thing happened. I am stumped on this at the moment.


Try setting separate test missions for each of them. SH5's engine might have problems rendering multiple textures on the same model at the same time :hmm2:


The turrets on the float plane work well, they fire front and back no problem. I cant get rear turrets on the other search planes to fire. When they should fire, the front one fires instead.

What search plane are you talking about? I might have a look into it :)


Aircraft guns are good though, they are an effective deterrent against the human player staying on the surface and as the AI for bombing is botched for player subs moving faster than ~10 knots, they are often all the player is up against. They don't do much damage but they do whittle away at hull integrity which will hamper a player in the campaign, so forcing him to dive.

:up:


Plane loadouts, well alot is guess work...

Loadouts are in the Air/plane/plane.cfg They seem to be divided into types, looking at them I would say..

...

Aircraft with bomb loadouts (type 2,3) will still attack player sub though (just tested that). I am guessing here but I think the game picks a loadout for a given situation so if the player is on patrol and is detected a Type 5 mission is launched if available, but maybe types are considered too.

It makes sense. thank you for sharing yor knowledge :up:

On a side note, I have noticed that Type1 (basic) loadouts are never declared in stock plane cfg files, and eqp files Basic Loadout definition are therefore missing their Loadout reference. Is this okay, or it is a mistake by devs?

MoreoverI don't see start/end date settings, as opposed to ship's eqp files. Can they be added?


Air missions are configured in airstrike.cfg in the cfg folder..

...

Range: obvious really but I also remember something like if you are closer then the probability of an air mission against you increases proportionately.
Base modifiers: multipliers based on airbase veterancy level. In SH3 I don't think bases went up in veterancy level as the war progressed. It was modded in I think, I seem to remember that. In SH5 I have no idea, will have to check airbase layers in the campaign at a few dates. Could well be botched again...

Night multiplier so much less likely to get attacked at night.. (though that sounds like fun with the new leighlight mod!)

Probabilities are pretty self explanatory, the attenuation factor is the reduction in prob. per time interval and the Logic Steps Between Air Sessions determines how long each interval is. It shows how to calculate this in the airstrike.cfg file

Everything is (well... more or less) clear. Thank you again for teaching me :salute:

On airbase veterancy level assignation in campaign we should disturb Trevally I think :D


The bombs.dat models are really old and naff compared to the new ones. Open it and have a look, also not sure if they are fully functional.

Stock game loadout cfgs contained a mix of each type e.g Bomb250kg (old model) and Bomb_250kg (new model). It seemed completely random. Both have their own sets of damage, AP, MaxEF etc. I think mods for air dropped bombs may have missed that their are actually two sets of bombs in game.. not sure.. I just got rid of all the old ones cause they look 10 times worse and it simplifies editing damage etc to one set of files.

I see... an underscore can make a big difference LOL :03:

Honestly, until today I was unaware of the two sets of bombs though. If only we could open guns_radars_01 in GR2 editor, we could export the detailed meshes, and re-import them into guns.dat. This would be useful for simulating bombs with different bursting charges :hmm2:


Anyway, Ill upload some files for people to play with soon. I kinda switch from one thing to another, Im looking at effects too, though I have finished making my TDC now.. woohoo!!!

Main things to look at:

Fix broken top and rear turrets on some large aircraft.
Skin swapping in the floatplane model.
Cloning VLR or enabling skin switching in that model.
Maybe alter some other things to help the AI...

Awesome, I can't wait for your new mod! Let me know if I can help with some of the problems you have listed above :yeah:

Jace11
05-10-13, 07:56 PM
Sorry, will get back onto this soon, I only got SH5 a few weeks ago (cheap on gamersgate) and I'm playing catchup big-time. I kinda boycotted the game at release cause of the DRM and the bugs etc. I'm flitting from topic to topic at the moment. I spent a couple of hour trying to integrate Real Env into my install and yesterday my attention was on catastophic explosions (I've got the game using the SH4 big explosion for ammo and fuelexplosions now but then that required a load of editing to get rid of the oil burning spots from the particles.dat)

Here are my heavy bomber folders, they are pretty inert (shouldn't conflict any mods)

http://www.gamefront.com/files/23295023/Heavy+Bombers.zip

The VLR is still a proxy of the heavy bomber and I havent figured out how to swicth skins yet but the new textures are there. Pick the one you want to use. The VLR (being a proxy probably doesnt need all those extra files in that folder) I was just experimenting while trying to enable skin swapping. So really just the .cfg .eqp .sns and .sil are used (I think!).

The Heavy bomber GR 2 has the xtra bomb hard points and corresponding loadouts 4 x500 4x 250 and 4 x DC. I widened turret azimuth a bit, but cant get rears or top turret to fire...

Its all work in progress, but the skins are OK... if you wanna use the US skin just rename it to longrange_bomber.dds. I just prefer coastal command type skin and as its shared between model and proxy, I have it being used instead.

gap
05-13-13, 10:07 AM
Thank you Jace11, I will look into your files, and into why your alternative textures are not rendered correctly, as soon as possible :up:

Jace11
05-15-13, 10:54 PM
Found the problem with rear turrets. Several rear turrets that don't fire, don't have their barrels assigned correctly. Either the name is wrong like in the case of the Sunderland gr2 file, or the name is right, but the barrel bone is not linked to the turret and is instead stuck on the airplane body.. Humph... Not sure which which other planes are broken but I managed to fix the Sunderland and the heavy bomber. One downside is the actual barrel model seems to rotate inversely to the virtual turret and so the barrels of a rear turret are pointing at 0 degrees, I.e. back into the fuselage if the turret is shooting bullets at 180 degrees after it has overflown a sub or something... You cant really see this though when playing, but it is a bit yucky, but better than not firing at all or firing its forward turret by mistake... I have a feeling that a couple of stock planes that do have working turrets also have this problem.

gap
05-16-13, 01:52 AM
Found the problem with rear turrets. Several rear turrets that don't fire, don't have their barrels assigned correctly. Either the name is wrong like in the case of the Sunderland gr2 file, or the name is right, but the barrel bone is not linked to the turret and is instead stuck on the airplane body.. Humph... Not sure which which other planes are broken but I managed to fix the Sunderland and the heavy bomber.

I think I see what you mean: in the case of the Sunderland, the barrel name specified in gun controllers (sim file), was the one used in the GR2 model for the fixed turret, rather than barrel name itself. Is this correct?

Brilliant finding :up:


One downside is the actual barrel model seems to rotate inversely to the virtual turret and so the barrels of a rear turret are pointing at 0 degrees, I.e. back into the fuselage if the turret is shooting bullets at 180 degrees after it has overflown a sub or something... You cant really see this though when playing, but it is a bit yucky, but better than not firing at all or firing its forward turret by mistake... I have a feeling that a couple of stock planes that do have working turrets also have this problem.

In other words, rear turrets are flipped by 180 deg... isn't it?

I see three possible solutions: either try inverting min and max traverse settings in rear turret controllers (e.g: 185/175 instead of 175/185), or rotate rear turret's bone (for doing it you need to change their flag to 3); if neither of the above methods works, rotate turret's bone (or barrel's bone :hmmm:) as before, and change traverse settings from 175/185 to -5/5.

I am almost sure that one of the above tweaks will make the trick. Fingers crossed :salute:

gap
05-17-13, 01:43 AM
I have figured out why only the float plane accepted multiple skins settings via cfg file. Any plane can be set similarly; the trick is renaming the main material of both full resolution and LOD GR2 models, from 'skin' to 'cfg#TXRskin'. This is easily done through GR2 Editor. No need to clone the model, nor to create a proxy unit. I was going to do it with your version of the Liberator, but it seems corrupted (no version of GR2 editor seems to open it). I have nonetheless made a testing mod which makes your new textures available in game:

http://www.mediafire.com/?tzrhxcgw0oa1tdy

Included in the mod are three single missions for testing different scenarios. They show some limitations of the game, relative to the handling of multiple textures by the same GR2 model:

- if many proxies of the same model are mixed together, only one texture is shown, no matter if they are set to use different skins.

- multiple texture definitions applied to the same roster entry are ignored, even if they have different date settings. Only the first texture definition is applied in single mission, no matter its date. I only hope that in campaign things are different. :hmm2:

http://img707.imageshack.us/img707/1795/sh5img20130517080048.jpg

gap
05-17-13, 01:56 AM
PS: talking about aircraft skins, you might be interested in the following online resources:

roundels of the world:
http://en.wikipedia.org/wiki/Military_aircraft_insignia

RAF roundels:
http://en.wikipedia.org/wiki/Royal_Air_Force_roundels

USAF roundels:
http://en.wikipedia.org/wiki/Military_aircraft_insignia

Historical aviation color schemes by nationality:
http://www.jpsmodell.de/dc/luft_e.htm

Camouflage profiles:
http://wp.scn.ru/

WWII Camouflages:
http://www.fritzthefox.com/camo_guide.html

Jace11
05-19-13, 10:37 AM
Thanks for your help, ill have a look at it and see if I can get it working. The 1 skin at a time thing is pretty lame but I guess we have to live with it.

Not sure what is up with the liberator.GR2, maybe I used an older GR2 editor when I changed it and its not reading it...? not sure.

gap
05-19-13, 11:00 AM
Thanks for your help, ill have a look at it and see if I can get it working. The 1 skin at a time thing is pretty lame but I guess we have to live with it.

yes, it is lame, but as you say, we can live with it. After all how many mixed squadrons (i.e. RAF and USN) of the same plane do we have in sampaign? I think no one.

I am currently drawing a list of all the Air Forces using the planes we have in game. It would be cool having one sking for each of them. It would be also nice if each Armed Force had more than one skin for the same plane (to reflect different camouflages/markings used at various stages of the war), but as I wrote, date settings are not applied in single mission, and I am not even sure that they are in campaign. The only workaround that I can think of, would be creating many unit definitions of the same aircraft with different availability dates and giving each of them its own texture, but it would require Trevally to update OHII for them to be correctly used in campaign. :hmmm:


Not sure what is up with the liberator.GR2, maybe I used an older GR2 editor when I changed it and its not reading it...? not sure.

I used v 1.1.374.1. (latest version). It reads the stock GR2 file, but not your modifications of it. Tried again with v 1.1.272.1, and it opens your file; nonetheless, I suggest you to get the latest copy of GR2 editor, and to make your changes using it :03: