Ludeon Forums

Ludeon Forums

  • May 30, 2020, 09:06:16 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Vakari

Pages: [1] 2
1
Help / Re: XML Patch Help, Please
« on: March 06, 2020, 07:26:07 PM »
Is this, perhaps, "Make Uranium Green?"

Sorry, I had to look that up.  No, I haven't tried that mod.  I did this for myself, unpublished.  This recolor is similar-looking to a bright yellow-colored Carnotite, although those colors can vary in shades of yellow to more yellowish-green.  I first made this little mod for myself by simply overwriting the entire def, but I wanted to know how to patch things like this that have to two almost identical element paths, and the solution I came up with just seemed clunky.  It worked, but I wasn't sure if I could merge the two somehow., make a more elegant patch operation.  It's all kind of new to me still, so I'm learning as I go.  In fact, the first recolor was the first "mod" I've ever made, and it was to help teach myself XML.  :)

Sorry for the long reply, but thanks again for the help :)!

2
Help / Re: XML Patch Help, Please
« on: March 05, 2020, 12:07:55 PM »
You could replace the entire graphicData?  But that's probably a bad idea.

Someone made a mod that allowed more complex node manipulation that I think included subNodes?

But in vanilla, no, you've got it.

Thank you so much for the reply!  I really appreciate the help :)

3
Help / XML Patch Help, Please
« on: March 04, 2020, 04:20:57 PM »
Posted a while back on an apparently dead thread, so wondering if anyone here can help me with an XML Patch noob question:

Is there a better way to combine two different changes to the same Def without two separate PatchReplace operations?  Here is what works, but is there a better way to do this?  (I tried just not pointing to /color or /colorTwo in the xpath, but it never worked.)

<Patch>
   <Operation Class="PatchOperationReplace">
      <xpath>/Defs/ThingDef[defName="MineableUranium"]/graphicData/color</xpath>
      <value>
         <color>(255,249,105)</color>
      </value>
   </Operation>
   <Operation Class="PatchOperationReplace">
      <xpath>/Defs/ThingDef[defName="MineableUranium"]/graphicData/colorTwo</xpath>
      <value>
         <colorTwo>(240,178,17)</colorTwo>
      </value>
   </Operation>
</Patch>


Thank you!

4
Ideas / Re: [1.0.2408] Visitor animals eating my food (etc.)
« on: November 10, 2019, 08:39:18 AM »
Check out the Trading Spot mod.  Should help a lot:  https://ludeon.com/forums/index.php?topic=33669.0

Also the Locks mod will let you have more control of who can use doors:  https://ludeon.com/forums/index.php?topic=35913.0

Both are available on Steam if you want them.  I consider both essential QoL mods.  Hope this helps!

5
Ideas / Re: Fight fires without undrafting
« on: November 10, 2019, 08:32:24 AM »
Good idea!

6
Ideas / Re: Suggestion: Add variety to "Ancient Dangers"
« on: November 10, 2019, 08:23:08 AM »
I had another idea for the ancient ruins:  Flooded caverns.  (Or buildings, etc).   Where you would have to research the moisture pump, and remove the water before you could see what is underneath.  Would be a nice change from the instant attack.

7
Help / Re: XPATH surgery - Need help with xpath? post here.
« on: September 22, 2019, 06:27:16 PM »
I'm leaving this post in case anyone else ever runs into this error.  Maybe it can help with debugging.  In addition, if anyone knows a more elegant way to combine both "<graphicData>" changes into one element, please let me know.  Anyway, I was able to figure this out for myself.  Here is what worked:

<?xml version="1.0" encoding="utf-8" ?>
<Patch>
   <Operation Class="PatchOperationReplace">
      <xpath>/Defs/ThingDef[defName="MineableUranium"]/graphicData/color</xpath>
      <value>
         <color>(255,249,105)</color>
      </value>
   </Operation>
   <Operation Class="PatchOperationReplace">
      <xpath>/Defs/ThingDef[defName="MineableUranium"]/graphicData/colorTwo</xpath>
      <value>
         <colorTwo>(240,178,17)</colorTwo>
      </value>
   </Operation>
</Patch>



First of all:  Thank you to the author of this post and everyone helping.  For a noob like myself, it's invaluable.

So, I'm trying to learn xpathing, and so I've read tons of articles, other posts, wikis, and looked at actual downloaded mods.  I think I've actually confused myself by information overload.

So, I thought I'd start small and just try a simple replace operation.  I want to change "color" and "colorTwo" values for the mineable uranium ore.

Everything I've tried causes errors.  I am sure there is a way to list both values in the same operation, but I can't make it work.  I've even tried separating each (color vs colorTwo) into separate operations.  I still get errors.  Would some generous soul please help me out?

EDIT:  The file with the change is:  Defs\ThingDefs_Buildings\Buildings_Natural.xml.

Again, thank you for any help!

Here is what I've tried last:


<?xml version="1.0" encoding="utf-8" ?>
<Patch>
   <Operation Class="PatchOperationReplace">
      <xpath>*/ThingDef/[defName = "MineableUranium"]/graphicData/color</xpath>
      <value>
            <color>(255,255,64)</color>
      </value>
   </Operation>
   
      <Operation Class="PatchOperationReplace">
      <xpath>*/ThingDef/[defName = "MineableUranium"]/graphicData/colorTwo</xpath>
      <value>
            <colorTwo>(240,178,17)</colorTwo>   
      </value>
   </Operation>
