View Single Post
Old 09-10-13, 01:57 PM   #50
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by vdr1981 View Post
@ Gap, you are the savior!


a few more head-ups:

- many objects are formed by separated parts, and they are linked together hierarchically. For U-boat guns we have generally a fixed base (fitted on the deck), the mounting/pedestal (which rotates around its y axis) and the gun itself (rotating around the x axis) which, on turn, is often split in a "body" (including the breech and the back part of the gun) and one or more muzzles. There can also be other smaller parts, but we can ignore them. When adding damage boxes to a gun, you can link it to its root (the fixed base) and make it to envelop the remaining parts or, better, you can give each part its own box with a peculiar damage zone set in it. If, for instance, the mount had a shield, you can assign to it a zone with an higher AP setting than other parts, thus protecting them from enemy fire. Moreover, boxes will move together with their parent objects, thus better envelopping the whole object.

- no matter how many boxes you have assigned to a gun (or to any other SH5 object), model parts which are lower hierarchically will be destroyed when one of the parts containing them, i.e. their parent(s), are destroyed; this becomes evident when you give hierarchically high objects a zone which is tagged as 'destructible=yes': when their HP's reach 0, they will be ripped off together with their children objects.

- you can link a box to a non-child object, so that, when the box is detsroyed, both the parent object and tje linked object are destroyed.

Quote:
Originally Posted by vdr1981 View Post
Actually ,i tried to copy and rename other .zon files before but without use of silent3deditor and i didn't have any success. Now i made it for the deck gun! I hope i'll have luck with other equipment too...
There is a another way to remove unwanted controllers: open a GR2 or a dat file into Goblin Editor, and merge the newly cloned binary file to it. Goblin will warn you that some controllers didn't find their owner objects; this is because there will be an ID's mismatch. The unused controllers will be listed as "lot controllers", and deleted when you save the file.

Quote:
Originally Posted by vdr1981 View Post
The main problem for me is that i still can't understand this "controller" concept quite enough, i never met it before...But we're on the track after all...
For our purposes, we can define a controller as group of closely related properties, controlling the way an object works or interacts with other objects in the SH5 world. Most controllers have one or more configurable parameters, whereas others are not configurable. Controllers must be assigned to 3d objects and/or to particles in order to be applied in game, and when their owner objects are destroyed, they stop working. Objects and particles are stored into dat or GR2 files. Their controllers are located into binary files with various extensions. The most common ones are:

- .zon: contain controllers whose function is to control the way an object interacts with other object, giving or receiving damage from them;

- .dsd: used for sound controllers;

- .cam: used for camera controllers (firts person views, scope views, gun sights, etc);

- .fx: used for linking special effects to an object;

- .val: used mostly for ships wake controllers;

- .prt: used for linking an object to a second object in another file;

- .sim: this is the most widely used file type, and it can contain a big variety of controllers whose function is generally to set the way an object moves, behaves or works.

One last note: every object, particle or controller got an unique id and a parent id (you can see them more easily by opening one of the aforementioned files in s3d). This is the way they are linked to each other and referred to in game. Rarely node/bone names are used instead. When you merge two files in Goblin Editor, it sorts automatically controllers with the same parent Id, and it list them under the appropriate object when you click on one of them.

Quote:
Originally Posted by vdr1981 View Post
Just tell me one more thing, which controller do not belong here?
Is this a drill?

The wpn_cannon controller, indeed. Governing the way guns work, ts place is in the sim file.
gap is offline   Reply With Quote