Log in

View Full Version : [TEC] Env Units GR2 Format Conversion


vdr1981
09-24-16, 11:37 AM
Can anyone give few advices how can I quickly convert few simple environmental dat objects into SH5's gr2 format, like mines and buoys ?

I need something like quick tutorial of some sort...:hmm2:

kevinsue
09-24-16, 08:48 PM
There are online converters for .dat files but none seem to convert to gr2 format.:down: This is maybe where we need the RAD Game Tools that Jeff-Groves is trying so hard to deliver to the community.:yep:

vdr1981
09-25-16, 07:02 AM
There are online converters for .dat files but none seem to convert to gr2 format.:down: This is maybe where we need the RAD Game Tools that Jeff-Groves is trying so hard to deliver to the community.:yep:

I guess that, for example, one dat mine conversion shouldn't be so hard to do but unfortunately right now only Gap knows how it can be done. If he decide not to reply, the thread will be useless.

It was suspected for a really long time that mines and light buoys are involved in game instabilities when nearing home port or enemy coastal waters if game is not restarted previously. I can confirm this now 100%.

More waiting is not an option for me ...

gap
09-25-16, 08:04 AM
Hi Vecko,

You are making a good point about the need to convert as much as possible of the dat units imported so far in game to the GR2 format.

While I am still hoping as much as Kevin that Jeff will succeed with his call for funding, I agree with you that converting the most simple units using GR2 Editor shouldnt be too complicated. Just time consuming.

Unfortunately, creating a tutorial for beginners on how to use GR2 Editor is gonna take time either. I am about to quit my current job so hopefully in a few days I will at last have some spare hours per day (which I didnt during the last seven months).

Be sure that you wil hear from me when I am ready :up: :salute:

vdr1981
09-25-16, 02:46 PM
I'm really looking forward to it gap...I'm pretty much sure now that with couple of mines and boyos converted I could create almost 100% stable yet heavily modded sh5...

I think I'm very close and with recent units revision my museum is CTD free no mater what I do. Rendering single mine or buoys after that will instantly crash the game. If those objects were in gr2 format no CTD would ever occur...:yep:

Jeff-Groves
09-25-16, 02:55 PM
You could try reading gap's thread when he created the barrage balloon.
I seem to recall only a certain version of TDW's tool could do the work.
If we get the RAD Games Tools?
It will be a quick job.

gap
09-25-16, 04:11 PM
I'm really looking forward to it gap...I'm pretty much sure now that with couple of mines and boyos converted I could create almost 100% stable yet heavily modded sh5...

I think I'm very close and with recent units revision my museum is CTD free no mater what I do. Rendering single mine or buoys after that will instantly crash the game. If those objects were in gr2 format no CTD would ever occur...:yep:

Mines and buoys are loaded in the museum? :o

If they were correctly set as "environmental" type units they shouldn't, but this little mistake is actually of great value to us, because it is providing us with yet another evidcence that at least some dat units are directly related with ctd's in game. :yep:

Anyway, as I was telling you before, the conversion of the buoys to the granny format using GR2 Editor should be a no brainer. I use the conditional because you never know how, even the easiest task, can become complicated when dealing with GR2 files. An example? TargorAvelany created and imported in game as a GR2 object, an amazing model of a real British mine. Everything seemed to work fine until he tried to detonate the little bastard, but there was no way to make it to detect collision... :hmmm:

vdr1981
09-25-16, 04:32 PM
Mines and buoys are loaded in the museum? :o



No mate, of course they aren't shown in the museum...:)

I only use museum for quick units rendering . As far as the game engine is considered, it completely the same is it unit/object rendered in the museum or encountered during patrol in single playing session. Stable museum-stable game, simple as that...:yep:

gap
09-25-16, 04:35 PM
No mate, of course they aren't shown in the museum...:)

I only use museum for quick units rendering . As far as the game engine is considered, it completely the same is it unit/object rendered in the museum or encountered during patrol in single playing session. Stable museum-stable game, simple as that...:yep:

