The International Simutrans Forum

 

Author Topic: BUG: cost of vehicles (makeobj or simutrans exp)  (Read 1976 times)

0 Members and 1 Guest are viewing this topic.

Offline Milko

  • Devotee
  • *
  • Posts: 829
BUG: cost of vehicles (makeobj or simutrans exp)
« on: September 09, 2011, 02:12:54 PM »
Hello

I enclose a picture and a file. "Dat" configuration.

I'm using experimental simutrans exp 10.0 (updated 01/09/2011) and the latest version of makeobj. Pakset Pakbritain exp.

If I compile the file. "Dat" (38000000 cost) attached cost that appears in "simutrans" is 9100.

If I compile the file. "Dat" by changing the cost (cost 39000000) cost that appears in "simutrans" is 11600.

If I compile the file. "Dat" by changing the cost (cost 28000000) cost that appears in "simutrans" is 27050.

The costs shown in "simutrans" are not related to those included in the file. "Dat".

I noticed the same problem in "simutrans exp 9.12".

I do not know if it is a problem of "makeobj" or "simutrans"

Giuseppe

Offline Carl

  • Devotee
  • *
  • Posts: 1593
    • Website
  • Languages: EN
Re: BUG: cost of vehicles (makeobj or simutrans exp)
« Reply #1 on: September 09, 2011, 02:27:57 PM »
I've noticed some similar anomalies regarding fixed maintenance costs, but I haven't had a chance to do rigorous testing yet.

From what I remember, there was a case where increasing the fixed maintenance cost of a vehicle in the .dat file actually led to a decrease in the fixed maintenance cost displayed in-game.

When I'm next editing vehicles, I'll look into this further and post a more detailed report.

Offline Milko

  • Devotee
  • *
  • Posts: 829
Re: BUG: cost of vehicles (makeobj or simutrans exp)
« Reply #2 on: September 09, 2011, 02:59:41 PM »
Hi

Some of the planes that I created long ago and that costs were properly displayed in the old versions "9.X/8.X" now show incorrect values​​.

Edit
I did further investigation, I think I can exclude that the cause is the "makeobj". The same file. "Pak" aircraft loaded "exp 9.2" works perfectly, load it into "exp 9.12, or 10.0" have the issue on costs. It is therefore a problem of "experimental simutrans"

Giuseppe
« Last Edit: September 09, 2011, 06:42:27 PM by Milko »

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18693
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: BUG: cost of vehicles (makeobj or simutrans exp)
« Reply #3 on: September 09, 2011, 10:47:09 PM »
Giuseppe,

thank you very much for the report. The problem appears to be an integer overflow; I have pushed a fix to my 10.x branch - if you can compile, can you re-test?

Offline Milko

  • Devotee
  • *
  • Posts: 829
Re: BUG: cost of vehicles (makeobj or simutrans exp)
« Reply #4 on: September 12, 2011, 04:29:59 PM »
Hello James

The problem was solved. I can not assess whether it was solved for the fixed maintenance costs, maybe Carl is working on this subject can give us a report.

Giuseppe