JGR's Patch Pack

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

bernasrebelo
Engineer
Engineer
Posts: 1
Joined: 23 Jul 2022 16:18

Re: JGR's Patch Pack

Post by bernasrebelo »

Hi!

1. I'm new to openttd regarding map creation, I'm using openttd JGR patch and I would like to add realistic cities on true locations to my European heightmap. What is the fastest way to do that?
2. Is there a way to have 2 or more different orders list in different time schedules from the same train in JGR?
Last edited by kamnet on 24 Jul 2022 00:51, edited 2 times in total.
Reason: Merging multiple posts from same user into one post.
Eddi
Tycoon
Tycoon
Posts: 8254
Joined: 17 Jan 2007 00:14

Re: JGR's Patch Pack

Post by Eddi »

bernasrebelo wrote: 23 Jul 2022 17:08 1. I'm new to openttd regarding map creation, I'm using openttd JGR patch and I would like to add realistic cities on true locations to my European heightmap. What is the fastest way to do that?
i'd look whether gamescripts can found towns, and feed it a table with hardcoded locations.
bernasrebelo
Engineer
Engineer
Posts: 1
Joined: 23 Jul 2022 16:18

Re: JGR's Patch Pack

Post by bernasrebelo »

Conditional orders

In conditional orders if you have set time to hours, what is the input on current time/date?
Last edited by bernasrebelo on 29 Jul 2022 23:17, edited 8 times in total.
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

bernasrebelo wrote: 29 Jul 2022 23:08 Conditional orders

In conditional orders if you have set time to hours, what is the input on current time/date?
You can select the input format/time quantity being tested in the conditional order window:
Fledinghattan Ridge Transport, 1990-01-07.png
Fledinghattan Ridge Transport, 1990-01-07.png (11.72 KiB) Viewed 3438 times
bernasrebelo wrote: 23 Jul 2022 17:08 2. Is there a way to have 2 or more different orders list in different time schedules from the same train in JGR?
A train can only have one order list with one timetable. You can however use scheduled dispatch for more complicated timetabling.
Ex TTDPatch Coder
Patch Pack, Github
Revenge_of_KioTheDev
Engineer
Engineer
Posts: 59
Joined: 14 Jun 2022 05:54

Re: JGR's Patch Pack

Post by Revenge_of_KioTheDev »

JGR wrote: 30 Jul 2022 19:33 ...
would it be possible to add shunting to your patch pack? thank you

edit: if not, maybe a patch to change reversing behavior so the train doesnt magically flip at the end of the line?
kirbyisbesttrain
Engineer
Engineer
Posts: 4
Joined: 19 Feb 2022 22:49

Openttd jgrpp nover0000

Post by kirbyisbesttrain »

I just tried to compile openttd jgrpp on ubuntu, and the version is 'norev0000', despite the filed being from v48.1. any way to change it so it will accept a v48.1 server? I have recompiled it 4 times, wih no effect. is their a file that set the version i can mess with? or a way to force connect to other versions?
User avatar
jfs
Tycoon
Tycoon
Posts: 1743
Joined: 08 Jan 2003 23:09
Location: Denmark

Re: JGR's Patch Pack

Post by jfs »

Are you using a git checkout or did you download the source as an archive file?

If you use a git checkout, and have the version checked out by tag name, then it should be detecting the correct version string to use.
Otherwise I think you need to create a special file containing the version name.
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Non Road station tiles

Post by wallyweb »

Is it possible to add to Action0 to enable a non-road station tile to be built without provoking an adjacent road to make a connection?
This can be done with objects but as a station tile it would add to the station coverage as well as offering some interesting animation opportunities.

Code: Select all

// 08 D	Class ID
//----------------------------------------------------------------------------------------------------------------------------
// 09 B	Stop type availability
		// 0	Passenger/bus stop
		// 1	Freight/lorry stop
		// 2	Both passenger/bus and freight/lorry stops
		// The default value is 2 (both bus and lorry stops).
//----------------------------------------------------------------------------------------------------------------------------
// 0A W	Name
		// This should be a D8xx or DCxx string ID.
