Need help to make my mod work again

Place to get help with not working mods / modding interface.
iCamper
Burner Inserter
Burner Inserter
Posts: 17
Joined: Sat Apr 16, 2016 11:04 pm
Contact:

Need help to make my mod work again

Post by iCamper »

Hey guys
its a long time ago since i played factorio.. so my mods are outdated.
I updated them but they dont want to work well in some kind.
The mod was basicly for reducing the costs of craft electronic circuits, advanced circuits and the processing unit.
But now i when im ingame i just can find the recipe for advanced circuits.
The second problem is that i cant use the productivity module for those recipe's anymore
maybe one of u can have a look at it.


Would be nice i just worked 4h around it and i cant find a way to fix the problem...


heres a dl of my mod
https://ufile.io/g6rm0

thank you in advance
User avatar
Volvith
Inserter
Inserter
Posts: 40
Joined: Mon Jun 26, 2017 12:28 pm
Contact:

Re: Need help to make my mod work again

Post by Volvith »

Hi, just wondering whether your problem still persists. :)
If yes, what version of factorio are you attempting to update your mod to?

If you've already fixed it, you can just ignore this. :3
Rational People: If it ain't fucked, don't fuck it.
Engineers: If it ain't fucked, unfuck it till it's perfect.
Me as an Engineer: If it ain't fucked, i'll fuck it till it is.
robertpaulson
Long Handed Inserter
Long Handed Inserter
Posts: 92
Joined: Sun Jun 18, 2017 2:21 pm
Contact:

Re: Need help to make my mod work again

Post by robertpaulson »

if your mod creates new recipes instead of updating existing ones you might need to update the list of each module and insert your items into the "allowed" list

Here is what I found when I run into the same problem, altho I haven't yet apply the fix mysefl:

viewtopic.php?f=25&t=28966&p=184060&hil ... t+#p184060
User avatar
Volvith
Inserter
Inserter
Posts: 40
Joined: Mon Jun 26, 2017 12:28 pm
Contact:

Re: Need help to make my mod work again

Post by Volvith »

I've taken another look at your mod, and i think everything should be working now. (updated version attached)

What have i changed?:
- Changed the info.json to factorio version 0.15, and changed the version number of the mod.
- I've taken out the item.lua and demo-item.lua, as the copying of item trees is not necessary when creating new recipes for an item, or changing existing ones.

- If you take a look in the productivity-config.lua, you can probably already see what i changed. The allowed recipes are specified in a function not unlike the one i wrote. Then, under the productivity module's limitation value, the name of the function is listed. All i did here is replace the default function with a new one which incorprets the new recipes. (Note that only one string can be listed for each "limitation" value, so adding a new value with only the changed recipes is not possible.) I also added productivity module 2 and 3 to the changed list.

- I've taken a look at the entity.lua, and saw that the only changed value in there (correct me if i'm wrong) was the allowed_effect: "productivity". So i added a table.insert for "productivity". Generally, if you're only changing one value of an entity, item, recipe, or stuff like that, you should use either data.raw..., or insert.table(data.raw...), as copying entire trees is a bit of a rough way of doing it. (And i think that, with copying entire trees, you can run into problems with future updates.)

- In technology.lua, i've added "advanced-electronic-circuit", as that recipe had no way of being activated/revealed before. (enabled was "false", and no tech unlocked it.) I've changed the name to "advanced-electronics-3", as it seems like a logical step up from 2.

- Finally, i've removed the unnecessary names from the locale.cfg. The tech name for electronics is handled automatically, the item names are already defined in the base locale, the new "advanced-(module tier)" recipes have no entity, and you don't need to add empty description categories to the locale. :)


Another suggestion i have would be to change the technology order of "advanced-electronics-3", and change the icon to the "advanced-electronics-2" icon, but that's just my perfectionism talking... ;)

If you have any questions, please, do ask, especially if you don't understand why i've changed something.
Also, definitely check out the solution robertpaulson posted for the productivity problem, as the method i used is not as compatibility-friendly as that one, even though it works just fine. (I believe that solution adds the recipes directly to the base function, instead of my solution, where i just overwrite the base function entirely. :3)

For the time being, cheers, and best of luck! ;D
Attachments
Advanced_Item_Costs_0.1.3.zip
(3.11 KiB) Downloaded 118 times
Rational People: If it ain't fucked, don't fuck it.
Engineers: If it ain't fucked, unfuck it till it's perfect.
Me as an Engineer: If it ain't fucked, i'll fuck it till it is.
Post Reply

Return to “Modding help”