Okay, so we definitely have the extra ships spawning in now, so that's all good, and I think rather than all being an equal chance, I will give a bit of weighting... Namely in the mixed group and reduce the weight of the M's and increase the S's
So in the following code:
Code: Select all
<group name="sca_pirate_sm">
<select macro="ship_arg_m_bomber_02_a_macro" weight="1"/>
<select macro="ship_arg_s_scout_01_a_macro" weight="36"/>
<select macro="ship_arg_s_scout_01_b_macro" weight="36"/>
<select macro="ship_tel_s_scout_01_a_macro" weight="54"/>
<select macro="ship_tel_s_scout_01_b_macro" weight="54"/>
<select macro="ship_tel_s_fighter_01_a_macro" weight="9"/>
<select macro="ship_tel_s_fighter_01_b_macro" weight="9"/>
</group>
That's the original for the mixed group, I want to alter the weights to be 5 for the M, 75 for the fighters, and 95 for the scouts, is this the replace lines I would use?
Code: Select all
<replace sel="/groups/group[@name='sca_pirate_sm']/select[@macro='ship_arg_m_bomber_02_a_macro']/@weight">5</>
<replace sel="/groups/group[@name='sca_pirate_sm']/select[@macro='ship_arg_s_scout_01_a_macro']/@weight">95</>
<replace sel="/groups/group[@name='sca_pirate_sm']/select[@macro='ship_arg_s_scout_01_b_macro']/@weight">95</>
<replace sel="/groups/group[@name='sca_pirate_sm']/select[@macro='ship_tel_s_scout_01_a_macro']/@weight">95</>
<replace sel="/groups/group[@name='sca_pirate_sm']/select[@macro='ship_tel_s_scout_01_b_macro']/@weight">95</>
<replace sel="/groups/group[@name='sca_pirate_sm']/select[@macro='ship_tel_s_fighter_01_a_macro']/@weight">75</>
<replace sel="/groups/group[@name='sca_pirate_sm']/select[@macro='ship_tel_s_fighter_01_b_macro']/@weight">75</>
Reading through the XML patch guide in the sticky, but it doesn't cover multi-attribute lines, so I'm not 100%, and it just looks wrong to me
EDIT: Nevermind, got it all working. But I was right, it was wrong. Debug kept throwing an error, googling around on error 76 eventually led me to find that rather than /> at the end of the replace line, it actually had to be /replace>... Even though I'm sure I've seen lines terminated as just /> before....