Opening an entity

Place to get help with not working mods / modding interface.
Post Reply
Lacni
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Jun 03, 2016 6:52 am
Contact:

Opening an entity

Post by Lacni »

Hi,
I'm making a mod in which i'm making a nuclear reactor. For now, I basicly copied the entity code of the steam generator. However, I want it to be openable like a furnace would be in order to add ingredients to it. I tried adding

Code: Select all

ingredient_count = 4
inside my file but it did not work. Is it because my entity is of type generator and generators can't be opened/have ingredients int them?

Thanks in advance!

User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: Opening an entity

Post by Adil »

Yes, it is.
Prototypes are basically hardcoded, and there are only a few undocumented combinations of parameters that are not represented in base game and yet are working.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.

Lacni
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Jun 03, 2016 6:52 am
Contact:

Re: Opening an entity

Post by Lacni »

Ok so is it possible to have it open or should I go a different path like using a assembling machine and making it produce electricity somehow?

User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 727
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Re: Opening an entity

Post by DRY411S »

Perhaps a boiler or a smelter entity might be usable? They both accept fuel.

There is also a diesel generator that produces electricity from oil, and the wind generator in the popular KS Power Mod

Lacni
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Jun 03, 2016 6:52 am
Contact:

Re: Opening an entity

Post by Lacni »

I thought about using a boiler since I mainly want my entity to accept fuel and water to produce electricity. The problem is that a boiler doesn't produce electricity. So I should I do this? I thought about placing an invisible steam generator on top of my entity to produce electricity when the right conditions are met. Would this way be usable?

PS. I also checked the KS Power mod but the diesel generator basically works like a steam generator (meaning it can't be opened). The windmill also can't be opened.

User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 727
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Re: Opening an entity

Post by DRY411S »

There is the burner generator in the KS Power mod too. You also find mods for both fusion and fission, producing power and ammo

I cannot offer advice on which may be suitable for your needs, I just know that they exist..

Lacni
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Jun 03, 2016 6:52 am
Contact:

Re: Opening an entity

Post by Lacni »

I looked at the burner generator and it seems like he iis doing it the way I mentioned earlier (meaning he places an invisible steam generator on top of is burner to produce the electricity).

So it seems I will try this out since it looks like the only doable way of doing it. Even though it seems a bit cheated :P

Thanks for the help everyone if you have any more tricks to make this work, feel free to let me know :D

Supercheese
Filter Inserter
Filter Inserter
Posts: 841
Joined: Mon Sep 14, 2015 7:40 am
Contact:

Re: Opening an entity

Post by Supercheese »

You could wait for 0.13; a new entity prototype is coming that will make implementing your idea much simpler.

Post Reply

Return to “Modding help”