[MOD 0.12] Color Coding - Trains, Lights, and Concrete!

Topics and discussion about specific mods
User avatar
MrGrim
Fast Inserter
Fast Inserter
Posts: 240
Joined: Sat Apr 09, 2016 7:58 pm
Contact:

Re: [MOD 0.12] Color Coding - Trains, Lights, and Concrete!

Post by MrGrim »

Nexela wrote:I am half tempted to expand on this for personal use and have it be created like concrete and not from concrete. Using additional items in the recipe to change the color. Use a piece of copper ore to get redder colors, coal for darker etc.
In my dedicated Factorio modding browser window are about 6 or 7 tabs open to various pages about how modern pigments are made...

Ya I've had this thought as well :D

justarandomgeek
Filter Inserter
Filter Inserter
Posts: 302
Joined: Fri Mar 18, 2016 4:34 pm
Contact:

Re: [MOD 0.12] Color Coding - Trains, Lights, and Concrete!

Post by justarandomgeek »

zingo2 wrote: Ummm about crafting speed- hazard concrete is fine i guess but make it faster for the rest of colors. We have a huge base on our server- like HUGE and we need like 50k to 100k colored concrete. It takes now such a long time to craft it- ofc you can use console and just grab it or set a factory but how it was previously was handy you know.
I think my releases are going to continue using the same recipe that stock hazard concrete does, in order to fit into the game better. I'll connect that back to the config file (I broke that when copying/mangling recipes) though so it's easier to mod it locally for super fast crafting if you want!

zingo2 wrote: About those pathfinders- when i looked a the code it felt messy as i missed the part for rotating. Well in previous lamps and concrete were all in their own subcategory. If you made rotating part for concrete why not lamps too? or vice versa? Im not sure rotting tiles is intuitive in factorio to get other tiles- you know? Ofc i can be wrong. Was liking before that you could easily get what you want- fast and easy.
I'm still not clear what a "pathfinder" even is?

