Sign in to follow this  
Guest

creating an API file from Gmaxmiddleman/fsregen....

Recommended Posts

Hi all,Today I registered for acccess to this forum. So yes I am a newbie. Question.Would someone be willing to either post here, or email me all the required steps in producing a API file that can be used in Airport260 or lets say FS Scenery Creator, where I create the source using Gmax, export it to the FSREGEN directory ( I am using newest makemdl, middlman, and fsregen)?I hate to bother Georgio just now with more questions, it appears that he only gets some four hours of sleep per day. But by email he told me he has plans on updating his documentation for many of the new tools he has included as of v029c.I have been using FSREGEN for some two weeks now with success as far as making lights, decals,lakes, raised hardened landable surfaces etc.. I just need a bit of help with how to use the library functions which I assume is how one would create a file_name.api macro file for use in the two above mentioned tools.Can someone help me? Best regards to all,grb (I can be also addressed as George :(. :-)

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi,If you search back a bit on the forum, you will find some discussions with an example api. Just copy-paste it and edit the GUID with a text editor. You will have the make the api by hand that way for every object.Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Share this post


Link to post
Share on other sites

Arno,Thank you for responding to my question. I did download and print out those threads that Bob5568 and a few others had answered for Knnygar in thread #560.My question is:what steps are required to produce the original api file if one follows the following:1)While in Gmax,export an object (let us say a light on top of a tower)into Middleman/Makemdl which obviously creates the asm files etc..2) While in FSREGEN go to the Library Tool and find the asm file that got exported. Then assign a "new GUID number to it", then save itas a file_name.api file.At this point I do not understand what the next steps in the process should be. I examine the file_name.api and the code it shows looks nothing like what I see in api files such as are found in Airport.They do not appear to have the scasm code one sees in Airport's api files or other macros one may download. And further I am not sure I am actually doing the correct things while in FSREGEN, the existing documentation is a bit sketchy in how to create and use library objects.So I am not sure what to do next. For instance, with the above mentioned file_name.api (with the code that does not appear to look like what I see in api files, I would not know where to place the code found in Bob Bernstein's example he provided in above mentioned thread.And further, without knowing quite sure how to even phrase the question... in Bob's code example.....one sees a Calllib command likeCallLibObj(0 xxxxxxx,xxxxxxx,......xxxxxxxx) without any include statement for instance to say where the compiler should look for the library file which would contain this object GUID reference number.This is all new to me, I have never created an object by writing scasm code, only have started to read some of the scasm documentation.So the questions I ask may not even make sense.That is why I was hoping one could provide a very simply example such as mentioned above, with each step required starting at how one actually creates the library object while in FSREGEN.I hate to be bugging Georgio just now based on his 4 hour sleep schedule, and I am not sure beyond FSREGEN if he even creates api type files in his daily work. So I have not bugged him for a step by step example at this point.Could you be in the position to provide a small procedure example?If you say no, I will harbor no ill feelings of any kind. I do thank you for at least responding to the initial questions.Lastly, I went to your home page and read through your help guides,thanks again for the things you are doing to improve the quality of FS2K2 and what we can do in scenery development etc..best regards,George B. :-)

Share this post


Link to post
Share on other sites

I don't use middleman.exporting a gmax model with a latest makemdl.exe from the mademdl sdk now gives you the option to "keep files". put a check in the box next to keep files.You should have three files, two .asm files, a "myfile.asm" and "myfile_0.asm" and a bgl file. Delete the bgl file.open fsregen, one of the later versions...click on button "library compiler" at the bottom.Now you have a new screen, click on the browse button to the right of the top line labelled "new object details" or just enter the path and file name of the version without the _0.Name it, and provide a unique GUID, this needs to be a set of 4 8 character words. these must be in hexidecimal, so only use numbers 0-9 or letters A-F. Making this unique is important, you might want to give this some thought...like your name in hex backwards....something no one else will use. Click on "Add to list"Then provide a name for your library file, in the bottom line labelled "output file".Click on "Create Library Source File".Now, using explorer, move the new library file (it will be your output file with a file type of .asm) to a directory with BGLC.exeeither drag the output file and drop it on bglc.exe, or compile your file from the DOS prompt using syntax bglc outputfile.asm outputfile.bgl you should get a file same name as your output with file type bgl.Thats your library file.Put it in your dir for your scenery proj. or your main scenery file.Any "calling" scasm that invokes that particular guid will look at all library files present looking for that guid, and will display your object if its found.Using the examples of calling macros from the other thread, just edit to include your guid, and compile to bgl.Enjoy,Bob B

Share this post


Link to post
Share on other sites

Hi Bob, Thank you Thank you Thank you :-) Made my first house in gmax using the Tutorial.......now on to the next steps. Your step by step explanation looks easy to follow. I"m already familiar with creating library files from Nova so I'll try not to be scared!!! LOLRob[table border=2 bgcolor=#eeeeee][tr][td]http://avsim.com/flightdeck/images/Radar_small.gif[/td][td]Beta tester for http://www.jdtllc.com' target="_blank">Radar Contact] the premier ATC adventure add-on for FS

Share this post


Link to post
Share on other sites

