[1.0] Pick a Color! (Update Dec. 26)

Started by mabor0shi, October 18, 2016, 05:18:43 PM

Previous topic - Next topic

Should there be any other changes in the special PaintBench version?

A small research requirement.
3 (15%)
Painting job should take time and give xp.
4 (20%)
Both of the above.
9 (45%)
Other (suggest via post in this thread).
0 (0%)
No other changes. Just add a bench.
2 (10%)
Don't want special bench. Sticking with Normal Version.
2 (10%)

Total Members Voted: 20

mabor0shi

[1.0] Pick a Color!

Along the left side of the picture are the plain (unpainted) materials. From the top: wood, granite, limestone, marble, sandstone, and slate. To the right of each, you can see the material in it's shade of each color after a colonist has colored it.

Description:
Adds bills to the stonecutting table that colonists can use to change the color of stone blocks by "painting" them 20 at a time & adds bills to the sculpting table for changing the color of wood logs by "painting" them 25 at a time. Colors can be removed the same way. New special version with seperate bench just for painting now available on NexusMods page! See next post for details.
Here's why: Things made by colonists (walls, sculptures, furniture, swords, etc.) are the same color as the stuff they are made from.
You want to build yet another dull, grayish-brown fortress/ compound/ shanty town/ cannibal village/ flakehead trailer park/ intergalactic hippie commune? Of course not. That was a stupid question. Nobody wants their colony to look just like every other dust and dirt colored colony. The goal of this mod is to add some colorful customization options to RimWorld in an unobtrusive way that doesn't affect balance(difficulty).

Details:
Changing stone/wood colors does not change ANY other stats and can be undone by an "unpaint" (or "strip paint" for wood) bill. Any mix of colors can go into a recipe and all come out as one color (including plain), as long as they're the same kind of material. Example: 5 plain marble + 5 blue marble + 3 black marble + 7 red marble = any color you want.
Painting takes almost no time, gives almost no XP, and requires no skill level. However, painting stone is a crafting job and painting wood is an art job, so only colonists capable of either job type can do either job.
The different stone types come out slightly different shades of whatever color they are painted. Marble will be lighter, Slate darker, Limestone has a greenish tint, etc. Wood is somewhere between Marble and Slate in brightness. See demo pic.
This mod changes wood logs and stone blocks to make them look better & have 3 levels of appearance (single, stack, & full stack all look different) instead of 2 levels for wood and 1 for stone. There is a version without this feature at the NexusMods link.
Except for flooring (unless you have Fluffy's Mods mentioned below) & a few "building" items, colored stuff can be used to make anything ordinary stuff can. Painted wood can be used as fuel.
The PaintBench version has all the painting bills on a new bench instead of on pre-existing benches. More info in the next post down.
There is a pair of mods that, together, allow you to make floors out of the colored blocks & logs. They are called StuffedFloors & ArchitectSense. They can be downloaded from Fluffy's Mods page. THIS IS A LINK TO IT. Thanks Fluffy!


Request: I want to see how people use Pick a Color! If you made a colony while using this mod, take a screenshot and post it here in this thread. Be proud, show everyone!


Modteam: Mabor0shi
Inspiration:Extended Woodworking by ItchyFlea
Special Thanks:kaptain_kavern & zlj

Disclaimer:Pick a Color works fine with existing saves. a]This mod adds several new items and bills, but all it changes are 1)the labels of the plain wood & plain stone blocks 2)the textures of wood logs & stone blocks. It will interfere with any mod that also changes these. b]Uninstalling this mod will have no effect on anything except colored stuff and things made from it. Rid your colony of that crap before you deactivate/remove this mod, or it will get ugly. Literally.

License
Do whatever you want with this mod other than directly copying it and telling people you made it yourself. Please let me know if you do incorporate it into a larger mod or modpack. Doesn't even have to be beforehand. Soon after would be alright. And mention my name wherever appropriate. For my ego.
Cool Mod, Bro Everything in RimWorld doesn't have to be either brown or grey anymore: Now you can Pick a Color!

mabor0shi

#1
Information on PaintBench version: This version adds a new workbench to the game. All painting jobs are done on this bench. It takes the same space/resources/time to make as a hand tailoring bench. That affects the balance of the game, making it slightly harder. This is because, instead of using benches you would already have anyway, you have to invest in this other workbench and find a place to put it. Remember, changing the color of blocks and logs doesn't change anything else about them or the things made out of them. It doesn't make them any better. It just makes them easier to look at for dozens of hours while you play with your colony. That being said, a cheap workbench is a small price to pay. Here's what the bench looks like in a variety of colors and rotated at different angles:
Get it from the NexusMods page.


