[A12d] Community Core Library (v0.12.3b)

Started by 1000101, June 29, 2015, 04:18:48 PM

Previous topic - Next topic

Leucetius

#15
Very nice! Thank you - I already have some use for it. Everything practicable has lowPower Module and I'm building something fancy ;)

edit: aaaand I hit a wall which I can't circumvent without additions and modifications. Time to register with github :/


edit2: and bug report. As can be seen on the attached screenshot...
- powerUsage = -0.01
- glowOn = True
- curUser = null

Owens is smelting sand to glas for free right now...
Most likely connected: glowOn stays true even after the 500 ticks (always)

edit3: (I should go to bed) found it. You added a default tickerType Normal to every production building. Which a) makes sense (how would the prod-table know that there is someone working at it, if it weren't ticking) but b) may lead to unneccessary lag in late game because of all the ticking. Changed that at my end - only the powered tables ticking now. But that's a xml thing and can be done to everybodys liking by themselves.

1000101

#16
Although it uses a normal ticker, they don't do their checks every tick and I've tried to short-circuit everything I could to run less code.

The checks are only done on very few ticks.  Doors check every 30 ticks while in low power mode and not again until they have time to fully open and close (which is anywhere between 30-400 ticks depending on the stuff used for the door), work tables go 500 ticks between any checks when in full power mode, etc.

I've tried to keep things like that down so it doesn't lag.
(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

mrofa

#17
How to use this place workers in xml or if the even got the xml hooks?
All i do is clutter all around.

1000101

Download the source package and look into "Modders Resource."

It contains examples of things not covered in the core changes.
(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

mrofa

I figure it out, there was no example for place workers.
But i got kinda a problem thrugh im not sure if its a bug or intended, WallAttachment is this intended to build only next to walls and not on walls ?
All i do is clutter all around.

kaptain_kavern

For building on wall i think it's like that :
<canPlaceOverWall>true</canPlaceOverWall>

1000101

#21
@mrofa, PlaceWorker Examples

Yeah WallAttachment is for things which attach to the side of a wall.  For things which go into walls, I have a new place worker for the next release which can handle that by specifying what ThingDefs it can (or can not) be placed on.

@kaptain_kavern,

As long as your building isn't an edifice (isEdifice is false), you can build it on a wall (or any other building). canPlaceOverWall is for replacing the wall with your new ThingDef such as doors.
(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

mrofa

#22
Quote from: 1000101 on July 05, 2015, 02:27:35 PM
@mrofa, PlaceWorker Examples

Yeah WallAttachment is for things which attach to the side of a wall.  For things which go into walls, I have a new place worker for the next release which can handle that by specifying what ThingDefs it can (or can not) be placed on.

@kaptain_kavern,

As long as your building isn't an edifice (isEdifice is false), you can build it on a wall (or any other building).

Thanks mate, im just actually writing one for walls,but when ccl is up gona switch to yours since it will most likley look more sane then my current :D

Edit: also when i use place worker it seems that the interaction cells dont get thier checks so you might consider that :P
All i do is clutter all around.

1000101

Quote from: mrofaEdit: also when i use place worker it seems that the interaction cells dont get thier checks so you might consider that :P

feature?   :o

I'll see if I notice anything strange with interaction cells 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

Thx for sharing the knowledge ;)
BTW is there a Wiki page or another resource with all (or some) tags explained?

1000101

#25
Not at the moment.

I did do a doxygen on an earlier revision of the sources, but it was outdated and unless you are a coder, doxy files can be hard to follow.

There are some resources which are secondary (download the source version) which demonstrate some of the things not included directly into anything in the core mod.  ie, nothing from the core mod was updated to use placement restrictions but there is a "modders resource" showing how to use them.

Edit:

As of v0.11.3 the GeothermalGenerator now uses PlaceWorker_OnlyOnThing.
(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

hopeseekr

So this was never released for A10? :-/ This might be a good enough reason for me to upgrade. For some reason, I am horribly, terribly afraid of Sappers.

1000101

v0.11.2 Update

Update includes:

More PlaceWorker restrictions (by request),

On the surface:
Lights can share color information with handy gizmos,
Hydroponics can share growing information with handy gizmos

In the deep:
Lots of useful functionality added for modders looking to write C# code directly using CCL.  Open up the sources and have a look.

Modders references shows a fairly complete set of basic xml-only type things you can do.  At least, from the "how it works" perspective.  It's only otherwise limited by your ability to use these basic building blocks.
(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

mrofa

Amazing stuff mate :D

I got a small problem thrugh, did some testing with WallAttachment place worker, as it turns out it will use many other buildings as support, like heaters or chairs
All i do is clutter all around.

1000101

Yeah, it's more of an "isEdifice" attachment.  I'll look into what I can do about that for more clarity, etc.

I really don't like the idea of looking at specific def[names] for matches unless the modder can specify the list of defs.
(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