//----------------------------------------------------------------------------------------------------------------------------
// 0B W	Class name
		// This should be a D8xx or DCxx string ID.
//----------------------------------------------------------------------------------------------------------------------------
// 0C B	Draw mode
		// Bit	Value	Meaning
		// 0		1		Bay stops: Draw road type ground sprite
		// 1		2		Drive through stops: Draw road/tram type overlays
		// 4		4		Road waypoints: Draw sprite layout ground sprite on top of the underlying road (by default the sprite layout ground sprite is not used)
		// The default value is 3 (bits 0 and 1 both set).
Attachments
Road Stop Non Road Tile.png
Road Stop Non Road Tile.png (18.37 KiB) Viewed 2639 times
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: Non Road station tiles

Post by JGR »

wallyweb wrote: 28 Aug 2022 19:06 Is it possible to add to Action0 to enable a non-road station tile to be built without provoking an adjacent road to make a connection?
This can be done with objects but as a station tile it would add to the station coverage as well as offering some interesting animation opportunities.

Code: Select all

// 08 D	Class ID
//----------------------------------------------------------------------------------------------------------------------------
// 09 B	Stop type availability
		// 0	Passenger/bus stop
		// 1	Freight/lorry stop
		// 2	Both passenger/bus and freight/lorry stops
		// The default value is 2 (both bus and lorry stops).
//----------------------------------------------------------------------------------------------------------------------------
// 0A W	Name
		// This should be a D8xx or DCxx string ID.
//----------------------------------------------------------------------------------------------------------------------------
// 0B W	Class name
		// This should be a D8xx or DCxx string ID.
//----------------------------------------------------------------------------------------------------------------------------
// 0C B	Draw mode
		// Bit	Value	Meaning
		// 0		1		Bay stops: Draw road type ground sprite
		// 1		2		Drive through stops: Draw road/tram type overlays
		// 4		4		Road waypoints: Draw sprite layout ground sprite on top of the underlying road (by default the sprite layout ground sprite is not used)
		// The default value is 3 (bits 0 and 1 both set).
I've add a flag to the roadstop_general_flags property (12) to do this.
https://jgrennison.github.io/OpenTTD-pa ... eral_flags
Ex TTDPatch Coder
Patch Pack, Github
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Non Road station tiles

Post by wallyweb »

JGR wrote: 28 Aug 2022 23:02 I've add a flag to the roadstop_general_flags property (12) to do this.
Thank you. I'll get it with your next release. :D
SomeIndianGuy
Engineer
Engineer
Posts: 65
Joined: 19 Nov 2018 19:26
Location: West Bengal,India

Re: JGR's Patch Pack

Post by SomeIndianGuy »

Hi,

Here attached is a crash report. This seems to be triggered for some odd reason.
Attachments
crash-20220904.tar.gz
(15.07 MiB) Downloaded 41 times
Nothing to put here!
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: JGR's Patch Pack

Post by wallyweb »

More RoadStop Questions:
I have bus stops and truck stops in separate classes.
For the drive through tiles in each x and y direction in each class I have four randomly selected variations with different furnishings.
If I build a single tile station, the randomness works as intended with a click for rerandomization until I get the desired furnishings.
For multi-tiled stations, the randomness only happens once for each new station.
After that, clicking on a drive through tile has no effect. I have to destroy and rebuild the entire station until I get the desired furnishings.
Add to this, combining a drive through bus and truck stop in one station, the first tile gets randomized, while the second tile gets the complimentary count.

Am I missing something here, or is this the intended effect?
Does the random count belong to the tile or to the entire station?
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

wallyweb wrote: 05 Sep 2022 20:21 More RoadStop Questions:
I have bus stops and truck stops in separate classes.
For the drive through tiles in each x and y direction in each class I have four randomly selected variations with different furnishings.
If I build a single tile station, the randomness works as intended with a click for rerandomization until I get the desired furnishings.
For multi-tiled stations, the randomness only happens once for each new station.
After that, clicking on a drive through tile has no effect. I have to destroy and rebuild the entire station until I get the desired furnishings.
Add to this, combining a drive through bus and truck stop in one station, the first tile gets randomized, while the second tile gets the complimentary count.

