Menu

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.

Show posts Menu

Topics - Telkir

#1
I'm trying to use a patch operation sequence to check whether a def from another mod is found, then apply an Add patch to XML within my own mod if it is. Should be pretty simple, but I'm having trouble. Here's the patch:

<Operation Class="PatchOperationSequence">
  <success>Always</success>
  <operations>
    <li Class="PatchOperationTest">
      <xpath>/Buildings/ThingDef[defName = "Anon2Dresser"]</xpath>
    </li>
    <li Class="PatchOperationAdd">
      <xpath>/Defs/ThingDef[@Name = "BedBase" or @Name = "DoubleBedBase" or @Name = "RoyalBedBase"]/comps/li[@Class = "CompProperties_AffectedByFacilities"]/linkableFacilities</xpath>
      <value>
        <li>Anon2Dresser</li>
        <li>Anon2EndTable</li>
        <li>Anon2EndTableLight</li>
        <li>Anon2RoyalEndTable</li>
        <li>Anon2RoyalEndTableLight</li>
      </value>
    </li>
  </operations>
</Operation>


The mod containing Anon2Dresser is More Furniture, whose def in question is here:
https://pastebin.com/0pEFDLWw

I'm trying to apply the patch to the abstract defs that my added beds inherit from, as shown here:
https://pastebin.com/SUM4g4gT

Problem as it stands is that with the patch as above, the patch isn't being applied when More Furniture is loaded. No errors are showing up in the console log.

Can anyone suggest what I'm doing wrong here?

EDIT: spdskatr on Discord has patiently explained that Shinzy is right, and I didn't need a <success>Invert</success> immediately after the PatchOperationTest xpath, so I've permanently removed it. However, now the patch seems not apply under any circumstance. See below for a small C# workaround.
#2
Bugs / [A16] Wrong art subject date
April 03, 2017, 05:33:12 PM
My colony had to deal with a siege late in its first winter. A few days later, in the spring of the new year, I noticed one of my colonists create this piece of art:



It looks like the date has somehow gotten confused by the new year.

...or is it maybe some kind of prophecy? The colonist who created it had the "psychiatric patient" backstory, so maybe the voices in his head are whispering eldritch truths to him...  :o
#3
Skully suggested this might be something Tynan would want to look at. There's some vaguely bug-like weirdness going on where a terrain added by my MoreFloors mod is replacing gold ore in a vanilla save for no obvious reason.

Original full details of the problem and how it can be reproduced and fixed are in this thread.

In summary: Gold ore in a vanilla RimWorld save is replaced by one specific terrain added by my mod, MoreFloors, when the save is loaded with that mod active. No errors are being flagged in the console. Changing the defname of the culprit terrain by just a single character fixes the problem.

The def in question is "FloorStoneChequerMarbleSandstone" on lines 361-370 of this file:
http://pastebin.com/Xa40L7rH

Apparently there were known hash collision problems in 0.15.1280 that got fixed - perhaps this is somehow related?
#4
Someone's reported a bug with my MoreFloors mod that's baffled me (doesn't take much, but this one seems especially weird). If you take a vanilla A15 colony with no mods, enable MoreFloors, then load your save, all gold ore in the map will turn into a specific flavour of planned flooring, like so:



MoreFloors only deals with terrains. Gold ore clearly isn't a terrain, and it's the only natural "building" that seems to be affected.

There are no errors in the console. The plans can be claimed and cancelled without causing any problem, leaving emptiness behind. If I remove that "Chequer slabs (marble / sandstone)" floor from the XML, reload mods and try loading the save again, gold ore appears correctly. Put the def back, bug returns. Move the def to a different position in the XML, bug still there.

???

I've gone over the XML of that particular floor with a fine tooth comb and there is nothing different about it compared to any of the other chequered floor defs in the same XML. Perhaps I've squinted at it for so long I've become blind to typos. You can see the full code of the relevant XML here:

http://pastebin.com/Xa40L7rH

The def in question is "FloorStoneChequerMarbleSandstone" on lines 361-370.

Can someone here give me any clues?
#5
Help / A13 Compatibility
April 22, 2016, 02:01:44 PM
Please disregard this post; if a mod could delete it, that would be great.
#6
I'm not sure whether this is a bug or just a reverted feature, but harvested crops will always give the maximum yield defined in their def, regardless of the growing skill of the pawn that harvests them.

For example - start a new colony, drop a growing zone down and grow some potatoes. In the core defs, a potato has a yield range of 2 to 4. Once they're fully grown, get an unskilled colonist to harvest them, and you still get 4 potatoes per plant. Didn't this used to be a random yield between the range?

A similar thing applies for the produced quantity of items made through a recipe, for example stonecutting. Whatever the skill of the colonist who takes the job, one stone chunk is always processed to 20 stone bricks.

I see the efficiency stats that factored into output quantity were removed in the A9 definitions, so I guess this is an intended change at least on the crafting side. Bit of a pity, really - I think it was a good feature that encouraged you to specialise your colonists carefully, more so than just having skill affect the speed of doing the job.
#7
Yeah, it's this topic again.  ::)

In quite a few other games that support modding (e.g. Oblivion / Skyrim) you can change the textures of anything in the game simply by placing a suitable graphic file in the correct path.

Now I know Tynan responded to a similar question just a couple of months ago about this sort of thing -

Quote from: Tynan on November 10, 2014, 01:17:02 AM
Nothing I've done as of yet will make this use case easier. I'm afraid that if you want to change graphics, in the current system you do have to copy all the XML defs and change the graphics paths to your own. There's no specific way to mod graphics only.

Is it planned for graphics-only modding to be improved sometime in the future? Dare I ask if there's any ETA?

I know this is restating the obvious (sorry!) but the ideal way for any mod wanting to change the graphic(s) for a vanilla item would be to simply have a correctly named and pathed graphic within the mod's "Textures" folder, rather than redefining the entire XML.

As more and more mods are being released, compatiblity is becoming a bit of a nightmare and this change would help a lot. I know inter-mod compatibility isn't Tynan's problem, it's ours, but it can't hurt to ask I hope. :)
#8
Help / Categories inside thingdef CostList - possible?
January 22, 2015, 06:36:08 AM
I'm wondering if it's possible to create a building floor/terrain that can accept any flavour of stone block in its costlist, without having to edit or add definitions.

