[MOD 0.16] Diesel Locomotive

Topics and discussion about specific mods
User avatar
Mango
Long Handed Inserter
Long Handed Inserter
Posts: 95
Joined: Fri Feb 22, 2013 6:27 pm
Contact:

Re: [MOD 0.15] Diesel Locomotive

Post by Mango »

Well that's a shame. :cry:

Are you planing to make it like that or do you want to wait until they make those "non-trivial time taking changes"?
Hm.... so we have a mystery donor... intriguing.

evildogbot100
Fast Inserter
Fast Inserter
Posts: 152
Joined: Sun Dec 18, 2016 3:02 pm
Contact:

Re: [MOD 0.15] Diesel Locomotive

Post by evildogbot100 »

Possibly do it during holiday, cause most of the time I took to make the mod back then is actually learning how modding in factorio works and lua in general so I guess I can do it a bit faster this time.

User avatar
Mango
Long Handed Inserter
Long Handed Inserter
Posts: 95
Joined: Fri Feb 22, 2013 6:27 pm
Contact:

Re: [MOD 0.15] Diesel Locomotive

Post by Mango »

that would be great :) Im looking forward to play with it
Thanks
Hm.... so we have a mystery donor... intriguing.

evildogbot100
Fast Inserter
Fast Inserter
Posts: 152
Joined: Sun Dec 18, 2016 3:02 pm
Contact:

Re: [MOD 0.16] Diesel Locomotive

Post by evildogbot100 »

Updated for 0.16 with fuel tank overhaul so it doesn't use some weird workaround with hidden fluid wagon anymore. Overall it is a lot more stable than the previous version but some animation no longer possible. Now also use the old Factorio locomotive graphic to differentiate with vanilla locomotive

User avatar
Mango
Long Handed Inserter
Long Handed Inserter
Posts: 95
Joined: Fri Feb 22, 2013 6:27 pm
Contact:

Re: [MOD 0.16] Diesel Locomotive

Post by Mango »

wohoo thanks :)
Hm.... so we have a mystery donor... intriguing.

evildogbot100
Fast Inserter
Fast Inserter
Posts: 152
Joined: Sun Dec 18, 2016 3:02 pm
Contact:

Re: [MOD 0.16] Diesel Locomotive

Post by evildogbot100 »

I'm thinking of changing the mod from making a separate train that accepts fluid fuel to just forcing vanilla locomotive to accept fluid fuel IN ADDITION to solid fuel. How do you guys think?

FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2483
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: [MOD 0.16] Diesel Locomotive

Post by FuryoftheStars »

Personally, I like them separate. I would say, though, to swap the graphics between the two trains so that the diesel looks like the newer / more advanced one. ;)

I do have a quick request, though, with your code. I'm creating a mod at the moment that has yours as a dependency (currently it's for personal use, but I've been considering on releasing it once done, though I would obviously notify you first). In this mod, among other things, I'm creating a couple different diesel consuming train variants with different tank sizes. I can't seem to directly edit your TANK_CAPACITY variable in the config.lua file from my mod, which is fine because I've worked around it by defining my own vars and then redefine trains as needed with those. However, you use this var in the control.lua file in a couple functions (ON_DESTROYED and ON_PLAYER_MAIN_INVENTORY_CHANGED) that I assume have to do with removing/destroying the fake fluids in the train. While I haven't encountered any issues (yet) with having a train that has a max capacity that is less than your TANK_CAPACITY var, I am mildly concerned on what would happen if I added one with a capacity greater than your defined variable.

Is there any way to change this code so that it will dynamically query the locomotive in question on what it's max tank capacity is and use that value instead rather than your statically assigned TANK_CAPACITY var?

EDIT: Also, as another thought for something that may not see fruition anyway, can something like this be modified to support single tank setups (in addition to the triple tank)? One of the things I'm doing in my mod is changing the base/vanilla loco to be more like a steam engine, but wanted to throw in water requirements. :) I already know that if I inadvertently modify the diesel burner inventory size to something other than 3, errors are thrown when it attempts to refuel. :P
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles

User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2631
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: [MOD 0.16] Diesel Locomotive

Post by steinio »

Hi,

the latest update of Geothermal Heat broke your mod:

Code: Select all

31.064 Error ModManager.cpp:1023: Error while loading item prototype "Diesel-Locomotive-geothermal-water-green-1" (item): Key "icon" not found in property tree at ROOT.item.Diesel-Locomotive-geothermal-water-green-1
Modifications: Diesel Locomotive
Change was, that with Alien Biomes (what i also use) the spawn tiles were changed.

Cu, steinio
Image

Transport Belt Repair Man

View unread Posts

evildogbot100
Fast Inserter
Fast Inserter
Posts: 152
Joined: Sun Dec 18, 2016 3:02 pm
Contact:

Re: [MOD 0.16] Diesel Locomotive

Post by evildogbot100 »

