Re: JGR's Patch Pack
Posted: 15 Jan 2021 11:25
What is wrong? I don't notice anything.
The place to talk about Transport Tycoon
https://www.tt-forums.net/
Code: Select all
switch(FEAT_TRAINS, SELF, switch_steam_Russia_RZD_F_visual_effect, motion_counter % 2) {
0: return visual_effect_and_powered(VISUAL_EFFECT_STEAM, -3, DISABLE_WAGON_POWER);
return visual_effect_and_powered(VISUAL_EFFECT_STEAM, 3, DISABLE_WAGON_POWER);
}
i don't know if that is the cause of your issue, but NewGRF code should never cause desyncs, and if it does, it must be considered a bug in the game, not the NewGRFMcZapkie wrote: 15 Jan 2021 11:45 Maybe it is problem with my newgrf, I wanted to be sure if it is known general issue...
EDIT: There is a suspect:It is my fault, not related to JGRPP, sorry for false alarm.Code: Select all
switch(FEAT_TRAINS, SELF, switch_steam_Russia_RZD_F_visual_effect, motion_counter % 2) { 0: return visual_effect_and_powered(VISUAL_EFFECT_STEAM, -3, DISABLE_WAGON_POWER); return visual_effect_and_powered(VISUAL_EFFECT_STEAM, 3, DISABLE_WAGON_POWER); }
Unfortunately it is easy to write a NewGRF which cause desyncs, even by accident, and this is really a bug in large chunks of the NewGRF specifications.Eddi wrote: 15 Jan 2021 14:51 i don't know if that is the cause of your issue, but NewGRF code should never cause desyncs, and if it does, it must be considered a bug in the game, not the NewGRF
I may be missing something, but I'm looking through the code for variables and that around CB36, and I don't see any such restricted access to variables.Eddi wrote: 15 Jan 2021 15:27 in this case, you could disable access to certain variables in the visual effects callback, similar to how access to variables is restricted in CB36
That is what I have done already for vehicles.Eddi wrote: 15 Jan 2021 15:27 alternatively you can add data to the (network) savegame for additional synchronization
Correct. And speaking as an newGRF developer, this is a total pain in the buttEddi wrote: 15 Jan 2021 21:11 i misremembered. it was var61 (trains) that is restricted for certain callbacks.
Can you post a save of what you're trying to get working and I'll have a look.McZapkie wrote: 16 Jan 2021 22:04 How this drive_through_train_depot particularly works? I enabled it, placed 2 depots back to back but thre are still 2 separate depots and train can't go trough.
Have you activated the function in settings ? ... Vehicles routing Drive through train depots ....OnMcZapkie wrote: 16 Jan 2021 22:04 How this drive_through_train_depot particularly works? I enabled it, placed 2 depots back to back but thre are still 2 separate depots and train can't go trough.
Problem solved - these depot are still separate and I addressed wrong one (exit instead of entry, thus train lost its path)JGR wrote: 16 Jan 2021 22:09Can you post a save of what you're trying to get working and I'll have a look.McZapkie wrote: 16 Jan 2021 22:04 How this drive_through_train_depot particularly works? I enabled it, placed 2 depots back to back but thre are still 2 separate depots and train can't go trough.
I haven't looked at it properly yet, at some point I'll get round to investigating it.Aegir wrote: 17 Jan 2021 03:04 On the subject of depots, given any thought to integrating the Multitile Depot patch? It's been running pretty stable for me, and choosing between the Patchpack and the Multitile build atm is killing me![]()
After doing a bit of digging, it turns out that the motion counter is not saved in the savegame at all and is therefore reset to 0 on load, including for network clients.Eddi wrote: 15 Jan 2021 14:51i don't know if that is the cause of your issue, but NewGRF code should never cause desyncs, and if it does, it must be considered a bug in the game, not the NewGRFMcZapkie wrote: 15 Jan 2021 11:45 Maybe it is problem with my newgrf, I wanted to be sure if it is known general issue...
EDIT: There is a suspect:It is my fault, not related to JGRPP, sorry for false alarm.Code: Select all
switch(FEAT_TRAINS, SELF, switch_steam_Russia_RZD_F_visual_effect, motion_counter % 2) { 0: return visual_effect_and_powered(VISUAL_EFFECT_STEAM, -3, DISABLE_WAGON_POWER); return visual_effect_and_powered(VISUAL_EFFECT_STEAM, 3, DISABLE_WAGON_POWER); }
I'm not really sure what you mean by this. Could you please clarify?Argus wrote: 18 Jan 2021 18:31 I just want to ask how many trains can intersect? I know there are no more than two in the Vanilla version.
Both in this patchpack and in vanilla you can have as many trains as you want in a block (using PBS) or on a route at the same time. There is not a limit of two.Argus wrote: 18 Jan 2021 19:01 Google Translate errors ... Sorry. How many trains can safely share one route?