JGR's Patch Pack
Moderator: OpenTTD Developers
Re: JGR's Patch Pack
Also another problem, after last template replacement (also changed all tracks to electric), some trains won't go to maintence automatically... dunno if it's Iron Horse problem because of double head of all trains, tried add more depots and no change. Was using normal trains "not double" before and was all fine. Easy to find bad trains on the vehicle list by reliability.
Save attached.
EDIT: Found the issue... was the Maintenance order (or seems that any depot order causes that problem), it disable the auto maintenance for trains (maybe for other modals too)... after removing that order all working, it seems a bug, because any train that needs repair (like a slow train that need to fix) don't go to any depot, only the depot on the order list.
Save attached.
EDIT: Found the issue... was the Maintenance order (or seems that any depot order causes that problem), it disable the auto maintenance for trains (maybe for other modals too)... after removing that order all working, it seems a bug, because any train that needs repair (like a slow train that need to fix) don't go to any depot, only the depot on the order list.
Last edited by nihues on 18 Dec 2019 19:32, edited 1 time in total.
Re: JGR's Patch Pack
There isn't anything like this at the moment, however I may be able look into the feasibility of such a mechanism in future.pixel_pirate wrote: ↑18 Dec 2019 10:45 Hello, just a question .
Is there a way to auto name trains / routes.
Like in jokers patch pack there is a button that just groups trains airplanes buses & ships , and auto names them.
it is very handy and quick to get things organised .
is there something similar in your patch
Thanks for all your work.
The slot conditional orders are only for exceptionally advanced use cases, and aren't how you would use them normally. They shouldn't be shown in the order window when the slots feature isn't enabled in the UI but unfortunately that was missed due to an oversight; that has now been fixed.nihues wrote: ↑18 Dec 2019 11:40 Hey, I just found a little bug, the conditional order "slot occupancy" has "undefined" status, so I can't use it (or I need to do more things to use slots?).
Also I'm using a universal wagon with multiple cargos with refit to avaliable, when I do template replacement using with refit or no refit option, it always reset all cargos to "zero", isn't suppose to reuse the avaliable cargo?
To use slots, enable the "show advanced routing restrictions features" setting, use the manage slots window in the trains listing window dropdown, and routing restrictions.
There isn't any code to support current cargo dependent vehicle refitting. New wagons added to the train are refit as per the template. The existing wagons are refit to match the template if the refit option is enabled.
If you need to have different groups refit to different cargoes, you should create different templates for each of the required cargoes.
This looks like a problem with your use of conditional orders, the service order is conditionally skipped, preventing the train from being regularly serviced.nihues wrote: ↑18 Dec 2019 15:47 Also another problem, after last template replacement (also changed all tracks to electric), some trains won't go to maintence automatically... dunno if it's Iron Horse problem because of double head of all trains, tried add more depots and no change. Was using normal trains "not double" before and was all fine. Easy to find bad trains on the vehicle list by reliability.
Save attached.
Ex TTDPatch Coder
Patch Pack, Github
Patch Pack, Github
Re: JGR's Patch Pack
The conditional order was intencional so it won't stay on the line and helps with station load/unload... worked but generated that other issue it was the Maintenance order (or seems that any depot order causes that problem), it disable the auto maintenance for trains (maybe for other modals too)... after removing that order all working, it seems a bug, because any train that needs repair (like a slow train that need to fix) don't go to any depot, only the depot on the order list.This looks like a problem with your use of conditional orders, the service order is conditionally skipped, preventing the train from being regularly serviced.
Re: JGR's Patch Pack
This is the correct/documented behaviour, it is not a bug.nihues wrote: ↑18 Dec 2019 19:36The conditional order was intencional so it won't stay on the line and helps with station load/unload... worked but generated that other issue it was the Maintenance order (or seems that any depot order causes that problem), it disable the auto maintenance for trains (maybe for other modals too)... after removing that order all working, it seems a bug, because any train that needs repair (like a slow train that need to fix) don't go to any depot, only the depot on the order list.This looks like a problem with your use of conditional orders, the service order is conditionally skipped, preventing the train from being regularly serviced.
In general, vehicles heading to an arbitrary depot of their own accord is unwanted behaviour as it tends to create problems including vehicles becoming lost/misrouted, etc. Therefore it is only done if the order list does not include any depot order, as otherwise the vehicle would have no way of being serviced at all.
Ex TTDPatch Coder
Patch Pack, Github
Patch Pack, Github
Re: JGR's Patch Pack
Hello JGR,
I'm trying to compile your fixes about vehicle template.
I get an error with Visual Studio 2019 (lastest version) when compiling in the vehicle_sl.cpp here :
I can "fix" the issue by using a static_conversion... I'm not very comfortable with C++ (well... I'm completely zero at C++) so I'm not sure this is a good solution at all...
I'm not sure about possible side effects...
Your code :
Mine :
And I still have some warnings :
I'm trying to compile your fixes about vehicle template.
I get an error with Visual Studio 2019 (lastest version) when compiling in the vehicle_sl.cpp here :
Code: Select all
1>------ Build started: Project: version, Configuration: Debug Win32 ------
2>------ Skipped Build: Project: generate, Configuration: Debug Win32 ------
2>Project not selected to build for this solution configuration
3>------ Build started: Project: settings, Configuration: Debug Win32 ------
1>Microsoft (R) Windows Script Host Version 5.812
1>Copyright (C) Microsoft Corporation. Tous droits r�serv�s.
1>
4>------ Build started: Project: openttd, Configuration: Release x64 ------
4>rev.cpp
4>vehicle_sl.cpp
4>F:\Projets\OpenTTD JGR\src\order_base.h(642,45): warning C4267: 'return': conversion from 'size_t' to 'VehicleOrderID', possible loss of data (compiling source file ..\src\saveload\vehicle_sl.cpp)
4>F:\Projets\OpenTTD JGR\src\saveload\vehicle_sl.cpp(1112,61): error C2398: Element '1': conversion from 'int' to '_Ty1 &' requires a narrowing conversion
4> with
4> [
4> _Ty1=const VehicleID
4> ]
4>Done building project "openttd_vs142.vcxproj" -- FAILED.
5>------ Skipped Build: Project: regression, Configuration: Debug Win32 ------
5>Project not selected to build for this solution configuration
========== Build: 2 succeeded, 1 failed, 4 up-to-date, 2 skipped ==========
Code: Select all
void Load_VESR()
{
int index;
while ((index = SlIterateArray()) != -1) {
auto iter = pending_speed_restriction_change_map.insert({ index, {} }); /* <== error is here */
PendingSpeedRestrictionChange *ptr = &(iter->second);
SlObject(ptr, GetVehicleSpeedRestrictionDescription());
}
}
I'm not sure about possible side effects...
Your code :
Code: Select all
void Load_VESR()
{
int index;
while ((index = SlIterateArray()) != -1) {
auto iter = pending_speed_restriction_change_map.insert({ index, { } });
PendingSpeedRestrictionChange *ptr = &(iter->second);
SlObject(ptr, GetVehicleSpeedRestrictionDescription());
}
}
Code: Select all
void Load_VESR()
{
int index;
while ((index = SlIterateArray()) != -1) {
auto iter = pending_speed_restriction_change_map.insert({ static_cast<VehicleID>(index), { } });
PendingSpeedRestrictionChange *ptr = &(iter->second);
SlObject(ptr, GetVehicleSpeedRestrictionDescription());
}
}
Code: Select all
1>------ Build started: Project: version, Configuration: Debug Win32 ------
2>------ Skipped Build: Project: generate, Configuration: Debug Win32 ------
2>Project not selected to build for this solution configuration
3>------ Build started: Project: settings, Configuration: Debug Win32 ------
1>Microsoft (R) Windows Script Host Version 5.812
1>Copyright (C) Microsoft Corporation. Tous droits r�serv�s.
1>
4>------ Build started: Project: openttd, Configuration: Release x64 ------
4>rev.cpp
4>vehicle_sl.cpp
4>F:\Projets\OpenTTD JGR\src\order_base.h(642,45): warning C4267: 'return': conversion from 'size_t' to 'VehicleOrderID', possible loss of data (compiling source file ..\src\saveload\vehicle_sl.cpp)
4>F:\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\utility(149,1): warning C4267: 'initializing': conversion from 'size_t' to '_Ty2', possible loss of data
4> with
4> [
4> _Ty2=unsigned short
4> ] (compiling source file ..\src\saveload\vehicle_sl.cpp)
4>F:\Projets\OpenTTD JGR\src\station_base.h(455): message : see reference to function template instantiation 'std::pair<Key,unsigned short>::pair<StationID&,unsigned __int64,0>(_Other1,_Other2 &&) noexcept' being compiled
4> with
4> [
4> Key=uint16,
4> _Other1=StationID &,
4> _Other2=unsigned __int64
4> ] (compiling source file ..\src\saveload\vehicle_sl.cpp)
4>F:\Projets\OpenTTD JGR\src\station_base.h(455): message : see reference to function template instantiation 'std::pair<Key,unsigned short>::pair<StationID&,unsigned __int64,0>(_Other1,_Other2 &&) noexcept' being compiled
4> with
4> [
4> Key=uint16,
4> _Other1=StationID &,
4> _Other2=unsigned __int64
4> ] (compiling source file ..\src\saveload\vehicle_sl.cpp)
4>Generating code
4>14 of 50817 functions (<0.1%) were compiled, the rest were copied from previous compilation.
4> 0 functions were new in current compilation
4> 162 functions had inline decision re-evaluated but remain unchanged
4>Finished generating code
4>tbtr_template_gui_main.obj : warning LNK4204: 'F:\Projets\OpenTTD JGR\objs\x64\Release\openttd.pdb' is missing debugging information for referencing module; linking object as if no debug info
[...]
4>scope_info.obj : warning LNK4204: 'F:\Projets\OpenTTD JGR\objs\x64\Release\openttd.pdb' is missing debugging information for referencing module; linking object as if no debug info
4>openttd_vs142.vcxproj -> F:\Projets\OpenTTD JGR\projects\..\objs\x64\Release\openttd.exe
4> 1 fichier(s) copié(s).
4>Done building project "openttd_vs142.vcxproj".
5>------ Skipped Build: Project: regression, Configuration: Debug Win32 ------
5>Project not selected to build for this solution configuration
========== Build: 3 succeeded, 0 failed, 4 up-to-date, 2 skipped ==========
Re: JGR's Patch Pack
Thanks for reporting this.MagicBuzz wrote: ↑18 Dec 2019 20:15 Hello JGR,
I'm trying to compile your fixes about vehicle template.
I get an error with Visual Studio 2019 (lastest version) when compiling in the vehicle_sl.cpp here :
...
I can "fix" the issue by using a static_conversion... I'm not very comfortable with C++ (well... I'm completely zero at C++) so I'm not sure this is a good solution at all...
I'm not sure about possible side effects...
Your code :Mine :Code: Select all
void Load_VESR() { int index; while ((index = SlIterateArray()) != -1) { auto iter = pending_speed_restriction_change_map.insert({ index, { } }); PendingSpeedRestrictionChange *ptr = &(iter->second); SlObject(ptr, GetVehicleSpeedRestrictionDescription()); } }
...Code: Select all
void Load_VESR() { int index; while ((index = SlIterateArray()) != -1) { auto iter = pending_speed_restriction_change_map.insert({ static_cast<VehicleID>(index), { } }); PendingSpeedRestrictionChange *ptr = &(iter->second); SlObject(ptr, GetVehicleSpeedRestrictionDescription()); } }
Yes, that's a correct fix. I've pushed fixes for this and the other warning.
On your earlier workaround, I would not recommend removing the save/load of those chunks as this creates a risk of multiplayer desyncs and other misbehaviour at load time when using the speed restrictions feature.
Ex TTDPatch Coder
Patch Pack, Github
Patch Pack, Github
Re: JGR's Patch Pack
While testing the vehicle template feature, I still have one bug with templates.
You'll find attached a savegame with an example.
Train group "Coal 10".
I created a vehicle template (template 0) composed of one "030" engine and 7 "Low sided wagon w/out brakes" and 6 "Low sided wagon" refited to transport coal.
We can see in the template there is a total capacity of 104 tons of coal, and nothing else.
But :
- When a train with less wagons is replaced with this template, all added wagons have their standard cargo (goods)
- When I send again the train to depot, it still keep "goods" refit for some wagons
Wagons created from the template should have the same cargo as the template, and when "refit" is enabled in the template vehicle, the existing wagons should be refitted to match the template.
You'll find attached a savegame with an example.
Train group "Coal 10".
I created a vehicle template (template 0) composed of one "030" engine and 7 "Low sided wagon w/out brakes" and 6 "Low sided wagon" refited to transport coal.
We can see in the template there is a total capacity of 104 tons of coal, and nothing else.
But :
- When a train with less wagons is replaced with this template, all added wagons have their standard cargo (goods)
- When I send again the train to depot, it still keep "goods" refit for some wagons
Wagons created from the template should have the same cargo as the template, and when "refit" is enabled in the template vehicle, the existing wagons should be refitted to match the template.
- Attachments
-
- jgr and snail.sav
- (2.48 MiB) Downloaded 71 times
Re: JGR's Patch Pack
Thanks for letting me know.MagicBuzz wrote: ↑18 Dec 2019 21:17 While testing the vehicle template feature, I still have one bug with templates.
You'll find attached a savegame with an example.
Train group "Coal 10".
I created a vehicle template (template 0) composed of one "030" engine and 7 "Low sided wagon w/out brakes" and 6 "Low sided wagon" refited to transport coal.
We can see in the template there is a total capacity of 104 tons of coal, and nothing else.
But :
- When a train with less wagons is replaced with this template, all added wagons have their standard cargo (goods)
- When I send again the train to depot, it still keep "goods" refit for some wagons
Wagons created from the template should have the same cargo as the template, and when "refit" is enabled in the template vehicle, the existing wagons should be refitted to match the template.
I've pushed a fix which should fix the earlier fix.
Ex TTDPatch Coder
Patch Pack, Github
Patch Pack, Github
Re: JGR's Patch Pack
Allright, probably a question asked a million times. Is this just to download and play or do I need to install the patches somehow?
I downloaded the windows binary but quite a few things doesn't seem to work.
I downloaded the windows binary but quite a few things doesn't seem to work.
- Redirect Left
- Tycoon
- Posts: 7240
- Joined: 22 Jan 2005 19:31
- Location: Wakefield, West Yorkshire
Re: JGR's Patch Pack
This is a download and play deal. Simply download the file from the first post, unzip it into its own folder, and then launch openttd.exe, this is the JGR patchpack installed and ready to play, what sort of issues are you having and things not seeming to work?
Re: JGR's Patch Pack
Picking and placing single houses in scenario editor and chunnels so farRedirect Left wrote: ↑20 Dec 2019 05:57This is a download and play deal. Simply download the file from the first post, unzip it into its own folder, and then launch openttd.exe, this is the JGR patchpack installed and ready to play, what sort of issues are you having and things not seeming to work?
Re: JGR's Patch Pack
Hy JGR,
Thank you for this patch pack. I know it's hard to maintain this, so i really appreciate the effort.
I searched "drag and drop objects" and I found a post from 1 year ago. viewtopic.php?f=33&t=73469&p=1215069&hi ... s#p1215069
Did you do anything further to this idea? Asking because there are a lot of settings in this pack and maybe I missed something.
Thank you
Thank you for this patch pack. I know it's hard to maintain this, so i really appreciate the effort.
I searched "drag and drop objects" and I found a post from 1 year ago. viewtopic.php?f=33&t=73469&p=1215069&hi ... s#p1215069
Did you do anything further to this idea? Asking because there are a lot of settings in this pack and maybe I missed something.
Thank you
The rest is confetti!
Re: JGR's Patch Pack
I believe both of those features are required to be enabled in settings.Sparvass wrote: ↑20 Dec 2019 17:05Picking and placing single houses in scenario editor and chunnels so farRedirect Left wrote: ↑20 Dec 2019 05:57This is a download and play deal. Simply download the file from the first post, unzip it into its own folder, and then launch openttd.exe, this is the JGR patchpack installed and ready to play, what sort of issues are you having and things not seeming to work?
Re: JGR's Patch Pack
Hello, JGR.
This can be not related to you but ... just in case.
I've been playing with a new "speed restriction" (SR) feature for a while and there are some, imho, inconsistencies:
1. SR should not be persistent. I have 1 train passed thru SR sema with limit of 70 KPH and now this poor train runs at 70 KPH all the time! Even after depot. Even after game restart. So I had to place "remove restriction" sema. This is ridiculous, I believe; IMHO, this feature should work like in IRL: until next sema, i.e. restriction is applied within the section. Maybe, there should be more SR options.
2. SR can't be used with pre-signalling. SR is pretty much useless in routefinding because you just cant slowdown a cargo train to let it pass the passenger express heading towards Y cross. If SR could be applied to pre-signalling then this scenario would be real.
Personally, I don't see any real usage of SR in it's current targeting. Anyone else on this forum have ever tried to play with a SR feature? It would be nice to read some other opinions and SR usage cases.
This can be not related to you but ... just in case.
I've been playing with a new "speed restriction" (SR) feature for a while and there are some, imho, inconsistencies:
1. SR should not be persistent. I have 1 train passed thru SR sema with limit of 70 KPH and now this poor train runs at 70 KPH all the time! Even after depot. Even after game restart. So I had to place "remove restriction" sema. This is ridiculous, I believe; IMHO, this feature should work like in IRL: until next sema, i.e. restriction is applied within the section. Maybe, there should be more SR options.
2. SR can't be used with pre-signalling. SR is pretty much useless in routefinding because you just cant slowdown a cargo train to let it pass the passenger express heading towards Y cross. If SR could be applied to pre-signalling then this scenario would be real.
Personally, I don't see any real usage of SR in it's current targeting. Anyone else on this forum have ever tried to play with a SR feature? It would be nice to read some other opinions and SR usage cases.
Last edited by eshield on 23 Dec 2019 08:34, edited 1 time in total.
Ask, and it shall be given you.
Seek, and ye shall find.
Knock, and it shall open unto you.
Seek, and ye shall find.
Knock, and it shall open unto you.
Re: JGR's Patch Pack
Not in many parts of the world -- speed restriction applies until it is explicitly lifted or another restriction come into effect.
There's always problem with "IRL" thing here -- trains in different countries operate differently.
I don't use pre-signal, but I use SR for more realistic speed on rural tracks, to slow down train approaching stations, and to force same operation speed on busy part of the network.
Re: JGR's Patch Pack
That's right, there is always an exception in the rule. This is why I've said: "Maybe, there should be more SR options." .... like "SR until next sema" and "SR until it's lifted" and etc. I don't need an IRL simulator, I just want to build really complex and complicated railway networks with some nasty rules not just FIFO
Ask, and it shall be given you.
Seek, and ye shall find.
Knock, and it shall open unto you.
Seek, and ye shall find.
Knock, and it shall open unto you.
- vincentkoevoets
- Engineer
- Posts: 48
- Joined: 14 Nov 2014 10:49
- Location: Assen, Netherlands
Re: JGR's Patch Pack
Same here, I use it just to slow down trains before stations or junctions, or in rural areas, for a bit more realistism.ino wrote: ↑23 Dec 2019 08:29Not in many parts of the world -- speed restriction applies until it is explicitly lifted or another restriction come into effect.
There's always problem with "IRL" thing here -- trains in different countries operate differently.
I don't use pre-signal, but I use SR for more realistic speed on rural tracks, to slow down train approaching stations, and to force same operation speed on busy part of the network.
Another thing I use it for is to let a freight train crawl through a siding, so a passanger train can pass at full speed without the freight train having to stop completely.
And indeed, in many parts of the world, the speed limit has to be explicitly lifted or changed.
Also, JGR said this would be a limitation of SR, that you would have to place a signal that lifts the speed restriction.
Re: JGR's Patch Pack
An interesting point is that in OpenTTD maximum speed limits can be set with railtypes (Action 0, property 14) and now roadtypes as well (Action 0, property 14 too) thus signage and signals become optional in such cases.... speed limits ...
wallyweb on tt-forums: Screenshots - Wallyweb World - Projects & Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
Re: JGR's Patch Pack
Nothing further has been done on this. Potentially something may be looked into in the future though.ColdIce wrote: ↑20 Dec 2019 18:07 Hy JGR,
Thank you for this patch pack. I know it's hard to maintain this, so i really appreciate the effort.
I searched "drag and drop objects" and I found a post from 1 year ago. viewtopic.php?f=33&t=73469&p=1215069&hi ... s#p1215069
Did you do anything further to this idea? Asking because there are a lot of settings in this pack and maybe I missed something.
Thank you
This is the intended behaviour. Having to place the restriction on every signal would be highly tedious. Nor should trains should arbitrarily unrestrict themselves.eshield wrote: ↑23 Dec 2019 08:19 Hello, JGR.
This can be not related to you but ... just in case.
I've been playing with a new "speed restriction" (SR) feature for a while and there are some, imho, inconsistencies:
1. SR should not be persistent. I have 1 train passed thru SR sema with limit of 70 KPH and now this poor train runs at 70 KPH all the time! Even after depot. Even after game restart. So I had to place "remove restriction" sema. This is ridiculous, I believe; IMHO, this feature should work like in IRL: until next sema, i.e. restriction is applied within the section. Maybe, there should be more SR options.
I am aware that forgetting to add a remove speed restriction signal would be an issue, this was also part of the earlier discussion, and is one of the reasons why the feature is hidden away behind an advanced feature setting in the same way as the slots feature.
Without knowing exactly what sort of layout you are talking about, probably the most practical answer is to: not use pre-signals, use PBS, and use slots/the slot occupancy conditional.
Th original discussion which led to the feature is only 2 pages earlier.
Ex TTDPatch Coder
Patch Pack, Github
Patch Pack, Github
Re: JGR's Patch Pack
Hello, I am repeatedly having trouble when I compile on ubuntu.
https://i.imgur.com/Amjl140.png
When I launch the game after this clearly incorrect compile, I have the version as nover000 - and so will not be able to connect to the eventual server it will be.
I have tried the latest, the previous 4 versions too with the same result. I'm downloading the zip. I am rather novice with linux and compiling. I have done this the same way with success a few times before.
https://i.imgur.com/Amjl140.png
When I launch the game after this clearly incorrect compile, I have the version as nover000 - and so will not be able to connect to the eventual server it will be.
I have tried the latest, the previous 4 versions too with the same result. I'm downloading the zip. I am rather novice with linux and compiling. I have done this the same way with success a few times before.
Who is online
Users browsing this forum: No registered users and 11 guests