after a weekend of studing xml codes, I found the reason why the invade faction logic not working correctly.
In line 852 and 1057 of the FactionGoal_Invade_Space.xml the function call "get_module_set_macro" doesn't return the desired result.
( the entire "<do_elseif value="$DesiredSubgoalsKeys.{$i} == '$SUBGOAL_BuildStation'">" block is twice! )
Code: Select all
<get_module_set_macro result="$StationMacro" race="$Faction.primaryrace" type="$StationType"/>
^^^^^^^^^
Result from Debugging:
The last line is where the faction war script stops working. It prevents the event from going further.[Scripts] 609434.54 *** Context:md.FactionGoal_Invade_Space.Start<inst:91149>: (antigone) Invade: True Sight(holyorder) -
[Scripts] 609434.54 (antigone) Invade: True Sight(holyorder) - weight 0.121174
[Scripts] 609434.99 ############
(antigone) Invade: True Sight(holyorder) - Phase changed from (null) to (prepare_for_invasion)
############
[Scripts] 609436.02 *** Context:md.FactionGoal_Invade_Space.EvaluateState<inst:91157>: (antigone) Invade: True Sight(holyorder) - desires 1
[Scripts] 609436.02 (antigone) Invade: True Sight(holyorder) - Unable to find suitable station macro for Argon defence
At first it looks like the defence base macro is not defined, which i can confime going through the station macros, but implement the required macro doesn't have the desired effect.
It could be a bug in the function itself, maybe the string evaluation doesn't work correctly. ( See below )
I can not do much from here because the "get_module_set_macro" function is part of xml engine. So the devs have to take a closer look at it.
Interesting fact:
I was able to get the script working by giving the function a NULL value, which is very interesting and it could be a following error of the incorrect string evaluation.
But it keeps the script working and results that the function returns any consturction plan (with an administration module inside).
The result was that antigone starts to build a tradestation in True Sight to conquer the sector which leeds in a massive war between both factions. Really impressive what the script can do if its working correctly.

Hope it can be fixed![=ERROR=] 609436.50 Error in MD cue md.FactionGoal_Invade_Space.EvaluateState<inst:92d15>: Evaluated value 'null' is not a string
* Expression: $StationType
[General] 609436.50 ======================================
[Scripts] 609436.50 *** Context:md.FactionSubgoal_BuildStation.Start<inst:9303a>: triggering (antigone) Build station<inst:9303a>: station_arg_tradestation_base_01_macro in True Sight 0x8851 -