Changing History tab graph colors

Started by kaptain_kavern, July 25, 2016, 03:26:21 PM

Previous topic - Next topic

kaptain_kavern

hey i need help folks please.
I'm trying to change graph colors in history.
I changed the RGB value in ​HistoryAutoRecorders.xml​ but that doesn't change at all in game. Any idea plz?

<?xml version="1.0" encoding="utf-8" ?>
<HistoryAutoRecorderDefs>

  <HistoryAutoRecorderDef>
    <defName>WealthTotal</defName>
    <label>wealth (total)</label>
    <!-- Yellow -->
    <graphColor>RGBA(240, 228, 66, 1)</graphColor>
    <recordTicksFrequency>30000</recordTicksFrequency>
    <workerClass>HistoryAutoRecorderWorker_WealthTotal</workerClass>
  </HistoryAutoRecorderDef>

  <HistoryAutoRecorderDef>
    <defName>WealthItems</defName>
    <label>wealth (items)</label>
    <!-- Bluish Green -->
    <graphColor>RGBA(0, 158, 115, 1)</graphColor>
    <recordTicksFrequency>30000</recordTicksFrequency>
    <workerClass>HistoryAutoRecorderWorker_WealthItems</workerClass>
  </HistoryAutoRecorderDef>

  <HistoryAutoRecorderDef>
    <defName>WealthBuildings</defName>
    <label>wealth (buildings)</label>
    <!-- Vermillion -->
    <graphColor>RGBA(213, 94, 0, 1)</graphColor>
    <recordTicksFrequency>30000</recordTicksFrequency>
    <workerClass>HistoryAutoRecorderWorker_WealthBuildings</workerClass>
  </HistoryAutoRecorderDef>

  <HistoryAutoRecorderDef>
    <defName>FreeColonists</defName>
    <label>free colonists</label>
    <!-- Bluish Green -->
    <graphColor>RGBA(0, 158, 115, 1)</graphColor>
    <recordTicksFrequency>30000</recordTicksFrequency>
    <workerClass>HistoryAutoRecorderWorker_FreeColonists</workerClass>
  </HistoryAutoRecorderDef>

  <HistoryAutoRecorderDef>
    <defName>Prisoners</defName>
    <label>prisoners</label>
    <!-- Vermillion -->
    <graphColor>RGBA(213, 94, 0, 1)</graphColor>
    <recordTicksFrequency>30000</recordTicksFrequency>
    <workerClass>HistoryAutoRecorderWorker_Prisoners</workerClass>
  </HistoryAutoRecorderDef>

  <HistoryAutoRecorderDef>
    <defName>ColonistMood</defName>
    <label>mood</label>
    <!-- Bluish Green -->
    <graphColor>RGBA(0, 158, 115, 1)</graphColor>
    <recordTicksFrequency>30000</recordTicksFrequency>
    <workerClass>HistoryAutoRecorderWorker_ColonistMood</workerClass>
  </HistoryAutoRecorderDef>

</HistoryAutoRecorderDefs>

kaptain_kavern

#1
It's weird. If i change directly the value in Core folder the changes shows.


But if i do a simple mod (only Defs\HistoryAutoRecorderDefs\HistoryAutoRecorders.xml) and load only this one mod (with CCL if it matters) it seems that my changes doesn't override vanilla value

kaptain_kavern

this is working :
<?xml version="1.0" encoding="utf-8" ?>
<HistoryAutoRecorderDefs>

  <HistoryAutoRecorderDef>
    <defName>WealthTotal</defName>
    <label>wealth (total)</label>
    <!-- Yellow -->
    <graphColor>(240, 228, 66)</graphColor>
    <recordTicksFrequency>30000</recordTicksFrequency>
    <workerClass>HistoryAutoRecorderWorker_WealthTotal</workerClass>
  </HistoryAutoRecorderDef>

  <HistoryAutoRecorderDef>
    <defName>WealthItems</defName>
    <label>wealth (items)</label>
    <!-- Bluish Green -->
    <graphColor>(0, 158, 115)</graphColor>
    <recordTicksFrequency>30000</recordTicksFrequency>
    <workerClass>HistoryAutoRecorderWorker_WealthItems</workerClass>
  </HistoryAutoRecorderDef>

  <HistoryAutoRecorderDef>
    <defName>WealthBuildings</defName>
    <label>wealth (buildings)</label>
    <!-- Vermillion -->
    <graphColor>(213, 94, 0)</graphColor>
    <recordTicksFrequency>30000</recordTicksFrequency>
    <workerClass>HistoryAutoRecorderWorker_WealthBuildings</workerClass>
  </HistoryAutoRecorderDef>

  <HistoryAutoRecorderDef>
    <defName>FreeColonists</defName>
    <label>free colonists</label>
    <!-- Bluish Green -->
    <graphColor>(0, 158, 115)</graphColor>
    <recordTicksFrequency>30000</recordTicksFrequency>
    <workerClass>HistoryAutoRecorderWorker_FreeColonists</workerClass>
  </HistoryAutoRecorderDef>

  <HistoryAutoRecorderDef>
    <defName>Prisoners</defName>
    <label>prisoners</label>
    <!-- Vermillion -->
    <graphColor>(213, 94, 0)</graphColor>
    <recordTicksFrequency>30000</recordTicksFrequency>
    <workerClass>HistoryAutoRecorderWorker_Prisoners</workerClass>
  </HistoryAutoRecorderDef>

  <HistoryAutoRecorderDef>
    <defName>ColonistMood</defName>
    <label>mood</label>
    <!-- Bluish Green -->
    <graphColor>(0, 158, 115)</graphColor>
    <recordTicksFrequency>30000</recordTicksFrequency>
    <workerClass>HistoryAutoRecorderWorker_ColonistMood</workerClass>
  </HistoryAutoRecorderDef>

</HistoryAutoRecorderDefs>


thx myself and everyone on the Slack o7

1000101

Ahh, you just had to remove the RGBA from the xml.  It may have also worked by limiting the range for the values used in RGBA from 0.0-1.0.

Glad you got it working though.
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

kaptain_kavern

Yep thx

Looks like talking to myself in the Help section actually help me :p

and thanks for the insight

Next future goal for me : use colorpicker from CCL in order to let user choose colours himself ;)

1000101

(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

Fluffy (l2032)

kaptain, see my relations tab ModConfigMenu and the CCL MiniMap ModConfigMenu implementations for how to call the ColorPicker, it's a bit tricky because a wrapper and callback are needed for the Color struct.

kaptain_kavern

Thank you friend.

I will take note of that and i will re read it when i feel able to understand (after digging where you told me) ;)
I will may be need to talk to myself in this thread again. Sorry ^^