The goal was to just have one "colored concrete" and one "colored lamp" that lays down any of the things. Tiles were what got attention first, because tiles needed work anyway to make rotating fire concrete. It looked like I could combine them all (each tile just gets a "next rotation", it wasn't apparent there was a limit), but they ended up as three items because I got it half done and then discovered the game won't let me put more than four rotations for a thing, and then having gotten there I didn't want to change lamps until I had a cleaner result with concrete. When I get some time, I'll be playing with hooking in a script to do shift-scroll behavior like the blueprint book, if I can.
zingo2 wrote: Yea the mod works fine on single player but on multiplayer when i placed down orange and hazard tiles on next load up the server just went in deysnc loop. The server overwrote the log file but recalling from head it tried to recreate missing entities it could not find anywhere. Like 10x failed attempts then desync- repeat. After i removed the mod- restarted server- no problems.
I'll do some multiplayer testing this weekend. To be clear: are you loading an existing save? If so, does it have colored concrete in it, and if so, is it from before/after 0.13? Does loading the same save in single-player work?
MrGrim wrote:
Nexela wrote:I am half tempted to expand on this for personal use and have it be created like concrete and not from concrete. Using additional items in the recipe to change the color. Use a piece of copper ore to get redder colors, coal for darker etc.
In my dedicated Factorio modding browser window are about 6 or 7 tabs open to various pages about how modern pigments are made...
Ya I've had this thought as well :D
That's pretty much the opposite direction I'm going (I want one item that does all the things essentially freely, to reduce item/recipe clutter - with the eventual goal of not needing a dedicated category), but by all means fork it and make a complex-recipes version! You might want to fork off before the concrete merging changes though!

User avatar
MrGrim
Fast Inserter
Fast Inserter
Posts: 240
Joined: Sat Apr 09, 2016 7:58 pm
Contact:

Re: [MOD 0.12] Color Coding - Trains, Lights, and Concrete!

Post by MrGrim »

justarandomgeek wrote:That's pretty much the opposite direction I'm going (I want one item that does all the things essentially freely, to reduce item/recipe clutter - with the eventual goal of not needing a dedicated category), but by all means fork it and make a complex-recipes version! You might want to fork off before the concrete merging changes though!
I play with a mix of things like hard crafting, n.tech chemistry, fractional distillation, bobs electronics, bio farm and other mods that all increase complexity all glued together with about 2500 lines of my own private glue mod (removes duplicate recipes and merges duplicate items and fluids, removes OP structures from a few of the mods, re-orders everything in the crafting window, re-balances several things etc). What's a few more lines to add pigment recipes and expanded concrete recipes? :)

zingo2
Inserter
Inserter
Posts: 42
Joined: Sun Jun 19, 2016 7:52 pm
Contact:

Re: [MOD 0.12] Color Coding - Trains, Lights, and Concrete!

Post by zingo2 »

justarandomgeek wrote:
I'm still not clear what a "pathfinder" even is?

The goal was to just have one "colored concrete" and one "colored lamp" that lays down any of the things. Tiles were what got attention first, because tiles needed work anyway to make rotating fire concrete. It looked like I could combine them all (each tile just gets a "next rotation", it wasn't apparent there was a limit), but they ended up as three items because I got it half done and then discovered the game won't let me put more than four rotations for a thing, and then having gotten there I didn't want to change lamps until I had a cleaner result with concrete. When I get some time, I'll be playing with hooking in a script to do shift-scroll behavior like the blueprint book, if I can.
Well About those pathfinders- i did roughly compare the old colored mod with your one and i think i found some extra lines with no links, like procedure anchors without a procedure. Then again i missed the rotation part. ;) As you mentioned you will still work on it to make 1 tile like in blueprint book then it will all be different in the end. You might even try to copy and implement a "concrete/ lamp" book. idea for thought.
justarandomgeek wrote:
I'll do some multiplayer testing this weekend. To be clear: are you loading an existing save? If so, does it have colored concrete in it, and if so, is it from before/after 0.13? Does loading the same save in single-player work?
On my single player on my pc the color coding worked without errors. But the server is configured to save the game when last person exits. So when next time i logged in the server loaded its internal save game which failed. The Map still had the colored concrete placed but it was trying to find some missing entities and after 10x failed tries the server desynced each time. (just a hunch but the color mod is not binned to train colors right? As trains are colored separately now)

It was on 0.13.1 version. I did not test loading the multiplayer on single player, so cant tell you if it worked.(to my mind it should have but that's a hunch)

Well good luck on the mod and looking forward to the results! Pixel art in factorio has never been better! :D

justarandomgeek
Filter Inserter
Filter Inserter
Posts: 302
Joined: Fri Mar 18, 2016 4:34 pm
Contact:

Re: [MOD 0.12] Color Coding - Trains, Lights, and Concrete!

Post by justarandomgeek »

zingo2 wrote: just a hunch but the color mod is not binned to train colors right? As trains are colored separately now
The old versions provided colored trains. I never used them myself, but didn't want to break people's trains by just removing them, so I also included the rules from the old "remover" script to convert them back to stock trains. Other than that one migration file, this mod no longer interacts with trains at all, as stock's color support is a superior replacement.

zingo2
Inserter
Inserter
Posts: 42
Joined: Sun Jun 19, 2016 7:52 pm
Contact:

Re: [MOD 0.12] Color Coding - Trains, Lights, and Concrete!

Post by zingo2 »

Any news? Did you fix the problems or stuff?

I see you have not made any changes so does that mean you are abandoning the mod?

Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: [MOD 0.12] Color Coding - Trains, Lights, and Concrete!

Post by Nexela »

zingo2 wrote:Any news? Did you fix the problems or stuff?
Mod is working as intended for me what problems are you talking about?

zingo2 wrote:I see you have not made any changes so does that mean you are abandoning the mod?
The original author is not maintaining the mod, however Justarandomgeek has updated it for .13 and for the most part is feature complete.

zingo2
Inserter
Inserter
Posts: 42
Joined: Sun Jun 19, 2016 7:52 pm
Contact:

Re: [MOD 0.12] Color Coding - Trains, Lights, and Concrete!

Post by zingo2 »

Are you Justarandomgeek Nexela?

Please dont speak in his name or part.

If you paid attention your questions have been answered in the posts just above.

And FYI feature complete is not code error free.
Have a nice day and happy building!

justarandomgeek
Filter Inserter
Filter Inserter
Posts: 302
Joined: Fri Mar 18, 2016 4:34 pm
Contact:

Re: [MOD 0.12] Color Coding - Trains, Lights, and Concrete!

Post by justarandomgeek »

zingo2 wrote:Are you Justarandomgeek Nexela?

Please dont speak in his name or part.

If you paid attention your questions have been answered in the posts just above.

And FYI feature complete is not code error free.
Have a nice day and happy building!
At the risk of getting a mod-slap myself (you've already gotten yours...): You're being a bit of an ass. I am a volunteer working on this project for free, because I wanted to continue using it myself.

I have not had a chance to do any multiplayer testing, due to real life.

I did some research on making a "color picker" tool (both to make current-color more obvious, and to make colored concrete a single item), but as far as I can tell, I can't do that while also allowing concrete to be robot-buildable, which is a hard requirement imho. I'll probably give up and revert it to the one-item-per-color for now (as much as I hate the item-clutter that causes), as rotation-colors also has the side effect of not allowing rotation of blueprints (or all your colors change). I hope to have that in the next few days. In the mean time, if you are not satisfied with the rate I'm working, you're welcome to fork the project and send pull requests or publish your own version, that's the beauty of permissive licenses!

justarandomgeek
Filter Inserter
Filter Inserter
Posts: 302
Joined: Fri Mar 18, 2016 4:34 pm
Contact:

Re: [MOD 0.12] Color Coding - Trains, Lights, and Concrete!

Post by justarandomgeek »

After much fighting with my computer to finally get two instances of the same Factorio install running (with a little help from Sandboxie), I did some multiplayer testing. The only messages I get from this version are FARL getting confused about the tiles/entities. I've been staring at the code (on both sides) for far too long, and I can't tell what it thinks is wrong - as far as I can tell, I did all the things it wants! As far as I can tell, this only prevents something to do with FARL's "metaconcrete", whatever that is?

I've reverted concrete back to 10 different items for the colors, as the half-way state was generally confusing. v1.0.9 will convert 1.0.8's merged-concrete items back into the first color from each group. In pre-1.0.8 save files that skip straight to 1.0.9, colored concrete will be preserved as if nothing ever happened. Sorry for making a mess in the concrete :?

zingo2
Inserter
Inserter
Posts: 42
Joined: Sun Jun 19, 2016 7:52 pm
Contact:

Re: [MOD 0.12] Color Coding - Trains, Lights, and Concrete!

Post by zingo2 »

Great job!

Your right I am being a bit of an ass but a little pressure on the buttons does not hurt anyone. If in the end the mod fixer learns to be better, the community gets a better working mod - all in all its a win-win for everyone. Besides criticism is needed. Not only does it make corrections you get benefit of doubt and you actively check for errors in future- making you a better modder/ programmer/ worker. There are many mods out there- many of them have huge errors(Ive tested many) some errors without a fresh rework are not fixable.

Most of those mods are in many versions- like look at the armor mods- too many same goal. If the mod wasn't fun and cool no one would give a dime for it- noone would test it for errors- it would rust and be forgotten and join the obsolete section. So given said that justarandomgeek cudos for the work you've done! Look at the progress you made- keep up the good job- in the end its all worth it(if sometimes it seems its not).

User avatar
MrGrim
Fast Inserter
Fast Inserter
Posts: 240
Joined: Sat Apr 09, 2016 7:58 pm
Contact:

Re: [MOD 0.12] Color Coding - Trains, Lights, and Concrete!

Post by MrGrim »

justarandomgeek wrote:Sorry for making a mess in the concrete :?
You're fine, despite Mr. "I'm being an asshole because it's good for you!" that thinks this is your second job. Thanks for updating this!

justarandomgeek
Filter Inserter
Filter Inserter
Posts: 302
Joined: Fri Mar 18, 2016 4:34 pm
Contact:

Re: [MOD 0.12] Color Coding - Trains, Lights, and Concrete!

Post by justarandomgeek »

MrGrim wrote:
justarandomgeek wrote:Sorry for making a mess in the concrete :?
You're fine, despite Mr. "I'm being an asshole because it's good for you!" that thinks this is your second job. Thanks for updating this!
That was directed more at anyone who installed 1.0.8 and thus now has all their concrete items bunched up on red, cyan and orange. Also meant to conjure the mental image of a kid who's just made a ton of hand/footprints in lots of colorful concrete just in time for it to set that way :D

Peppe
Fast Inserter
Fast Inserter
Posts: 223
Joined: Fri Nov 28, 2014 6:48 pm
Contact:

Re: [MOD 0.12] Color Coding - Trains, Lights, and Concrete!

Post by Peppe »

Mining colored concrete by hand or deconstruction planner is not returning anything?

Laying new colored concrete over old is also not returning any concrete.

Intended?

Config.lua
How you build the TILE_MINE_RESULT table looks correct, but it is always nil when looking by keys in tiles.lua ...

Manually setting all the colors works.
TILE_MINE_RESULT["red" ]="concrete-red"
TILE_MINE_RESULT["orange" ]="concrete-orange"
TILE_MINE_RESULT["yellow" ]="concrete-yellow"
TILE_MINE_RESULT["green" ]="concrete-green"
TILE_MINE_RESULT["cyan" ]="concrete-cyan"
TILE_MINE_RESULT["blue" ]="concrete-blue"
TILE_MINE_RESULT["purple" ]="concrete-purple"
TILE_MINE_RESULT["magenta"]="concrete-magenta"
TILE_MINE_RESULT["white" ]="concrete-white"
TILE_MINE_RESULT["black" ]="concrete-black"

Removed this loop:
for color,_ in ipairs(COLOR_TABLE) do
TILE_MINE_RESULT[color]="concrete-"..color
end



Also hovering fire hazard concrete item/recipe shows unknown key: "item-name.fire-hazard-concrete"

justarandomgeek
Filter Inserter
Filter Inserter
Posts: 302
Joined: Fri Mar 18, 2016 4:34 pm
Contact:

Re: [MOD 0.12] Color Coding - Trains, Lights, and Concrete!

Post by justarandomgeek »

Peppe wrote:Mining colored concrete by hand or deconstruction planner is not returning anything?

Laying new colored concrete over old is also not returning any concrete.

Intended?

Config.lua
How you build the TILE_MINE_RESULT table looks correct, but it is always nil when looking by keys in tiles.lua ...

Manually setting all the colors works.
TILE_MINE_RESULT["red" ]="concrete-red"
TILE_MINE_RESULT["orange" ]="concrete-orange"
TILE_MINE_RESULT["yellow" ]="concrete-yellow"
TILE_MINE_RESULT["green" ]="concrete-green"
TILE_MINE_RESULT["cyan" ]="concrete-cyan"
TILE_MINE_RESULT["blue" ]="concrete-blue"
TILE_MINE_RESULT["purple" ]="concrete-purple"
TILE_MINE_RESULT["magenta"]="concrete-magenta"
TILE_MINE_RESULT["white" ]="concrete-white"
TILE_MINE_RESULT["black" ]="concrete-black"

Removed this loop:
for color,_ in ipairs(COLOR_TABLE) do
TILE_MINE_RESULT[color]="concrete-"..color
end



Also hovering fire hazard concrete item/recipe shows unknown key: "item-name.fire-hazard-concrete"
The "unknown key" is a result of me doing a large revert at ~3am - I missed a locale file entry. It'll be fixed in the next build (probably in the next couple hours...), and is already fixed in source on github, thanks to a pullrequest! :)

I'm shocked I didn't try mining the concrete last night, only confirmed I could place every color, that's probably related to whatever FARL is griping about. it makes sense that setting them manually would work, as that's how I had done it in the previous version. Given that the game is forcing me to make so many items, I was hoping to stick to the procedural-generated items for it at the very least! I guess I'll have another look and see why that loop isn't behaving...

Edit: 1.1.0 going up now, fixing both of these issues. FARL also no longer complains. Turns out I just had to use pairs() instead of ipairs(). Probably the 3AM coding again...

zingo2
Inserter
Inserter
Posts: 42
Joined: Sun Jun 19, 2016 7:52 pm
Contact:

Re: [MOD 0.12] Color Coding - Trains, Lights, and Concrete!

Post by zingo2 »

That could explain the weird desync loop i was having with the mod, good find and fix!

Peppe
Fast Inserter
Fast Inserter
Posts: 223
Joined: Fri Nov 28, 2014 6:48 pm
Contact:

Re: [MOD 0.12] Color Coding - Trains, Lights, and Concrete!

Post by Peppe »

justarandomgeek wrote:
Peppe wrote:Mining colored concrete by hand or deconstruction planner is not returning anything?

Laying new colored concrete over old is also not returning any concrete.

Intended?

Config.lua
How you build the TILE_MINE_RESULT table looks correct, but it is always nil when looking by keys in tiles.lua ...

Manually setting all the colors works.
TILE_MINE_RESULT["red" ]="concrete-red"
TILE_MINE_RESULT["orange" ]="concrete-orange"
TILE_MINE_RESULT["yellow" ]="concrete-yellow"
TILE_MINE_RESULT["green" ]="concrete-green"
TILE_MINE_RESULT["cyan" ]="concrete-cyan"
TILE_MINE_RESULT["blue" ]="concrete-blue"
TILE_MINE_RESULT["purple" ]="concrete-purple"
TILE_MINE_RESULT["magenta"]="concrete-magenta"
TILE_MINE_RESULT["white" ]="concrete-white"
TILE_MINE_RESULT["black" ]="concrete-black"

Removed this loop:
for color,_ in ipairs(COLOR_TABLE) do
TILE_MINE_RESULT[color]="concrete-"..color
end



Also hovering fire hazard concrete item/recipe shows unknown key: "item-name.fire-hazard-concrete"
The "unknown key" is a result of me doing a large revert at ~3am - I missed a locale file entry. It'll be fixed in the next build (probably in the next couple hours...), and is already fixed in source on github, thanks to a pullrequest! :)

I'm shocked I didn't try mining the concrete last night, only confirmed I could place every color, that's probably related to whatever FARL is griping about. it makes sense that setting them manually would work, as that's how I had done it in the previous version. Given that the game is forcing me to make so many items, I was hoping to stick to the procedural-generated items for it at the very least! I guess I'll have another look and see why that loop isn't behaving...

Edit: 1.1.0 going up now, fixing both of these issues. FARL also no longer complains. Turns out I just had to use pairs() instead of ipairs(). Probably the 3AM coding again...
Nice... i always forget about lua's pairs vs ipairs iteration and ability to silently fail.

justarandomgeek
Filter Inserter
Filter Inserter
Posts: 302
Joined: Fri Mar 18, 2016 4:34 pm
Contact:

Re: [MOD 0.12] Color Coding - Trains, Lights, and Concrete!

Post by justarandomgeek »

Peppe wrote: Nice... i always forget about lua's pairs vs ipairs iteration and ability to silently fail.
I'm relatively new to lua (learning it the same way I always do - read some code. patch some preexisting code. write some new code.), so I'm still getting used to it's quirks anyway. On the plus side, I now actually understand the difference between pairs and ipairs! :D

zingo2
Inserter
Inserter
Posts: 42
Joined: Sun Jun 19, 2016 7:52 pm
Contact:

Re: [MOD 0.12] Color Coding - Trains, Lights, and Concrete!

Post by zingo2 »

Well with all the bug finds and fixes and all the mod is working superb now- had no crashes- desyncs whatsoever.

The extra tab for colors ain't so bad- you get used to that very easy and its kinda intuitive to select a color and make what you want to make.

So with that- I recommenced this mod as its fun and definitely a keeper!

Waiting on your next project mod! haha :D

justarandomgeek
Filter Inserter
Filter Inserter
Posts: 302
Joined: Fri Mar 18, 2016 4:34 pm
Contact:

Re: [MOD 0.12] Color Coding - Trains, Lights, and Concrete!

Post by justarandomgeek »

zingo2 wrote:Well with all the bug finds and fixes and all the mod is working superb now- had no crashes- desyncs whatsoever.

The extra tab for colors ain't so bad- you get used to that very easy and its kinda intuitive to select a color and make what you want to make.

So with that- I recommenced this mod as its fun and definitely a keeper!

Waiting on your next project mod! haha :D
I still don't like the fact that it creates so many new items, but I guess I'll just tolerate that for a while...

As for my next project... I'm playing with blueprints... I'm doing bad things with blueprints

Post Reply

Return to “Mods”