Search found 1030 matches

by Pi-C
Mon Apr 19, 2021 10:40 am
Forum: Modding help
Topic: Decomposed ingredients list (total raw)
Replies: 6
Views: 245

Re: Decomposed ingredients list (total raw)

OK, took me more time than expected, but I've got a working solution now: Define the reference fuel: base_fuel = {name = "wood", type = "item", fuel_value = data.raw.item.wood.fuel_value or "2MJ"}. Initialize dictionaries fuel_items and fuel_values with data of base_fue...
by Pi-C
Sun Apr 18, 2021 7:40 pm
Forum: Gameplay Help
Topic: Splitter "input priority" does nothing?
Replies: 12
Views: 312

Re: Splitter "input priority" does nothing?

What am I missing here http://i.imgur.com/XjlaHzO.gifv Why isn't the right belt moving before the left when right input priority is selected? Because it's "Input priority", not "Block input". As you can see, nothing comes in on the right track of the right belt, but something go...
by Pi-C
Sun Apr 18, 2021 3:53 pm
Forum: Modding interface requests
Topic: utils.lua: Converting fuel values
Replies: 0
Views: 47

utils.lua: Converting fuel values

I've run into an unexpected problem while trying to manipulate fuel values. There is a function in data/core/lualib/utils.lua that allows to convert a fuel value to a number: local energy_chars = { k = 10^3, K = 10^3, M = 10^6, G = 10^9, T = 10^12, P = 10^15, E = 10^18, Z = 10^21, Y = 10^24 } functi...
by Pi-C
Tue Apr 06, 2021 7:35 pm
Forum: Modding help
Topic: Send any data between data and control stages
Replies: 3
Views: 104

Re: Send any data between data and control stages

Prototypes are defined in the data stage. You can read prototype data in the control stage, but not change them.
by Pi-C
Tue Apr 06, 2021 7:08 pm
Forum: Modding help
Topic: Send any data between data and control stages
Replies: 3
Views: 104

Re: Send any data between data and control stages

