jpanther / dectorio

Dectorio is a large mod that adds decorative elements to Factorio.
https://mods.factorio.com/mod/Dectorio
GNU General Public License v3.0
23 stars 17 forks source link

Speed Modifier #175

Open dbiser99 opened 4 years ago

dbiser99 commented 4 years ago

It might be too much extra coding to be worth it, but would it be possible to get separate modifiers for the different painted concrete types? I'd like to be able to have some styles speed things up (get across a rail crossing faster maybe), other styles slow things down (I have a situation now where an autonomous vehicle is overrunning a gate and need to slow the approach), and some other styles keep the defaults so they are just painted concrete and don't change anything. I very briefly looked at the code and I think I can do something basic with it myself for my own use, but short of the potential work involved thought it might be a good addition to the mod and figured I'd suggest it. Thanks

dbiser99 commented 4 years ago

Also, is there a list of the new priority order for the colors somewhere I've missed? Is it as simple as how they appear in the signals list? I hadn't checked out that part of my base yet, but just walked past a section where the default color of a lamp was Yellow with Green and Red coming in on top of it based on circuit condition. Your mod seems to have changed the order so Green is now the lower priority which means that a lamp which should be green is now yellow. (Red still overrides the color correctly as it is still higher than yellow.)

On a related note, I like having the preset colors and have made good use of the priority system, but I'd be interested in having a way to either toggle priority so I can have multiple colors of lamps on the same wire and/or be able to set custom colors by sending RGB values using the Red Green and Blue signals. Seems like something that would fit nicely into the theme of your mod.

dbiser99 commented 4 years ago

Another idea...In the process of playing with Dectorio and Asphalt Pavement I came up with a new entitiy I'd like to request...guardrails. Thinking up to 3 types...standard steel, the older wire cable style, cement "jersey barrier" or "K-Rail" style

jpanther commented 4 years ago

Hey, thanks for all the suggestions. The different modifiers for different concretes is definitely something I could look to add in the future. The only downside to it is it adds a lot of extra mod settings and it might start to get a bit confusing for people, but I'll see if there's a nice way to do it.

With regards to the colour priorities, as far as I know there's no way to set a priority on them. I can only assume the order is determined by some other characteristic. Perhaps because Dectorio is adding more colours in, it's changing the priority in some way but it's certainly nothing I'm doing intentionally. I also don't believe it's possible to do full RGB colour mixing on the lamp either as the game only supports colours that are mapped at data load time. I'm not sure what your use case for these lamps so it's hard to know what a good solution could be.

The guard rails is also a good idea. I always intended to expand on the decorations as I wanted more options other than just the traffic bollard. I'll have to look into ways to create these assets though as I'm not a graphic designer so coming up with visuals is the hardest part of this request!

dbiser99 commented 4 years ago

Thanks.

Looking at the base game, I'm not surprised at the limitations on lamps. The priority systems is certainly useful in its own right, but logically I never understood why the option to do no-priority or RGB color mixing wasn't there. Both seem like pretty simple things to do...add checkboxes or signals to the lamps to enable or disable priority and enable or disable an RGB mode. After that if priority is disabled, it only shows the preset color channel color. If RGB is enabled the Red, Green, and Blue signals become level values from say 0-255 instead of an on/off. If the base game won't allow it, even as a mod, there isn't much you can do and I totally understand. I'm just happy you have the additional colors and the Glow Lamp options. I didn't mind the illumination radius decreasing with the colors, but visually it bothered me that the glow was still white. Now I can actually color code the lights in the different areas of my base and have it look right.

I'm not a graphic designer myself or I'd offer to help. I'm barely a programmer and currently would be lost trying to make a mod from scratch. I understand the base concepts from other programming work I've done, but it has all been highly specialized applications and the Factorio mods are the first contact with Lua I've had. It has been a lot of fun reading through the code, seeing how different people do things, and in some over-all rare cases making a custom version for myself with a recipe balanced more inline with my opinions and game play or if I ever get that far, stuff like yours were it isn't "pretty" but I think if I changed your conditional coding for the concrete modifier to split off the color I wanted to be slow, I could hard code the values for that one type. Actually that just gave me a thought on how you might be able to do it...give say 2 modifier levels (with a third, possibly hidden, default level) and in addition to saying what the modifier should be, have some sort of check box system to indicate the player wants a type of concrete associated with that level. A little more complicated than the over-all modifier now, but I think that chould be pretty simple without exposing every type to its own modifier...and selfishly solves my problem, as I don't need more than 2 modifiers + default.

dbiser99 commented 4 years ago

In regards to the color signal order, I played around with some things, and came up with the attached modifications to the control.lua file. It restores the vanilla signal order so circuits made with that priority order still work properly and intersperses the new colors you've added somewhat chromatically in a way that seems to be what you were going for with your changes. The vanilla order isn't really choromatic, so the chromatic aspect here isn't perfect though.

Use it in a future update. Don't use it at all. Make it switchable so people like me that have built circuits around the vanilla priorities and people that may have built or rebuilt circuits based on your order are both served ...Just thought I'd throw it out there. (I prefer it this way, but it literally just reorders the list and doesn't change any actual code. As long as you don't drastically change it, it'll be easy to change for my own purposes in future updates.)

config.zip

jpanther commented 4 years ago

Thanks, I'll look to include the change in the next update.

jpanther commented 3 years ago

I have to admit this coloured signal order change had fallen off my radar. It will be in the next release!

dbiser99 commented 3 years ago

Awesome! I haven't actually played for a bit myself (new computer and didn't get the files transferred right away plus some work returned and I wasn't sitting at home as often) but I saw it listed in the release notes and look forward to checking it out.

Also thanks for the recommendations to replace the signs. I'll miss the look and feel of yours, but the Industrial Display Plates are a nice replacement.