[MOD REQUEST] Landfill restriction

This is the place to request new mods or give ideas about what could be done.
Post Reply
ihaku
Manual Inserter
Manual Inserter
Posts: 4
Joined: Tue Mar 03, 2020 8:47 am
Contact:

[MOD REQUEST] Landfill restriction

Post by ihaku »

Hey, i'd like to request a mod that disables landfill being able to fill deep water. it's still supposed to work on shallow and normal water (or modded water states) but specificly not work on deep water.

The mod is for an island world modpack that ill be hosting for some people and swimming in deepwater is already disabled. building shallow water cannals for ships is possible, but the goal is to actually only use the space an island gives you while the majority of the map is coverd and is supposed to stay covered in deep water.

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

Re: [MOD REQUEST] Landfill restriction

Post by darkfrei »

ihaku wrote: ↑
Tue Mar 03, 2020 9:02 am
Hey, i'd like to request a mod that disables landfill being able to fill deep water. it's still supposed to work on shallow and normal water (or modded water states) but specificly not work on deep water.
Just place it to the data.lua:

Code: Select all

local collision_layer = "layer-13"
table.insert (data.raw.item.landfill.place_as_tile.condition, collision_layer)
table.insert (data.raw.tile.deepwater.collision_mask, collision_layer)

ihaku
Manual Inserter
Manual Inserter
Posts: 4
Joined: Tue Mar 03, 2020 8:47 am
Contact:

Re: [MOD REQUEST] Landfill restriction

Post by ihaku »

darkfrei wrote: ↑
Wed Mar 04, 2020 9:05 pm
ihaku wrote: ↑
Tue Mar 03, 2020 9:02 am
Hey, i'd like to request a mod that disables landfill being able to fill deep water. it's still supposed to work on shallow and normal water (or modded water states) but specificly not work on deep water.
Just place it to the data.lua:

Code: Select all

local collision_layer = "layer-13"
table.insert (data.raw.item.landfill.place_as_tile.condition, collision_layer)
table.insert (data.raw.tile.deepwater.collision_mask, collision_layer)
if i do this my game crashes. sorry, i dont know where in the lua i whould fill this in (or even which of the 2, if there arent even more), i havent done any modding with factorio myself, which is why i requested it as a mod that i can just load.

Image

whould other people even be able to download this as a mod when they join?

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

Re: [MOD REQUEST] Landfill restriction

Post by darkfrei »

ihaku wrote: ↑
Thu Mar 05, 2020 2:30 pm
if i do this my game crashes. sorry, i dont know where in the lua i whould fill this in (or even which of the 2, if there arent even more), i havent done any modding with factorio myself, which is why i requested it as a mod that i can just load.

Image

whould other people even be able to download this as a mod when they join?
Please add it to your new mod, not to the vanilla base folder.
You can upload it to the mod portal and everyone can download it.

See also https://wiki.factorio.com/Tutorial:Mod_structure

ihaku
Manual Inserter
Manual Inserter
Posts: 4
Joined: Tue Mar 03, 2020 8:47 am
Contact:

Re: [MOD REQUEST] Landfill restriction

Post by ihaku »

darkfrei wrote: ↑
Thu Mar 05, 2020 4:04 pm
Please add it to your new mod, not to the vanilla base folder.
You can upload it to the mod portal and everyone can download it.

See also https://wiki.factorio.com/Tutorial:Mod_structure
what new mod? do i have to download some kind of modmaker or something? i dont understand. or do i make a new mod ingame?
the thing you linked looks complicated, i was just hoping to request a mod not to be educated on how to make my own mods. sorry if thats not what this forum is for :L

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

Re: [MOD REQUEST] Landfill restriction

Post by darkfrei »

ihaku wrote: ↑
Thu Mar 05, 2020 4:27 pm
darkfrei wrote: ↑
Thu Mar 05, 2020 4:04 pm
Please add it to your new mod, not to the vanilla base folder.
You can upload it to the mod portal and everyone can download it.

See also https://wiki.factorio.com/Tutorial:Mod_structure
what new mod? do i have to download some kind of modmaker or something? i dont understand. or do i make a new mod ingame?
the thing you linked looks complicated, i was just hoping to request a mod not to be educated on how to make my own mods. sorry if thats not what this forum is for :L
The requested mod "Landfill Restriction" is:
a folder in the /Factorio/mods/ with the name "LandfillRestriction_0.0.1"
in this folder just only one files: data.lua and info.json

Create the file data.lua and paste this code into it:

Code: Select all