Changelog
v1.0 (12/26/18)
updated   Just a compatibility update.


v1.19.53 (11/01/18)
updated   Full Beta 19 compatibility.

v1.18.52 (01/29/18)
updated   i   fully compatible with B18
changed  i    no more "staining". colonists now "paint" stone, same as wood, because it simplifies some things to just use that one word.
new         i   released v1.18.52pb (special version with paint bench)
fixed            gave marble <tradeability>Sellable</tradeability> like the other stone types.
unimportant for streamlining, removed <jobString> from each wood recipe, added to abstract parent instead.


v1.17.5 (06/02/17)
updated   proper xpathing has made mod incompatibility chance almost 0%
improved Painted wood now works as fuel for anything regular wood does, including stove and smithy.

v1.17.4 (05/31/17)
updated   Full Alpha 17 compatibility.
v1.16.4 (01/15/17)
fixed      No colored blocks & wood in traders' inventories or random resource pod drops.
             Reset <commonality>.

v1.16.3 (01/01/17)
updated  Full Alpha 16 compatibility.
v1.15.3 (11/11/16)
added  i   Wood!
              New triple-stack textures for wood and stone.
improved Any 25 pieces of wood or 20 blocks of the same stone type can be used for recipes, regardless of color: So any mix of colors (5 plain + 6 blue + 3 black + 7 red, etc.) can go into a recipe and all come out as one color.
changed  Increased color difference between the different materials, made some material/color combos better looking.
reverted  No more carved stone floor tiles. They were not up to my standards of quality. Them not being "terrain" meant the real terrain's beauty and walk speed came through. Fixin' impossible.
              Returned beauty modifiers to stone-types. Removing them skewed balance. Things will once again be more or less beautiful depending on what kind of stone they are made from, just like in the unmodified game.

v1.15.2 (10/20/16)
fixed        Floor tile now takes 18 work to make.
               Floor tile now has proper beauty rating of 3.
               Floor tile construction looks/sounds like vanilla tile construction.
added      Orange blocks! Happy Halloween!

v1.15.1 (10/18/16)
First Version
Cool Mod, Bro Everything in RimWorld doesn't have to be either brown or grey anymore: Now you can Pick a Color!

kaptain_kavern

 8) Neat
Congratulation on your ?first? release buddy.

I'm gonna build a disco-colored-colony I think  :D

SteelRev

So why is carved stone not a flooring?

EldVarg

Because you can't set different colors/materials on a floor. It has to have a big texture (and taking up a slot in build list) for each type.

mabor0shi

Quote from: EldVarg on October 19, 2016, 12:40:35 AM
Because you can't set different colors/materials on a floor. It has to have a big texture (and taking up a slot in build list) for each type.
Not sure why you can only make floors out of one set of ingredients, but that's how the XML is set up. I wish I could ask why. Either way, when it comes to XML, modders can only do as much as Ludeon allows us to. I tried some ways around it, no go. Maybe someone who reads this can tell me a secret.
Cool Mod, Bro Everything in RimWorld doesn't have to be either brown or grey anymore: Now you can Pick a Color!

Dingo

#6
You sure about that? You can do stuffCategories with TerrainDefs. I may have to test it to see if you're right on that one.

EDIT: It seems that stuffCategories doesn't work on TerrainDef even though it inherits from the BuildableDef abstract. That's odd. My best guess is it's because it doesn't use a class so it doesn't satisfy MadeFromStuff.

While testing my theory I also noticed that walls will spawn with random colours when you generate a new map. This is because walls take their properties from whatever material they're using, and since your coloured blocks are all within <li>Stony</li> you get this result:



Whether or not that's desired I leave up to you. :P

mabor0shi

#7
Thanks Dingo. I wasn't thorough enough in my testing, it seems. I just fixed another bug. I'm still obsessing over <coversFloor>true</coversFloor> working for walls, vents, and coolers but not my tiles. I'll fine tune it a bit more and release an update tomorrow. It's midnight in my time zone.
Cool Mod, Bro Everything in RimWorld doesn't have to be either brown or grey anymore: Now you can Pick a Color!

Dingo

Try <CoexistsWithFloors>true</CoexistsWithFloors>, though I did not test it.

mabor0shi

