Adding a tag to a Macro
Posted: Sat, 27. Jan 24, 02:27
I am trying to add the tag 'influencelist="medium_drive_disrupt' to the macro 'bullet_pir_turret_m_battleship_01_gatling_01_mk1_macro'. The orginal macro looks like this:
<?xml version="1.0" encoding="utf-8"?>
<!--Exported by: nick (192.168.3.123) at 02.09.2021_15-21-12-->
<macros>
<macro name="bullet_pir_turret_m_battleship_01_gatling_01_mk1_macro" class="bullet">
<component ref="bullet_gen_m_gatling_01_mk1" />
<properties>
<ammunition value="15" reload="1" />
<bullet speed="3221.1" lifetime="2.863" amount="1" barrelamount="2" icon="weapon_gatling_mk1" timediff="0.025" angle="0.43" maxhits="2" ricochet="0.01" restitution="0.3" scale="0" attach="0">
<damagecurves>
<time>
<point position="0.2" value="1" />
<point position="0.5" value="0.8" />
<point position="1" value="0.1" />
</time>
<distance>
<point position="0.2" value="1" />
<point position="0.5" value="0.7" />
<point position="1" value="0.1" />
</distance>
</damagecurves>
</bullet>
<reload rate="8" />
<damage value="26" repair="0" />
<effects>
<impact ref="impact_gen_s_gatling_01_mk1" inside="impact_gen_s_gatling_01_mk1_inside" />
<bigobjectimpact ref="impact_gen_s_gatling_01_mk1_bigobject" inside="impact_gen_s_gatling_01_mk1_bigobject_inside" />
<launch ref="muzzle_turret_gen_m_gatling_01_mk1" />
</effects>
<weapon system="turret_shortrange" />
</properties>
</macro>
</macros>
I want it to look like this:
<macros>
<macro name="bullet_pir_turret_m_battleship_01_gatling_01_mk1_macro" class="bullet">
<component ref="bullet_gen_m_gatling_01_mk1" />
<properties>
<ammunition value="15" reload="1" />
<bullet speed="3221.1" lifetime="2.863" amount="1" barrelamount="2" icon="weapon_gatling_mk1" timediff="0.025" angle="0.43" maxhits="2" ricochet="0.01" restitution="0.3" scale="0" attach="0" influencelist="medium_drive_disrupt">
<damagecurves>
<time>
<point position="0.2" value="1" />
<point position="0.5" value="0.8" />
<point position="1" value="0.1" />
</time>
<distance>
<point position="0.2" value="1" />
<point position="0.5" value="0.7" />
<point position="1" value="0.1" />
</distance>
</damagecurves>
</bullet>
<reload rate="8" />
<damage value="26" repair="0" />
<effects>
<impact ref="impact_gen_s_gatling_01_mk1" inside="impact_gen_s_gatling_01_mk1_inside" />
<bigobjectimpact ref="impact_gen_s_gatling_01_mk1_bigobject" inside="impact_gen_s_gatling_01_mk1_bigobject_inside" />
<launch ref="muzzle_turret_gen_m_gatling_01_mk1" />
</effects>
<weapon system="turret_shortrange" />
</properties>
</macro>
</macros>
I thought the following would do it:
<?xml version="1.0" encoding="utf-8"?>
<diff>
<add sel="//macros/macro/properties/bullet[@attach="0"]">influencelist="medium_drive_disrupt"</add>
</diff>
but that does not work. What am I missing?
<?xml version="1.0" encoding="utf-8"?>
<!--Exported by: nick (192.168.3.123) at 02.09.2021_15-21-12-->
<macros>
<macro name="bullet_pir_turret_m_battleship_01_gatling_01_mk1_macro" class="bullet">
<component ref="bullet_gen_m_gatling_01_mk1" />
<properties>
<ammunition value="15" reload="1" />
<bullet speed="3221.1" lifetime="2.863" amount="1" barrelamount="2" icon="weapon_gatling_mk1" timediff="0.025" angle="0.43" maxhits="2" ricochet="0.01" restitution="0.3" scale="0" attach="0">
<damagecurves>
<time>
<point position="0.2" value="1" />
<point position="0.5" value="0.8" />
<point position="1" value="0.1" />
</time>
<distance>
<point position="0.2" value="1" />
<point position="0.5" value="0.7" />
<point position="1" value="0.1" />
</distance>
</damagecurves>
</bullet>
<reload rate="8" />
<damage value="26" repair="0" />
<effects>
<impact ref="impact_gen_s_gatling_01_mk1" inside="impact_gen_s_gatling_01_mk1_inside" />
<bigobjectimpact ref="impact_gen_s_gatling_01_mk1_bigobject" inside="impact_gen_s_gatling_01_mk1_bigobject_inside" />
<launch ref="muzzle_turret_gen_m_gatling_01_mk1" />
</effects>
<weapon system="turret_shortrange" />
</properties>
</macro>
</macros>
I want it to look like this:
<macros>
<macro name="bullet_pir_turret_m_battleship_01_gatling_01_mk1_macro" class="bullet">
<component ref="bullet_gen_m_gatling_01_mk1" />
<properties>
<ammunition value="15" reload="1" />
<bullet speed="3221.1" lifetime="2.863" amount="1" barrelamount="2" icon="weapon_gatling_mk1" timediff="0.025" angle="0.43" maxhits="2" ricochet="0.01" restitution="0.3" scale="0" attach="0" influencelist="medium_drive_disrupt">
<damagecurves>
<time>
<point position="0.2" value="1" />
<point position="0.5" value="0.8" />
<point position="1" value="0.1" />
</time>
<distance>
<point position="0.2" value="1" />
<point position="0.5" value="0.7" />
<point position="1" value="0.1" />
</distance>
</damagecurves>
</bullet>
<reload rate="8" />
<damage value="26" repair="0" />
<effects>
<impact ref="impact_gen_s_gatling_01_mk1" inside="impact_gen_s_gatling_01_mk1_inside" />
<bigobjectimpact ref="impact_gen_s_gatling_01_mk1_bigobject" inside="impact_gen_s_gatling_01_mk1_bigobject_inside" />
<launch ref="muzzle_turret_gen_m_gatling_01_mk1" />
</effects>
<weapon system="turret_shortrange" />
</properties>
</macro>
</macros>
I thought the following would do it:
<?xml version="1.0" encoding="utf-8"?>
<diff>
<add sel="//macros/macro/properties/bullet[@attach="0"]">influencelist="medium_drive_disrupt"</add>
</diff>
but that does not work. What am I missing?