Am I missing something here, or is this the intended effect?
Does the random count belong to the tile or to the entire station?
I assume that you're using random_bits_station from https://newgrf-specs.tt-wiki.net/wiki/N ... _variables, or the lower part of random_bits.
This is indeed associated with the station instead of any particular tile.

Bits 16-23 of random_bits should be random per-tile.
Not sure why the variable for that got missed out, it's present for stations and airport tiles in NML. I've added this to road stops as well as random_bits_tile.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: JGR's Patch Pack

Post by wallyweb »

JGR wrote: 05 Sep 2022 22:13 I assume that you're using random_bits_station from https://newgrf-specs.tt-wiki.net/wiki/N ... _variables, or the lower part of random_bits.
This is indeed associated with the station instead of any particular tile.
Actually I'm not aware of that page. I work in NFO and have been referencing your roadstope document and NewGrf specifications.
Bits 16-23 of random_bits should be random per-tile.
Not sure why the variable for that got missed out, it's present for stations and airport tiles in NML. I've added this to road stops as well as random_bits_tile.
Again, thanks for looking into this.
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

wallyweb wrote: 05 Sep 2022 22:47
JGR wrote: 05 Sep 2022 22:13 I assume that you're using random_bits_station from https://newgrf-specs.tt-wiki.net/wiki/N ... _variables, or the lower part of random_bits.
This is indeed associated with the station instead of any particular tile.
Actually I'm not aware of that page. I work in NFO and have been referencing your roadstope document and NewGrf specifications.
Bits 16-23 of random_bits should be random per-tile.
Not sure why the variable for that got missed out, it's present for stations and airport tiles in NML. I've added this to road stops as well as random_bits_tile.
Again, thanks for looking into this.
In NFO it's bits 24-31 of variable 5F.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: JGR's Patch Pack

Post by wallyweb »

JGR wrote: 05 Sep 2022 23:04 In NFO it's bits 24-31 of variable 5F.
Pending your next release, I composed this document to help me analyze the problem.
Any comments are welcome.
Attachments
55_RoadStop_Test_Issue.txt
(7.37 KiB) Downloaded 48 times
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

wallyweb wrote: 08 Sep 2022 13:13
JGR wrote: 05 Sep 2022 23:04 In NFO it's bits 24-31 of variable 5F.
Pending your next release, I composed this document to help me analyze the problem.
Any comments are welcome.
Would it be possible to get this as a GRF file, or as complete source which can be turned into a GRF?
Trying to read NFO files is too time consuming to be worth it. It is easier to debug the resulting GRF file.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: JGR's Patch Pack

Post by wallyweb »

JGR wrote: 08 Sep 2022 13:26 Would it be possible to get this as a GRF file, or as complete source which can be turned into a GRF?
Trying to read NFO files is too time consuming to be worth it. It is easier to debug the resulting GRF file.
Attachments
55_RoadStop_Test.grf
(46.85 KiB) Downloaded 43 times
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

wallyweb wrote: 08 Sep 2022 13:35
JGR wrote: 08 Sep 2022 13:26 Would it be possible to get this as a GRF file, or as complete source which can be turned into a GRF?
Trying to read NFO files is too time consuming to be worth it. It is easier to debug the resulting GRF file.
You're using a random switch for views 4 and 5, which is using the lower part of the random bits, which is per station.
The current use of variable 5F in each of the groups referenced by the random switches does not make sense.

I'd suggest getting rid of the use of variable 5F, as that is not doing anything useful.
Set randbit to 16 (0x10) in your random switches.

Also, your road stops seem to have the ground sprite missing.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: JGR's Patch Pack

Post by wallyweb »

JGR wrote: 08 Sep 2022 13:56 I'd suggest getting rid of the use of variable 5F, as that is not doing anything useful.
Set randbit to 16 (0x10) in your random switches.
That worked.
Also, your road stops seem to have the ground sprite missing.
Yes. The groundsprite is suppressed. I have to add it as a building tile ... The next step in the lab.
Thanks for your help. :D
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 4 guests