Categories

Place to get help with not working mods / modding interface.
Post Reply
User avatar
Kyte
Inserter
Inserter
Posts: 23
Joined: Mon Apr 28, 2014 8:51 pm
Contact:

Categories

Post by Kyte »

I have a question about the categories.

I want to make a category for a boiler/fuel. Is that possible ?

The boiler should just accept one type of fuel. The item will have as a example have 100 mj possible energy but it just can get burned in that special boiler I created. But I dunno if there exist such a category or if I can create such categories.

Any Ideas? Would be great :3

Greetings Kyte :)
My awesome mod! Dustcraft! (At the moment Work in Progress)
This mod adds Uranium, Atomic Power, Radiation, new type of cars and more!
https://forums.factorio.com/forum/vie ... =32&t=3334

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: Categories

Post by FreeER »

Currently any boiler/furnace can use any item with a fuel value, you can not restrict it (AFAIK). You could however, make the boiler invisible and have no collison/selection box (so that they player can not access it directly) and instead have the player place a regular 'container' entity. You'd then use the control.lua to spawn your boiler (on top of the container) whenever a player placed the container and to check every second or so (game.tick%60 == 0 or game.tick%120 == 0) to see if it has the proper fuel in the container, if so it inserts it into the boiler and removes it from the container (make sure to check that it can be placed in the boiler, otherwise you'd be removing it from the chest and not putting it back when the boiler is full)...of course you'd really need two types of 'fuel' items if you only wanted it to work in your boiler (one without a fuel value that the players can craft, and one that has the actual fuel value, you'd remove the craftable one from the container and insert the one with the fuel value into the boiler)... I think that should work anyways :)

hm, I may not have done well with explaining that, let me know if I didn't :)

User avatar
Kyte
Inserter
Inserter
Posts: 23
Joined: Mon Apr 28, 2014 8:51 pm
Contact:

Re: Categories

Post by Kyte »

Soo I am making a atomic expansion to the game atm.
Everything works fine just my nuclear reactor accepts also coal XD

Soo if I understand correctly

--> I have an container with the look of the nuclear reactor which acts as the inventory of the "atomic boiler"
The control lua will create a "fuel using atom core" which is invisible ontop of the "atomic boiler".

And now the fuel system idea.

--> The control lua will control in a amount of time(tick) if there is fuel inside the container .
This fuel will have zero MJ so nobody can burn it but the description will say it have 100mj for the user which plays with it.
While the container checks it he will remove one of it and add a 100mj fuel rod to the invisible boiler.

and the control lua will repeat it :3


Do I understand it correctly? ^-^

Greetings Kyte
My awesome mod! Dustcraft! (At the moment Work in Progress)
This mod adds Uranium, Atomic Power, Radiation, new type of cars and more!
https://forums.factorio.com/forum/vie ... =32&t=3334

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: Categories

Post by FreeER »

Kyte wrote:Do I understand it correctly? ^-^
Yep!
just one possible note: If you assign an actual '0' fuel value I'm not sure how the game handles it (if it rejects it as fuel or if it would use it as fuel that simply provides 0 heat....), so if you meant that, I'd suggest not giving the craft-able 'fuel' any fuel value at all :)

User avatar
Kyte
Inserter
Inserter
Posts: 23
Joined: Mon Apr 28, 2014 8:51 pm
Contact:

Re: Categories

Post by Kyte »

No with my 0 MJ for fuel i just mean that there is a item which isnt actually fuel but is used to trigger the fuel event with the help of the control lua.(I just wanted to point out that that is the fuel item but for the container control event) ^^
(I wont write the code that the item has 0 mj XDDD that would be probably crash the game or waste items or whatever XDDDD
and it would be senseless because the it wouldnt make any sense. huh XD)

Thank you for your help :3

Greetings Kyte
My awesome mod! Dustcraft! (At the moment Work in Progress)
This mod adds Uranium, Atomic Power, Radiation, new type of cars and more!
https://forums.factorio.com/forum/vie ... =32&t=3334

Post Reply

Return to “Modding help”