• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

gmax -> xml -> timed object

Messages
537
Country
canada
Hi,

I (finally) started using Arno's ObPlacer XML. I can create the objects in gmax or use the library, and make them appear where I want it.

Now I want to time them... For example, make de sail boats only show from May to October.

I know how to do that with APIs. How do I do it with the XML file?

Thanks!

Fern
 
Hi Fern,

With XML code you can not apply conditions, you would have to add these directly to the object (MDL files).

Unfortunately GMax does not support this, so you would have to tweak the ASM source code of the objects. Or you could try MDLTweaker which gives you a GUI to tweak the MDL files.
 
Timed MDLs

Hi, Arno

With the FS2004 gamepack, gmax generates a .mdl and a .xml file, but no .asm. I will look for MDL Tweaker.

This is a bit of a downer, as you had just convinced me to use gmax/ObPlacer to work exclusively with the XML format, as opposed to the "old" APIs, etc.

Thanks. If you know of anything else that could help, don't hesitate to post it here, he he he.

Fern
 
By default MS is trying to hide the ASM source files from us, but when you use a CFG file for MakeMDL or MDLCommander (I use the last option) you can still keep them during export.

If you just want to tweak a MDL file MDLTweaker might be easier, as it keeps the "scary" source code away from you :D.
 
Timed gmax objects

Hi, Arno

Worked first time. Tried three options together in the same object - rotate to observer, day of the year, time of day - and they all worked. Good to have read the hex/decimal minor confusion threads. It saved me a lot of aggravation time, I think.

Is it possible to make an object appear just during the day and not at dusk or dawn?

As for fear of code... hey, I could programme in Cobol! That is no code, you'd say. And you are right, and that was also 30 years ago. I also could programme Burroughs machine language. But what I think most of us lack is structured information on SCASM, BGL and now BGLcomp. However, with your help and other nice people, we'll get there.

Thanks, and until next question.

Fern
 
Timed display

And here is the next question, Arno...

When using objects from the library with ObPlacer XML, is there a way to condition their showing for, say day of year?

I am affraid I may already know the answer to this question...

(I know how to add my own object to a library, and I could then tweak it before adding it to the library, but that is not what I want to do)

Thanks

F
 
Hi Fern,

No, if you are using generic objects or a library made by someone else it is not possible to add a condition to the display.
 
Hi Fern.

At the risk of confusing you....

If you make a new Gmax MDL that uses an attachpoint to display the default library object, you might be able to control the display conditions.

Dick
 
Hi Dick,

Have you tested this? I am not sure if the attachpoints also respond to condition put on the rest of the object. These condition apply to the BGL section of the MDL only and I think the attached objects do not respond to this.
 
To Fern:

<<As for fear of code... hey, I could programme in Cobol! That is no code, you'd say. And you are right, and that was also 30 years ago. I also could programme Burroughs machine language. But what I think most of us lack is structured information on SCASM, BGL and now BGLcomp. However, with your help and other nice people, we'll get there.>>

I relate to this message! I was an old Fortran user back in the day, but until I ran into the scasm tutorial over at the mushy peas website (which used to be www.combatsim.de, but that link is now dead), I REALLY struggled with scasm. That was also some time ago back when scasm was the leading language. That web site is dedicated to helping you learn to hand code a macro, but it was FINALLY the kind of instruction I learn best with, and I finally learned to read and edit scasm successfully.

My luck, that's right about when BGLC came out, and maybe its because I never learned C, but I've never found a similar instruction, so I've always remained in the dark looking at BGLC code.

Bob

Anyway, fun to relate to a message.
 
Hi Bob,

Maybe I am a bit more familiar with different programming languages (I know bits of C++, Java and Visual Basic), but BGLC was certainly new for me. It seems to come from assembler language, which I never used before.

But I still found the BGLC code very similar to SCASM as well. The commands are almost all the same, just as the parameters used. So if you know SCASM well, I think it should not be too hard to understand BGLC as well.

Another point is that nobody wants to write their complete object in BGLC code nowadays (like I did with an entire airport in the SCASM days). The new commands for the VertexList and triangles is just a lot complexer and therefore very hard to make completely by hand. So I think most people will only be tweaking ASM code made by GMax.

I will try to write more tutorials on this tweaking. Maybe one big overview of what the different parts of code GMax creates do would be a nice addition for the future.
 
Hi Arno...I agree, and I see the similarities in the commands. Problem is, I tend to not feel comfortable with a language until I see how the flow of the commands work.

The big breakthru for me with scasm, for example, was the tutorial that explained which bits within the syntax were the "goto" labels if the condition was not met. In addition, the idea that at a return, one automatically found the next in sequence call command for the logic to proceed. I've never found a similar tut for bglc, and I never can see how the logic flows looking at bglc code.

The other headache I have, and this occurred in the later versions of scasm also, was when the code began to look very "coded"...no longer did I see a command saying ifVAR...but repeated lines of something like db, or dx, or dw...I'm at work without examples, so forgive the poor description.

Those lines never meant anything to me, I did have some appreciation that a decoder ring must exist, as I worked a bit with Louis Sinclair over the original fsds, when the line command was not producing the correct color, he had me experiment by changing one of the integers within one of those otherwise "greek" commands, and the color did indeed change.

Cheers,

Bob
 
Hi Bob,

I think if you look at the BGLC code you will see the flow is very similar to SCASM. In SCASM labels are defined as:

Code:
:location

While in BGLC they are defined as:

Code:
location label word

The return command is also very similar, it is only called BGL_RETURN instead of Return. If you know look at the jump commands, these looked like this in SCASM:

Code:
Jump( :location )

In BGLC this becomes:

Code:
BGLJUMP location

So it is all very similar. The other big difference is that in SCASM all parameters are given between parenthesis. In BGLC they are seperated by commas.

I hope to find some time in the future to write an overview of the BGLC source. So take the output of GMax as example and show what each piece of code does. But a full tutorial like the SCASM one you refer to is a bit too much work (and not many people would write BGLC code from scratch).

The Dwx like commands indeed making reading more difficult. In the first versions of FSDS they were used for commands that SCASM did not yet support (or to prevent trouble with older version of SCASM). I much say that only recently (now that I am learning how to read BGL files in my tools directly) I am really understanding how these work. It requires reading the hex opcodes from the SDK to see which command it is.
 
Hi Fern.

Arno is right, the attachpoints cannot be made conditional... no code branching allowed in that section of the ASM code. :(

So if you want conditional display, you'll need to make a reproduction of the object with gmax, and then you'll have the ASM code ( or MDL ) to allow conditional display. Most default objects aren't too complicated, so you should be able to "clone" them, and use the default textures.

It would be wonderful if MS would give us a full suite of conditional coding via the XML placement code for the next version of the sim ( as well as better dynamic object coding ).

Dick
 
Back
Top