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

Topics and discussion about specific mods
TRauMa
Inserter
Inserter
Posts: 40
Joined: Fri Jan 15, 2016 3:48 pm
Contact:

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

Post by TRauMa »

Yep, get well soon. I may pick this up, at least the trainless version - maybe there is a smart way to migrate the lamps to vanilla ones with the colours preset, concrete should be easy to do as soon as we have the new one as a template. Next week is... turbulent for me, so it might take me a while, if anyone else want's to jump in, don't hold back.

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 »

TRauMa wrote:Yep, get well soon. I may pick this up, at least the trainless version - maybe there is a smart way to migrate the lamps to vanilla ones with the colours preset, concrete should be easy to do as soon as we have the new one as a template. Next week is... turbulent for me, so it might take me a while, if anyone else want's to jump in, don't hold back.
It might be possible to write a migration to replace the train engines with vanilla ones and update the colors on the fly. I'm not entirely sure how as usually you'd use a json migration for such a thing and I don't think it can also change parameters. It would be pretty sweet for a straight migration to vanilla engines to retain the current colors.

As for the lamps, my brief experimentation with vanilla lamps is that they'll only change color in response to a signal from a circuit network. The minimum one could replace the colored lamps with in vanilla is a constant combinator, vanilla lamp, and a wire. The vanilla lamp colors can at least be altered without too much trouble. I noticed the RGB values in the game base files while attempting to make another mod work. So, there might still be some value to straight up colored lamps on their own.

Concrete can probably be copied as is without any problem. Just make sure to deal with the single hazard style vanilla picked up in 0.13.

Sunnova
Fast Inserter
Fast Inserter
Posts: 169
Joined: Mon May 16, 2016 12:10 pm
Contact:

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

Post by Sunnova »

I have no interest in taking over this mod, but the changes to make it work were not that hard. I fixed the json file, added in
"factorio_version": "0.13",
"dependencies": ["base >= 0.13"],

Since I didn't ever use anything for the trains, I removed that from all the code and locale, changed the main graphic to remove the train next to the light. And with some limited testing, no problems so far.

TRauMa
Inserter
Inserter
Posts: 40
Joined: Fri Jan 15, 2016 3:48 pm
Contact:

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

Post by TRauMa »

charmead wrote:Since I didn't ever use anything for the trains, I removed that from all the code and locale, changed the main graphic to remove the train next to the light. And with some limited testing, no problems so far.
Well congrats, you recreated color-coding-lite :). If you add a link here I'm sure d3phoenix will add it to the first post.

*Edit: I just realized that this may sound way worse than I meant it - it's cool that you did this, and it would be cooler still if you'd share it, because there's probably a lot of people who are eager to try 0.13 but are held back because they have maps that use mods like this and that make them anxious about losing their concrete pixel art and their coloured lamp setups, and even if you gave instructions how to recreate your work, for some it's really way out of their comfort zone to extract files, edit scripts and update mod zips this way. In short, I'd encourage you to share early, even if you consider your version of color coding neither complete nor a proper fork with support, as it may still be useful (or a game/work/life saver) to some.

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 »

If noone else has plans to continue this, I'll set up a github project for it and make a no-trains update for 0.13 (basically, fixed-color lamps, and the concrete colors that aren't yet stock - the bits I have to do for myself anyway ;) ).

Sunnova
Fast Inserter
Fast Inserter
Posts: 169
Joined: Mon May 16, 2016 12:10 pm
Contact:

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

Post by Sunnova »

I would be happy to send the zip file of the version I modified if anyone wants to take it on. At my age I'm not really interested in getting into supporting mods for a game again. (I don't have a problem changing the ones I use for myself though.) The lamps and concrete all work fine so far. Let me know if anyone wants it.

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 »

I've already essentially duplicated what you'd described and am now working on converting the concretes (and lamps, if it'll let me...) to rotate-to-color single items (one for color, one for fire), like the new stock hazard concrete works!

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 »

Turns out you can't quite make it one item, since you only get four rotate states. For now, they're RGBW, CMYK, and orange/purple. I've also included a migration which should convert colored trains back to stock trains, convert old hazard concrete to stock, and convert colored concrete items to the corresponding combined concrete item. I've posted it on github here

Sunnova
Fast Inserter
Fast Inserter
Posts: 169
Joined: Mon May 16, 2016 12:10 pm
Contact:

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

Post by Sunnova »

Thank you!

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 »

Just updated github (and replaced the download on the mod portal) to add a missing migration file to enable the new recipes in an old save file. Not sure how I missed that last night.

User avatar
d3phoenix
Inserter
Inserter
Posts: 46
Joined: Wed Dec 17, 2014 2:24 am
Contact:

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

Post by d3phoenix »

Thank you everyone :)

I'm linking the new github in the OP.

If a new forum thread is started for the 0.13 version let me know and I will link that as well.

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 »

They seem to want us to go all-in on modportal+github, and that's just fine with me, so I doubt there will be a new forum thread. My intent is to maintain the mod in it's current form/functionality, as needed by game updates, and collapse colored items into fewer items as game updates allow, but otherwise I have no real improvement plans at this time (because it was all done pretty well the first time! ;) ).

