Dumb question from a non-modder

Place to get help with not working mods / modding interface.
MassiveDynamic
Fast Inserter
Fast Inserter
Posts: 162
Joined: Sun Sep 16, 2018 10:44 pm
Contact:

Dumb question from a non-modder

Post by MassiveDynamic »

I don't know how to mod, but I like to tinker, so I am playing with Power Armor MK3 mod. First I made a copy of the zipped folder. Next I extracted the files and found a couple things I was confident I could change that were pretty obvious looking; specifically grid size and item size. So I adjusted them slightly using Notepad. Then I zipped up the folder. Next I changed the name of the original folder slightly and moved it to a temp folder. Then I moved the edited zipped folder into the Mods folder. So, thinking I was pretty smart, I opened Factorio and checked to see if the grid size had changed and the shield icon size had changed? And NO. Neither thing changed. So I closed Factorio, turned off the mod, reloaded, quit, turned the mod on, reloaded, and still no changes.

What am I not doing correctly?

I am fascinated by the idea of modding and this is my first foray into that world. (Except a little bit of fun with Dungeon Defenders armor modding some years ago)

User avatar
Linver
Fast Inserter
Fast Inserter
Posts: 143
Joined: Wed Jan 09, 2019 2:28 pm
Contact:

Re: Dumb question from a non-modder

Post by Linver »

Hi, some details are missing, so I don't get what are u doing wrong, but I will list some possible problems hoping one of this will help u:
  • Prototypes are indexed by name. If ur mod or all loaded mods add to the game two prototypes, for example two equipment grids with the same name, they exist and are accessible by their names, so because they have the same name for the game is like the same object is added two times, and will be save the second one, because the first will be overwritten, see Prototype definitions.
  • Mod Order. Each mod will be loaded in 3 stages, data, data-update and data-final-fixes, if is not specified with dependecy, this phases will be executed in lexicographical order, for example if we have mod A and B, will be done first A-data after B-data after A-data-update and blabla.. if B require A in dependecy, will be done first B and then A, for more info see Data-Lifecycle. If u have Power armor loaded with ur mod, but will be loaded after, will override ur mod prototypes in what they are equials.
  • Bad info file. Factorio load mod if the info file is valid, and start looking for some default files, if u have write some bad information inside, like a wrong mod name or version will be not loaded, see Mod structure

MassiveDynamic
Fast Inserter
Fast Inserter
Posts: 162
Joined: Sun Sep 16, 2018 10:44 pm
Contact:

Re: Dumb question from a non-modder

Post by MassiveDynamic »

So specifically I edited this in the “equipment-grid2” folder...

See height,width changed from 20 to 30 each.
Attachments
Screenshot (15).png
Screenshot (15).png (81.16 KiB) Viewed 701 times

Honktown
Filter Inserter
Filter Inserter
Posts: 747
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: Dumb question from a non-modder

Post by Honktown »

You need to assign it to the armor too. Did you do that?
I have mods! I guess!
Link

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2799
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Dumb question from a non-modder

Post by darkfrei »

1. Please use Notepad++ for modding
2. You don't need to zip it.

MassiveDynamic
Fast Inserter
Fast Inserter
Posts: 162
Joined: Sun Sep 16, 2018 10:44 pm
Contact:

Re: Dumb question from a non-modder

Post by MassiveDynamic »

Ok, thanks, I used Notepad++, but still no joy. I tried several times, zipping, not zipping, each time I closed Factorio and restarted. Both when I left the file zipped and unzipped, the mod did not appear in the mod list in-game. Only when I use the original zip file does the mod appear in the list. And YES I made sure the file name was correct.

Pi-C
Filter Inserter
Filter Inserter
Posts: 894
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: Dumb question from a non-modder

Post by Pi-C »

MassiveDynamic wrote:
Sun Feb 02, 2020 5:52 pm
Both when I left the file zipped and unzipped, the mod did not appear in the mod list in-game. Only when I use the original zip file does the mod appear in the list.
Restart the game and let it load to the main menu. Then search the log file (factorio-current.log) for the name of your mod. If anything is wrong with the mod that stops it from loading, you should find the reason there.
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 4373
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Dumb question from a non-modder