#9
Quote from: Dingo on October 19, 2016, 02:51:28 AM
Try <CoexistsWithFloors>true</CoexistsWithFloors>, though I did not test it.
I tested it, its not for <ThingDefs>.
Quote from: Dingo on October 19, 2016, 01:26:09 AM
While testing my theory I also noticed that walls will spawn with random colours when you generate a new map. This is because walls take their properties from whatever material they're using, and since your coloured blocks are all within <li>Stony</li> you get this result:
I should be able to solve this by figuring out why walls don't spawn made out of jade. Tomorrow.

edit: No luck. I found that ItchyFlea's Woodworking will cause maps to generate with the "New Woodtypes", but never with "Painted Wood". So, it's not <li>stony</i> that causes this. Examining the XML + trial & error has gotten me nowhere on this or on tiles not covering the floor whereas coolers do.
Cool Mod, Bro Everything in RimWorld doesn't have to be either brown or grey anymore: Now you can Pick a Color!

mabor0shi

#10
It IS <coversFloor> that allows 'buildings' to cover floors, but it needs to also have <fillPercent> set to 1 (can't even be .99) or it does nothing. Why someone decided the two must be linked is beyond my ability to imagine. <fillPercent> determines cover effectiveness, so that "fix" made my tiles give 100% cover :-[ I noted 2 more minor issues in this last round of testing; I will be working on those. fixed
Cool Mod, Bro Everything in RimWorld doesn't have to be either brown or grey anymore: Now you can Pick a Color!

Dingo

It kinda makes sense because you don't even need fillPercent for flooring. It might as well be 1 (if that's the default). It doesn't COMPLETELY make sense though as it might as well by anything, too.

mabor0shi

Quote from: Dingo on October 20, 2016, 03:43:09 AM
It kinda makes sense because you don't even need fillPercent for flooring. It might as well be 1 (if that's the default). It doesn't COMPLETELY make sense though as it might as well by anything, too.
You misunderstand me. I was saying in order for <coversfloor> to function, the field <fillPercent> has to be there & has to be set to 1. A building cannot cover a floor unless it can 100% cover a pawn from gunfire. My question was, why make the two fields codependent? It seems like an arbitrary limitation. Why not set up the code so that you can't have <coversfloor> without <holdsroof>? That is a sarcastic, rhetorical question. Do you feel me now?
Cool Mod, Bro Everything in RimWorld doesn't have to be either brown or grey anymore: Now you can Pick a Color!

Dingo

#13
I did understand. I was talking in general, but it doesn't really matter. I should've phrased it differently - you shouldn't need to control what fillPercent is for floors because floors don't offer cover. The interaction itself is still weird.

It MIGHT have something to do with FillCategory, from the ThingDef assembly:

public FillCategory Fillage
{
get
{
if (this.fillPercent < 0.01f)
{
return FillCategory.None;
}
if (this.fillPercent > 0.99f)
{
return FillCategory.Full;
}
return FillCategory.Partial;
}
}

mabor0shi

Quote from: Dingo on October 20, 2016, 04:48:29 PM
I did understand. I was talking in general, but it doesn't really matter. I should've phrased it differently - you shouldn't need to control what fillPercent is for floors because floors don't offer cover. The interaction itself is still weird.

It MIGHT have something to do with FillCategory, from the ThingDef assembly:

public FillCategory Fillage
{
get
{
if (this.fillPercent < 0.01f)
{
return FillCategory.None;
}
if (this.fillPercent > 0.99f)
{
return FillCategory.Full;
}
return FillCategory.Partial;
}
}

I'm still not sure we r on the same page about fillPercent. I know "you shouldn't need to control what fillPercent is for floors",but if you want a building to function as a floor, you do need to control it's <fillPercent> or it won't <coverTheDamnedFloor!> Do you honestly believe I don't know that "floors don't offer cover"? I'm looking at one now, right between my feet. I'm not under the impression I could hide behind it, Dingo :P In vanilla all floors are terrain and therefore fillPercent and coversFloor are invalid for them anyway. It was only the reasoning behind making "the interaction" ( i.e. why did Tynan or whoever decide to impose that?) that I find baffling, so I think we are in agreement. That being said, thank u kindly for the bit of code :) It has shown me that I must learn how to make assemblies to overcome the limitations of XML. I appreciate that you took the time to look into that for me, buddy.
Cool Mod, Bro Everything in RimWorld doesn't have to be either brown or grey anymore: Now you can Pick a Color!