Ships With Working Guns Now Possible.
Results 1 to 8 of 8

Thread: Ships With Working Guns Now Possible.

  1. #1

    Ships With Working Guns Now Possible.

    “My method is different. I do not rush into actual work. When I get a new idea, I start at once building it up in my imagination, and make improvements and operate the device in my mind. When I have gone so far as to embody everything in my invention, every possible improvement I can think of, and when I see no fault anywhere, I put into concrete form the final product of my brain.”
    - Nikola Tesla

    Folks, that has to be the most appropriate quote that came up when I just looked for one online. We have working turrets, barrels, and targeting on ships. I'll put together a tutorial in due time, but for now here are the basics so that others may test my findings and improve on them (please, please, pretty please):

    ===================================

    DESIGN "RULES"
    --------------

    1. Use animation POINTS and not dummy boxes. These are your mount#, gun#, and barrel# items.
    2. Make your meshes as you see fit. I used files from Stuart since they are available with his ships. I'm also collaborating on his next project (which I'm not going to divulge without his consent first) which is going to have rotating radars and - now - targeting AA guns as well.
    3. Screenshot from his BB-33 Arkansas, but any ship will do.
    4. Make sure labels and hierarchy match. You can name the parts anything so long as the hierarchy matches what I have and your pivot points are done properly (see item #1). Picture attached.
    5. For the gun# and barrel# points, change the axis so that the green one is pointing up, the red one to the right (normal), and the blue one to the back. Not sure if this is a needed step, but it won't hurt (and it happened to work for me like this).
    6. For "pindle"-type guns (the ones that swivel like a 50 cal): the three points may be co-located since it rotates about the same point. Axis, however, should be done the same way (orientation).
    7. When all is said and done, the highest point in the list (mount#) MUST, MUST, MUST be linked to a mesh. One reason for no turret or missing turrets was because I had not done this seemingly innocuous step. Like I said, I haven't touched gmax for a while and wasn't that good to begin with (still not). I was just linking it to the LOD_100 dummy square like the rest of the stuff so it wasn't working. Otherwise, this post would have happened Saturday night!

    COMPILE PROCEDURE
    -----------------

    1. Export with FS2K2 gamepack. I'm using Middle-Man. Settings in picture.
    2. Run resulting "x" file through the !!DEFAULT/STOCK!! FS9 gamepack. DON'T use other ones. Might be just me and my 64-bit Win7, though. Settings in picture.
    3. 64-bit system, so: DOSMdlc 2.0 by Allen. Rename your model to "Z.mdl" and cut and paste to the DOSMdlc 2.0 folder.
    4. Execute the batch file called: DOSBox Auto Convert.bat (best option for ships I've found so far).
    5. Get coffee. Wait for batch to run. Get more coffee. Play Tic-Tac-Toe. Keep waiting for batch. Okay, you're getting bored now.
    6. Finally, rename the CFS_MO2.MDL file to your model name from before (the one you named "Z" for this step). Copy and paste it into your project folder for safe keeping.
    7. Now, cut and paste the mdl file from the DOSMdlc 2.0 folder to our ship's model folder. Check to make sure you have the correct name in the model.cfg file for it to show up in the sim. It should read something along the lines of "normal=model_name" (your choice of name).

    NOTE: You should have five (5) more files in the DOSMdlc 2.0 folder that are related to your file. They are: Z.MD2, Z.MD8, CFS2_MOD.MDL, Z.mdl, and Z.LOG. I've been deleting these, but if you think they can help in troubleshooting issues keep them with the project folder.

    ===================================

    DAMAGE PROFILE INFO
    -------------------

    ;=============================

    ; This is for the USS Arkansas by Stuart.
    ; The coordinates are ship specific and come from a reference point called the origin.

    [GUNSTATIONS]
    ; Turret_01 Gun0
    ;gunstation.0=1,-23,1,20,880,24.8864,5,23900,6,0,1d1*1,0,8.718,53.4 52,0,0,0,-150,150,15,-5,0.3

    ; Using the 1.1in "Chicago Piano" info for testing.
    ; Type 4 settings trick sim for gun flashes (SOH - Caleb - Others) and T&E with firing all at once.
    ; Group with main guns that use.
    gunstation.0=1,-23,1,0.40,820,1.8293,0.40,6400,5,100,1d1*28,0,8.71 8,53.452,0,0,0,-120,120,85,-10,14.672
    gunstation.1=4,-24,1,60.0, 1,1.0000,0.01, 1,0, 0,1d1*1, 0,8.718,53.452,0,0,0,-120,120,85,-10, 0

    gunstation.2=1,-25,1,0.40,820,1.8293,0.40,6400,5,100,1d1*28,0,9.93 0,41.383,0,0,0,-120,120,85,-10,14.672
    gunstation.3=4,-26,1,60.0, 1,1.0000,0.01, 1,0, 0,1d1*1, 0,9.930,41.383,0,0,0,-120,120,85,-10, 0

    [guns.0]
    gun.0=100, 0.866,-13.184,0.351,0,0,1,100
    gun.1=100,-0.872,-13.184,0.351,0,0,1,100

    [guns.1]
    gun.0=100, 0.866,-13.184,0.351,0,0,0,100
    gun.1=100,-0.872,-13.184,0.351,0,0,0,100

    [guns.2]
    gun.0=100, 0.866,-13.920,0.835,0,0,1,100
    gun.1=100,-0.872,-13.920,0.835,0,0,1,100

    [guns.3]
    gun.0=100, 0.866,-13.920,0.835,0,0,0,100
    gun.1=100,-0.872,-13.920,0.835,0,0,0,100

    ;=============================

    For those of you on 32-bit systems please see if you can run the settings on MDLC with the settings Allen wrote into the "conf" file for DOSMdlc 2.0's automatic conversion batch file since the setting for 64-bit should be the same method/process to get the file from FS9 to CFS2.

    In case I missed this point, pics attached.

    I don't want to sound patronizing, but I'm trying to write this for the gmax-stupid like me that waste two days not realizing you need to attach a point to a mesh or that was using a dummy box for the pivot and was wondering why nothing showed up at first. No offense.

    An in-depth tutorial WILL show up eventually, but for now I need to get ready for work coming up later this week. When I have another break I'll work on making naval guns using Stuart's help since he has them made already. It's just a matter of making a gun mount and you're in business. All the desinger would need to do is place the thing and you're in business since there's no animation involved. I'll ask him if it's okay to load that gun package up on the server here - whenever it's done unless someone beats me to the punch - once I can get his permission to start. He's on vacation/holiday for a while so it may take some time.

    In the mean time, if the moderators think there is a more appropriate place for this or if it is better as a sticky somewhere please do so. I'd like to get the widest discemination to see if I did this correctly.

    After this marathon I'm actually looking forward to the trips that are coming up at work starting this weekend!

    Now time for dinner and a frothy, adult beverage!

    Jorge
    Miami, FL

    PS: I'll monitor the site for the next few days to answer any questions as best I can and to see how you are all doing with the testing.
    Attached Thumbnails Attached Thumbnails mkmdl_settings.jpg   working_ship_guns_02.jpg   working_ship_guns_03.jpg   working_ship_guns_05.jpg   working_ship_guns_06.jpg  

  2. #2
    Guys,

    This should hopefully be a better picture.



    The listing is like this:

    mesh of some sort
    -----mount#
    ----------gun#
    ---------------mesh of some sort
    --------------------barrel#
    -------------------------mesh of some sort

    Where the dashed lines are: the linkage tree. Can't link the barrel directly to the gun, but apparently you can link the gun directly to the mount (makes sense from a vet's point of view). ;-)

    Going to try for turret two before going to bed tonight. Hopefully we can repeat what was done for number one!

    Jorge
    Miami, FL
    Attached Thumbnails Attached Thumbnails working_ship_guns_06.jpg  
    Last edited by Jorge; September 23rd, 2019 at 18:34. Reason: pic still somewhat blurry

  3. #3
    Hi Jorge,

    Looks like it is working. Great Job.
    The Gun and Barrel count seams to be 16. 0-15
    One could make more than one turret or mount link to one Gun/Barrel variable.

    Regards,
    B24Guy

  4. #4
    Quote Originally Posted by The B24 Guy View Post
    Hi Jorge,

    Looks like it is working. Great Job.
    The Gun and Barrel count seams to be 16. 0-15
    One could make more than one turret or mount link to one Gun/Barrel variable.

    Regards,
    B24Guy
    Thanks!

    I've been downloading some of Stuarts ships to see which would be a good tutorial subject. I was figuring one of the small patrol boats or gunboats. I"m wondering why there are 16 gun and barrel entries but only 11 mounts (0-10) available? I'm wondering if you can have duplicate gun# and barrel# entries in the model as long as they are connected to different mounts since each mount has a unique GUID number in the SDK for FS2k2. For example:

    mount0 ;{3014E6E5-53C2-48D9-888C-A7A9404FA35D}
    -----gun0
    ----------mesh
    ---------------barrel0
    --------------------mesh
    -----gun1
    ----------mesh
    ---------------barrel1
    --------------------mesh

    mount1 ;{17B16FEE-2B7F-4BEC-BBFD-C51087AB8679}
    -----gun0
    ----------mesh
    ---------------barrel0
    --------------------mesh
    -----gun1
    ----------mesh
    ---------------barrel1
    --------------------mesh

    mount2 ;{11F715D4-3D4C-4A38-A125-2866B9FCEC07}
    -----gun0
    ----------mesh
    ---------------barrel0
    --------------------mesh
    -----gun1
    ----------mesh
    ---------------barrel1
    --------------------mesh

    etc, etc, etc.

    Maybe the gun# entry references the gunstation# in the DP? Beneath the gunstation.# entry, each gun.# resets to "0" in the successive gunstation.# entry in the DP, so maybe you can do the same with the model when you are working on it? Reset the point name to gun0 in the model just as the gun.0 entry in the DP? That's probably why you have multiple entries for the ships almost going up to the low 20's in some cases. What counts is the gun# in the model and the gunstation.# in the DP? The mount info is transparent, so the sim just sees another, new, position to work with. Also, this would seem to make sense since you would - just like in real life - want to "group" the guns in your model. For example:

    US Navy 5"-50cal: mount0
    US Navy 3"-50cal: mount1
    US Navy 1.1"-Quad: mount2

    etc, etc, etc.

    You can now have up to 11 guns of each. If you need more, then:

    US Navy 5"-50cal: mount0
    US Navy 3"-50cal: mount1
    US Navy 1.1"-Quad: mount2
    US Navy 1.1"-Quad: mount3

    Now you have up to 11 of the 3" and 5" guns and up to 22 of the quad mounts. This is all theory for now, but what do you think?

    I'm wondering if this is possible because on the default Indy you have 12 gunstation entries and on the default Haruna you have 13 entries. Granted, this is within the gun0 through gun15 limits, but these are not that detailed. If you do the math you could probably have a total of 176 moving guns on a ship if this is true (11 mounts * 16 guns/barrels = 176 total combos). Remember, the "mount" is only an animation point that connects the rest of the thing to the mesh. Nothing more. Just like the gun connects a lateral movement and the barrel a vertical one, except you don't have a GUID for the conditional animations. As long as they are labeled properly you're in business.

    I'll try what I can, but don't want to take too much away from the project with Stuart's next carrier. So far I can get all the major guns on it to work with just the basics of 1=1 for a total of 8 positions. I'll try something with the multiples and see if it works. I'll post something when I can.

    As for the tutorial, like I said, I'll try with the smaller boats simply because of the fewer guns on them. Better for someone to work with. Furthermore, the gmax files are already released with the ships themselves.

    As for the scasm, where/how would I be able to look up the number of mounts or guns on the default ships? Would that be the mount's guid number? If so, how would that be found in the sca file? Or would I need to check the mdl with the "hex thingie" instead? I have a program called HxD which seems to work for the CFS2 - FS90 changes described by Erwin Welker on his site to update some newer CFS2 aircraft and ships to FSX standard.

    Thanks and you're right, this is addictive!

    Jorge
    Miami, FL
    Last edited by Jorge; September 25th, 2019 at 12:32. Reason: grammar

  5. #5
    Hi Jorge,
    I Have never seen a GUID for Mount# in a CFS2 model.
    I think one could use just one mount# and then all the guns are located as offsets of that.

    I know that the model uses the Gun#/Barrel# first then jumps to draw the object(s)
    So one gun/barrel input variable could control multiple guns.

    Hope this helps,
    B24Guy

  6. #6
    Hi Jorge,
    I was thinking about your DP questions. The DP provides info on the guns limits and ammo. The DP has no control as to the animation of the guns.
    Somehow CFC2 does it's thing and the bullets and model animation work.

    Regards,
    B24Guy

  7. #7
    Well ...

    It seems that you cannot add anything after the gun# or barrel# entry. In other words, the label "gun0" will work but the label "gun0_second" will not. It seems - so far - that the only addition that will work is the "per-part" label, for example "gun0_LOD_100" has worked so far which is why I was hoping to test out some more options with other trailing words in order to test out the theory of a total of 176. I'll do more testing when possible to see if my theory will work. It would be nice to have ALL the guns moving, but we'll see. The smaller weapons may have to just stay still.

    One note, however, and that is with regards to the cloning of parts. It seems that when you create the original mesh it helps to have the mesh created facing "north" on the grid. In other words, with the "0" heading being north on the part. I've found that I had to rotate the parts after cutting them out of the original mesh, then reset their pivot points, and only then could they be used in conjunction with the pivot animation. Maybe I'm missing something, but we'll see.

    If anyone is working on this as well please let us know and post something here - whether it's from the DP perspective or the mesh or whatever.

    Regards,

    Jorge
    Miami, FL

  8. #8
    Hi Jorge,
    If you can only apply Gun0 in GMAX then I think that one would have to SCASM the MDL and insert the correct GUID values.
    I think this because of the SCASM code that dvslats posted in the CFS2 thread.
    This may be the same problem with bullet holes. Requires SCASM editing to make the animations function.

    Regards,
    B24Guy

Members who have read this thread: 46

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •