- Messages
- 54
- Country

Hi everyone, I'm trying to add custom code to the choke lever of my airplane in developing for MSFS 2020 using Copilot's AI ( I'm not a coding expert ) , but every test doesn't give the desired result after compiling, (templates loaded but custom variables not showed in behaviordebug /LocalVariables.. etc ), I think perhaps that Copilot AI may have provided the correct logic, but the syntax and file paths may be incorrect. I would like to know if the basic structure is correct for implementing custom code.
In my PackageSources I have the following folder "ModelBehaviorDefs" and inside my xml.file called "custom_code.xml"
Questions:
1) MODEL.XML
Is the my "include" instruction right for my custom.xml file ? Is the sintax correct?
<Behaviors>
<Include ModelBehaviorFile="ModelBehaviorDefs\custom_code.xml"/>
..... etc ....
CUSTOM.XML
the first instructions of my generic "custom_code.xml" are right?
<?xml version="1.0" encoding="utf-8"?>
<ModelBehaviors>
<Template Name="test">
.......... custom code........
</Template>
</ModelBehaviors>
hope someone could help me to understand, or could explain me the right way to add custom code for custom behavior ( I mean how to initialize some custom templates , how to call it ) .
Thanks
In my PackageSources I have the following folder "ModelBehaviorDefs" and inside my xml.file called "custom_code.xml"
Questions:
1) MODEL.XML
Is the my "include" instruction right for my custom.xml file ? Is the sintax correct?
<Behaviors>
<Include ModelBehaviorFile="ModelBehaviorDefs\custom_code.xml"/>
..... etc ....
CUSTOM.XML
the first instructions of my generic "custom_code.xml" are right?
<?xml version="1.0" encoding="utf-8"?>
<ModelBehaviors>
<Template Name="test">
.......... custom code........
</Template>
</ModelBehaviors>
hope someone could help me to understand, or could explain me the right way to add custom code for custom behavior ( I mean how to initialize some custom templates , how to call it ) .
Thanks

