The International Simutrans Forum

Simutrans Extended => Simutrans-Extended development => Topic started by: Phystam on January 31, 2018, 06:12:41 PM

Title: Power revenue
Post by: Phystam on January 31, 2018, 06:12:41 PM
Hello, James and everyone!

I'm now creating a pakset for simutrans-extended, and the balancing is the most important task.
Almost all revenues can be modified, so it is very hard work for us to adjust the revenue.
However, the power revenue cannot be modified with any variables because it is hard coded.
So I introduced a variable for modifying the power revenue, named "power_revenue_factor_percentage", in simuconf.tab.
The power revenue is multiplied by this value/100. I tried to introduce "power_revenue_per_kwh" variable, but I cannot do it because I do not know the value of "delta_t".

This patch is included in my github repository: https://github.com/Phystam/simutrans-extended/tree/power_revenue (https://github.com/Phystam/simutrans-extended/tree/power_revenue)
Title: Re: Power revenue
Post by: jamespetts on January 31, 2018, 10:56:52 PM
Excellent, thank you for that: I have now incorporated this.

For your information, delta_t is the amount of time in ticks that has passed since the method in question was last called, and so is an essential part of calculating power consumption.

I shall be very interested to see your work on your new pakset - this is most interesting.
Title: Re: Power revenue
Post by: Phystam on February 01, 2018, 12:42:43 AM
Thank you for the incorporation!

For our information, "power_revenue_factor_percentage" in the General Ex. setting is the multiplier of default power revenue in percent.
The default value is 100.
Title: Re: Power revenue
Post by: jamespetts on February 01, 2018, 12:45:34 AM
Splendid - I had inferred as much. I have added this setting with its default value to simuconf.tab.