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?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.
2.0.1 alpha / 2.5 beta discussion
Moderator: TTDPatch Moderators
- George
- Tycoon
- Posts: 4364
- Joined: 16 Apr 2003 16:09
- Skype: george-vb
- Location: Varna, Bulgaria
- Contact:
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...SHADOW-XIII wrote:I was selling Volvo by dragging outside the depot and crash occur
Reality is that which, when you stop believing in it, doesn't go away.—Philip K. Dick
-
- Tycoon
- Posts: 14275
- Joined: 09 Jan 2003 08:37
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
anyway I will test it more
edit: Just tested with Josef's 38.2 ... still happens
- Attachments
-
- CRASH000.TXT
- log with Josef's 38.2
- (1.55 KiB) Downloaded 57 times
-
- logs.rar
- logs with 38vcs
- (4.54 KiB) Downloaded 55 times
what are you looking at? it's a signature!
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.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?
Yes... you probably had the vehicle window open. It tries to call a callback on the sold vehicle to display the cargo name there.SHADOW-XIII wrote:edit: Just tested with Josef's 38.2 ... still happens
-
- Tycoon
- Posts: 14275
- Joined: 09 Jan 2003 08:37
probably ... but it seems to be random ... I'm just trying with 38vcs and cannot reproduce (with the same vehicle)Patchman wrote:Yes... you probably had the vehicle window open. It tries to call a callback on the sold vehicle to display the cargo name there.SHADOW-XIII wrote:edit: Just tested with Josef's 38.2 ... still happens
what are you looking at? it's a signature!
- George
- Tycoon
- Posts: 4364
- Joined: 16 Apr 2003 16:09
- Skype: george-vb
- Location: Varna, Bulgaria
- Contact:
Hm. I code it this way and it works. But I do not return any FF. Where should I return it?Patchman wrote: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.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?
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
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.George wrote:Hm. I code it this way and it works. But I do not return any FF. Where should I return it?Patchman wrote: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.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?
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
- Raichase
- Moderizzle
- Posts: 11509
- Joined: 15 Dec 2002 00:58
- Location: Sydney, Australia. Usually at work in the underground railway station...
- Contact:
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
.

Some good GUI work done recently, keep up the good work guys
![Pleased :]](./images/smilies/pleased.gif)
Posted by Raichase. Visit my Flickr! Gallery, Blog (get a feed of everyone at once at Planet TT-Forums).
Raichase - Perfect timing, all the time: [13:37] * Now talking in #tycoon


Official TT-Dave Worley Fan Club
Official TT-Andel-in-a-pink-hat Fan Club
Raichase - Perfect timing, all the time: [13:37] * Now talking in #tycoon


Official TT-Dave Worley Fan Club
Official TT-Andel-in-a-pink-hat Fan Club
- George
- Tycoon
- Posts: 4364
- Joined: 16 Apr 2003 16:09
- Skype: george-vb
- Location: Varna, Bulgaria
- Contact:
Could you post me pre-alpha to test?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
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.
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.
Vehicle data is not updated after 2050.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
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.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.
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.(the normal gameplay kept their rel. high till 2080, but the resetvehicles/graphics/apply code somehow forgets to calculate this)
-
- Tycoon
- Posts: 14275
- Joined: 09 Jan 2003 08:37
-
- Tycoon
- Posts: 14275
- Joined: 09 Jan 2003 08:37
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.George wrote: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.SHADOW-XIII wrote:well it can be hardly checked .... trains go to max speed in a second
I also haven't touched prop. 20/19 since alpha 35, so it should've been working since then...
Who is online
Users browsing this forum: No registered users and 1 guest