News:

The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

Power revenue

Started by Phystam, January 31, 2018, 06:12:41 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Phystam

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

jamespetts

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.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Phystam

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.

jamespetts

Splendid - I had inferred as much. I have added this setting with its default value to simuconf.tab.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.