As this is my first source post here ill introduce myself

Im a local memory hacker from England, I prefer to stay anonymous for this reason as the code I will share here is nothing to do with hacking, nor is it intended to be use as such and I don't want people requesting access to my private hacking community due to anything I may put here.
So, that's that

Here's my method of getting your architects to build capital ship yards without the need for a 3 phase system (due to the loop crash as I call it). If I may ask for someone to spend some time to have this released on steam workshop as a working mod then it would be appreciated (ill not due to the statement above)
basically it works by adding a dummy station macro to the build list, between when the user has selected the dummy macro and the upgrade screen it replaces the dummy macro string with the real macro string - causing it to build the station. Im going to cover the Albion station here, the same method works for all. Iv not yet added any code to add the construction drones to the architects list, I believe Berserk Knight's has got a good method of this in his Build Shipyards mod.
I should also mention that 'Berserk Knight' was the one who made me think of this method, His problem solving give me quick insight into why it wasn't possible to patch the capital stations directly.
our extension folder & files layout
Code: Select all
UnknownMod\
> content.xml
-- assets
-- -- props
-- -- -- SurfaceElements
-- -- -- -- Macros
-- -- -- -- > buildmodule_stations_albion_macro.xml
-- -- -- structures
-- -- -- -- build_trees
-- -- -- -- -- Macros
-- -- -- -- -- > struct_bt_alb_big_ships_yard_dummy_macro.xml
-- md
-- > NPC_Architect.xml
-- index
-- > macros.xml
assets/props/SurfaceElements/Macros/buildmodule_stations_albion_macro.xml
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<diff>
<add sel="/macros/macro[@name='buildmodule_stations_albion_macro']/properties/builder">
<macro ref="struct_bt_alb_big_ships_yard_dummy_macro" />
<macro ref="struct_bt_alb_small_ships_complex_macro" />
<macro ref="struct_bt_alb_small_ships_yard_macro" />
</add>
</diff>
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<macros>
<macro name="struct_bt_alb_big_ships_yard_dummy_macro" class="station">
<component ref="struct_bt_alb_cattle_ranch" />
<properties>
<identification name="{20102,601}" description="{20102,602}" unique="0" />
</properties>
</macro>
</macros>
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<diff>
<add sel="/mdscript[@name='NPC_Architect']/cues/cue[@name='Base']/cues/cue[@name='SectionHandler']/actions" pos="prepend">
<do_if value="event.param == 'cArch_selectUpgradesMenu'">
<do_if value="event.param2.{6} == 'struct_bt_alb_big_ships_yard_dummy_macro'">
<set_value name="event.param2.{6}" exact="'struct_bt_alb_big_ships_yard_macro'" />
</do_if>
</do_if>
</add>
</diff>
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<diff>
<add sel="/index">
<entry name="struct_bt_alb_big_ships_yard_dummy_macro" value="\Extensions\<REPLACE WITH MOD FOLDER NAME>\assets\structures\build_trees\macros\struct_bt_alb_big_ships_yard_dummy_macro" />
</add>
</diff>