local collision_layer = "layer-13"
table.insert (data.raw.item.landfill.place_as_tile.condition, collision_layer)
table.insert (data.raw.tile.deepwater.collision_mask, collision_layer)
Create the file info.json and put this code into it:

Code: Select all

{
  "name": "LandfillRestriction",
  "version": "0.0.1",
  "title": "Landfill Restriction",
  "author": "ihaku",
  "dependencies": ["base"],
  "factorio_version": "0.18"
}
Don't forget to save both files and just start the game.

After testing just zip it and attach it here https://mods.factorio.com/mods/new
The mod is ready and published!

Qon
Smart Inserter
Smart Inserter
Posts: 1633
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [MOD REQUEST] Landfill restriction

Post by Qon »

Thank you darkfrei! You are a delight and a gift to this community! :)
Maybe the mod requester one day learns how to show his appreciation as well ;)

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

Re: [MOD REQUEST] Landfill restriction

Post by eradicator »

Qon wrote: ↑
Thu Mar 05, 2020 6:47 pm
Maybe the mod requester one day learns how to show his appreciation as well ;)
To be fair this sub-forum's name seems to attract mostly people with unrealistic expectations about how likely it is that shouting into the room will make a magic modding gnome appear who's only desire is to fullfill your every wish. Compared to some of the other threads this @OP is "mostly harmless".
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: ζ—₯本θͺž, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

ihaku
Manual Inserter
Manual Inserter
Posts: 4
Joined: Tue Mar 03, 2020 8:47 am
Contact:

Re: [MOD REQUEST] Landfill restriction

Post by ihaku »

darkfrei wrote: ↑
Thu Mar 05, 2020 5:06 pm
After testing just zip it and attach it here https://mods.factorio.com/mods/new
The mod is ready and published!
thanks!
Maybe the mod requester one day learns how to show his appreciation as well ;)
i only made this account here to get a certain mod done for my multiplayer session. i have very little interest in familiarizing myself with lua or the making of factorio mods in general as this is most likely the last time ill be using the forum or require a mod to be done. I was unaware that this is how how it works here and as eradicator said the name of the forum isnt very telling in that it appears to not be the case.
In the areas that im usually spending my time if someone requests something i either deny it or fulfill the request instead of trying to make someone help himself which is why i found it strange but if thats how this forum works then it is indeed my fault for not knowing so i guess, so my appologies.

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

Re: [MOD REQUEST] Landfill restriction

Post by darkfrei »

Some mods are pretty easy* and I don't want to make them. But such easy* mods can be done by mod requester after some instructions.
Next time someone can just read it and make it by themselves.

*for experience modders or after provided code


Upd:
https://mods.factorio.com/mod/LandfillRestriction

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

Re: [MOD REQUEST] Landfill restriction

Post by eradicator »

ihaku wrote: ↑
Thu Mar 05, 2020 8:50 pm
In the areas that im usually spending my time if someone requests something i either deny it or fulfill the request instead of trying to make someone help himself which is why i found it strange but if thats how this forum works then it is indeed my fault for not knowing so i guess, so my appologies.
Around here there's simply not many people who are interested in making trivial one-time mods. Most modders are either busy with their own ideas, or find the task too trivial to bother. Or both. There's no "fame" to be gained by it either. And there's too many requests to do it out of good will. So when you're lucky someone bored comes around and gives you the 10% knowledge you need to do the 90% work. And honestly i find it hard to imagine that this would be much different elsewhere (i'm not active elsewhere so this doesn't say much ;).
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: ζ—₯本θͺž, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Illiander42
Long Handed Inserter
Long Handed Inserter
Posts: 92
Joined: Mon Feb 05, 2018 10:01 am
Contact:

Re: [MOD REQUEST] Landfill restriction

Post by Illiander42 »

I'd just like to say thank you to darkfrei for the answer on how to do this :)

Is there an easy way to find out what collision layers other major mods use for things? I don't want to cause conflicts.

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

Re: [MOD REQUEST] Landfill restriction

Post by darkfrei »

Illiander42 wrote: ↑
Wed Sep 02, 2020 5:35 pm
I'd just like to say thank you to darkfrei for the answer on how to do this :)

Is there an easy way to find out what collision layers other major mods use for things? I don't want to cause conflicts.
I use this info mod to read what the game has after all mods loading. Just open the log file with notepad++.
2020-09-02T20_00_37.png
2020-09-02T20_00_37.png (6.37 KiB) Viewed 558 times
The full list of layers is not defined in data stage, but here is a full list of them: https://wiki.factorio.com/Types/CollisionMask

Post Reply

Return to β€œIdeas and Requests For Mods”