Hello everyone, I just started using lua scripting as I am a fan of DyTech mod and I did spend some days looking at their code etc and since the 0.12.0 was released the mod is not able to run on it so I was wondering to keep atleast 1 thing from the mod until they update the mod, which may take them a while since the mod is huge.
now I have to say that in the dytech mod I found this line
data.raw["player"]["player"].inventory_size = 100
and I intend to use this just to have something going on quickly and it should do what I want exactly. So I created a new folder named it "inventory-mod_0.1.1" and I created a file "info.json" with these contents
{
"name": "inventory-mod",
"version": "0.1.1",
"title": "Inventory Mod",
"author": "ClayC",
"contact": "http://www.factorio.com",
"homepage": "http://www.factorio.com",
"description": "Get a bigger inventory"
}
I created a control.lua and a data.lua and a prototypes folder which is empty as I saw this as a requirement on a tutorial I followed.
inside the control.lua I pasted the above mentioned line for the inventory size and I left the data.lua empty as I am not sure what to include.
I tried opening the game to see if the mod was recognized and it doesn't show up in the list, I also wasn't able to find any errors what-so-ever
What am I missing?
Any help and information is welcome,
Thanks,
ClayC
[Solved] Need help with data.lua
[Solved] Need help with data.lua
Last edited by ClayC on Thu Jul 30, 2015 12:35 pm, edited 1 time in total.
Re: Need help with data.lua
Any data.raw related changes (new recipies, items, changes to inventory size) need to go to data.lua (or it's variants).
control.lua is for reacting to game events (like... a chunk has been generated) and cannot modify data.raw values, as the game has already read them upon startup (so technically speaking, it can modify them, but without any effect).
control.lua is for reacting to game events (like... a chunk has been generated) and cannot modify data.raw values, as the game has already read them upon startup (so technically speaking, it can modify them, but without any effect).
Re: Need help with data.lua
There is an inventory mod already that does just this.
It's here: https://forums.factorio.com/forum/vie ... =91&t=5891
It's here: https://forums.factorio.com/forum/vie ... =91&t=5891
Re: Need help with data.lua
Then how is it achievable like what DyTech did? I am asking for learning purposes maybe I come up with some new ideas to add to the game who knowsSirRichie wrote:Any data.raw related changes (new recipies, items, changes to inventory size) need to go to data.lua (or it's variants).
control.lua is for reacting to game events (like... a chunk has been generated) and cannot modify data.raw values, as the game has already read them upon startup (so technically speaking, it can modify them, but without any effect).
Thanks, I'll look at the way this was handled and learn from it as the inventory seems to be the easiest mode to do on this gameorzelek wrote:There is an inventory mod already that does just this.
It's here: https://forums.factorio.com/forum/vie ... =91&t=5891
Re: Need help with data.lua
I found the issue after uninstalling and re-installing the game and adding the mod files back in it worked like magic hehe, there was something wrong with my game, thanks to those that tried to help