So bear with me here because i have absolutely no experience with making mods and at best kindergarden levels if experience with writing code.
So im trying to write a mod that changes some values for vanilla items. I've poked around in some other mods and I think i understand how to add an attribute to something, such as a fuel value, but not to change it.
In this case, i want to make changes to an item, a projectile and a recipe, without introducing new items.
I've watched klonan's modding tutorial on youtube (helpful but doesn't really cover what i'm trying to do) and read over some of the modding tutorials on the wiki and the forum but i'm still absolutely lost. Can anyone point me to some other good resources for modding factorio?
Modifying attributes of vanuilla items
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: Modifying attributes of vanuilla items
You can access the existing stuff by creating a `data.lua`in your mod then accessing the existing prototypes via `data.raw`.
For example, all the recipes are stored on `data.raw.recipe`.
If it's any help, I just dumped everything in data.raw to a text file that you can see online:
https://raw.githubusercontent.com/auber ... r/data.raw
If you wanted to change the charge cooldown of that accumulator at the top, you'd do:
For example, all the recipes are stored on `data.raw.recipe`.
If it's any help, I just dumped everything in data.raw to a text file that you can see online:
https://raw.githubusercontent.com/auber ... r/data.raw
If you wanted to change the charge cooldown of that accumulator at the top, you'd do:
Code: Select all
data.raw.accumulator.accumulator.charge_cooldown = 40
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
Re: Modifying attributes of vanuilla items
This is incredibly helpful, thank you so much!