</Patch>


Here is the error log.  I've tried googling this but couldn't figure out what is wrong:

Error in patch.Apply(): System.Xml.XPath.XPathException: Error during parse of */ThingDef/[defName = "MineableUranium"]/graphicData/color ---> Mono.Xml.XPath.yyParser.yyException: irrecoverable syntax error
  at Mono.Xml.XPath.XPathParser.yyparse (yyInput yyLex) [0x00000] in <filename unknown>:0
  at Mono.Xml.XPath.XPathParser.Compile (System.String xpath) [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at Mono.Xml.XPath.XPathParser.Compile (System.String xpath) [0x00000] in <filename unknown>:0
  at System.Xml.XPath.XPathExpression.Compile (System.String xpath, IXmlNamespaceResolver nsmgr, IStaticXsltContext ctx) [0x00000] in <filename unknown>:0
  at System.Xml.XPath.XPathExpression.Compile (System.String xpath) [0x00000] in <filename unknown>:0
  at System.Xml.XPath.XPathNavigator.Compile (System.String xpath) [0x00000] in <filename unknown>:0
  at System.Xml.XmlNode.SelectNodes (System.String xpath, System.Xml.XmlNamespaceManager nsmgr) [0x00000] in <filename unknown>:0
  at System.Xml.XmlNode.SelectNodes (System.String xpath) [0x00000] in <filename unknown>:0
  at Verse.PatchOperationReplace.ApplyWorker (System.Xml.XmlDocument xml) [0x00000] in <filename unknown>:0
  at Verse.PatchOperation.Apply (System.Xml.XmlDocument xml) [0x00000] in <filename unknown>:0
  at Verse.LoadedModManager.ApplyPatches (System.Xml.XmlDocument xmlDoc, System.Collections.Generic.Dictionary`2 assetlookup) [0x00000] in <filename unknown>:0
Verse.Log:Error(String, Boolean)
Verse.LoadedModManager:ApplyPatches(XmlDocument, Dictionary`2)
Verse.LoadedModManager:LoadAllActiveMods()
Verse.PlayDataLoader:DoPlayLoad()
Verse.PlayDataLoader:LoadAllPlayData(Boolean)
Verse.Root:<Start>m__1()
Verse.LongEventHandler:RunEventFromAnotherThread(Action)
Verse.LongEventHandler:<UpdateCurrentAsynchronousEvent>m__1()


Thank you in advance for any assistance with my learning this process! 

8
Support / Re: Game too dark, any way to adjust brightness, gamma, etc?
« on: September 17, 2019, 09:55:00 PM »
@Camute:  Brilliant!!  This is just what I needed.  I'm running it now and it definitely helps!  Thank you for the suggestion!

Also:  LWM:  Thank you for your interest and help.  Very much appreciated, too! :)

9
Support / Re: Game too dark, any way to adjust brightness, gamma, etc?
« on: September 15, 2019, 03:19:54 PM »
Thanks for the reply.  I do not have the lighting mod, because I definitely don't want to make my game darker. :)

I don't know if the brightness is the issue, or if the color saturation is.  I just know when the daylight starts to wane, in full dark, and in rain, I am squinting at details and it gives me a headache.  Was hoping there was a way to adjust things, in-game, via mod, or even an outside software.


10
Support / Game too dark, any way to adjust brightness, gamma, etc?
« on: September 14, 2019, 10:35:22 PM »
Hello

I have my monitor adjusted to full brightness and contrast, but when night falls or it rains, I can barely see anything on the game screen.  I get that its supposed to be dark, but when I'm literally squinting trying to play, I think physical need outweighs immersion experience.  Is there any way to lighten the game?  Thank you!

11
Ideas / Re: Suggestion: Add variety to "Ancient Dangers"
« on: June 19, 2019, 09:57:54 PM »
@AileTheAlien:  Love that idea!!!!
@LWN:  Those would be great, too!  Also:  Ghost mods??  Gotta check that out!

12
Ideas / Re: Slave-to-Colonist Option
« on: June 19, 2019, 09:52:22 PM »
Thank you both for the replies!

13
Ideas / Slave-to-Colonist Option
« on: June 16, 2019, 04:59:11 PM »
I would like the ability to "free" purchased slaves, and have the description change from "Female/Male SLAVE of {insert colony name}" to "Female/Male COLONIST of {insert colony name}"

In addition, it would be fantastic if "freeing" slaves gives a positive boost to colonists, in the same vein as "banishing" a colonist provides a negative.

Thanks!

14
Ideas / Re: Suggestion: Add variety to "Ancient Dangers"
« on: May 31, 2019, 08:01:05 PM »
@Kirby23590:  Yep, exactly!  Just need to randomize what we find more.

15
Ideas / Re: Suggestion: Add variety to "Ancient Dangers"
« on: May 31, 2019, 05:54:18 PM »
Thanks, jbox1 :)  I agree with you about finding surprises in regular ruins, too. 

Pages: [1] 2