SlicksGirl Posted March 31, 2019 Share Posted March 31, 2019 I have changed car colors in past versions, before learning xpath. So my question is, if i wanted to replace multiple properties of a block, how would i do that? and do i need to change it for both cntCar03SedanDamage0 and cntCar03SedanDamage1? i realize this appends it, is there a way to replace it? <append xpath="/blocks/block[@name='cntCar03SedanDamage0']"><property name="RandomTintColor1" value="0,50,110" param1="car03_white"/> <property name="RandomTintColor2" value="255,0,255" param1="car03_white"/> <property name="RandomTintColor3" value="255,255,0" param1="car03_white"/> <property name="RandomTintColor4" value="255,128,0" param1="car03_white"/> <property name="RandomTintColor5" value="51,0,0" param1="car03_white"/> <property name="RandomTintColor6" value="255,128,0" param1="car03_white"/> <property name="RandomTintColor7" value="102,102,0" param1="car03_white"/> <property name="RandomTintColor8" value="51,51,0" param1="car03_white"/> <property name="RandomTintColor9" value="128,255,0" param1="car03_white"/> <property name="RandomTintColor10" value="0,51,0" param1="car03_white"/> <property name="RandomTintColor11" value="0,255,255" param1="car03_white"/> <property name="RandomTintColor12" value="0,102,102" param1="car03_white"/> <property name="RandomTintColor13" value="0,0,204" param1="car03_white"/> <property name="RandomTintColor14" value="0,0,51" param1="car03_white"/> <property name="RandomTintColor15" value="51,0,102" param1="car03_white"/> <property name="RandomTintColor15" value="51,0,51" param1="car03_white"/> <property name="RandomTintColor15" value="204,0,102" param1="car03_white"/> <property name="RandomTintColor15" value="0,102,51" param1="car03_white"/> <property name="RandomTintColor15" value="255,51,255" param1="car03_white"/> <property name="RandomTintColor15" value="0,0,0" param1="car03_white"/> <property name="RandomTintColor15" value="96,96,96" param1="car03_white"/> <property name="RandomTintColor15" value="102,51,0" param1="car03_white"/> </append> Link to comment Share on other sites More sharing options...
Ragsy 2145 Posted March 31, 2019 Share Posted March 31, 2019 It appears you can use set for multiple items so the code looks very similar to the append code. <set xpath="/blocks/block[@name='cntCar03SedanDamage0']"> <property name="RandomTintColor1" value="0,50,110" param1="car03_white"/> <property name="RandomTintColor2" value="255,0,255" param1="car03_white"/> <property name="RandomTintColor3" value="255,255,0" param1="car03_white"/> <property name="RandomTintColor4" value="255,128,0" param1="car03_white"/> <property name="RandomTintColor5" value="51,0,0" param1="car03_white"/> <property name="RandomTintColor6" value="255,128,0" param1="car03_white"/> <property name="RandomTintColor7" value="102,102,0" param1="car03_white"/> <property name="RandomTintColor8" value="51,51,0" param1="car03_white"/> <property name="RandomTintColor9" value="128,255,0" param1="car03_white"/> <property name="RandomTintColor10" value="0,51,0" param1="car03_white"/> <property name="RandomTintColor11" value="0,255,255" param1="car03_white"/> <property name="RandomTintColor12" value="0,102,102" param1="car03_white"/> <property name="RandomTintColor13" value="0,0,204" param1="car03_white"/> <property name="RandomTintColor14" value="0,0,51" param1="car03_white"/> <property name="RandomTintColor15" value="51,0,102" param1="car03_white"/> <property name="RandomTintColor15" value="51,0,51" param1="car03_white"/> <property name="RandomTintColor15" value="204,0,102" param1="car03_white"/> <property name="RandomTintColor15" value="0,102,51" param1="car03_white"/> <property name="RandomTintColor15" value="255,51,255" param1="car03_white"/> <property name="RandomTintColor15" value="0,0,0" param1="car03_white"/> <property name="RandomTintColor15" value="96,96,96" param1="car03_white"/> <property name="RandomTintColor15" value="102,51,0" param1="car03_white"/> </set> Haidr'Gna says this works so credits to him for tinkering about with xpath and discovering this method ... normally I would use <remove xpath="/blocks/block[@name=cntCar03SedanDamage0]"></remove> to remove whole block and then either append it like in your code example to end of file or use insertAfter (previous block) to place new code in the file in the appropriate place. Not sure about second part of the question to be honest, but after first stage of wrenching a car I have never noticed wether it still has a colour or not. Link to comment Share on other sites More sharing options...
SlicksGirl Posted April 1, 2019 Author Share Posted April 1, 2019 I replaced the colors manually and started a new seed and it appears that, the game ignores the car colors, because it only serves up 4 colors and white. and none of those colors are in the list. - - - Updated - - - your code example should work though, thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.