But in data-final-fixes in SE this option change collision masks table and all. After this all prototypes has clear all custom options :( It is the way to catch any data to next stage? Couldn't you just add a dependency on SE to make sure it loads before your mod, and fix SE's changes in your own d...
by Pi-C
Tue Apr 06, 2021 7:00 pm
Forum: Ideas and Suggestions
Topic: Spidertron Train
Replies: 5
Views: 167

Re: Spidertron Train

i would love to see a traincart which only houses a single Spidertron that you could walk into with the Spidertron and have the Spidertron sitdown and dock into, letting it be transported via trains! You should check out Vehicle Wagons . I haven't tried it with spidertrons yet, but according to the...
by Pi-C
Tue Apr 06, 2021 6:51 pm
Forum: Modding help
Topic: Data linking between stages/layers
Replies: 11
Views: 470

Re: Data linking between stages/layers

I don't remember/know how mods see settings at the data stage etc That's explained in the settings tutorial . And, the settings stage is first stage, what if someone want to get/check some data from the data stage ((after) second stage) to change/create settings? That makes no sense. You can not re...
by Pi-C
Tue Apr 06, 2021 8:34 am
Forum: Modding help
Topic: Data linking between stages/layers
Replies: 11
Views: 470

Re: Data linking between stages/layers

I tried to do the same in Bio Industries . The problem is that the game provides different data in the various stages: Settings stage: mods Data stage: mods, data, settings Control stage: Initialization: remote, script script.on_init: remote, script, settings, game, global migrations: script, settin...
by Pi-C
Mon Apr 05, 2021 6:48 am
Forum: Ideas and Suggestions
Topic: Landfill should over time change to grass
Replies: 4
Views: 198

Re: Landfill should over time change to grass

Bio Industries allows you to fertilize the ground, which will turn tiles like dirt, landfill etc. to grass. You can also plant trees in various ways (using seeds directly, using seedbombs with yor rocket launcher, or using terraformer buildings), which have a very small chance to grow on barren gro...
by Pi-C
Sun Apr 04, 2021 4:23 pm
Forum: Modding help
Topic: Data linking between stages/layers
Replies: 11
Views: 470

Re: Data linking between stages/layers

As far as I know, LuaRemote exists only in the control stage (once you're in a newly created or loaded game). But it seems you're interested in tracking changes during the data stage -- is that correct? I don't think it's possible to get information on what mod has changed a prototype. The only thin...
by Pi-C
Sun Apr 04, 2021 1:55 pm
Forum: Modding help
Topic: Decomposed ingredients list (total raw)
Replies: 6
Views: 245

Re: Decomposed ingredients list (total raw)

You shouldn't need to test any item more than once if you do a depth first search. Simply go over the list once, for each ingredient first check if you calculated it yet, if you have not calculate the value of the ingredient first, repeating. I won't know in the beginning what ingredients will have...
by Pi-C
Sun Apr 04, 2021 10:08 am
Forum: Modding help
Topic: Decomposed ingredients list (total raw)
Replies: 6
Views: 245

Re: Decomposed ingredients list (total raw)

However, it seems to be quite complicated to get a list of all items that may contain wood (and the total amount of wood) -- especially as the game builds such a list by itself anyway. Is there any shortcut I could use? No, the only way is to build the list yourself. I'm trying to do that now! Not ...
by Pi-C
Fri Apr 02, 2021 1:20 pm
Forum: Modding help
Topic: Decomposed ingredients list (total raw)
Replies: 6
Views: 245

Decomposed ingredients list (total raw)

If recipe.allow_decomposition is true, recipe ingredients are broken down as far as possible to "raw" ingredients during the game. I wonder if it's possible to get access to that list during the data stage. The idea is to check all recipes if they make an item that contains wood, if the li...
by Pi-C
Thu Apr 01, 2021 6:39 am
Forum: Modding help
Topic: Conflict between Krastorio 2/BioIndustries and Food Industry
Replies: 1
Views: 120

Re: Conflict between Krastorio 2/BioIndustries and Food Industry

Hey all, I've encountered this mod conflict: https://1drv.ms/u/s!AvxnKV2cj771vEay7dSRV3tGgp-s?e=s1LL0r Copying the error message from the log file instead of uploading a screenshot would have made replying so much easier … Anyway, this is the definition of the fertilizer recipe from the last publis...
by Pi-C
Thu Apr 01, 2021 5:23 am
Forum: Ideas and Suggestions
Topic: Rails auto-deconstruction trees/rocks/...
Replies: 7
Views: 289

Re: Rails auto-deconstruction trees/rocks/...

Kind of FARL light: Ghosts of rails, signals, and power poles are built from inventory of player or train, rocks and trees are deconstructed automatically, if necessary.
by Pi-C
Tue Mar 30, 2021 4:44 am
Forum: General discussion
Topic: Bigger chests?
Replies: 9
Views: 563

Re: Bigger chests?

Hi, should bigger chests (2x2, 3x3, 2x3) be a thing? There are mods that provide such chests. Bio Industries, for example, has them in sizes 2x2, 3x3, and 6x6. (Personally, I think 6x6 is too large for a chest, it would be more fitting if they were themed as a ware house, but that's just about appe...
by Pi-C
Tue Mar 30, 2021 4:20 am
Forum: Modding help
Topic: Sprite Sheet Controlled On How Many Items Are In The Entity
Replies: 6
Views: 280

Re: Sprite Sheet Controlled On How Many Items Are In The Entity

While you can't replace the sprite sheet of an entity at runtime, you can define different entities (each with its own sprite sheet) and replace one with the other. To do that, you need to maintain a list of the built entities in the global table (so it will be saved with the game). It's a common te...
by Pi-C
Sun Mar 28, 2021 2:38 pm
Forum: Questions, reviews and ratings
Topic: Street Lamps
Replies: 5
Views: 330

Re: Street Lamps

Is there a mod that has lamp poles? You collide with regular lamps on the ground. There are other mods that provide flat lamps you can safely drive over. I know of Schall Lamp Contrast (will replace the vanilla lamps, so there are no additional entities, and if you remove the mod, they'll automatic...
by Pi-C
Sat Mar 27, 2021 8:25 pm
Forum: Modding help
Topic: Adding/Replacing The Win Condition Other Than Launching the first Rocket
Replies: 11
Views: 269

Re: Adding/Replacing The Win Condition Other Than Launching the first Rocket

That works fine in console when I tried, but only once. Possibly the game won't show the victory screen if the map has already been won. Calling set_game_state with game_finished = false doesn't seem to reset it. Turns out I made a stupid mistake. I was already wondering why I hadn't been asked to ...
by Pi-C
Sat Mar 27, 2021 3:25 pm
Forum: Modding help
Topic: Adding/Replacing The Win Condition Other Than Launching the first Rocket
Replies: 11
Views: 269

Re: Adding/Replacing The Win Condition Other Than Launching the first Rocket

I really appreciate the detailed answer,now i know how to deal with these type of codes; thanks again :) You're welcome! But I just noticed a copy/paste error: script.on_event(id, defines.events.on_built_entity, function(event) should be script.on_event(defines.events.on_built_entity, function(even...

Go to advanced search