1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Where do I write Usrvr5 info?

Discussion in 'ActiGate' started by welshtorg, 20/12/05.

  1. welshtorg

    welshtorg

    Joined:
    10/3/05
    Messages:
    37
    Country:
    us-northcarolina
    In the Actigate SDK, you wrote:

    -and-

    So where do you actually place the BGLC code? Is it in the .asm file or _0.asm?

    Thanks Again
  2. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    20,573
    Country:
    netherlands
    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.
  3. welshtorg

    welshtorg

    Joined:
    10/3/05
    Messages:
    37
    Country:
    us-northcarolina
    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
  4. ablitos

    ablitos

    Joined:
    9/1/05
    Messages:
    302
    Country:
    us-newjersey
    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
  5. welshtorg

    welshtorg

    Joined:
    10/3/05
    Messages:
    37
    Country:
    us-northcarolina
    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:
  6. ablitos

    ablitos

    Joined:
    9/1/05
    Messages:
    302
    Country:
    us-newjersey
    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
  7. welshtorg

    welshtorg

    Joined:
    10/3/05
    Messages:
    37
    Country:
    us-northcarolina
    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... :(
  8. welshtorg

    welshtorg

    Joined:
    10/3/05
    Messages:
    37
    Country:
    us-northcarolina
    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:

    5. I hand edit the CAT_0.asm to read

    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.
  9. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    20,573
    Country:
    netherlands
  10. welshtorg

    welshtorg

    Joined:
    10/3/05
    Messages:
    37
    Country:
    us-northcarolina
    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... :)
  11. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    20,573
    Country:
    netherlands
    Hi,

    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.

    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.
  12. welshtorg

    welshtorg

    Joined:
    10/3/05
    Messages:
    37
    Country:
    us-northcarolina
    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:

    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:

    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...
  13. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    20,573
    Country:
    netherlands
    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.
  14. welshtorg

    welshtorg

    Joined:
    10/3/05
    Messages:
    37
    Country:
    us-northcarolina
    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)

    Attached Files:

  15. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    20,573
    Country:
    netherlands
    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?
  16. welshtorg

    welshtorg

    Joined:
    10/3/05
    Messages:
    37
    Country:
    us-northcarolina
    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?
  17. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    20,573
    Country:
    netherlands
    Hi,

    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.

    You can use FsInterrogate for that. That comes with the FSUIPC SDK and allows you to monitor the FS memory.
  18. welshtorg

    welshtorg

    Joined:
    10/3/05
    Messages:
    37
    Country:
    us-northcarolina
    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?
  19. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    20,573
    Country:
    netherlands
    Hi,

    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.

    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.

Share This Page