Hahah, so you changed unit-type and roster assignation for testing purposes, don't you? That was clever by you... :03:

Jeff-Groves
09-25-16, 04:40 PM
I do that all the time.
:D

Working on a project for an SH4 mod I have an environmental classed differently so I can check it in the museum.

SkyBaron
09-26-16, 02:21 PM
I am about to quit my current job so hopefully in a few days I will at last have some spare hours per day

So you're quitting your job to have more time to mod SH5? :haha: just kidding!

gap
09-27-16, 03:39 AM
So you're quitting your job to have more time to mod SH5? :haha: just kidding!

More or less... :D

gap
10-05-16, 04:49 AM
Rosomaha's S3D configurator gave me the idea of checking the controllers of some of the "problematic" units, and I discovered that they feature a number of old SHIII controllers which have been updated in SH5. I wonder why no one, including me, thought about it before :doh:

Controllers which have been updated in SH5 generally share the same structure than their SHIII-IV counterparts, but they add a few customizable properties to the latter. While still working in SH5, at least partially, out-of-date controllers are a potential cause of fatal errors, because the game might try reading vital information which is missing, or located at the wrong address, within the binary file(s) containing those old controllers.

There are still excellent reasons for processing all the dat units added to the game so far so that they become granny objects, but before we embark in the conversion work we should at least track down all the "bad format" controllers contained in their binary files, and replace them with updated controllers. :yep:

vdr1981
10-15-16, 04:12 PM
Rosomaha's S3D configurator gave me the idea of checking the controllers of some of the "problematic" units, and I discovered that they feature a number of old SHIII controllers which have been updated in SH5. I wonder why no one, including me, thought about it before :doh:

Controllers which have been updated in SH5 generally share the same structure than their SHIII-IV counterparts, but they add a few customizable properties to the latter. While still working in SH5, at least partially, out-of-date controllers are a potential cause of fatal errors, because the game might try reading vital information which is missing, or located at the wrong address, within the binary file(s) containing those old controllers.

There are still excellent reasons for processing all the dat units added to the game so far so that they become granny objects, but before we embark in the conversion work we should at least track down all the "bad format" controllers contained in their binary files, and replace them with updated controllers. :yep:


So far I have learned that CTDs involved around problematic DAT units are not related to duplicate IDs , weak hardware or memory issue.

Recently I have imported several more units from SH4 and noticed something really strange.

Editing sim,val,dsd and zon files with Goblin would always give me CTD in one of mine rigorous tests which is loading single mission with one playable sub and then quick jump to museum to render as much units as possible until game CTDs, simulating long campaign patrol with lot of unit types encountered (effect is the same). New units worked just fine with stock SH4 files.

Then I used new S3D with SH5 configuration to edit controler files (except zon files, still don't know how to do it with S3D) and new units passed all the tests. :hmmm:

This was only noticeable with some units while some had no problems with files edited with goblin editor.

In short, I managed to isolate several units which will always result in CTD in previously mentioned test no mater which editor, files or controllers are used:

VIIA/B: Tug boat, Akita

VIIC: Tug Boat, Akita, War Melody, Express, SV fishing boat, Hog Island(SH4), Taihosan, Paula, Zinbu.

U-Flak, VIIC41: same units like VIIC but without Akita

Targor Avelany
11-06-16, 06:14 PM
the trick is, unfrotunately, is that not all of us know the files very well. I have high respect for people who do, but i, myself, can't do it the way of just opening the files, like Steve or TDW. That is why I used to do this all with help of TDW's GR2 editor. Problem with it - it is not complete and still has lots to be figured out. My mines project, for exmample, still have major issues of lacking damage model. The amount of time I have spent on it.... ooooo.... LOL

Obviously i've been away and some things might have changed. Once I get my main computer out of storage (probably still few month), i'll start lokking into this a bit again.