Version: 1.5.27.0
Frequency: Consistently
Severity: Blocker
Marketplace package name: sent via PM for Simobject patch not overriding base files - #6 by FlyingRaccoon
Context: Editing and Mounted to Community
Bug description: Loops fail to correctly initialise parameters. This is an FS2024-only problem and affects code that works fine in 2020. The problem is there, whether we use Asobo or Asobo_EX1 style RPN.
Repro steps:
TEST 1 - PARTIAL FAILURE
We created this template in an XML library and called it in our exterior model. The purpose was to create a loop that would output into UPDATE_CODE_X.
<Template Name="Loop_Test">
<Parameters Type="Default">
<LOOP_COUNT>5</LOOP_COUNT>
<LOOP_TEMP/>
</Parameters>
<Loop>
<Setup>
<Param>COUNT</Param>
<From>1</From>
<To>#LOOP_COUNT#</To>
<Inc>1</Inc>
</Setup>
<Do>
<Parameters Type="Default" Lifetime="Loop">
<LOOP_TEMP>#LOOP_TEMP# #COUNT#</LOOP_TEMP>
</Parameters>
</Do>
<Then>
<Parameters Type="Default">
<UPDATE_CODE_X>#LOOP_TEMP#</UPDATE_CODE_X>
</Parameters>
</Then>
</Loop>
<UseTemplate Name="ASOBO_Update_Template">
<UPDATE_FREQUENCY>4</UPDATE_FREQUENCY>
<UPDATE_CODE>#UPDATE_CODE_X#</UPDATE_CODE>
</UseTemplate>
</Template>
The Components and Update appear correctly, but UPDATE_CODE_X does not initialise correctly and appears as the parametre name in Behaviors:
We also tried creating a ParametersFn to handle it, with the same exact results.
TEST 2 - PARTIAL FAILURE
We used this code to generate the code. This time we put the tag for <UPDATE_CODE_X> within the section of the loop and directly fed into it. The assumption was that is not working correctly, despite seeing it work properly in Asobo_EX1 templates. The result was the same as test #1.
We tried creating a ParametersFn to handle this just like in test #1, with the same exact results.
<Template Name="Loop_Test">
<Parameters Type="Default">
<LOOP_COUNT>5</LOOP_COUNT>
<LOOP_CODE_TEMP/>
</Parameters>
<Loop>
<Setup>
<Param>COUNT</Param>
<From>1</From>
<To>#LOOP_COUNT#</To>
<Inc>1</Inc>
</Setup>
<Do>
<Parameters Type="Override">
<UPDATE_CODE_X>#LOOP_CODE_TEMP# #COUNT#</UPDATE_CODE_X>
</Parameters>
</Do>
</Loop>
<UseTemplate Name="ASOBO_Update_Template">
<UPDATE_FREQUENCY>4</UPDATE_FREQUENCY>
<UPDATE_CODE>#UPDATE_CODE_X#</UPDATE_CODE>
</UseTemplate>
</Template>
TEST 3 - TOTAL FAILURE
Test #3 was about embedding the within a set of , using to output into UPDATE_CODE_X. Again, we have examples of this working in default Asobo_EX1 and examples of our own working in FS20.
<Template Name="Loop_Test">
<Parameters Type="Default">
<LOOP_COUNT>5</LOOP_COUNT>
<LOOP_TEMP/>
</Parameters>
<Parameters Type="Default">
<Loop>
<Setup>
<Param>COUNT</Param>
<From>1</From>
<To>#LOOP_COUNT#</To>
<Inc>1</Inc>
</Setup>
<Do>
<Parameters Type="Default" Lifetime="Loop">
<LOOP_TEMP>#LOOP_TEMP# #COUNT#</LOOP_TEMP>
</Parameters>
</Do>
<Then>
<UPDATE_CODE_X>#LOOP_TEMP#</UPDATE_CODE_X>
</Then>
</Loop>
</Parameters>
<UseTemplate Name="ASOBO_Update_Template">
<UPDATE_FREQUENCY>4</UPDATE_FREQUENCY>
<UPDATE_CODE>#UPDATE_CODE_X#</UPDATE_CODE>
</UseTemplate>
</Template>
The result was that the Update doesn’t even get initialised, as if it never existed.