FuryoftheStars wrote:Personally, I like them separate. I would say, though, to swap the graphics between the two trains so that the diesel looks like the newer / more advanced one. ;)
Why tho? I thought people want to leave the vanilla one alone.
FuryoftheStars wrote: Is there any way to change this code so that it will dynamically query the locomotive in question on what it's max tank capacity is and use that value instead rather than your statically assigned TANK_CAPACITY var?

EDIT: Also, as another thought for something that may not see fruition anyway, can something like this be modified to support single tank setups (in addition to the triple tank)? One of the things I'm doing in my mod is changing the base/vanilla loco to be more like a steam engine, but wanted to throw in water requirements. :) I already know that if I inadvertently modify the diesel burner inventory size to something other than 3, errors are thrown when it attempts to refuel. :P
Alright, I will change it to use capacity from prototype instead of static from config.lua. On your second request, I think it is not possible without changing big part of the code, depends on what exactly you ask though, because I'm still not sure what exactly are you going to implement.
Last edited by evildogbot100 on Wed Jan 31, 2018 7:31 pm, edited 1 time in total.

evildogbot100
Fast Inserter
Fast Inserter
Posts: 152
Joined: Sun Dec 18, 2016 3:02 pm
Contact:

Re: [MOD 0.16] Diesel Locomotive

Post by evildogbot100 »

To Steinio, thanks for using/testing my mod, I will check geothermal around the weekend to see the problem. Diesel locomotive only search for fluids, that means geothermal have a fluid with no icon. Most likely I will implement some check for fluid with no icon for next version.

FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2483
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: [MOD 0.16] Diesel Locomotive

Post by FuryoftheStars »

evildogbot100 wrote:Why tho? I thought people want to leave the vanilla one alone.
Eh, probably more my personal tastes. Just seems to make more sense to me as the vanilla train is more closely akin to a steam engine (just without the water management) than a diesel in the sense of what they use for fuel, so it seems more logical in my mind for the diesel to have the more advanced look. You can leave it as is, though. I have them swapped in my personal mod. :)
evildogbot100 wrote:Alright, I will change it to use capacity from prototype instead of static from config.lua. On your second request, I think it is not possible without changing big part of the code, depends on what exactly you ask though, because I'm still not sure what exactly are you going to implement.
Thanks. :) And don't worry about the second bit. It wasn't so much a request as it was something that I was throwing out there that I haven't even begun to really look at yet. I doubt what I'm envisioning would work, anyway, due to game limitations.
steinio wrote:Hi,

the latest update of Geothermal Heat broke your mod:

Code: Select all

31.064 Error ModManager.cpp:1023: Error while loading item prototype "Diesel-Locomotive-geothermal-water-green-1" (item): Key "icon" not found in property tree at ROOT.item.Diesel-Locomotive-geothermal-water-green-1
Modifications: Diesel Locomotive
Change was, that with Alien Biomes (what i also use) the spawn tiles were changed.
Steinio, are you using Alien Biome's built-in option to disable unused vanilla tiles? That'll cause issues with the green water tiles from other mods.
Ok, so I just checked for mod updates, let Geothermal update (so yes, I already had it previously and it worked fine along side Diesel Loco) and am now getting the same error. Setting the Alien Biomes option I mentioned about to false doesn't help. So, yeah, definitely something in Geothermal that was changed that's causing the issue. No idea what at this point.
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles

ThelianInteracitve
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sat Dec 01, 2018 7:51 pm
Contact:

Re: [MOD 0.16] Diesel Locomotive

Post by ThelianInteracitve »

Bug Report: Factorio 0.16 Modded
-Mod Conflicts: Loaded Mods
Diesel Loco 0.1.6
Pressurized Fluids 0.1.9 by lovely_santa
-Conflicting Code:
https://imgur.com/a/DFIfJJb
Image

FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2483
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: [MOD 0.16] Diesel Locomotive

Post by FuryoftheStars »

