Page 1 of 1
					
				[MOD REQUEST] Landfill restriction
				Posted: Tue Mar 03, 2020 9:02 am
				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.
			 
			
					
				Re: [MOD REQUEST] Landfill restriction
				Posted: Wed Mar 04, 2020 9:05 pm
				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)
 
			 
			
					
				Re: [MOD REQUEST] Landfill restriction
				Posted: Thu Mar 05, 2020 2:30 pm
				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.
whould other people even be able to download this as a mod when they join?
 
			 
			
					
				Re: [MOD REQUEST] Landfill restriction
				Posted: Thu Mar 05, 2020 4:04 pm
				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.
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 
			 
			
					
				Re: [MOD REQUEST] Landfill restriction
				Posted: Thu Mar 05, 2020 4:27 pm
				by ihaku
				
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
 
			 
			
					
				Re: [MOD REQUEST] Landfill restriction
				Posted: Thu Mar 05, 2020 5:06 pm
				by darkfrei
				ihaku wrote: Thu Mar 05, 2020 4:27 pm
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!
 
			 
			
					
				Re: [MOD REQUEST] Landfill restriction
				Posted: Thu Mar 05, 2020 6:47 pm
				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  

 
			 
			
					
				Re: [MOD REQUEST] Landfill restriction
				Posted: Thu Mar 05, 2020 7:16 pm
				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".
 
			 
			
					
				Re: [MOD REQUEST] Landfill restriction
				Posted: Thu Mar 05, 2020 8:50 pm
				by ihaku
				
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.
 
			 
			
					
				Re: [MOD REQUEST] Landfill restriction
				Posted: Thu Mar 05, 2020 9:31 pm
				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 
			 
			
					
				Re: [MOD REQUEST] Landfill restriction
				Posted: Fri Mar 06, 2020 5:30 pm
				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 ;).
 
			 
			
					
				Re: [MOD REQUEST] Landfill restriction
				Posted: Wed Sep 02, 2020 5:35 pm
				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.
 
			 
			
					
				Re: [MOD REQUEST] Landfill restriction
				Posted: Wed Sep 02, 2020 5:56 pm
				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 (6.37 KiB) Viewed 3454 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