Page 33 of 83
Posted: 09 Nov 2004 07:47
by George
Patchman wrote:[edit] While I'm at it, here's a screenshot of the new refitting menu of alpha 39, which shows all sub-types of a certain cargo at once. In the actual game, you might have, for example "Goods (Sheet Metal)", "Goods (Cars)", "Goods (Petroleum)" etc.
How do the game will recognize the number of sub-types? Would it be possible to specify different refitting cost for different lines in this list?
Posted: 09 Nov 2004 08:09
by Csaboka
SHADOW-XIII wrote:I was selling Volvo by dragging outside the depot and crash occur
After some examination, it seems to be that TTD is trying to run a capacity callback when the crash occurs, but unfortunately, the exact instruction that failed can't be found. I haven't touched this part of the code in a38vcs, so I don't know how I could break it...
Posted: 09 Nov 2004 09:01
by SHADOW-XIII
well .. I am posting all crash logs that occurs
anyway I will test it more
edit: Just tested with Josef's 38.2 ... still happens
Posted: 09 Nov 2004 16:59
by Patchman
George wrote:How do the game will recognize the number of sub-types? Would it be possible to specify different refitting cost for different lines in this list?
This works via callback 19. It starts at refit cycle 0 and increases the cycle until the callback returns FF. All those options are displayed in the list.
SHADOW-XIII wrote:edit: Just tested with Josef's 38.2 ... still happens
Yes... you probably had the vehicle window open. It tries to call a callback on the sold vehicle to display the cargo name there.
Posted: 09 Nov 2004 19:22
by SHADOW-XIII
Patchman wrote:SHADOW-XIII wrote:edit: Just tested with Josef's 38.2 ... still happens
Yes... you probably had the vehicle window open. It tries to call a callback on the sold vehicle to display the cargo name there.
probably ... but it seems to be random ... I'm just trying with 38vcs and cannot reproduce (with the same vehicle)
Posted: 09 Nov 2004 20:09
by George
Patchman wrote:George wrote:How do the game will recognize the number of sub-types? Would it be possible to specify different refitting cost for different lines in this list?
This works via callback 19. It starts at refit cycle 0 and increases the cycle until the callback returns FF. All those options are displayed in the list.
Hm. I code it this way and it works. But I do not return any FF. Where should I return it?
Code: Select all
…
62 * 4 01 01 04 08
63 F:\GAMES\TTD-WIN\GRF\pl\SPRITES\3VolvoTrucksw00.PCX 322 168 01 39 10 -4 -20
…
94 F:\GAMES\TTD-WIN\GRF\pl\SPRITES\3VolvoTrucksw01.PCX 146 8 09 34 45 -17 -19
95 * 9 02 01 50 01 01 00 00 00 00
96 * 9 02 01 51 01 01 01 00 01 00
97 * 9 02 01 52 01 01 02 00 02 00
98 * 9 02 01 53 01 01 03 00 03 00
99 * 15 02 01 54 80 00 00 04 50 00 51 00 52 00 53 00
100 * 22 02 01 55 81 0C 00 FF 03 14 FF 12 12 52 FF 15 15 00 FF 19 19 54 00
101 * 23 04 01 9F 01 00 D0 20 28 67 65 6E 65 72 69 63 20 63 61 72 67 6F 29 00
102 * 4 01 01 06 08
103 F:\GAMES\TTD-WIN\GRF\pl\SPRITES\3VolvoTrucksw01.PCX 338 8 01 39 10 -4 -20
…
150 F:\GAMES\TTD-WIN\GRF\pl\SPRITES\3VolvoTrucksw01.PCX 482 264 09 34 45 -17 -19
151 * 13 02 01 58 02 02 00 00 01 00 00 00 01 00
152 * 13 02 01 59 02 02 02 00 03 00 02 00 03 00
153 * 13 02 01 5A 02 02 04 00 05 00 04 00 05 00
154 * 74 02 01 5B 81 C4 00 FF 10 58 00 1E 22 59 00 23 27 58 00 2D 31 59 00 32 37 58 00 3C 40 59 00 41 45
58 00 4B 4F 59 00 50 54 58 00 5A 5E 59 00 5F 63 58 00 69 6D 59 00 6E 72 58 00 78 7C 59 00 7D 81
58 00 87 8B 59 00 8C 90 5A 00
155 * 22 02 01 5E 81 0C 00 FF 03 0D FF 12 12 59 FF 15 15 01 FF 19 19 5B 00
156 * 14 02 01 5F 81 F2 00 01 01 5E 00 01 01 55 00
157 * 26 04 01 9F 01 01 D0 20 28 63 68 65 6D 69 63 61 6C 73 20 74 61 6E 6B 65 72 29 00
…
196 * 22 03 01 01 12 05 02 2F 00 03 3F 00 05 5F 00 0A AE 00 FF FF 00 F1 00
Posted: 09 Nov 2004 20:40
by Patchman
George wrote:Patchman wrote:George wrote:How do the game will recognize the number of sub-types? Would it be possible to specify different refitting cost for different lines in this list?
This works via callback 19. It starts at refit cycle 0 and increases the cycle until the callback returns FF. All those options are displayed in the list.
Hm. I code it this way and it works. But I do not return any FF. Where should I return it?
Yes, it'll be a bit different in alpha 39. Sorry that I had to change the specification, but I rewrote most of the refitting code and it had to be done.
Right now you check the callback in two different places:
100 -> Set callback results for first cargo subtype
155 -> Set callback results for second cargo subtype
156 -> If first subtype, use #100, if second subtype use #155
You need to return FF when the callback is called for the "third" subtype which doesn't exist, so you could change sprite 156 to this:
Code: Select all
156 * 14 02 01 5F 81 F2 00 FF 02 5E 00 01 01 55 00 00 00 FF FF
Posted: 10 Nov 2004 04:38
by Raichase
The new menu's look very nice, it should be good for the canal boats set that Michael is working on

