Search found 26 matches

by BrokenScience
Tue Aug 15, 2017 1:39 am
Forum: Ideas and Suggestions
Topic: Additional dynamic technology effects
Replies: 7
Views: 729

Re: Additional dynamic technology effects

I would love to make a mod that adds some technologies that reduce robot energy consumption, but this is not one of the modifiers. I would very much like to see the modifiers removed in place of something that just allows the changing of values in data. As for what I understand, all the modifiers ch...
by BrokenScience
Sat Aug 12, 2017 2:38 am
Forum: Modding help
Topic: Production Graphs
Replies: 0
Views: 180

Production Graphs

Can graphs be created and displayed like the production or power graphs? I would like to add more for a mod I am working on.
by BrokenScience
Sun Aug 06, 2017 3:24 am
Forum: Modding help
Topic: Link between space-science-pack and rockets?
Replies: 2
Views: 307

Re: Link between space-science-pack and rockets?

Any way to access this fake recipe?
by BrokenScience
Sat Aug 05, 2017 8:53 pm
Forum: Modding help
Topic: Link between space-science-pack and rockets?
Replies: 2
Views: 307

Link between space-science-pack and rockets?

Since the launching of a rocket and a satellite 'produces' 1000 space-science-packs, is there some form of link or recipe between them? I'm looking for some sort of connection similar to LuaItemPrototype.burnt_result or LuaRecipePrototype.products for a mod.
by BrokenScience
Wed Aug 02, 2017 1:47 am
Forum: Modding help
Topic: Getting steam turbines to cool down steam?
Replies: 10
Views: 990

Re: Getting steam turbines to cool down steam?

Back in FFF 164 (the initial explanation of Nuclear power), turbines reduced the steam temperature from 500 down to 120 which could then be sent into a cooling tower or consumed by a steam engine. Clearly, this is not how they work right now, but it is possible that it wasn't discarded. I looked aro...
by BrokenScience
Wed Aug 02, 2017 12:58 am
Forum: Modding help
Topic: [Solved] Attempt to index global 'game' (a nil value)
Replies: 3
Views: 899

Re: Attempt to index global 'game' (a nil value)

Yep, it was the parentheses I included as part of the build_order() function.

That is a small detail that creates an incredibly complex problem.
by BrokenScience
Tue Aug 01, 2017 2:16 am
Forum: Modding help
Topic: [Solved] Attempt to index global 'game' (a nil value)
Replies: 3
Views: 899

[Solved] Attempt to index global 'game' (a nil value)

