Jump to content
Sign in to follow this  
Guest sinzow

gmax and apis ? help needed

Recommended Posts

Guest sinzow

gentlemen,i downloaded some objects in gmax-format. i know how to create apis from eod, how to place them etc., but i know nothing how to place gmax-objects.well, i guess this has been clarified somewhere long ago, but i could not find a solution, so please :-))thxSinzow

Share this post


Link to post
Share on other sites
Guest cwright

Hi Sinzow, There may be other ways of doing this but this is how I did it and it works fine. In summary, you use fsregen to convert your gmax design into an object library. You assign a GUID number to the object. You then create a standard api that calls up the GUID number. You can get fsregen here: http://www.nhreas.com/fsregen.html By the way, I think you have to be sure to use the right Microsoft gmax plug-in that creates xxxx_0.asm files. In fsregen you assign a GUID number to your object and then create the library file. You can also place multiple objects into the library file. Then for each object you create an API file. Here's an example: Area( 5 %1 %2 %3 ) mif( %12 ) IfVarRange( : 0x0346 %12 5 ) mifend CrashIndirect( :Object :Shadow :Rotate 0 0 ) PerspectiveCall( :Persp ) ShadowCall( :Shadow ) Jump( : ) :Persp Perspective :Shadow mif( %11 ) RefPoint( 2 :EndP %4 %1 %2 v1= %10 E= %11 V2= 190 ) melse RefPoint( 7 :EndP %4 %1 %2 v1= %10 V2= 190 ) mifend :Rotate RotatedCall( :Object 0 0 %5 ) :EndP Return :Object CallLibObj( 0 054382ec5 04a43b1bd 05f4f1aaa 0c3569352 ) Return EndANote: the forum seems to have replaced two characters by a smiley! If you see the smiley, simply replace the smiley by a colon followed by a capital P The four 8 digit hex words (third line up) are the GUID number that you specified. I've used this method for placing objects in Airport for Windows and it works nicely. By the way, I'm about to release the new version of AutoAsm, which can place dynamic objects. The manual includes instructions on how to create dynamic objects (e.g. road traffic) using gmax and fsregen. Any questions, don't hesitate to ask. Good luck! Best regards, Chris

Share this post


Link to post
Share on other sites

Chris provided a good response if you are designing for FS2002 and earlier. If you are designing for FS2004, then you are adding a lot of work for something that is already a part of the FS2004 SDK.I recommend downloading the FS2004 SDKs, especially the GMAX SDK for building 3D objects.W. Sieffert

Share this post


Link to post
Share on other sites

If you are using the Fs2004 gamepack then I would indeed suggest placing the objects with XML code (see the BGLComp SDK for details).An alternative for the FsRegen library tool, is Library Creator XML (available from my website). It gives you a nice GUI to create your object library. If you are still using an old tool like AFW it can also create API macros for you (although I strongly recommend using XML code for the placement).


Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites

Arn,So you are saying is that it is better to place API objects with (say) SceneGenX than AFW?RegardsShez


Shez Ansari

Windows 11; CPU: Intel Core i7-8700K; GPU: EVGA GEFORCE GTX 1080Ti 11GB; MB: Gigabyte Z370 AORUS Gaming 5; RAM: 16GB; HD: Samsung 960 Pro 512GB SSD, Samsung 850 Pro 256GB SSD; Display: ASUS 4K 28", Asus UHD 26"

Share this post


Link to post
Share on other sites

No, I say it is better to not place the API and use XML code instead. If you place the API with SGX it still uses the same code as when placing it with AFW.


Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites

Hi Shez,As Arno indicates, SGX and AFW are going to use SCASM to place APIs. What I am indicating is if you are using FS2004 and making 3D objects using GMAX, then use the FS2004 GMAX MAKEMDL to make the the 3D objects into *.mdls, then use the XML to call the *.mdls where you want.Tom Hiscox has just make SGX convenient, so that, one can use new (MDL/XML) and old (API) formats. SGX will compile two separate *.bgls if you use both formats.This was the whole point of redoing your gates in the new format, so one didn't have to have all the APIs.W. Sieffert

Share this post


Link to post
Share on other sites
Guest sinzow

Hithanks - i will try my luck with xml :-).though - old habits (apis) seldom die.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...