• 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.

Where do I write Usrvr5 info?

Messages
37
Country
us-northcarolina
In the Actigate SDK, you wrote:

IFMSK lbl_end, usrvr5, 1
; code only to be displayed when condition is true
lbl_end label word

This check if the bit that corresponds with the value of 1 has been set. So for any value of usrvr5 where the value of 1 has been set will result in a positive result of the check.
-and-

Please note that CAT is not able to write the IFMSK command in your source code at the moment. So you will have to tweak the source code a little bit manually to be able to trigger your animation...
So where do you actually place the BGLC code? Is it in the .asm file or _0.asm?

Thanks Again
 
Hi,

If you want to change the code created by CAT, then "all" you have to do is replace the lines in the _0.asm file created by CAT that perform the triggering. They do use a IFIN1 command now and that needs to be replaced by a IFMSK command.
 
Arno,

Once I tweak the code in the original .asm file, how then do I turn it into a useable mdl? :banghead:

(I've used makemdl lots of times before without any problems)

help
 
you can use BGLC9 compilier which can compile the file to a bgl. file. then you can rename it to a mdl. then u can add it to an xml file as a model

Dave
 
Export file from GMAX
Edit the _0.asm file
Parse using BGLC_9
Get BGL file
Rename (DOS Switch) to an MDL
Parse with BGLCOMP
ERROR!!!! (Cites Library Object name / ModelDataname on the XML)
:banghead:
:banghead:
 
once u dropped your modified file in bglc, it will produce something like your_object.bgl. just rename to your_object.mdl and thats it. there is no need drop the file again.

Dave
 
Believe it or not, I'm not normally this thick....

If I switch the BGLC_9 made bgl to a mdl, wouldn't I need to parse it with an xml?

That was my train of thought, and that's why I was trying to parse with BGLCOMP.

Apparently when i try to habd edit or ObjPlacer XML, i get the same errors.

I know that It's right infront of me....I just can't see it... :(
 
I'm building a T-hangar whose door opens on a certain day.

Here's the plan.

1. Model built in GMAX (based on a model that will parse without the actigate)

2. Exported the model by GMAX (through middleman and mdlcommander)

3. Got the following: iso_10.mdl, iso_10.xml, iso_10.asm & iso_10_0.asm.

4. Ran CAT to put a miscellaneous command in the file (that will be replaced)
The CAT _0.asm looks like this:

VAR_BASE_OVERRIDE 0
IFIN1 at_5, 031Ah, 256, 257
IFIN1 at_6, 6h, 0, 0
SETWRD 6h, 1
at_6 label word
BGL_JUMP_32 at_8
at_5 label word
IFIN1 at_7, 6h, 3, 3
SETWRD 6h, 4
at_7 label word
at_8 label word
BGL_JUMP_32 at_10
at_9 label word
SETWRD 6h, 0
at_10 label word

5. I hand edit the CAT_0.asm to read

VAR_BASE_OVERRIDE 0
IFMSK lbl_end, usrvr5, 768
; code only to be displayed when condition is true
lbl_end label word
IFIN1 at_6, 6h, 0, 0
SETWRD 6h, 1
at_6 label word
BGL_JUMP_32 at_8
at_5 label word
IFIN1 at_7, 6h, 3, 3
SETWRD 6h, 4
at_7 label word
at_8 label word
BGL_JUMP_32 at_10
at_9 label word
SETWRD 6h, 0
at_10 label word

Thus subsituting the single line:
IFIN1 at_5, 031Ah, 256, 257

-for-

IFMSK lbl_end, usrvr5, 768
; code only to be displayed when condition is true
lbl_end label word​
6. Then DOS prompt command a BGLC_9 Parse
c:\myscenery\bglc_9 iso10_0.asm
a bgl is produced

7. DOS prompt command
rename iso10_0.bgl iso10_0.mdl
the bgl is changed to a mdl

Now here's where the problem starts.

When i try to associate it with an XML of insertion into FS, I get Model Data Error. This happens with both handplacement and OBJPLACER XML.
 
Maybe I'm picturing Actigate wrong

Arno:

I posted a thread a while back about making a T-hangar that opened and closed based on the day of the week. You suggested Actigate.

With the tweaking, I can get the door to open, but not close (reverse animation) like CAT.

Does Actigate work like CAT whereas the coding acts as a trigger to activate and reverse the animation, or does the module read the info one time and doesn't correct for changes in the scenario.

So if I have usrvr 5 set to 1 (for the parking brake) if I have the brake on will the animation activate and then when I take the brake off, should the animation reverse.

Maybe I'm misinterpreting what Actigate is for or expecting too much.

Does the Coding I supplied earlier in this post look right?

BTW: Thanks for the other help. I finally got it to parse right... :)
 
Hi,

welshtorg said:
Does Actigate work like CAT whereas the coding acts as a trigger to activate and reverse the animation, or does the module read the info one time and doesn't correct for changes in the scenario.

All that ActiGate does is supply you with a few extra variables that you can use in tools like CAT. So it does not provide functionality like CAT, it just gives you access to some variables that are not available elsewhere.

welshtorg said:
So if I have usrvr 5 set to 1 (for the parking brake) if I have the brake on will the animation activate and then when I take the brake off, should the animation reverse.

Yes, that is how it should work if you use the uvrvr5 as trigger in CAT. But you need to use the IFMSK command instead of IFIN1, as explained in the documentation.

The only problem I see in your code is maybe the value of 768. I guess this means it will trigger on almost anything. So for only the parking brake, you would need a value of 1.
 
I Got it

Just for documenting purposes and to help future thread readers,

It turns out that I copied and pasted the command from the Actigate_SDK like this:

IFMSK lbl_end, usrvr5, 1
; code only to be displayed when condition is true
lbl_end label word
All that I'd get was and one-time run of animation without a reversal.

I then decided to try the code again, but instead of coping and pasting, I started anew with the coding. I put in:

IFMSK lbl_end, 031Ah, 1
; code only to be displayed when condition is true
lbl_end label word
It turns out that instead of writing in the hexID for the command I was actually writing "usrvr5". DUH! :banghead:

Arno, Thanks for all of your help!.. You are the master...

Actigate is a COOL tool...
 
Thanks for sharing this. Are you sure that changing usrvr5 for 031Ah was the only change you made? BGLC_9 does replace usrvr5 with that hex address on compilation.
 
You were right

Arno-

You were right.

The "test" of my animation was the parking brake value of "1". I could get the model's animation to function when the parking brakes were set and to reverse the animation when I took the parking brake off.

I thought the mystery was solved.

HOWEVER, when I susbituted "8" for "1", (Monday for Parking Bakes), no game. The animation did not trigger.

If anyone is interested -or can offer a suggestion here are the asm_0 files.

Original is the way the _0.asm came out of the exporter.
CAT is the way CAT codes the _0.asm (using Enable Animation Trigger)
Tweaked is my attempt at hand tweaking. (substituting the IFIN1 for IFMSK)
 

Attachments

  • Original_THang2_0.asm
    36.2 KB · Views: 737
  • CAT_THang2_0.asm
    46.4 KB · Views: 747
  • TWEAKED_THang2_0.asm
    46.4 KB · Views: 675
Hi,

I am not sure if a day of the week is a useful trigger :). You can never change the day, without getting a reload of the scenery, so that makes it very hard to see if something has actually happened. And as long as it is still monday, the animation will not change. So are you sure it is not something like this, that you are seeing?
 