Hi Bob,Thank you for your feedback and explaination per above.I understand what you have indicated here.However, this is not what I am asking.Georgio specifically indicates in his howto document that one can create a FILE_NAME.API file to be used by Airport 260.In yourexample given and ones by Arno and CWright....thank you guys, you all show me how to use rsregen to output a "asm" type file. BUT. When I do a "save as" in the rsregen output file window while in the Library Tool screen......entering lets say file_name.api (according to rsregen document) I get something like this:; Library Compiler - fsregen v0.29c - test by G.Ioannu ; Freeware. Commercial use is prohibited.; header label word dw 0001 dd 000989D57H dd 0FF6914C5H dd 07FFFFFFFH dd 080B60B62H dw 22 dup(0) dd (offset LIBRARY_DATA) - (offset header) dw 10 dup(0) dd 0AAAAAAAAh dd 0AAAAAAAAh dd 0AAAAAAAAh dd 0AAAAAAAAh dw 14 dup(0)LIBRARY_DATA label word dd (offset LIBRARY_0) - (offset LIBRARY_DATA) dd 0AAAAAAAAh, 0AAAAAAAAh, 0AAAAAAAAh, 000000001h dd 0,6,8 dd (offset LIBRARY_DATA)LIBRARY_0 label word dd 0AAAAAAAAh, 0AAAAAAAAh, 0AAAAAAAAh, 000000001h db 100 dd (offset LIBRARY_0_HE) - (offset LIBRARY_0) dd (offset LIBRARY_0_END) - (offset LIBRARY_0_START) dd 20 dd 131072 dd 0 dd 0 db "test-smoke1" dd 0LIBRARY_0_HE label wordLIBRARY_0_START label word include C:Program Filesfsregentest-smoke1_0.asmLIBRARY_0_END label word dd 0,0,0,0Which clearly is not what one would expect to see in a file_asm source file for compiling with bglc.Lastly, as you are all aware, Airport 260 uses file_name.api macro files which should look like the "asm files" you guys are showing me.Ignore the fact in the above illustration that the GUID is not in a correct form..........I just took this example on the fly because it contains a small amount of code for a visual, I understand that one must create a distinct GUID library number without the "h's" on the end etc.So in summary, the key is.........fsregen claims one can output a api style scasm file for use in Airport 260. Apparently I am still totally in the dark as how this is supposedly accomplished.Thank you all for your willingness to help and your patience, perhaps I simply am not using the proper gramatical constructs to bring out what I am attempting to communicate.best regards,George B.

Share this post


Link to post
Share on other sites

As far as I know FsRegen can NOT create an API macro. The code you post here is the ASM code for the object library, but not the code to call it.I have not read the latest docs of FsRegen, so I don't know what is started there exactly.Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Share this post


Link to post
Share on other sites

I'm not sure what "claim" you are referring to, I have never read or heard any claims that fsregen can produce an api macro. Perhaps we who are quite familier with library objects have used shortcut language which left this impression, however, no-one I know has ever meant that fsregen can produce an api file. I see no value in such a file anyway....why would I want that? Bob Bernstein

Share this post


Link to post
Share on other sites

Bob,After reading fsregen doc, the two howtos on lake/decal, and carefully looking at all the text at his home rsregen homepage I found not one reference to any mentioning of creating an api style file for use with Airport 260.I then discovered where I had seen a reference to creating this form of file for use in Airport. By form, I mean earlier, that I thought there was a difference between what is contained in an api verse what is contained in an asm file, and thought there was some intermediatory step that one could use in fsregen to directly create a api file.........On June 29th you wrote:---------------------------------------------------------------------LAST EDITED ON Jun-29-02 AT 03:52 PM (EDT)first, compile your library .asm file. If you put a copy of bglc.exe in the same dir as the above files, you can just drag ur library file over it, and you'll get a bgl file. Then put that in your scenery dir that you want to use. Don't get confused by your current bgl file, that's junk, toss it. The code you've copied is a typical "calling" macro. You can find out what you called the macro in the lib with Georges fsregen tool. Anyway get the object identifyer from your library and replace the numbers in the above file with your own. CallLibObj( 0 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX ) Then save the file as filename.api Now you open up Airport, or FSSC, and add the macro just like you'd add any macro. Now you can rotate it in the macro file. Bob Bernstein ------------------------------------------------------------------End of your quote. So now I see what you where explaining to knnygarin topic #560.Somehow I misconstrued what you where explaining in that thread, as I was just in the mode of parsing through many items in search of articles referencing fsregen etc., and in my pee brain formed a concept of how fsregen works, in that I thought one could have it directly create a api file without any text edit processing being performed.In this I apologize to you, Cwright, and Arno in wasting your time with what I thought was possible. Obviously I simply did not understand what you guys where communicating to knnygar and the forum as how to generate and modify a asm file via. fsregen to make it available as a library object so to speak.Thanks for your patience.George B.

Share this post


Link to post
Share on other sites

No Problem, George. I wouldn't have been at all peeved had I realized your confusion. Without realizing that, it just seemed like you were continuing to ask the same question even thou I had answered as completely as I knew how.Wishing you peace, contentment, and the pleasures of using cool processes to create visual fun!Bob B

Share this post


Link to post
Share on other sites

Bob,And may you have years of good health and fun creating usefull applications and then enjoying there use.best regards,George B.

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