Animating Guns on Ships?
Results 1 to 21 of 21

Thread: Animating Guns on Ships?

Hybrid View

  1. #1

    Animating Guns on Ships?

    Greetings,

    I've been messing around with the gmax files kindly provided by Stuart and I've gotten the radar on the the early Fletcher to rotate in CFS2. I followed the tutorials I found for that and everything seems okay with that regard. However ...

    I've been scouring the internet and haven't found anything that would help with the animation on the guns, i.e. have them track you like those on USIO's ships. He has the same animation that the default ships have. I have found only two references to this process - specifically on this website. I'm writing down what I understand from those two pages to see if I'm on the right track or if I'm missing something. Here goes:

    1. In 2008 a post was made by simonu which alluded to the animation of the guns. He stated that the "guns0" was the translation of the gun (rotate horizontally about the z-axis), while the "barrel0" was the elevation of the gun (rotate vertically about the x-axis). It didn't matter what number followed "guns" or "barrel" as long as you started at 0 and had one of the accepted values which I believe were 0-9.

    2. As per the same post a reply was given by Good_2_Be that Usio had posted a tutorial on how to do it on his webpage, but that it was in Japanese and that google translate was not that great, but something was better than nothing. I've scoured the internet and it seems we have lost this valuable source of information.

    3. According to various items on this website as well as others it seems there is no SDK per say for CFS2, however, there is more than enough info out there that you can cobble together enough data that you can pretty much do anything with CFS2 as long as you stay within the program's limits. There are ways, however, that you can push those limits (maximum polygons in gmax for example) and various other "tweaks" that allow you to modify things by hand (asm tweaks for example as well as editing mis files by hand for missions, etc). I haven't, however, found anything for tweaking an "x" file or "asm" or "sca" file for guns or barrels.

    4. The 2008 post closed by saying that you had to basically make the model using the FS2K2 gmax pack. You then exported and kept the "x" file but didn't compile the model. After exiting gmax you processed the "x" file with the default version of the FS9 gmax make model executable and created the mdl file from that, while keeping the resulting "x" file in the process. The mdl was then processed through MDLC for conversion to CFS2 standard. According to the author, simonu, he had succeeded in everything except testing in CFS2. My question is this: has anyone been able to corroborate his testing? I've tried to no avail to follow this process and nothing. I'm wondering if this is a problem on my end.

    5. Speaking of my end, I'm using (for better or worse) Windows 7 64-bit edition. I haven't had a chance to try and wake up by old Vista 32-bit laptop since I haven't gotten to my storage to dig it out yet. I'm wondering if this can be caused by the fact I'm "mounting" the MDLC with Allen's DosBox release. Has anyone had issues in general producing anything on a 64-bit system? At least for the older programs? Should I get the thing out of storage just to make that one my MDLC rig?

    6. With regards to the different "tweaking" methods I've been reading about, what is the difference between an "sca" file and an "asm" file I've been seeing? I know they are different since the information in the "_0.asm" file gmax created for me is different than the ".sca" file that MDLC put out when I ran a batch file for the mounting of DosBox and ran a de compile of the Usio model of the Lexington. In the Usio model you clearly see information with regards to the "guns" and "barrels" sections as well as some numbers which I'm guessing have to do with the animations, textures, vertices, etc. Is there a simple way to find the info I would need in the "_0.asm" file or "x" file and then just "hand mash" it into existence?

    I know it seems like a lot, but seeing this is my first real try at gmax and CFS2 in general I was wondering if I was doing "noob" mistakes. With FS9 and FSX several things were "depreciated" from one to the next, but the older stuff would still work with a few tweaks here and there. For example, Usio's ships work great in FSX! I took the HMS Eagle and Lexington and have them as ship AI using the SDK from FSX. I found AIBTC to work equally well if not better despite a different approach at making the traffic.

    I want to thank everyone ahead of time for your help on this. Getting the guns to animate was no big deal at first since I figured it was some Microsoft Magic, but when I saw that it was done in the past I needed to figure out how. Could it be I'm just not understanding the process for some of the older stuff in order to get the animations to work?

    Thanks for the help and hope to hear something from the experts out there!

    Regards,

    Jorge
    Miami, FL

    PS: I found the FS2K2 SDK for the MDL files. It specifically states that there are entries for part names gun# and barrel# as well as other names that are CFS2 specific. Will look into this more as I can, but still would like any input from others. Thanks!
    Last edited by Jorge; September 18th, 2019 at 14:38. Reason: FS2K2 MDL SDK found.

  2. #2
    Redding Army Airfield Allen's Avatar
    Join Date
    Dec 2007
    Location
    O85 Benton Field Airport
    Age
    36
    Posts
    5,462
    I have never seen any of these docs about moving guns.

    I can say anything you can do with MDLC you can do with DOSMdlc 2.0 http://www.sim-outhouse.com/sohforum...9&linkid=25224 by using the DOSBox MDLC Command Line.bat
    "Let Being Helpful Be More Important Than Being Right!" Some SOH Founder.

  3. #3
    Thanks Allen! That's the file I was using for the final conversion to CFS2 format. It's an indispensable tool for those of us that have been pushed over to the 64-bit world! I was just wondering if anyone else was having animation issues with the work around. Either way, I'll try and fire up the old 32-bit laptop tomorrow - if it still works, that is!

    Here's the link to the FS2K2 MDL SDK: https://www.fsdeveloper.com/forum/re...ries/fs2002.7/

    It's not a direct link, just to the website where you can get it. It's halfway down next to the makemdl SDK.

    There isn't much as far as explanations of the functions, just, "Used in Combat Flight Simulator" or "Unsupported". For example, there is one in there called "pilot" that is unsupported. It also mentions the "l_wingfold" and "r_wingfold" which is used in the Corsair. It's curious that they also put some damage variables in there as well.

    I'll look more into it and see what I can come up with. Still crossing my fingers, though!

    Jorge
    Miami, FL

  4. #4
    Redding Army Airfield Allen's Avatar
    Join Date
    Dec 2007
    Location
    O85 Benton Field Airport
    Age
    36
    Posts
    5,462
    Here is text of things I know or think work.

    As for gun# and barrel#. I know next to nothing about SCASM editing but it looks like part of the code to make them work is being exported as I can find the part name and guid params for them is being exported from gMax into the model file but they don't work in game.
    Attached Files Attached Files
    "Let Being Helpful Be More Important Than Being Right!" Some SOH Founder.

  5. #5
    Quote Originally Posted by Allen View Post
    Here is text of things I know or think work.

    As for gun# and barrel#. I know next to nothing about SCASM editing but it looks like part of the code to make them work is being exported as I can find the part name and guid params for them is being exported from gMax into the model file but they don't work in game.
    Thanks, Allen!

    I messed with the thing for a while but same results you have. I tried my hand at SCASM editing, but things didn't work out either. At least the thing compiled again with your bat file for MDLC, but nothing as far as movement. With the SCASM edit I somehow lost the radar that I had done with the key frames. I must have done something wrong there since all I changed was the section with the gun0 entry.

    For now I'm just going to work on key frame animating the radars that Stuart is going to use on his ships. I'll just mess with the gun thing every now and then instead. Once I'm done with the radars I'll try again by "grafting" some of the info from Usio's ships if possible. We'll see.

    If anyone has any info or has been able to mess with this please let me know here so we can further look into this. It would be a shame if we lost something that was possible in the past.

    Regards,

    Jorge
    Miami, FL

  6. #6

    What I Remember

    Hey Guys,

    A little bit I remember from Usio's pages (translated), when the model is in gmax the turret needs a rotation point, the barrel a pivot point, then the "whole" a mount.
    Animate "keyframes" and name this points (separately of course). There was mount_, barrel_ and gun_.

    The icing on the cake was having the correct numbers in the ship's *.dp file. Some trigonometry and geometry was needed from rotation point and pivot point in gmax. The numbers gained from this needed to be in the *.dp [GUNSTATIONS] section.
    How Usio arrived at these numbers from gmax, I have no idea. This part became lost in the translation.

    Not much in the tutorial catagory, so take it for what it is.

    Cheerz,
    Dave

Members who have read this thread: 1

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
  •