Ludeon Forums

Ludeon Forums

  • September 23, 2019, 02:47:20 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3 ... 8

Author Topic: [A12d] Community Core Library (v0.12.3b)  (Read 108987 times)

1000101

  • Planetologist
  • ****
  • Posts: 1344
  • RimFortress Builder
    • View Profile
[A12d] Community Core Library (v0.12.3b)
« on: June 29, 2015, 04:18:48 PM »



This is the old forum thread, please redirect yourself to the new thread here.
« Last Edit: October 20, 2015, 12:23:37 PM by 1000101 »
Logged
(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

skullywag

  • Global Moderator
  • Transcendent
  • ****
  • Posts: 5857
  • Engineer
    • View Profile
Re: [A11] Community Core Library (v0.11.0)
« Reply #1 on: June 29, 2015, 04:20:49 PM »

you got the coloured light thing working....gimee nomnomnom...
Logged
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

1000101

  • Planetologist
  • ****
  • Posts: 1344
  • RimFortress Builder
    • View Profile
Re: [A11] Community Core Library (v0.11.0)
« Reply #2 on: June 29, 2015, 04:25:13 PM »

:)

Just add CCLs ThingComp to your lights.  It will mean your mod now depends on CCL, but that is the point of CCL.  :)
Logged
(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

Loki88

  • Colonist
  • ***
  • Posts: 512
  • Evil Muffalo
    • View Profile
Re: [A11] Community Core Library (v0.11.0)
« Reply #3 on: June 29, 2015, 04:58:20 PM »

This changes EVERYTHING! Now to get my brain to figure out how to use it... *notices smoke coming from ears*
Logged

skyarkhangel

  • Colonist
  • ***
  • Posts: 650
  • Skynet machine
    • View Profile
Re: [A11] Community Core Library (v0.11.0)
« Reply #4 on: June 29, 2015, 06:01:15 PM »

Low Idle Power (ThingComp) - Allows tables which shouldn't use power when not in use to draw less.

wow.. big thanks especially for it!


1000101, can you make with this.. Placement restrictions (PlaceWorkers) "Only on smoothed floor?
« Last Edit: June 29, 2015, 06:09:18 PM by skyarkhangel »
Logged

1000101

  • Planetologist
  • ****
  • Posts: 1344
  • RimFortress Builder
    • View Profile
Re: [A11] Community Core Library (v0.11.0)
« Reply #5 on: June 29, 2015, 07:01:38 PM »

Quote from: skyarkhangel
Low Idle Power (ThingComp) - Allows tables which shouldn't use power when not in use to draw less.

wow.. big thanks especially for it!
Yeah, it bothered me when my colonists would go to bed and leave the stove on.  :\

Quote from: skyarkhangel
1000101, can you make with this.. Placement restrictions (PlaceWorkers) "Only on smoothed floor?
It's possible, I'll look into it.  Thanks for the suggestion, always looking to improve on this and add functionality which will help everyone.
Logged
(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

skyarkhangel

  • Colonist
  • ***
  • Posts: 650
  • Skynet machine
    • View Profile
Re: [A11] Community Core Library (v0.11.0)
« Reply #6 on: June 29, 2015, 07:10:12 PM »

Quote from: skyarkhangel
Low Idle Power (ThingComp) - Allows tables which shouldn't use power when not in use to draw less.

wow.. big thanks especially for it!
Yeah, it bothered me when my colonists would go to bed and leave the stove on.  :\

Quote from: skyarkhangel
1000101, can you make with this.. Placement restrictions (PlaceWorkers) "Only on smoothed floor?
It's possible, I'll look into it.  Thanks for the suggestion, always looking to improve on this and add functionality which will help everyone.

And that class could works with terraindefs too..? Eg.. Needs to smooth floor before build woodenfloor or other floors.
« Last Edit: June 29, 2015, 08:05:52 PM by skyarkhangel »
Logged

1000101

  • Planetologist
  • ****
  • Posts: 1344
  • RimFortress Builder
    • View Profile
Re: [A11] Community Core Library (v0.11.0)
« Reply #7 on: June 29, 2015, 08:33:14 PM »

While I can probably get a place worker restriction for smooth floors, I'm not sure I would put it in CCL that flooring requires floors to be smoothed first.  That part sounds like it would be good for a separate mod though.  I don't want to "inflict" too much on the user with the core of CCL, that's where other mods come in which make use of CCLs available resources.

In the full source download for CCL is an example of a refrigerated meal shelf.  I didn't put this into the main user download as I'm not aiming on adding directly to RimWorld content with CCL but provide tools for modders not to have to re-invent the wheel all the time.  What is modded in CCL from the vanilla is only the core assets which would make sense to use the new functionality (such as production tables and auto-doors using CompPowerLowIdleDraw and the lamps being resolved into a single entity using CompColoredLight).
« Last Edit: June 29, 2015, 08:38:25 PM by 1000101 »
Logged
(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

Loki88

  • Colonist
  • ***
  • Posts: 512
  • Evil Muffalo
    • View Profile
Re: [A11] Community Core Library (v0.11.0)
« Reply #8 on: June 29, 2015, 08:49:55 PM »

Is the <CompColoredLight> limited to the standard red green and blue of vanilla or is it possible to define your own custom colours within the mod using this tag? Ie, if I were to make a version of my LED rope lights mod to use this can I implement it to use the gold and violet colours I currently have?
Logged

1000101

  • Planetologist
  • ****
  • Posts: 1344
  • RimFortress Builder
    • View Profile
Re: [A11] Community Core Library (v0.11.0)
« Reply #9 on: June 29, 2015, 09:22:02 PM »

CompColoredLight has it's own set of colors defined but you can define your own.  If you don't define your own it uses the predefined colors.  CompProperties_ColoredLight.cs is the colored light properties.

Default colors:
Code: [Select]
white, ( 217, 217, 217,   0 )
red, ( 217,   0,   0,   0 )
green, (   0, 217,   0,   0 )
blue, (   0,   0, 217,   0 )
yellow, ( 217, 217,  43,   0 )
orange, ( 255, 132,   0,   0 )
purple, ( 185,  61, 205,   0 )

How to define a light with only two custom colors:
Code: [Select]
<li Class="CommunityCoreLibrary.CompProperties_ColoredLight">
<compClass>CommunityCoreLibrary.CompColoredLight</compClass>
<color>
<li>
<name>white</name>
<value>( 255, 255, 255, 0 )</value>
</li>
<li>
<name>pukey pink</name>
<value>( 255, 0, 255, 0 )</value>
</li>
</color>
</li>

You can use <Default> (default 0) in the comp to specify the default color index.  You can also specify the research required to change color using <requiredResearch> (default "ColoredLights").

Don't forget you still need a CompGlower to define the radius and a CompPowerTrader.  If people demand it, the requirement for CompPowerTrader can become optional.
« Last Edit: June 29, 2015, 09:33:34 PM by 1000101 »
Logged
(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

Loki88

  • Colonist
  • ***
  • Posts: 512
  • Evil Muffalo
    • View Profile
Re: [A11] Community Core Library (v0.11.0)
« Reply #10 on: June 29, 2015, 10:17:44 PM »

CompColoredLight has it's own set of colors defined but you can define your own.  If you don't define your own it uses the predefined colors.  CompProperties_ColoredLight.cs is the colored light properties.

Default colors:
Code: [Select]
white, ( 217, 217, 217,   0 )
red, ( 217,   0,   0,   0 )
green, (   0, 217,   0,   0 )
blue, (   0,   0, 217,   0 )
yellow, ( 217, 217,  43,   0 )
orange, ( 255, 132,   0,   0 )
purple, ( 185,  61, 205,   0 )

How to define a light with only two custom colors:
Code: [Select]
<li Class="CommunityCoreLibrary.CompProperties_ColoredLight">
<compClass>CommunityCoreLibrary.CompColoredLight</compClass>
<color>
<li>
<name>white</name>
<value>( 255, 255, 255, 0 )</value>
</li>
<li>
<name>pukey pink</name>
<value>( 255, 0, 255, 0 )</value>
</li>
</color>
</li>

You can use <Default> (default 0) in the comp to specify the default color index.  You can also specify the research required to change color using <requiredResearch> (default "ColoredLights").

Don't forget you still need a CompGlower to define the radius and a CompPowerTrader.  If people demand it, the requirement for CompPowerTrader can become optional.

Thank you very much for your explanation! All I could think of with removing power trader is technicolor camp fires and tiki torches  :P
Logged

mrofa

  • Planetologist
  • ****
  • Posts: 1666
  • Squirrel Hunter
    • View Profile
Re: [A11] Community Core Library (v0.11.0)
« Reply #11 on: June 30, 2015, 09:47:15 AM »

That is awsome thanks alot 1000101!
And that wall attachment damn i was just thinkering on it :D
Logged
All i do is clutter all around.

sky

  • Muffalo
  • *
  • Posts: 3
  • Refugee
    • View Profile
Re: [A11] Community Core Library (v0.11.0)
« Reply #12 on: June 30, 2015, 11:47:31 AM »

That should be included in Core. Would help a lot. ;)
Logged

mipen

  • Colonist
  • ***
  • Posts: 545
  • {0} has gained the infirm trait!
    • View Profile
Re: [A11] Community Core Library (v0.11.0)
« Reply #13 on: July 01, 2015, 02:06:09 AM »

How on earth did I gloss over this...? This is amazing! :P I'm definitely going to add this as a reference for MD2. Does the CompPowerTrader in this override the core one, or do you need to explicitly use it in the defs? And if so, is this done by CCL?

Also, another idea for a place worker would be to have one the limits the number of buildings of a type that can be built. If its possible, you could have that number defined in a def.

Anyways, some great work here :D
Logged

1000101

  • Planetologist
  • ****
  • Posts: 1344
  • RimFortress Builder
    • View Profile
Re: [A11] Community Core Library (v0.11.0)
« Reply #14 on: July 01, 2015, 02:32:21 AM »

@mipen:

The core of CCL overrides the vanilla tables, you can take a look at those defs for a basic reference.

The low idle draw comp relies on there being a power trader and if the building also has a glower it will turn it off when going into low power mode.
Logged
(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
Pages: [1] 2 3 ... 8