Post by eradicator »

The required folder hierarchy is different for non-/zipped:

Not zipped:
.\blabla\mods\your-mod-name_1.2.3\info.json
.\blabla\mods\your-mod-name_1.2.3\data.lua

Zipped:
.\blabla\mods\your-mod-name_1.2.3.zip|your-mod-name_1.2.3\info.json
.\blabla\mods\your-mod-name_1.2.3.zip|your-mod-name_1.2.3\data.lua
(after the "|" is an extra folder inside the zip file)
Author of: Hand Crank Generator Deluxe, Screenshot Hotkey 2.0, /sudo
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

MassiveDynamic
Fast Inserter
Fast Inserter
Posts: 162
Joined: Sun Sep 16, 2018 10:44 pm
Contact:

Re: Dumb question from a non-modder

Post by MassiveDynamic »

You guys are awesome! Thanks, BUT... still no joy. I admit I'm in over my head but here are 2 screenshots that answer your questions. They will mean more to you than to me.
Attachments
Screenshot (17).png
Screenshot (17).png (906.3 KiB) Viewed 649 times
Screenshot (16).png
Screenshot (16).png (588.02 KiB) Viewed 649 times

Pi-C
Filter Inserter
Filter Inserter
Posts: 894
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: Dumb question from a non-modder

Post by Pi-C »

Incorrect mod name, I'd say. See here:
The mod must either be in a folder, or in a folder inside a zip file. The mod folder/zip must be named in the pattern of {mod-name}_{version-number}, for example test-mod-thing_0.0.1. When using a zip file for the mod, the folder inside the zip file does not have any naming restrictions; only the zip file itself must be named with the {mod-name}_{version-number} pattern. The mod name and its version number are defined in the info.json file.
Get rid of the spaces in the directory names, and follow the pattern laid out above …
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!

MassiveDynamic
Fast Inserter
Fast Inserter
Posts: 162
Joined: Sun Sep 16, 2018 10:44 pm
Contact:

Re: Dumb question from a non-modder

Post by MassiveDynamic »

I am admittedly cumbersome and a little slow, BUT... I tried renaming the UN-zipped folder using the Power-Armor-MK3_0.2.14 with no joy.
Now I edited the file and RE-zipped it using the EXACT SAME ORIGINAL NAMING STRUCTURE (I copy/pasted it just to be 100% sure) and still not recognizing it.

Tell me when I should give up.


Screenshot (19).png
Screenshot (19).png (859.37 KiB) Viewed 638 times

MassiveDynamic
Fast Inserter
Fast Inserter
Posts: 162
Joined: Sun Sep 16, 2018 10:44 pm
Contact:

Re: Dumb question from a non-modder

Post by MassiveDynamic »

So upon further consideration this question occurs to me. Notice here that the mod appears in the list....
Screenshot (20).png
Screenshot (20).png (1.26 MiB) Viewed 635 times
But, when I edit the file in any way, it no longer appears in the list. I was thinking that maybe I need to load the mod again, but instead of from the portal from my file... But I don't seem to have that option????

Honktown
Filter Inserter
Filter Inserter
Posts: 747
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: Dumb question from a non-modder

Post by Honktown »

Pi-C wrote:
Sun Feb 02, 2020 6:41 pm
Incorrect mod name, I'd say. See here:
The mod must either be in a folder, or in a folder inside a zip file. The mod folder/zip must be named in the pattern of {mod-name}_{version-number}, for example test-mod-thing_0.0.1. When using a zip file for the mod, the folder inside the zip file does not have any naming restrictions; only the zip file itself must be named with the {mod-name}_{version-number} pattern. The mod name and its version number are defined in the info.json file.
Get rid of the spaces in the directory names, and follow the pattern laid out above …
Interestingly, Power Armor Mk3 actually does have spaces in the zip name: "Power Armor MK3_0.2.12.zip" with the title in file:

Code: Select all

