all the code I've posted would belong in the data portion of your mod (whether directly in data.lua or a file required by it). But yeah, send me the code and I'll look and see why it's not working as expected.Phakx wrote:EDIT: i added your lower code in a control.lua 2 days ago as you send it to me.
Search found 1266 matches
- Sat Oct 04, 2014 10:00 pm
- Forum: Modding help
- Topic: Recipe categories
- Replies: 12
- Views: 4629
Re: Recipe categories
- Fri Oct 03, 2014 4:49 pm
- Forum: Modding help
- Topic: Recipe categories
- Replies: 12
- Views: 4629
Re: Recipe categories
for recipes enabled controls whether the recipe will be unlocked at the start of the game or not. If it is set to false (the default is true) then it is not unlocked (and thus not displayed in the crafting menus) and it will need to be unlocked in-game using research (added via a technology prototyp...
- Fri Oct 03, 2014 3:58 pm
- Forum: Modding help
- Topic: iron plate
- Replies: 2
- Views: 1105
Re: iron plate
Since the majority (if not all) of the base recipe names use the same name as they item they craft you can find the item name ("iron-plate") and assume it'll be the name of the recipe. You'd find it by either looking at the prototypes (it'd be under data/base/prototypes/item/demo-item.lua)...
- Thu Oct 02, 2014 2:24 pm
- Forum: Modding help
- Topic: Need help with modding
- Replies: 2
- Views: 1164
Re: Need help with modding
Well if you look in the data/base/prototypes/entity/entity.lua file you'll see that the storage tank has a type of "storage-tank" and a name of "storage-tank", you'll also see the number 250 (suspiciously close to the 2500 number you mentioned) as the base_area in the fluid_box s...
- Wed Oct 01, 2014 1:16 pm
- Forum: Modding help
- Topic: Simple help needed
- Replies: 18
- Views: 6249
Re: Simple help needed
I also want to know is how do you detect if the same mod is installed to use the disabler? yeah, good question there... You can just check if data.raw[type][name] ~= nil (since nil evaluates to false you wouldn't actually need the explicit ~= nil portion) for one of the prototypes that you know the...
- Tue Sep 30, 2014 4:26 pm
- Forum: News
- Topic: Friday Facts #53 Multikulti Mutliplayer
- Replies: 35
- Views: 30576
Re: Friday Facts #53 Multikulti Mutliplayer
Well #factorio on irc.esper.net is the official irc channel.paul42 wrote:perhaps an IRC channel?
- Tue Sep 30, 2014 2:01 pm
- Forum: Modding help
- Topic: Recipe categories
- Replies: 12
- Views: 4629
Re: Recipe categories
Not exactly. First, just to be sure, enabled = false makes it so that the recipe is not shown by default, if the category is empty (or none of the recipes are enabled) then it won't be displayed. Recipes need to be set enabled during the game (typically with a technology through research, but contro...
- Tue Sep 30, 2014 1:32 pm
- Forum: Implemented mod requests
- Topic: game.player.gui.center.add{type="picture", [...]}
- Replies: 3
- Views: 4973
Re: game.player.gui.center.add{type="picture", [...]}
which elements i can style with pictures and how can i do this? Until now i couldn't find any example. at least buttons (see first spoiler, and second for others types), which rk84 used for his test mode mod (and checkboxes too). For an example download it and look at the styles subfolder. -- note ...
- Tue Sep 30, 2014 12:37 pm
- Forum: Modding help
- Topic: script
- Replies: 8
- Views: 2306
Re: script
Then that explains why it won't work :p Yeah, was hoping that wouldn't be an issue for you, but kind of figured it would. You probably could hack it in control.lua if you really wanted to by having two recipes and monitoring all built assembling machines (using the onbuiltentity event and storing t...
- Mon Sep 29, 2014 11:19 pm
- Forum: Modding help
- Topic: script
- Replies: 8
- Views: 2306
Re: script
You can actually specify the recipe result in a couple ways if you use the "results" property instead of "result": {"item-name", x}. where x is a number. {type=theType, name="item-or-fluid-name", probability=y, amount=x}, where theType is "item" or &...
- Mon Sep 29, 2014 5:04 pm
- Forum: News
- Topic: Friday Facts #53 Multikulti Mutliplayer
- Replies: 35
- Views: 30576
Re: Friday Facts #53 Multikulti Mutliplayer
Anyway, will mods work in multiplayer? Provided they don't use math random (with unpredictable seed kinda). The issue won't be math.random (it's been replaced by a deterministic version). I imagine mods would need to be changed to handle multiple player characters existing with the same force, (and...
- Mon Sep 29, 2014 2:51 pm
- Forum: Modding help
- Topic: lua code inventory tabs
- Replies: 7
- Views: 3146
Re: lua code inventory tabs
yeah, well the only solution to that (other than asking the devs for scroll bars on everything lol) is to use the Lua GUIs like testmode does and simulate one. The possible Lua gui positions are either top, left, or center and are accessed with game.player.top for example (see wiki ). To one of thos...
- Mon Sep 29, 2014 3:25 am
- Forum: Modding help
- Topic: lua code inventory tabs
- Replies: 7
- Views: 3146
Re: lua code inventory tabs
The number of slots in an inventory is defined by the "inventory_size" property/node in the container prototype, the technical limit is probably about 32 thousand... but since I don't believe Factorio will add scroll bars to the inventory the practical limit is going to be determined by th...
- Sun Sep 28, 2014 6:31 pm
- Forum: Modding help
- Topic: lua code inventory tabs
- Replies: 7
- Views: 3146
Re: lua code inventory tabs
i need code to define a parameter called "tabs" which defines the count of inventory tabs in a container. If you mean "tabs" like the item groups in the player's inventory or the recipe selection in assembler's but for another container then I'm fairly certain that you can't def...
- Sat Sep 27, 2014 3:42 pm
- Forum: Modding help
- Topic: A few questions
- Replies: 6
- Views: 1962
Re: A few questions
Well, you'd need a way for the player to tell you want they want to 'buy' (the selling part could be as easy as whatever is placed in an "exports" chest, or as 'complicated' as the buying). There are a couple ways that I can think of off the top of my head. Remote interfaces (annoying to u...
- Fri Sep 26, 2014 2:51 pm
- Forum: Modding help
- Topic: control mod behavior from console
- Replies: 2
- Views: 1774
Re: control mod behavior from console
But: Is there a alternative to remote.call(...)? Currently, there is not (you could have them manually edit files but...). Well, you could use any of the normal events to call the function, say monitor the onputitem event for when the player tried to build a certain item (or did so ontop of a certa...
- Thu Sep 25, 2014 12:48 pm
- Forum: Modding help
- Topic: A few questions
- Replies: 6
- Views: 1962
Re: A few questions
Can I make custom container with custom gui? Not like there are for the regular entities, the best you can do from a mod are the guis like those in TestMode. Of course you control when they open so you can have the player attempt to open the container with an item and use the onputitem event to ope...
- Tue Sep 23, 2014 6:34 pm
- Forum: Modding help
- Topic: A few questions
- Replies: 6
- Views: 1962
Re: A few questions
1) not that I am aware of 2) yes 3) yes 4) .. depends. While Factorio is loading (and assuming your mod is loaded after the resource was added to Factorio using the info.json dependencies) you can read that information from data.raw and have full access to the prototype. In game you have limited acc...
- Mon Sep 22, 2014 6:41 pm
- Forum: Modding help
- Topic: Entity graphics
- Replies: 2
- Views: 1052
Re: Entity graphics
The best advice I could give here would probably be to learn how to use a 3D modeling program like Blender (I believe the base sprites are made from Blender models), there's a short guide for making sprite sheets with Blender here , as for modeling your object a few youtube channels with Blender vid...
- Fri Sep 19, 2014 6:23 pm
- Forum: Modding help
- Topic: Simple help needed
- Replies: 18
- Views: 6249
Re: Simple help needed
Is there anything I can do FreeER to set it right in my code? With not knowing how much I need per item it is hard to play. well it's still 1 iron per craft (or whatever was specified in the ingredients), you'll just get 51/101/etc result items per craft. As said, there's nothing wrong there and if...