The International Simutrans Forum

 

Author Topic: 102.2.2RC Startting money  (Read 3573 times)

0 Members and 1 Guest are viewing this topic.

Offline z9999+

  • Coder/patcher
  • *
  • Posts: 377
102.2.2RC Startting money
« on: February 01, 2010, 06:19:39 PM »
If I set below in simuconf.tab and start game from 2030 without timeline, startting money in savegame will be zero.
Is this 102.2.2 feature or 103.0 feature ?

Quote
starting_money[0]=1930,20000000,1
starting_money[1]=2030,35000000,1


EDIT:
If I commented out above 2 lines and start simutrans. And loading this savegame, simutrans quits. Because starting money is zero.

This new starting_money system is strange, it depends on each user's setting. Which means each player can have different starting money.
« Last Edit: February 01, 2010, 06:38:42 PM by z9999+ »

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4878
  • Languages: EN, DE, AT
Re: 102.2.2RC Startting money
« Reply #1 on: February 01, 2010, 06:40:56 PM »
Is this 102.2.2 feature or 103.0 feature ?
Imho the question is: is this 102.2.2 bug or 103.0 bug :/

Should be fixed in 3066.

This feature is intended for pakset creators to balance their pak set over the whole timeline. If savegame version is increased this stuff is saved in the save game, and all players (in one game) get their money from the same settings.
« Last Edit: February 01, 2010, 07:39:14 PM by Dwachs »

Offline z9999+

  • Coder/patcher
  • *
  • Posts: 377
Re: 102.2.2RC Startting money
« Reply #2 on: February 01, 2010, 07:22:44 PM »
Why did you add this to branch ?
Branch should not have any new feature.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4878
  • Languages: EN, DE, AT
Re: 102.2.2RC Startting money
« Reply #3 on: February 02, 2010, 04:59:39 PM »
I got a request from a user asking to include this into the stable branch. And in principe this feature was a small one in comparison to other trunk features. This feature here was in trunk since November without any bug reports.

But now you discovered a bug, since maybe the first time a user tested it. And your bug report is equally valid for the trunk version.

Offline z9999+

  • Coder/patcher
  • *
  • Posts: 377
Re: 102.2.2RC Startting money
« Reply #4 on: February 02, 2010, 06:24:43 PM »
Thank you for explaining it.
But I'm not still understanding this feature yet.
Could you explain it ?

Assume I wrote these code below in simuconf.tab.
Quote
starting_money[0]=1930,20000000,1
starting_money[1]=2030,35000000,1

Q1: Does this affect both timeline mode and without timeline mode ?

So, when I start a game in 2030 with timeline, starting money is 35000000.
And also when I start a game in 2030 without timeline, starting money is 35000000.
Is this correct ?

Q2: When I start a game in 1930, my starting money is 20000000.
If some other player joined this game in 2030, his starting money will be 35000000 or 20000000 ? Which is correct ? And current system working as intended ?

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4878
  • Languages: EN, DE, AT
Re: 102.2.2RC Startting money
« Reply #5 on: February 02, 2010, 07:39:14 PM »
Q1: yes - which starting money should be chosen without timeline?

Q2: he will get 35000000, a player starting in 1970 should get 26000000.

The system works as intended (as long as no bug reports are known etc).

With this in simuconf.tab:
Code: [Select]
starting_money[0]=1930,20000000,1
starting_money[1]=2030,35000000,1
a player starting 1930 and earlier gets 200,000
.... starting 2030 or after he would get 350,000
... starting in a year in between he would get

200,000 + (350,000-200,000) * (year - 1930) / (2030-1930)

setting year=1970 gets 260,000 as above. That means, the starting money is linearly interpolated between the given values.

If there is a zero as here:
Quote
starting_money[0]=1930,20000000,0
starting_money[1]=2030,35000000,1
a player starting between 1930 and 2030 still gets only 200,000.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10674
  • Languages: De,EN,JP
Re: 102.2.2RC Startting money
« Reply #6 on: February 02, 2010, 08:32:07 PM »
Well, I think the integration of new feature in the stable should only done under special conditions. One was being able to read bzipped games, or else none of the nightly games would have been readable.

But the flexible starting money ought been left out (especially since it requires a midfied savegame).

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4878
  • Languages: EN, DE, AT
Re: 102.2.2RC Startting money
« Reply #7 on: February 03, 2010, 06:52:50 AM »
Does this starting money thing now work as described above? I would say yes, but others might disagree ;)

Compared to all the changes in trunk (network mode for convoi etc), this feature seemed to be very minor. And there was no bug report since its inclusion in trunk. So I thought it would be safe to include it in stable. Remember the 102.2 was released 4 months ago, 102.2.1 one and a half months ago. And yes, there were new features in 102.2.1
Quote
ADD: do not close load/save dialogue after deleting;
CHANGE: info windows now open less important first resp. for single window topmost object first (usually most important)
The bug report of z9999 is valid for trunk too. So this bug had to be fixed (the sooner the better), no matter whether it is in branch or trunk.

Nobody claimed that the stable branch release candidate is free of bugs. Thats why there is something like a release candidate.

Offline z9999+

  • Coder/patcher
  • *
  • Posts: 377
Re: 102.2.2RC Startting money
« Reply #8 on: February 03, 2010, 07:47:20 AM »
Q2: he will get 35000000, a player starting in 1970 should get 26000000.

I tested this in r3066 RC, but result was different.

I started game in 1930, money was 20000000.
I added player in 1960, money was 24500000.
I saved game and reloaded this game.
I added player in 1990, money was 20000000.


No bug report doesn't mean no bug.
It is only no one played nor no one reported.
And small patch or big patch is also no difference.

Most important thing is 'no add new bug', which is just equal to 'no add new feature'.
« Last Edit: February 03, 2010, 08:06:18 AM by z9999+ »

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4878
  • Languages: EN, DE, AT
Re: 102.2.2RC Startting money
« Reply #9 on: February 03, 2010, 10:20:10 AM »
The whole starting money thing is read/written from/to the savegame, that all players have equal conditions.

The behavior you described is expected, since the savegame version was not changed. It will be fixed as soon as the savegame verison is increased.



Offline z9999+

  • Coder/patcher
  • *
  • Posts: 377
Re: 102.2.2RC Startting money
« Reply #10 on: February 03, 2010, 11:33:29 AM »
Next release version doesn't inclease savegame version.
So, this is a bug.

And how about network mode.
If server and client have different setting, each player's starting money is different.
But player doesn't know suth thing.

server
Quote
starting_money[0]=1930,40000000,1
starting_money[1]=2030,70000000,1

player
Quote
starting_money[0]=1930,20000000,1
starting_money[1]=2030,35000000,1

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4878
  • Languages: EN, DE, AT
Re: 102.2.2RC Startting money
« Reply #11 on: February 03, 2010, 11:48:48 AM »
Thats why this startingmoney structure will be saved for increased savegame version ... to deal with the issue you raised. Written in savegame => send over network. As far as I know, activating players does not work properly in network game yet.

Network mode is disabled in the stable.

Offline z9999+

  • Coder/patcher
  • *
  • Posts: 377
Re: 102.2.2RC Startting money
« Reply #12 on: February 03, 2010, 12:22:11 PM »
Which means new starting money system in 102.2.2 and 103.0 is different.
Then, new starting money system in 102.2.2 is incorrect.
Incorrect system doesn't need to implement.

It should be removed.