"name":"Power Armor MK3",
Wonder how that plays vs folder.
I have mods! I guess!
Link

Pi-C
Filter Inserter
Filter Inserter
Posts: 894
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: Dumb question from a non-modder

Post by Pi-C »

Honktown wrote:
Sun Feb 02, 2020 8:07 pm
Interestingly, Power Armor Mk3 actually does have spaces in the zip name: "Power Armor MK3_0.2.12.zip" with the title in file:

Code: Select all

"name":"Power Armor MK3",
Wonder how that plays vs folder.

Code: Select all

   0.478 Info ModManager.cpp:249: Found duplicate mod Power Armor MK3, using folder version (0.2.14).
I honestly didn't expect this …
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!

MassiveDynamic
Fast Inserter
Fast Inserter
Posts: 162
Joined: Sun Sep 16, 2018 10:44 pm
Contact:

Re: Dumb question from a non-modder

Post by MassiveDynamic »

Now you guys are speaking in codibabble way over my head. What exactly does this mean to me?
Pi-C wrote:
Sun Feb 02, 2020 8:16 pm
Honktown wrote:
Sun Feb 02, 2020 8:07 pm
Interestingly, Power Armor Mk3 actually does have spaces in the zip name: "Power Armor MK3_0.2.12.zip" with the title in file:

Code: Select all

"name":"Power Armor MK3",
Wonder how that plays vs folder.

Code: Select all

   0.478 Info ModManager.cpp:249: Found duplicate mod Power Armor MK3, using folder version (0.2.14).
I honestly didn't expect this …

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3241
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Dumb question from a non-modder

Post by DaveMcW »

Screenshots are not very helpful at communicating mod errors.

What would be helpful is if you attach your zip file.

MassiveDynamic
Fast Inserter
Fast Inserter
Posts: 162
Joined: Sun Sep 16, 2018 10:44 pm
Contact:

Re: Dumb question from a non-modder

Post by MassiveDynamic »

Will do as soon as I get back.

Pi-C
Filter Inserter
Filter Inserter
Posts: 894
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: Dumb question from a non-modder

Post by Pi-C »

MassiveDynamic wrote:
Sun Feb 02, 2020 8:24 pm
Now you guys are speaking in codibabble way over my head. What exactly does this mean to me?
Honktown wrote:
Sun Feb 02, 2020 8:07 pm

Code: Select all

"name":"Power Armor MK3",
Wonder how that plays vs folder.
Honktown quoted a line from the original "Power Armor Mk3"'s info.json; it shows that this mod really uses spaces in its name.

Code: Select all

   0.478 Info ModManager.cpp:249: Found duplicate mod Power Armor MK3, using folder version (0.2.14).
That's a line from the log file after I unpacked the directory and Factorio used the folder version instead of the zip file. So we can rule out that your mod isn't being found because it has spaces in its name.
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2002
Joined: Fri Nov 06, 2015 7:41 pm

Re: Dumb question from a non-modder

Post by Deadlock989 »

Mods are allowed spaces in the name, it's just that the mod portal stopped accepting them for upload at some point.

Usually a mod completely missing from the in-game list means a malformed info.json file in my experience.

MassiveDynamic
Fast Inserter
Fast Inserter
Posts: 162
Joined: Sun Sep 16, 2018 10:44 pm
Contact:

Re: Dumb question from a non-modder

Post by MassiveDynamic »

So here is my small modification in screenshots. All I did was unpack the zip, change height,width to 30,30, repack the zip, delete the unzipped version. And here is the edited mod.
Attachments
Power Armor MK3_0.2.14.zip
(310.72 KiB) Downloaded 26 times
Screenshot (24).png
Screenshot (24).png (906.49 KiB) Viewed 588 times
Screenshot (23).png
Screenshot (23).png (911.1 KiB) Viewed 588 times
Screenshot (22).png
Screenshot (22).png (818.1 KiB) Viewed 588 times
Screenshot (21).png
Screenshot (21).png (816.08 KiB) Viewed 588 times

Post Reply

Return to “Modding help”

Who is online

Users browsing this forum: Google [Bot]