Evildogbot100 has allowed me to update this mod for 0.17. Key changes:
  • Tank mechanism has been changed from a 3 tank to 1 tank system. Due to 0.17's new anti-fluid mixing logic, I don't think this should be an issue.
  • It allows 6 hookup positions for filling or draining the fuel to help save on the number of entities. See one of the new screenshots below.
  • Crude oil has been removed as a valid fuel (though if you really want it, you can add it back into the config.lua file, or, if there's a strong enough of a demand, I can probably work it in as an optional setting).
  • The mod now has settings! Settings are:
    • Swapping the graphics used between the mod added and vanilla locos
    • Choosing default fuel types (heavy oil only, light oil only, or both)
    • Whether or not to allow diesel fuel to be used if added by another mod (for heavy or light only fuel type selections, diesel fuel will replace them, otherwise for the both selection it will add it in as an additional fuel)
  • A few other minor tweaks, like allowing the pumps to more reliably line up to the locomotive when stopped.
  • I've also attempted to better balance the fuel values. Please let me know what you think. Tank capacity has also been set to 1500 to better balance against vanilla loco (vanilla loco has 3 stacks x 50 per stack of solid fuel x 10 units of heavy/light oil per unit of solid fuel = 1500)
    • Heavy Oil
      • Fuel value: 1.35 MJ
      • Fuel Acceleration Multiplier: 1.1
      • Fuel Top Speed Multiplier: 1.05
    • Light Oil
      • Fuel value: 1.35 MJ
      • Fuel Acceleration Multiplier: 1.2
      • Fuel Top Speed Multiplier: 1.1
    • Diesel Fuel (if added by another mod and setting to allow is checked)
      • Fuel value: 1.4 MJ
      • Fuel Acceleration Multiplier: 1.2
      • Fuel Top Speed Multiplier: 1.1
    • Solid fuel (to compare to above values)
      • Fuel value: 12 MJ (note that it takes 10 units of heavy or light oil to create 1 solid fuel)
      • Fuel Acceleration Multiplier: 1.2
      • Fuel Top Speed Multiplier: 1.05
Any questions, comments, concerns, bugs, etc, please let me know and, of course, please enjoy!

Note: Download URL on the first post is for the old 0.16 version. Please visit the mod portal or download directly in game for the latest version.

Fluid fuels.png
Fluid fuels.png (995.57 KiB) Viewed 5109 times
Pump positions.png
Pump positions.png (515.84 KiB) Viewed 5109 times
Settings screen.png
Settings screen.png (21.66 KiB) Viewed 5109 times
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles

slippycheeze
Filter Inserter
Filter Inserter
Posts: 587
Joined: Sun Jun 09, 2019 10:40 pm
Contact:

Re: [MOD 0.16] Diesel Locomotive

Post by slippycheeze »

FuryoftheStars wrote:
Wed Jul 10, 2019 3:54 pm
Evildogbot100 has allowed me to update this mod for 0.17.
Awesome. I'll try this out, but may I suggest: create a new top level thread for your update? I almost ignored this, but was curious to see how you handled some issues, because 0.16 isn't the version I'm playing.

Pointing to this thread for credit, etc, is of course appropriate. A separate thread like "Diesel Locomotive 0.17 port" would help be clearer about what it was, and keep 0.17 bugs out of the 0.16 thread, etc. :)

FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2483
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: [MOD 0.16] Diesel Locomotive

Post by FuryoftheStars »

Yeah, wasn’t quite sure how to handle that as evildogbot100 added me as collaberator to the original mod page. We’ll talk it over real fast and figure out the best path forward.

Thanks!
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles

slippycheeze
Filter Inserter
Filter Inserter
Posts: 587
Joined: Sun Jun 09, 2019 10:40 pm
Contact:

Re: [MOD 0.16] Diesel Locomotive

Post by slippycheeze »

FuryoftheStars wrote:
Wed Jul 10, 2019 4:24 pm
Yeah, wasn’t quite sure how to handle that as evildogbot100 added me as collaberator to the original mod page. We’ll talk it over real fast and figure out the best path forward.
Well, them editing the 0.16 out of the subject line would solve the problem too. :)

Tell them I think their work is awesome too, when you ask

User avatar
numbernegative
Manual Inserter
Manual Inserter
Posts: 2
Joined: Fri Jun 28, 2019 8:18 pm
Contact:

Re: [MOD 0.16] Diesel Locomotive

Post by numbernegative »

Getting error on launching the newest version on .17.55
Capture.PNG
Capture.PNG (11.9 KiB) Viewed 5082 times

FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2483
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: [MOD 0.16] Diesel Locomotive

Post by FuryoftheStars »

numbernegative wrote:
Thu Jul 11, 2019 5:19 pm
Getting error on launching the newest version on .17.55

Capture.PNG
I'm running 0.17.55 as well and do not get that error.

Are you running any other mods?

EDIT: Looking into this some, I think you may be running a mod that adds the next_upgrade value to storage tanks (like something that adds additional storage tanks as an upgrade or something). I'm uploading 0.2.1 with a potential fix. Please let me know if it works.
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles

User avatar
numbernegative
Manual Inserter
Manual Inserter
Posts: 2
Joined: Fri Jun 28, 2019 8:18 pm
Contact:

Re: [MOD 0.16] Diesel Locomotive

Post by numbernegative »

FuryoftheStars wrote:
Thu Jul 11, 2019 6:35 pm
numbernegative wrote:
Thu Jul 11, 2019 5:19 pm
Getting error on launching the newest version on .17.55

Capture.PNG
I'm running 0.17.55 as well and do not get that error.

Are you running any other mods?

EDIT: Looking into this some, I think you may be running a mod that adds the next_upgrade value to storage tanks (like something that adds additional storage tanks as an upgrade or something). I'm uploading 0.2.1 with a potential fix. Please let me know if it works.
The new version fixed it. I also have other mods including bob's which adds more tanks, might have been it.

FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2483
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: [MOD 0.16] Diesel Locomotive

Post by FuryoftheStars »

For some reason I completely forgot that solid fuel is made by 20 units of heavy oil while only 10 units of light. For balance reasons, I was thinking of slashing heavy oil's fuel value in half (right now it's balanced towards 10 units of heavy oil to solid fuel).

Thoughts, comments?
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles

Post Reply

Return to “Mods”