I know workbench recipes can accept categorydefs - in the above case I'd use "StoneBlocks" - but I can't seem to find if there's a similar method for CostLists.

(Sorry if this was asked already - did some searches and couldn't find anything.)

EDIT: For great clarity!
#9
As part of the rewrite of my mods for Alpha 7 I'm adding recipes that let colonists take non-military apparel (cowboy hats, shirts, tribalwear, etc.) and deconstruct them to get some of the fabric back.

Although I'm sure this would be possible with some DLL shenanigans, I wondered if it were possible for a pure XML tweak to allow the recipe to generate appropriate cloth based on the apparel's material - e.g. a cobraskin T-shirt should give some amount of cobraskin when disassembled.

Yay or nay? :)

Edit: Sorry, I should've posted this in the "Help" subforum - if a mod wants to move it, mucho gracias in advance!
#10
Ideas / "Strip corpse" order
August 11, 2014, 10:54:16 AM
In the late game when you have a lot of corpses hanging around the map it becomes a pain to micromanage one or several colonists to strip certain corpses (particularly raiders wearing power armour).

To solve this it would be nice to have an order that could mark corpses that you want your colonists to strip, similarly to how you mark rocks and slag for hauling.
#11
Ideas / Explosion size for electrical fault event
August 11, 2014, 04:59:07 AM
I'm not sure if this is already in the game since you don't often see the explosion first-hand when an electrical fault occurs.

The event I'm talking about is the event where all stored power in the colony batteries manages to short-circuit itself at one particular power-conducting point of your base, resulting in an explosion and fire.

If it doesn't already, it would be a nice touch if the size of this explosion took into account the amount of power involved, so you'd barely notice the bang if the batteries were nearly drained, but having a dozen or so charged batteries would result in an extremely dangerous 5 or 6 tile radius blast that could easily kill anyone nearby.
#12
A really small tweak but one that would make a huge usability difference.

Right now if you zoom in or out the screen zooms from the centre of whatever your view is looking at.

Please could this be changed, or an option added, for the zoom area to move the camera toward the cursor's location.
#13
Help / [Solved] Are custom sound events possible?
July 10, 2014, 10:31:37 AM
The page on the RW wiki about sound modding (this one) links to a list of event names that can be used to trigger sounds, but it says they are hard-code. Does that mean that there's currently no way to add a custom sound event?

For example, I have a building that I want to make a one-shot noise when certain conditions are met. Do I need a sound event or is there another way?

As always thanks for any help.
#14
Help / C# / DLL - Counting pawns
July 09, 2014, 10:36:50 AM
Like the subject says I am starting to experiement with C# and DLLs... fun stuff! After a tiny bit of success with the first simple thing I tried though, I've become stuck. :(

I'm trying to count the number of colonist pawns and the number of hostile pawns.