Well, I'm trying to coordinate with AI Flight Plans, so that's why I'm leaning toward the day of the week.

So, if my flight starts on a Tuesday (the door doesn't open) and I manually change it to Monday (Changing Time & Date), should that be enough to trip the animation?

Is there an add on to see what FSUPIC is putting out?
 
Hi,

welshtorg said:
So, if my flight starts on a Tuesday (the door doesn't open) and I manually change it to Monday (Changing Time & Date), should that be enough to trip the animation?

I am not sure about that, when you change the time and the date, the scenery is reloaded, so that will probably destroy the animation state as stored by CAT. Also when you use a trigger like this, why bother to make an animation? It is hardly never visible. So it would be much easier to just remove the parts that should be gone to pretend being open.

welshtorg said:
Is there an add on to see what FSUPIC is putting out?

You can use FsInterrogate for that. That comes with the FSUIPC SDK and allows you to monitor the FS memory.
 
Ah, the thread that won't die!

Arno,

I Googled "IFMSK" command to try to learn more about it. I found a topic on a CFS3 site that talked about damage to buildings. Anyway, the author spoke of having at least 3 levels of the building (Normal, Damaged, Destroyed) then using the IFMSK command to have the Sim determine which is the correct model to display.

Could I do something similar with FS9? I really, don't care to see the animation, I'd just like to have the bi-fold door open on days when the AI Aircraft is going to taxi out and fly. (It's pretty bad to see the AI Aircraft taxi through the closed door :yikes: )

Could I use a Closed door model on Sunday through Friday, then display an Open door model on Saturdays?
No animation, just switched models?
 
Hi,

welshtorg said:
I Googled "IFMSK" command to try to learn more about it. I found a topic on a CFS3 site that talked about damage to buildings. Anyway, the author spoke of having at least 3 levels of the building (Normal, Damaged, Destroyed) then using the IFMSK command to have the Sim determine which is the correct model to display.

The IFMSK command does nothing more (or less) than looking at a variable and checking if the bits you specify are turned on. It depends on which variable you use, what kind of logic you can build with it. But the command on itself does not do any switching of models or so.

welshtorg said:
Could I do something similar with FS9? I really, don't care to see the animation, I'd just like to have the bi-fold door open on days when the AI Aircraft is going to taxi out and fly. (It's pretty bad to see the AI Aircraft taxi through the closed door :yikes: )

In that case I would indeed try to put the IFMSK command around the code that draws your door. Just like you can use the IFIN1 command to add a condition to some part of code. You could also apply this condition to the total model, but then you end up using 2 MDL files.
 
Back
Top