How to create mod for modelbehaviour addition

Could somebody explain me how I can create a mod for the TBM where I just want to add the following code to the TBM930_interior.xml?

	<Component ID="LVAR_TO_BVAR">
		<UseTemplate Name="ASOBO_GT_Update">
			<UPDATE_CODE>
				(L:TBM930_BAT_SET, Number) s0 0 &gt; if{ l0 1 - (&gt;B:ELECTRICAL_Source_Switch_Set) 0 (&gt;L:TBM930_BAT_SET) }
				(L:TBM930_BLEED_AIR_SET, Number) s0 0 &gt; if{ l0 1 - (&gt;B:PRESSURIZATION_Bleed_Air_Source_Set) 0 (&gt;L:TBM930_BLEED_AIR_SET) }
			</UPDATE_CODE>
			<FREQUENCY>2</FREQUENCY>
		</UseTemplate>
	</Component>

Hey @TFEV1909
You can try this:

  1. Make a copy of the asobo-aircraft-tbm-930 folder
  2. Delete all of the text files inside the asobo-aircraft-tbm-930 folder except the layout.json and manifest.json file
  3. Open the simobject folder
  4. Delete everything in that folder except the Model folder
  5. In the model folder delete everything except the interior.xml file or whatever file you want to change
  6. Edit the .xml file with your code and save
  7. Regenerate the layout file. You can use GitHub - HughesMDflyer4/MSFSLayoutGenerator: A drag-and-drop application for updating layout.json files in Microsoft Flight Simulator (2020) packages. to do this step

All set! Drop this in your community folder and what this does is overwrite the interior.xml file in the original airplane folder.

Hope this helps!

3 Likes

Yep, as above, but you HAVE TO also modify the “asobo-aircraft-tbm-930” folder name.
So:
1a: make a copy of “asobo-aircraft-tbm-930” folder
1b: place copy in community folder
1c: modify name of the community copy of “asobo-aircraft-tbm-930” folder

(And minor correction, it’s layout.json and manifest.json)

3 Likes

I’d recommend naming it to your name/company name.

So I would rename it to “hamfam-aircraft…” if I were editing it

(Fixed my mistake, too :grin:)

1 Like

Thanks @WombiiActual and @HamMan2118 !! Going to try this out, but seems reasonably easy to do!

1 Like