i can not edit fluid speed by lua

Place to get help with not working mods / modding interface.
Post Reply
860000023
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Dec 27, 2019 3:10 am
Contact:

i can not edit fluid speed by lua

Post by 860000023 »

i need to modify crude-oil fluid speed to fast.
Before 0.17 ,i edit  pressure_to_speed_ratio = 0.4,

  flow_to_energy_ratio = 0.59,

but 0.17 can not find this. Can someone tell me where I need to modify now? Thank you very much

Hiladdar
Fast Inserter
Fast Inserter
Posts: 214
Joined: Mon May 14, 2018 6:47 pm
Contact:

Re: i can not edit fluid speed by lua

Post by Hiladdar »

Probably the best programming example that might meet some of your needs is https://mods.factorio.com/mod/high-pressure-pipes. What that mod does create a new tier of pipes with increased throughput of fluids. Based on the code, it looks like the variable xxx.fluid_box.height can be modified to change the throughput capacity of a pipe for fluids. In this case "xxx" is an entity, which deals with fluids. In your case, you might need to add some conditional statements, to ascertain if it is crude oil or not, or create a new tier of fluid logistical entities which can only transport crude oil.

Another option, would be to create a new fluid, say super-heated crude oil, the recipe would be 2 crude for 1 super-heated crude oil, likewise the reverse recipe would be 1 super-heated crude oil into 2 crude. Net result, you would be able to convert crude oil into super-heated oil, and move through crude oil through the pipes twice as fast, then revert it back to crude.

A third option, is to change the recipes of basic oil processing, advanced oil processing, and anything else that uses crude oil as an ingredient. The example with basic processing the replaced recipe could be 100 crude oil producing 90 petroleum.

Hiladdar

Post Reply

Return to “Modding help”