I recently moved some code from control to a new file to reduce clutter. Unfortunately it no longer works because of an error I did not get before. The file is required in control.lua and is called through on_init and on_configuration_changed, both of which do have access to the game table (I checke...
by BrokenScience
Thu Jul 27, 2017 10:58 pm
Forum: Modding help
Topic: Loaders and electrical-energy-interface recipes
Replies: 5
Views: 2099

Re: Loaders and electrical-energy-interface recipes

So why does the electrical-energy-interface have a recipe?
by BrokenScience
Thu Jul 27, 2017 6:21 am
Forum: Modding help
Topic: Loaders and electrical-energy-interface recipes
Replies: 5
Views: 2099

Loaders and electrical-energy-interface recipes

I was working with my mod that uses recipes to create an order of all the items in the game. When printing the results, I noticed some items that I did not expect to find. I am aware of what loaders are, but have never seen the electrical-energy-interface before. The version of factorio I was runnin...
by BrokenScience
Thu Jul 27, 2017 2:19 am
Forum: Modding help
Topic: Accessing Wagon Cargo Quantity
Replies: 12
Views: 1210

Re: Accessing Wagon Cargo Quantity

You can get the count of items in a train much faster by just calling train.get_item_count() -> http://lua-api.factorio.com/latest/LuaTrain.html#LuaTrain.get_item_count All items have a max stack size found with LuaItemPrototype .stack_size . Divide the number of items returned from train.get_item_...
by BrokenScience
Thu Jul 27, 2017 12:19 am
Forum: Modding help
Topic: [Solved] Odd return from item.subgroup
Replies: 4
Views: 499

Re: Odd return from item.subgroup

Alright, my bad. I have no idea why I thought I read that item.subgroup would return a string.
by BrokenScience
Wed Jul 26, 2017 6:27 am
Forum: Modding help
Topic: [Solved] Odd return from item.subgroup
Replies: 4
Views: 499

[Solved] Odd return from item.subgroup

I'm trying to find all the items with the subgroup "raw-resource" by using item.subgroup as seen on the lua api, but did not get the strings I was looking for: https://steamuserimages-a.akamaihd.net/ugc/843714746854288495/80A4FCCB357E50A724407785F12482914FA9F0A2/ That was what I received as the subg...
by BrokenScience
Mon Jul 24, 2017 11:07 pm
Forum: Modding help
Topic: [Solved] Attempt to index global 'script' (a nil value)
Replies: 15
Views: 2368

Re: Attempt to index global 'script' (a nil value)

Yes I am. No idea how that got there. (Solved)
by BrokenScience
Sun Jul 23, 2017 1:09 am
Forum: Modding help
Topic: [Solved] Attempt to index global 'script' (a nil value)
Replies: 15
Views: 2368

Re: Attempt to index global 'script' (a nil value)

What you have given me there crashes with the same error when in control.lua. The problem I'm having is with script in the script.on_event, not the contents (although I know it does not work). I went and deleted the entirety of the contents of the function so I had only: script.on_event("Eco", funct...
by BrokenScience
Sat Jul 22, 2017 12:53 am
Forum: Modding help
Topic: [Solved] Attempt to index global 'script' (a nil value)
Replies: 15
Views: 2368

Re: Attempt to index global 'script' (a nil value)

It will be more helpful if you can provide us the whole lua file instead of just the snippet. The code above is the entire Lua file of control.Lua with the exception of a single comment above it that says, "-- test", but I added it anyway. What is the difference between: data:extend({ { type = "cus...
by BrokenScience
Fri Jul 21, 2017 1:07 am
Forum: Modding help
Topic: [Solved] Attempt to index global 'script' (a nil value)
Replies: 15
Views: 2368

Re: Attempt to index global 'script' (a nil value)

I replaced data now with game.recipe_prototypes so now I have this: script.on_event("Eco", function(event) local test = player.gui.center.add({type = "frame", name = "test", direction = "vertical"}) local frame = ui.add({type = "frame", name = "test_frame", direction = "vertical"}) for each in game....
by BrokenScience
Wed Jul 12, 2017 8:57 pm
Forum: Modding help
Topic: [Solved] Attempt to index global 'script' (a nil value)
Replies: 15
Views: 2368

Re: Attempt to index global 'script' (a nil value)

That was it. How do I access the recipes and items then in this stage if I cannot use data?
by BrokenScience
Fri Jul 07, 2017 5:30 pm
Forum: Modding help
Topic: [Solved] Attempt to index global 'script' (a nil value)
Replies: 15
Views: 2368

Re: Attempt to index global 'script' (a nil value)

script.on_event("Eco", function(event) for each in data do if each[type] == "recipe" then table.insert(recipes, each) end end local test = player.gui.center.add({type = "frame", name = "test", direction = "vertical"}) local frame = ui.add({type = "frame", name = "test_frame", direction = "vertical"...
by BrokenScience
Thu Jul 06, 2017 1:10 pm
Forum: Multiplayer
Topic: LF two new members to join our server (2/4)(GB)
Replies: 5
Views: 686

Re: LF two new members to join our server (2/4)(GB)

I'm interested if you have room for one more. I love working with trains and have died an embarrassingly large number of times from them. Recently finished a 130 hr 'marathon' game trying to substitute trains for logistic bots. Didn't work very well but I got the logistic embargo achievement.
by BrokenScience
Thu Jul 06, 2017 12:49 pm
Forum: Modding help
Topic: [Solved] Attempt to index global 'script' (a nil value)
Replies: 15
Views: 2368

[Solved] Attempt to index global 'script' (a nil value)

The game does not allow me to use script.on_event or any other of the functions stored in script. It works fine with all my other mods but, in this particular one, crashes and brings up the error: "attempt to index global 'script' (a nil value)". What is causing this and how do I fix it?

Go to advanced search