Page 4 of 5
Re: OpenTTD 0.6.0-beta2
Posted: 04 Jan 2008 14:33
by belugas
Nemesis wrote:You sau that subsidies are done based on station, not towns. The way I see that is impossible. Then there would never be a subsidie in the beginning.
So, please elaborate.
I was wrong. It's not ONLY stations:
Code: Select all
struct Subsidy {
CargoID cargo_type;
byte age;
/* from and to can either be TownID, StationID or IndustryID */
uint16 from;
uint16 to;
};
It can be based on towns, industries of stations...
There is a function called to verify that the about to be offered subsidy does not exists:
Code: Select all
static bool CheckSubsidyDuplicate(Subsidy *s)
{
const Subsidy* ss;
for (ss = _subsidies; ss != endof(_subsidies); ss++) {
if (s != ss &&
ss->from == s->from &&
ss->to == s->to &&
ss->cargo_type == s->cargo_type) {
s->cargo_type = CT_INVALID;
return true;
}
}
return false;
}
So, i think we are pretty much covered. Now... It may differ in term of appearance, but the basic behaviour is still consistent.
Or so I think...
Re: OpenTTD 0.6.0-beta2
Posted: 04 Jan 2008 14:47
by Rubidium
A subsidy for the same pair of towns will only be offered when the level of service is determined to be too low, so what it effectively does is 'asking' more companies to perform a service between the two towns.
Re: OpenTTD 0.6.0-beta2
Posted: 04 Jan 2008 16:21
by Nemesis
belugas wrote:Nemesis wrote:You sau that subsidies are done based on station, not towns. The way I see that is impossible. Then there would never be a subsidie in the beginning.
So, please elaborate.
I was wrong. It's not ONLY stations:
Code: Select all
struct Subsidy {
CargoID cargo_type;
byte age;
/* from and to can either be TownID, StationID or IndustryID */
uint16 from;
uint16 to;
};
It can be based on towns, industries of stations...
There is a function called to verify that the about to be offered subsidy does not exists:
Code: Select all
static bool CheckSubsidyDuplicate(Subsidy *s)
{
const Subsidy* ss;
for (ss = _subsidies; ss != endof(_subsidies); ss++) {
if (s != ss &&
ss->from == s->from &&
ss->to == s->to &&
ss->cargo_type == s->cargo_type) {
s->cargo_type = CT_INVALID;
return true;
}
}
return false;
}
So, i think we are pretty much covered. Now... It may differ in term of appearance, but the basic behaviour is still consistent.
Or so I think...
It looks indeed okay, but still the issue is there. To elaborate more:
You have offered subsidies(OS), and Subsidised Subsidies (SS) (don't confuse with the programming language). Should there not be a small program code that prevent having an Subsidy in the OS and SS position. (Like "if subsidy excist in OS or SS then... (no new subisidy) else.. (new subsidy))
As Rubidium stated. It will only offer a subsidy when the level of service is too low. I think the original Tycoon did work a little bit different. Because as it works now the following issues appear:
- Subsidies almost never appear in the first year, because low level of service has to be created (when starting everything shall be neutral I think)
- Later on the game, when a Town is in low level of service several subsidies are created from Town A, B, C to Town with low level service
- And the problem I stated earlier. A subsidy is Subsidised, and the same subsidy is offered.
I know most people don't work with these things, but the AI is, and some people like me do. (is something different than just building huge networks).
Regarding the window issue. It also happens when only 4 windows are open, and the 5th is the traindepot window. Watch at screenshot.
Re: OpenTTD 0.6.0-beta2
Posted: 04 Jan 2008 16:28
by DaleStan
Nemesis wrote:In that screenshot, there's an other bug. It's there since I can remember. A subsidie problem.
The reason it's been there as long as you can remember is because it works that way in TTD too.
Re: OpenTTD 0.6.0-beta2
Posted: 04 Jan 2008 17:48
by Nemesis
DaleStan wrote:Nemesis wrote:In that screenshot, there's an other bug. It's there since I can remember. A subsidie problem.
The reason it's been there as long as you can remember is because it works that way in TTD too.
I disagree. I've never had it in the original TTD or TTDLX. I've played the game many times, and never had seen it. Only in OpenTTD this occurs.
Re: OpenTTD 0.6.0-beta2
Posted: 04 Jan 2008 18:01
by LordAzamath
Nemesis wrote:DaleStan wrote:Nemesis wrote:In that screenshot, there's an other bug. It's there since I can remember. A subsidie problem.
The reason it's been there as long as you can remember is because it works that way in TTD too.
I disagree. I've never had it in the original TTD or TTDLX. I've played the game many times, and never had seen it. Only in OpenTTD this occurs.
/me wonders what is difference between TTD and TTDLX...
I for one completely forgot to thank devs for beta-2 and it's been avilable so long...THANK YOU.
Re: OpenTTD 0.6.0-beta2
Posted: 04 Jan 2008 18:33
by DaleStan
Nemesis wrote:I've never had it in the original TTD or TTDLX.
"never had" is not the same as "does not exist". I have seen it, at the very least in TTDPatch. Unless you want to come up with some sort of conspiracy theory wherein both OpenTTD and TTDPatch have made especial efforts to explicitly allow duplicate subsidies, I think you're stuck blaming TTD for that behaviour.
Re: OpenTTD 0.6.0-beta2
Posted: 04 Jan 2008 23:54
by Nemesis
I'm not blaming anyone. Why do you feel attacked? I just want to help a great product, just to be better.
For Lordazamath. I mean the Original Transport Tycoon offcourse.
DaleStan wrote:
I have seen it, at the very least in TTDPatch
Could be, only used TTDpatch for a very short time. But still. I know Never had is not the same as doesn't exist. But if you know how much I played that game, never had is doesn't exist until proofed otherwise.
So leave your conspiracy theories in amerika where they belong (no offence), I just want to know if it can be solved, or not. It's software, made my humans. Humans have errors, software have errors. Big software is never flawless. Accept it.
Well, I'm going back to the game. Duplicates or not, still love the game!
Re: OpenTTD 0.6.0-beta2
Posted: 05 Jan 2008 03:23
by belugas
Nemesis wrote:Could be, only used TTDpatch for a very short time. But still. I know Never had is not the same as doesn't exist. But if you know how much I played that game, never had is doesn't exist until proofed otherwise.
I just want to know if it can be solved, or not. It's software, made my humans. Humans have errors, software have errors. Big software is never flawless. Accept it.
For mutual understanding: TTDPatch requires the original game (here, it is Transport Tycoon De Luxe) in order to work. The actual executable, in fact.
Dalestan is a developer of TTDPatch. In order to be one, you have to know how the game is made from the inside out.
I do believe Dalestan in this matter.
OpenTTD is built using the code of the original game too.
And I know that this part of the code has almost not changed. I just checked (revision r607 PRE-current r1). Which means that both TTDPatch and OpenTTD have the same behaviour.
Now... You're asking if it can be fixed/solved.
There is a big difference between fixing a bug and adapting the game the the perception of one individual.
I do not dispute the fact that you do believe there is something fishy. But when thinking about the history of both projects, the number of players who enjoyed and tested both programs for quite a verr long period of time, it is a bit strange that nobody but you noticed it.
So, no, i do not think it must be fixed, since we do not see anything broken.
Unless, of course, you can prove with hard facts that there is indeed a duplicate subsidy in the system.
Savegames, screenshots, everything.
You said yourself that humans make errors. True. On either side of the fence. But the data do not lie. And in this case, personnaly, i do think it is only a matter of perception.
Re: OpenTTD 0.6.0-beta2
Posted: 05 Jan 2008 12:54
by Nemesis
Thank you. I'll provide some screenshots and savegames.
There is a big difference between fixing a bug and adapting the game the the perception of one individual.
Completely true. I work myself in the ERP business and there's a likewise system. There is a difference between a bug and a enhancement. When you have a bug, the problem need to be reproduceable. Also the change should be logical and should work for every customer. Therefore. At the moment I'm playing. If I get a double subsidy I'll add a screenshot, save the game and attach the saved game.
I do not dispute the fact that you do believe there is something fishy. But when thinking about the history of both projects, the number of players who enjoyed and tested both programs for quite a verr long period of time, it is a bit strange that nobody but you noticed it.
As I said, I'm one of the few who uses subsidies only! (I know, strange, maybe) Maybe that's a reason why nobody noticed.
Now... You're asking if it can be fixed/solved.
There is a big difference between fixing a bug and adapting the game the the perception of one individual.
True, but in this situation I think it's a bug. I do say. There are bigger issues, I'm sure of that. You also have to think about how many do I satisfy by solving this problem.
i do think it is only a matter of perception
C'est la vie.
I'll post screenshots and a savegame today!
Re: OpenTTD 0.6.0-beta2
Posted: 05 Jan 2008 13:32
by Nemesis
While playing. I did get an other problem.
With maglevs trains. Every train has a maximum lenght of 10 (with long trains deactivated). But this maglev can only be nine long.
See screenshot and savegame.
Re: OpenTTD 0.6.0-beta2
Posted: 05 Jan 2008 14:01
by Nemesis
And the double subsidy:
[edit]added 2nd screenshot[/edit]
Re: OpenTTD 0.6.0-beta2
Posted: 05 Jan 2008 16:38
by Tyr_Arcana
Just a quick note to say that beta2 seems to be working fine for me. I haven't done extensive testing, but have had no trouble at all on my MacBook Pro (17", 2.4ghz 2gb ram 256 grfx) running OSX 10.5.1
Re: OpenTTD 0.6.0-beta2
Posted: 05 Jan 2008 18:15
by DaleStan
belugas wrote:I do not dispute the fact that you do believe there is something fishy. But when thinking about the history of both projects, the number of players who enjoyed and tested both programs for quite a verr long period of time, it is a bit strange that nobody but you noticed it.
I never said that it doesn't happen. I, in fact, said that it does happen.
Nemesis: Savegames after the fact aren't useful except for proving that the so-called bug exists. If you want the "bug" removed, you'll need to post savegames from a few game days before the second subsidy appears.
Re: OpenTTD 0.6.0-beta2
Posted: 05 Jan 2008 18:25
by Nemesis
DaleStan wrote:belugas wrote:I do not dispute the fact that you do believe there is something fishy. But when thinking about the history of both projects, the number of players who enjoyed and tested both programs for quite a verr long period of time, it is a bit strange that nobody but you noticed it.
I never said that it doesn't happen. I, in fact, said that it does happen.
Nemesis: Savegames after the fact aren't useful except for proving that the so-called bug exists. If you want the "bug" removed, you'll need to post savegames from a few game days before the second subsidy appears.
Well keep the savegame. As you can see I've added a second screenshot. It happens just after the first one. So if you have the savegame, it's not happened yet. But it will happen. Good luck. I can't predict double subsidies better than this

Re: OpenTTD 0.6.0-beta2
Posted: 12 Jan 2008 09:43
by Nemesis
any news about this?
Re: OpenTTD 0.6.0-beta2
Posted: 12 Jan 2008 13:26
by Nemesis
New Problem encountered:
When renaming cities I came accross a limit of renaming.
Probably your allowed to change only a small amount of names in the game. It doesn't matter if this is a city name, company name or company owner name.
See screenshote for message. It says: Can't change name of "director/city/etc" To many names are in use.
Re: OpenTTD 0.6.0-beta2
Posted: 12 Jan 2008 13:38
by Rubidium
Nemesis wrote:New Problem encountered:
That really depends on what you call new... the limit has been there since at least about 1995.
Re: OpenTTD 0.6.0-beta2
Posted: 12 Jan 2008 13:39
by Bilbo
There is (quite a low) limit on number of custom names in game ...
char _name_array[512][32];
Basically, 512 strings, 32 characters each.
Proper fix may be making this dynamic and do realloc once you run out of space, but there are some algorithms for finding duplicate names which run in O(n), so making this array larger could lead to trouble. So you may need to add some hash for checking duplicates too.
Re: OpenTTD 0.6.0-beta2
Posted: 13 Jan 2008 09:59
by Nemesis
Rubidium wrote:Nemesis wrote:New Problem encountered:
That really depends on what you call new... the limit has been there since at least about 1995.
I believe you in an instant. Yet again not a big problem

. Just to mention you. But the limit is based on 256 X 256 maps, and I don't expect to reach on that kind of map the limit. You deside yourself what you do withit. It's not a showstopper
