Page 1 of 1

some questions for the modder here

Posted: Wed Nov 21, 2018 10:41 am
by nosports
Hello,

as i try to do some modding i have a few questions (asking them before trying in vain, because it don't is possible)

* can a inserter generated, with a hard wired filter ?
* can belts be made using/giving electricity ?
* is it possible to have a secund rail-system (i have seen a categroy rail in the main-data, but did not find anything relating to trains?)

So if anyone knows something on this topics .....

Re: some questions for the modder here

Posted: Wed Nov 21, 2018 11:21 am
by eradicator
@inserter filter:
No, but could be done with heavy scripting.
@belts:
No. Use forum search. Some people spam invisible electric poles, but that's known to be bad for performance.
@rails:
No. Use forum search. Moddability removed in 0.15 or 0.16.

Re: some questions for the modder here

Posted: Wed Nov 21, 2018 1:19 pm
by nosports
thanks for the fast answer..
Unfortunately an outcome which i feared ;)

as i want to generate elecric-power maybe :

Is it possible to make a steam-engine or a steam-turbine to output (like in these both cases water)

Re: some questions for the modder here

Posted: Wed Nov 21, 2018 1:55 pm
by eradicator
Nope. There was a recent thread about just that too.

Re: some questions for the modder here

Posted: Thu Nov 22, 2018 9:47 am
by bobingabout
the ability to change the energy_source of locomotives was removed in a recent previous version, maybe 0.15 (fairly sure it was the same update that introduced nuclear), it was buggy before that anyway, and didn't actually work.

Looking at it from a source code perspective, the main issue is that the locomotive has to move, and if the entity moves, it might not be in a pole's area anymore, so it needs to re scan. This scanning is "CPU Expensive", so is only done when it needs to be, usually when you place the entity, or when you place/remove a pole near it.

Alternate sugestions have been that the rail itself could carry the power, but again, from the source perspective, that would introduce too much "overhead" because you then have to carry more information in the rail itself, and the devs believe that would be too much infromation.

The final alternative we're left with is faking it with scripts. it is possible to make some kind of locomotive that can't actually accept fuel items, but then a fake item can give it energy (not actually used as an item, just set the "currently burning"), and increase that in your locomotive as some "Electric energy interface" removes it from your electric grid. Basically, wireless power, via scripting. though you could be creative and have it linked to the rails somehow.


Either way, Scripting in this way is slow and can reduce performance in the game unless you do it right, but, the whole "Entity monitoring scripts" is one of the things bob's mods doesn't do, which is why I haven't done it myself.

Re: some questions for the modder here

Posted: Thu Nov 22, 2018 11:43 am
by eradicator
bobingabout wrote:
Thu Nov 22, 2018 9:47 am
the ability to change the energy_source of locomotives was removed in a recent previous version, maybe 0.15 (fairly sure it was the same update that introduced nuclear), it was buggy before that anyway, and didn't actually work.
Did you accidentially post in the wrong topic? OP here asked about rail-category, not energy_source. Though while you're here...does that mean trains are incompatible with the new "void/null" energy? :/

Re: some questions for the modder here

Posted: Thu Nov 22, 2018 11:46 am
by Bilka
eradicator wrote:
Thu Nov 22, 2018 11:43 am
does that mean trains are incompatible with the new "void/null" energy? :/
No. They accept burner/void, same as cars and some other things I'm too lazy to look up right now.

Re: some questions for the modder here

Posted: Thu Nov 22, 2018 11:59 am
by eradicator
Bilka wrote:
Thu Nov 22, 2018 11:46 am
eradicator wrote:
Thu Nov 22, 2018 11:43 am
does that mean trains are incompatible with the new "void/null" energy? :/
No. They accept burner/void, same as cars and some other things I'm too lazy to look up right now.
Good to know. As long as everything is voidable i'm fine with it :D
Back to topic...

Re: some questions for the modder here

Posted: Thu Nov 22, 2018 12:28 pm
by bobingabout
eradicator wrote:
Thu Nov 22, 2018 11:43 am
bobingabout wrote:
Thu Nov 22, 2018 9:47 am
the ability to change the energy_source of locomotives was removed in a recent previous version, maybe 0.15 (fairly sure it was the same update that introduced nuclear), it was buggy before that anyway, and didn't actually work.
Did you accidentially post in the wrong topic? OP here asked about rail-category, not energy_source. Though while you're here...does that mean trains are incompatible with the new "void/null" energy? :/
nosports wrote:
Wed Nov 21, 2018 1:19 pm
thanks for the fast answer..
Unfortunately an outcome which i feared ;)

as i want to generate elecric-power maybe :

Is it possible to make a steam-engine or a steam-turbine to output (like in these both cases water)
Not wrong topic.

Also, I wasn't thinking about void, I was looking at it from a 0.16 perspective where void doesn't exist yet.