Search found 11 matches

by LuxArdens
Tue Sep 26, 2023 5:48 pm
Forum: Modding help
Topic: Adding the continuous burning property to a building?
Replies: 9
Views: 886

Re: Adding the continuous burning property to a building?

You don't have too much code yet, so I'd say keep everything in control.lua. Once that is growing too long it may make sense to restructure things and put functions that belong together into different files Alright cheers. It's probably going to take me some time to integrate some of these tips but...
by LuxArdens
Mon Sep 25, 2023 1:04 pm
Forum: Modding help
Topic: Adding the continuous burning property to a building?
Replies: 9
Views: 886

Re: Adding the continuous burning property to a building?

There are more events you should listen to! They are raised with different arguments, so you must adjust the values. About your function: You should make sure that housing and reactor are on the same surface (which is not guaranteed to be game.surfaces[1] as mods like Factorissimo or SE will create...
by LuxArdens
Sun Sep 24, 2023 9:37 pm
Forum: Modding help
Topic: Adding the continuous burning property to a building?
Replies: 9
Views: 886

Re: Adding the continuous burning property to a building?

Update 2: I figured it out! It's probably a disgusting piece of code, it will probably kill the UPS, but it works! God, I'm so happy, I love life and from now on I love Lua as well. -- call script.onevent, tell it we want to do something when an entity is built, and give another anonymous function t...
by LuxArdens
Sun Sep 24, 2023 7:37 pm
Forum: Modding help
Topic: Adding the continuous burning property to a building?
Replies: 9
Views: 886

Re: Adding the continuous burning property to a building?

Okay update: I see now the usual invisible entity contraption is the only solution. So far I've got this after repairing some insanely broken code I found elsewhere on the forum: -- call script.onevent, tell it we want to do something when an entity is built, and give another anonymous function that...
by LuxArdens
Sat Sep 23, 2023 10:21 pm
Forum: Modding help
Topic: Adding the continuous burning property to a building?
Replies: 9
Views: 886

Adding the continuous burning property to a building?

Hi, I'm trying to make a type of building for my mod that requires and consumes a certain "fuel" constantly to keep a bar from depleting, regardless of whether it is actually working on a recipe at that moment or not. I thought before that this would be pretty easy since the nuclear reacto...
by LuxArdens
Wed Dec 04, 2019 7:27 pm
Forum: PyMods
Topic: pY HighTech Discussion
Replies: 790
Views: 242850

Re: pY HighTech Discussion

Hey Pyanodon, Really love your mod; I recently started my third run with it. I also like the balancing that's happened since 0.16, it makes the mod a whole lot more UPS-friendly :D I did notice that electronic components now require their predecessor, like resistor 2 requires resistor 1 in the recip...
by LuxArdens
Sat Nov 16, 2019 3:52 pm
Forum: Modding help
Topic: Feasibility of limiting # of a certain item in game?
Replies: 10
Views: 2917

Re: Feasibility of limiting # of a certain item in game?

I made a working prototype of this mod that procedurally parses the technology tree to generate energy tokens based on science packs. credit to LuxArdens for the idea. https://mods.factorio.com/mod/scientorio Though i suspect you have other ideas about how such tokens should be managed. Procedural ...
by LuxArdens
Thu Nov 14, 2019 2:12 pm
Forum: Modding help
Topic: Feasibility of limiting # of a certain item in game?
Replies: 10
Views: 2917

Re: Feasibility of limiting # of a certain item in game?

Problem is that over time you will loose obsidian bricks. For example buildings get destroyed by aliens. Does that destroy the brick? Or does it drop the brick as loot? Worse: When the user changes a recipe in an assembler the running recipe is lost destroying one obsidian brick. I don't think ther...
by LuxArdens
Thu Nov 14, 2019 1:27 pm
Forum: Modding help
Topic: Feasibility of limiting # of a certain item in game?
Replies: 10
Views: 2917

Re: Feasibility of limiting # of a certain item in game?

Yeah sounds like those houses can just be chests that host a fixed number of "workers", meaning each one will only ever be given 100, or however many. There are no major exploits by simply counting how many "workers" you initially added to the chests, and by counting when entiti...
by LuxArdens
Thu Nov 14, 2019 12:02 pm
Forum: Modding help
Topic: Feasibility of limiting # of a certain item in game?
Replies: 10
Views: 2917

Re: Feasibility of limiting # of a certain item in game?

Ah, thank you, unfortunate that such an event doesn't exist (although I'm sure it's for a good reason). There could be a better way to do what you're trying to do without using an item counter and limiter. E.g. "when max demand for an item is reached, stop requesting said item" for example...
by LuxArdens
Tue Nov 12, 2019 11:57 pm
Forum: Modding help
Topic: Feasibility of limiting # of a certain item in game?
Replies: 10
Views: 2917

Feasibility of limiting # of a certain item in game?

I enthusiastically started constructing a new overhaul mod, that introduces population and 'labor (force)' as something you have to put on a belt and use to craft objects. Yesterday, however, I realized that there is a critical concept to what I want to achieve, that the entire mod hinges on, and if...

Go to advanced search