I've found the ListerPawns class which would seem to be capable of giving me the data, but I don't seem to be using it correctly because I get an error in-game. My code is doing this:

        private ListerPawns pawnCounter = new ListerPawns();
        private int numFriendlies;
        private int numHostiles;

        public override void TickRare()
        {
            base.TickRare();
            UpdatePawnCounts();
        }

        private void UpdatePawnCounts()
        {
            numFriendlies = pawnCounter.ColonistCount;
            numHostiles = pawnCounter.PawnsHostileToColony.Count();
        }

The error I am getting is KeyNotFoundException: The given key was not present in the dictionary.

It looks like I somehow need to manually add pawns into the list before I can count them. How would I do that? Or is there some global data that I can pull from instead?

Thanks in advance for any advice!
#15
I've tried to search to see if there were any plans or ideas to fix this but didn't come up with anything. Correct me if I'm wrong (I often am and I suck at checking my facts :P), but right now, there are situations for modders where...

* Example Mod A introduces a new industrial resource, neutronium ore
* Example Mod B introduces another new industrial resource, microbes
* Both mods redefine the vanilla IndustrialTrader TraderKind to make them deal in their new resources
* Depending on the mod load order, either mod A or mod B will lose out, and not have their goods stocked as desired

I know this can be fixed by defining new types of traders. In some cases it's appropriate but for the example above it isn't ideal - most added resources can fall under the heading of one of the existing trader types.

If all resource-adding mods created individual trading ships for their stuff, someone who has a selection of mods could double or maybe even triple the types of trader that could visit the colony. With so many different types of traders it becomes a lottery in getting one that is actually useful to you at any given time.

In the future it would be nice if the modding framework was a little more flexible - keep the current TraderKindDefs, but instead of hardcoding inventories there, move the relevant stock tags within each resource ThingDef (stone blocks used as an example with the suggested new tags at the end):

<ThingDef ParentName="ResourceBase">
<defName>StoneBlocks</defName>
<label>Stone blocks</label>
<description>For building structures.</description>
<texturePath>Things/Item/Resource/StoneBlocks</texturePath>
<soundInteract>Stone_Drop</soundInteract>
<soundDrop>Stone_Drop</soundDrop>
<basePrice>1.9</basePrice>
<useStandardHealth>false</useStandardHealth>
<storeCategories>
<li>ResourcesRaw</li>
</storeCategories>
<tradeDefs>
<stockedByTrader>IndustrialTrader</stockedByTrader>
<stockPriceModifier>Cheap</stockPriceModifier>
<stockAmountMin>100</stockAmountMin>
<stockAmountMax>200</stockAmountMax>
</tradeDefs>
</ThingDef>


The aim of this change would be to allow modders to "stack" new resources into an existing TraderKind without actually overwriting anything or causing conflicts as described above.

I know it's early days still and the data format is being tweaked in each new alpha, so it seems like a good point to suggest this.

Edit for clarity.
#16


Vanilla-friendly mods for a better RimWorld!
Current stable version 2.3.0 for RimWorld 1.0 to 1.3 - also supports Royalty & Ideology DLCs

New in v2.3.0
I know you've heard this before but this time it's real: the final update for T's Mods!

Added support for RimWorld 1.3. A fair bit of work happened in MoreFloors as I redrew all of the added stone floor textures to be as absolutely consistent as I could make them, firstly to the vanilla RimWorld visual theme and secondly to each other (by ensuring effect settings were identical). There was some further compatibility work done to support Alpha Biomes and RimNauts, along with tweaks to existing compatibility patches.

The new MoreFloors textures may not appeal to you, but the good news is the old textures are included within MoreFloors and you can swap back to them by following the instructions in the readme.txt.

All of my other mods are working just as they were in v2.2.0, so nothing else new to report.






[T] ExpandedCloth :: Tweaks the game's cotton and cloth system.
● Cotton plants yield raw cotton fibre. No more magical cloth directly from plants!
● A new research topic, cotton processing, will unlock the textile bench
● The textile bench must be used to produce cloth from raw cotton fibre
● Using MoreBedsCloth? Build padded sleeping spots as a stopgap until you have cloth for real beds

[T] ExpandedCrops :: Expands and refines the fruit and vegetables your colonists can grow.
● Three new crop types - tomatoes, lettuce, and carrots
● Two new meal types - salad requires lettuce and berries, and soup requires tomatoes, carrots, and potatoes
● New bulk cookery bills for cooks who are sufficiently skilled
● New kitchen cupboard that boosts the productivity of a nearby stove

[T] MiscStuff :: Things that don't fit anywhere else.
● One new wall type, the scrap metal wall - weak but cheap and fast to build
● Alert lamps that glow in various colours depending on colony threat (requires colored lighting research)
● Threat sensors to provide data to alert lamps - without one, they're useless

