are CAU features defined. Also, the macro's dynamic features aren't very dynamic. I ended up with a bunch of AFR or ASI with the same face but different hair after
spawning 100 of them across 10 M class Miner ships.
So to spawn all three, I copied the existing macro to my own 'macros' file and renamed it. I then made a second macro that always spawns a CAU and added both
of these using a DIFF/ADD operation:
arg_f_manager1_macro
arg_f_manager2_macro
The problem is that I can't get these macros to work by using a random roll to decide if it is a "1" or "2" that should be spawned. I've tried several different
ways but I get different errors:
1. These methods result in: $theMacro is not of datatype macro
Code: Select all
<set_value name="$charMacroID" exact="['1', '2'].random" />
<set_value name="$theMacro" exact="''macro.arg_f_manager' + $charMacroID + '_macro''" />
<debug_to_file name="$DebugFile" directory="$DebugDir" text="'macro generated: %s'.[$theMacro]" />
<create_npc_template name="$crewTemplate" object="$SelectedShip" macro="'$theMacro'" role="entityrole.service" force="false" />
Code: Select all
<set_value name="$charMacroID" exact="['1', '2'].random" />
<set_value name="$theMacro" exact="''macro.arg_f_manager[%s]_macro'.[$charMacroID]''" />
<debug_to_file name="$DebugFile" directory="$DebugDir" text="'macro generated: %s'.[$theMacro]" />
<create_npc_template name="$crewTemplate" object="$SelectedShip" macro="'$theMacro'" role="entityrole.service" force="false" />
2. This method results in: Cannot find macro XML file from index '$themacro' in file 'index\macros'
Code: Select all
<set_value name="$charMacroID" exact="['1', '2'].random" />
<set_value name="$theMacro" exact="'arg_f_manager' + $charMacroID + '_macro''" />
<debug_to_file name="$DebugFile" directory="$DebugDir" text="'macro generated: %s'.[$theMacro]" />
<create_npc_template name="$crewTemplate" object="$SelectedShip" macro="macro.$theMacro" role="entityrole.service" force="false" />
My debug log shows that appending the number to the macro name is working but it appears the result is unusable as a macro object. Is it not possible to use a random macro name
without hard coding the choices in the actual MD file? I really don't want to do this for every type of macro (pilot, manager, etc.) because I may decide to add more in the future.
Code: Select all
<set_value name="$charMacroID" exact="['1', '2'].random" />
<do_if value="$charMacroID == 1">
<create_npc_template name="$crewTemplate" object="$SelectedShip" macro="macro.arg_f_manager1_macro" role="entityrole.service" force="false" />
</do_if>
<do_else>
<create_npc_template name="$crewTemplate" object="$SelectedShip" macro="macro.arg_f_manager2_macro" role="entityrole.service" force="false" />
</do_else>