News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

102.2.2RC Startting money

Started by z9999+, February 01, 2010, 06:19:39 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

z9999+

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.

Dwachs

#1
Quote from: z9999+ on February 01, 2010, 06:19:39 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.
Parsley, sage, rosemary, and maggikraut.

z9999+

Why did you add this to branch ?
Branch should not have any new feature.

Dwachs

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.
Parsley, sage, rosemary, and maggikraut.

z9999+

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 ?

Dwachs

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:

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.
Parsley, sage, rosemary, and maggikraut.

prissi

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).

Dwachs

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
QuoteADD: 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.
Parsley, sage, rosemary, and maggikraut.

z9999+

#8
Quote from: Dwachs on February 02, 2010, 07:39:14 PM
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'.

Dwachs

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.


Parsley, sage, rosemary, and maggikraut.

z9999+

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

Dwachs

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.
Parsley, sage, rosemary, and maggikraut.

z9999+

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.