[T] MoreBeds :: Bored of plain beds? Indulge your inner decorator with new bed graphics and colours.
● Adds five new colour styles for normal, double, and royal beds
MoreBedsCloth changes all beds to require some cloth to build, while MoreBedsVanilla doesn't - use one, not both!

[T] MoreFloors :: You can never have too many styles of flooring!
● Adds six new styles of wooden flooring (plus straw floors for that barn feel)
● Adds eleven new styles of stone flooring in all five stone vanilla stone types
● Adds eight styles of chequered stone floor in various combinations
● Adds six new carpet colours - orange, yellow, turquoise, purple, black, and white
● Adds a new style of chequered carpeting in all colours
● Adds a new style of wool carpeting in all colours, requiring woven wool from the new loom workbench
● Adds plasteel and jade flooring perfect for end-game colonies
● Support for Cupro's Stones and Extra Stone

[T] RawCropThoughts :: Adjusts vanilla crops with added detail.
● All vanilla crop items now give specific colonist thoughts if they are eaten raw





Compatibility Notes
MoreFloors has integrated compatibility with Cupro's Stones, [K]Extra Stone, Kura's Extra Gems, Gemstones, CCP's Stone Tweaks, and CCP's Stone Tweaks Vanilla
MoreBeds has integrated compatibility with More Furniture, Vanilla Furniture Expanded, and Vanilla Furniture Expanded - Spacer Module

Optional Downloads
Jabbamonkey's HD Textures (for CoreCropTweaks, ExpandedCloth, and ExpandedCrops) - from this thread

Mods From Other Modders
Vegetable Garden by dismar - takes the idea of expanding the crops your colony can grow and runs with it into the far distance!
Architect Sense / Stuffed Floors by Fluffy - an excellent mod for keeping your architect menu tidy. It completely integrates all of the added flooring styles in MoreFloors with only one minor drawback of not having per-floor work-to-build, beauty, and materials required.
More Furniture by Anonemous2 - if you like giving your colonies a bit of character with extra decorations and... well... more furniture, this mod is definitely for you.


Source Code
Available on request! :)

Installation
IMPORTANT: Unless you're using a TMods patch designed for older versions, make sure you delete any old versions of TMods before extracting the new ones! Filenames may change between versions and other differences may be present. Overwriting an old installation will almost always cause errors.

To install TMods, simply unzip the mod's zip file into your RimWorld "Mods" subfolder, load RimWorld, then activate the parts you want to use by clicking the Mods button on the main menu and ticking the mods to enable.

License
You're welcome to do pretty much whatever you like with all of my mods, but you may not directly sell or lock behind a paywall anything that includes them (taking donations is fine, though). If you use some or all of T's Mods in your own mod or modpack, please credit me and include a link back to this forum post or the mod's RimWorld Nexus page. Thanks!

Credits
Some artwork in T's Mods may be based on existing sources - see credits.txt within each mod's About folder for links to sources. All such art is at least "free for non-commercial use" to the best of my knowledge.

Translators:
These folks have generously spent the time to create translations for T's Mods, either here or on the Steam Workshop. Thanks!
Latta
Raccoon
Candacis
TeiXeR
Proxyer
CANALETA
master_wu

Special mentions to:
Skullywag - for being an inexhaustible font of modding knowledge
Shinzy - for artwork
dismar - for polishing some of my patches
Helpful Bot - for suggesting a floor made from jade
You, the RimWorld community - for being generally awesome and supportive

Changelog
See the "T-readme.txt" included in the download for a history of changes.
#17
Really minor request, but pretty much as the topic says I am wondering if there is some way to change the ThoughtDef that gets triggered when a colonist eats raw meat.

I want it to be a custom "AteRawMeat" rather than the default "AteRawFood".

Is this possible somehow? I know that defs for meat are generated within the code for reasons Tynan explained here - just wanted to check if there was any workaround. :)
#18
Hi all, just today I started working on a simple "Agriculture" mod for my own amusement. The main thing I wanted to do was give the colonists a bit more variety in what they could grow and make meals from.

I understand the basics and have added a couple of new growable plants with their own graphics (tomatoe vines and lettuce). I even managed to tweak the MemoryThoughts to add more specific "raw veg" and "raw fruit" thoughts. But I'm wondering how to proceed...

What I was hoping to work toward having was this:

  • A "tree" category of growable which would probably take up a 2x2 tile space
  • A "grove" zone for growing trees normally (and slowly) outdoors
  • A second tier of Hydroponics research would unlock a new type of basin that let colonists grow trees faster
It would also be nice if I could gate the new "normal" crop types behind research, the logic being that crashing on an alien planet would need the colonists to learn how to adapt Earth-like crops to their new conditions. But I think I'm right in saying that new growables can't be set to researched in the current design?

If anyone could offer any advice on the technicalities of this then that would be great!