Also, if anyone wants to update translations, or make smarter train migrations (maybe convert the colors to stock colors, if that's possible?), or anything else, pull requests are of course welcome! :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 »

You have to fix the code. You missed other color concrete colors. For now it only shows 3 colored concrete but the names are wrong, there are missing pathfinders.

color-coding_1.0.8

Might be other errors in code.

Also bump up the crafting speed. The crafting speed is very low. Bump it up by 100x at least and test it. Before it was seconds to make 1k of a certain color- now it takes just too long. We already made concrete- no need to make it twice.

Update:

Had to remove it. The mod conflicts with 0.13.1 factorio directories causing a loop "desync" on headless server. The game mod and mod uses same entity(hazard concrete(from first glance)) which is not clearly defined thus they cancel each other out when the server loads the game- it prioritizes factorio directories over mod.

PS. Come on man- its a cool mod- do it right. Fix the code- test it and upload.

User avatar
d3phoenix
Inserter
Inserter
Posts: 46
Joined: Wed Dec 17, 2014 2:24 am
Contact:

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

Post by d3phoenix »

Zingo2, I don't appreciate your tone here. Modding is a collaborative community effort. Getting things right takes a lot of time and energy, and there are bound to be bugs during a transition as large as 0.12 to 0.13.

justarandomgeek was kind enough to take time out of his day to get this project up on github and patch it for 0.13 when I could not. All CC users owe him thanks for that. The least you can do is be polite and patient while any kinks get worked out. Being demanding and telling a modder to "do it right" isn't going to help things get fixed any quicker.

As for the extra concrete colors, i believe justarandomgeek has set them up to use the rotate key to switch colors, so that you can keep fewer unique items in your inventory. (This is explained in the changes on github)

If you see issues with the mod, please file a constructive bug report on github or better yet open a pull request if you already know how to fix it.

Thank you.

TRauMa
Inserter
Inserter
Posts: 40
Joined: Fri Jan 15, 2016 3:48 pm
Contact:

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

Post by TRauMa »

Rekt.

As in, justly rectified.

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:You have to fix the code. You missed other color concrete colors. For now it only shows 3 colored concrete but the names are wrong, there are missing pathfinders.

color-coding_1.0.8

Might be other errors in code.

Also bump up the crafting speed. The crafting speed is very low. Bump it up by 100x at least and test it. Before it was seconds to make 1k of a certain color- now it takes just too long. We already made concrete- no need to make it twice.

Update:

Had to remove it. The mod conflicts with 0.13.1 factorio directories causing a loop "desync" on headless server. The game mod and mod uses same entity(hazard concrete(from first glance)) which is not clearly defined thus they cancel each other out when the server loads the game- it prioritizes factorio directories over mod.

PS. Come on man- its a cool mod- do it right. Fix the code- test it and upload.
Rotate to get the other colors from each item - one for RGBW, one for CMYK, and one for orange/purple. I wanted to reduce the item count, as there's already quite a lot of items! I'll look into adding some explanatory text when hovering over one of the items. I've also requested from Factorio devs to have more than 4 rotation states, and may experiment with blueprint-book like behavior in the mean time if I get the kinks worked out of the other mods I'm trying to drag into the future!

The recipes are essentially unchanged from the previous version, apart from there being fewer variants, as each item now covers multiple colors. They seems blindingly fast to me. Perhaps you're missing other crafting speed modifiers you previously had?EDIT: Actually, upon further review, it looks like I may have inadvertently changed the crafting speed. They'll be restored in the next build, probably sometime tonight!

I don't use multiplayer, so I hadn't tested that. I'll try to get some time this weekend to have a look at what's up there.

As far as I can tell, all the hazard bits have been removed (Here's a search). I don't speak german, so someone else will have to pullreq me a new translation file, but otherwise the only mention at all is in the migration file, which converts mod-hazard-concrete from an old save file into stock hazard concrete. Where are you finding bits still around to conflict?

It's all working beautifully on 0.13.1 for me!

I'm not sure what you mean by "missing pathfinders", but if you can clarify that, I'll certainly look into it!

And as d3phoenix said, a clear bug report on github (or better yet a pullreq) is in general the best way to go about these things! :)
Last edited by justarandomgeek on Fri Jul 01, 2016 12:56 am, edited 1 time in total.

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 »

Thank you for the updates and migrations for this mod!!!! Love how we can rotate the fire hazard however Not sure how I feel about rotating to get the other color concrete, maybe its because there are still 3 diff items for it. Guess I will have to get used to it until/if Factorio increases the rotation states!

Thanks again... As for crafting speed It is perfect and matches the factorio hazard creation speed (.25/sec for 10) so I don't see no need to change it. (speed was insanely fast in .12 .1/sec for 10 I think) My factories manage to keep up just fine and if they don't while then it is time to build more assembly machines!

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 »

Nexela wrote:Thank you for the updates and migrations for this mod!!!! Love how we can rotate the fire hazard however Not sure how I feel about rotating to get the other color concrete, maybe its because there are still 3 diff items for it. Guess I will have to get used to it until/if Factorio increases the rotation states!

Thanks again... As for crafting speed It is perfect and matches the factorio hazard creation speed (.25/sec for 10) so I don't see no need to change it. (speed was insanely fast in .12 .1/sec for 10 I think) My factories manage to keep up just fine and if they don't while then it is time to build more assembly machines!
Yeah, I don't love the three items as much as I loved the idea of making it a single item - thus the sort-of-half-plan to investigate a shift-scroll behavior for it!

I'd intended to leave the speed as it was, but you're right, what I ended up doing was duplicating the stock hazard concrete, because I wasn't paying much attention! I'm on the fence now about if that's right, or if I should match earlier versions, but I generally lean towards fitting in with stock over fitting in with old versions.

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 »

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.

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 »

Oh sorry- I thought i made it constructive. Didn't meant no offense.

Yeah the explanation- missed that part- didn't know you can rotate tiles. Maybe its possible to add a small UI helpbox or something to let know as such a feature exists- didnt find such info thus my conclusions in previous post.

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.

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.

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.

Post Reply

Return to “Mods”