[MOD 0.12.X] Concrete 1K

Topics and discussion about specific mods
Post Reply
Kane
Filter Inserter
Filter Inserter
Posts: 666
Joined: Fri Sep 05, 2014 7:34 pm
Contact:

[MOD 0.12.X] Concrete 1K

Post by Kane »

Type: Mod
Name: Concrete 1K
Description: Changes Concrete Stack size to 1000 from 100
License: idgaf
Version: 0.0.1
Release: 2015-09-26
Tested-With-Factorio-Version: 0.12.8 Should work with 0.12.+
Category: Other/vanilla+
Tags: Concrete
Download-Url: http://stonelegion.com/kane/concrete1k_0.0.1.zip

Picture:
Image

This was inspired to make a simple mod because of this post that I did not agree with but thought why not make a mod so if someone wants it changes they have a mod for it.
https://forums.factorio.com/forum/vie ... 16&t=16501

Colossus
Long Handed Inserter
Long Handed Inserter
Posts: 56
Joined: Mon Mar 10, 2014 8:31 pm
Contact:

Re: [MOD 0.12.X] Concrete 1K

Post by Colossus »

Could you add compatibility for the color coding mod? https://forums.factorio.com/forum/vie ... 44&t=13907

I did so just by adding the default ones to the data file, but I'm not very skilled with coding, and don't know if there's a more elegant way, especially since it looks like the color mod was written with customization in mind (users can insert additional colors which wouldn't be captured by my brute force method). Of course, there would need to be detection of the color coding mod too... not sure how to do that either.

Code: Select all

data.raw.item["concrete-red"].stack_size = 1000
data.raw.item["concrete-orange"].stack_size = 1000
data.raw.item["concrete-yellow"].stack_size = 1000
data.raw.item["concrete-green"].stack_size = 1000
data.raw.item["concrete-cyan"].stack_size = 1000
data.raw.item["concrete-blue"].stack_size = 1000
data.raw.item["concrete-purple"].stack_size = 1000
data.raw.item["concrete-magenta"].stack_size = 1000
data.raw.item["concrete-white"].stack_size = 1000
data.raw.item["concrete-black"].stack_size = 1000
data.raw.item["concrete-hazard-left"].stack_size = 1000
data.raw.item["concrete-hazard-right"].stack_size = 1000
data.raw.item["concrete-fire-left"].stack_size = 1000
data.raw.item["concrete-fire-right"].stack_size = 1000

PiggyWhiskey
Filter Inserter
Filter Inserter
Posts: 252
Joined: Wed May 13, 2015 5:28 am
Contact:

Re: [MOD 0.12.X] Concrete 1K

Post by PiggyWhiskey »

Colossus wrote:Could you add compatibility for the color coding mod? https://forums.factorio.com/forum/vie ... 44&t=13907

I did so just by adding the default ones to the data file, but I'm not very skilled with coding, and don't know if there's a more elegant way, especially since it looks like the color mod was written with customization in mind (users can insert additional colors which wouldn't be captured by my brute force method). Of course, there would need to be detection of the color coding mod too... not sure how to do that either.
Detecting color coding mod would be reasonably simple.

Code: Select all

if data.raw.item["concrete-red"] then
  --do something.
  --concrete-red can be any item. If it exists, this section runs.
end

As for finding all concrete, If the mod (and any other mods) are cloning the base game concrete/stone bricks (which I think they would) they should fall in the subgroup of "terrain"
So you could do something like:

Code: Select all

for i, x in pairs(data.raw["terrain"]) do
    x.stack_size = 1000
end
I haven't tested it, it'll only work in data.lua (from what I've managed to google) so you should test it to make sure it only returns the concrete/bricks versions. (Change x.stack_size = 1000 to game.player.print(x.name)

Post Reply

Return to “Mods”