. Also good for sets with trains that can haul different type of trains (ie from a game point of view, they are coaches that have been refitted to carry passengers, and are identical except in graphics).
Some good GUI work done recently, keep up the good work guys
![Pleased :]](./images/smilies/pleased.gif)
.
Posted: 10 Nov 2004 04:49
by George
Patchman wrote:Yes, it'll be a bit different in alpha 39. Sorry that I had to change the specification, but I rewrote most of the refitting code and it had to be done.
Right now you check the callback in two different places:
100 -> Set callback results for first cargo subtype
155 -> Set callback results for second cargo subtype
156 -> If first subtype, use #100, if second subtype use #155
You need to return FF when the callback is called for the "third" subtype which doesn't exist, so you could change sprite 156 to this:
Code: Select all
156 * 14 02 01 5F 81 F2 00 FF 02 5E 00 01 01 55 00 00 00 FF FF
Could you post me pre-alpha to test?
Posted: 10 Nov 2004 15:37
by Szappy
I've got some problems...
the cht:resetvehicles does not work as it used to. I mean it used to refresh all vehicles data from the .grf files, but now it behaves the same as prssing the default (yes!) button in the graphics window. That also means turning on/off specific sets, according their ! setting.
also:
I have a game, where i reached 2080 or so, but I had to reapply the grf files (some got updated, or so), and it somehow screwed my reliabilities.
I think the persistentengines code broke somewhere, and in a quite interesting way.
When I pressed the apply in the grf window, the vehicles I was using, but otherwise should have been decayed, lowered their reliabilities to 20-30%, and the ones I'm not using kept their reliabilities at 80-90%. It seems to be working in reverse.
(the normal gameplay kept their rel. high till 2080, but the resetvehicles/graphics/apply code somehow forgets to calculate this)
After applying these low values, I thought (patchman, you said me this) that these will increase, because I'm using them, so just out of curiosity, I let the game run on ffwd for 10 years, but it did not change.
The only way I could get back my normal reliabilities was to cht:year back to 2030, and apply again, which removed certain maglev vehicles.
I cht:year-ed back to 2080, and waited for the disappeared ones, to appear (as they used to), and to my surprise, they did not.
Posted: 10 Nov 2004 17:07
by DaleStan
Vehicle data is not updated after 2050.
Posted: 10 Nov 2004 17:29
by Patchman
Szappy wrote:the cht:resetvehicles does not work as it used to. I mean it used to refresh all vehicles data from the .grf files, but now it behaves the same as prssing the default (yes!) button in the graphics window. That also means turning on/off specific sets, according their ! setting.
I must have changed that accidentally. Clicking the "apply" button without making any changes should still work though, it's what ResetVehicles used to do.
(the normal gameplay kept their rel. high till 2080, but the resetvehicles/graphics/apply code somehow forgets to calculate this)
Ah yes, like DaleStan said, normally vehicle stats don't update aftre 2050. But the "apply" button (as well as resetvehicles) updates them no matter the date. So for now (until a39 or whenever I fix this), don't click apply or use ResetVehicles after 2050.
Posted: 11 Nov 2004 15:55
by Szappy
Ah yes, like DaleStan said, normally vehicle stats don't update aftre 2050.
Is this the cause that the maglevs have not reappeared too?
Posted: 11 Nov 2004 16:30
by Patchman
Probably. The game ends in 2050, so nothing is updated after that time. Like the GRF docs say, do not set any introduction dates later than 2044.
Posted: 15 Nov 2004 17:49
by SHADOW-XIII
a39: MAJOR BUG FOUND ?
Realistic Acceleration of trains (3) is broken ... trains nearly in a second reach full speed
Posted: 15 Nov 2004 18:49
by George
SHADOW-XIII wrote:a39: MAJOR BUG FOUND ?
Realistic Acceleration of trains (3) is broken ... trains nearly in a second reach full speed
Or at least work as intended? Acseleration now acts in 1/256? I'll test it tonight
Posted: 15 Nov 2004 20:47
by SHADOW-XIII
well it can be hardly checked .... trains go to max speed in a second
Posted: 15 Nov 2004 22:17
by George
SHADOW-XIII wrote:well it can be hardly checked .... trains go to max speed in a second
Yes, it works now. Sets creators, update your sets if you use prop 20 fro trains or 19 for RVs. I shall update my sets tomorrow.
Posted: 15 Nov 2004 22:34
by George
Bug
Posted: 15 Nov 2004 22:35
by Patchman
George wrote:SHADOW-XIII wrote:well it can be hardly checked .... trains go to max speed in a second
Yes, it works now. Sets creators, update your sets if you use prop 20 fro trains or 19 for RVs. I shall update my sets tomorrow.
Hmm, AFAIK no sets actually set prop. 20/19 yet. What Shadow describes sounds more like a bug, it's definitely not something I intended.
I also haven't touched prop. 20/19 since alpha 35, so it should've been working since then...