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

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:Hello JGR,

I don't know if you remember the docking buoy from TTDPatch, but cirdan has this implemented in New Map Features such that if one builds a dock over water, one gets a docking buoy. Any chance of adding this most useful feature to your patch?
I can look into it at some point, from the little I saw of it previously I am not sure what the use case is and what value it adds.
dasy2k1 wrote:Not sure which patch the Slot function lives in but now that I have found a explanation for how it works and have played with it a bit I have a suggestion,

in train conditional orders we have Slot X has capacity or Slot X is full as conditional statements
please can we also have Train is in slot X / Not in Slot X


for example then I could have train orders like

1 Go to station A
2 Go to Waypoint B (signal before B has Try to aquire slot X )
3 Jump to order 7 when train not in slot X
4 Go to station C
6 Jump always to order 1
7 Go to Station D
loop
This seems reasonable to me.
I don't use conditional orders myself so haven't really play-tested the slot state conditional orders, but when using routing restrictions with slots I find the train is in slot conditional to be very useful.
Adding this should be straightforward.
Edit: Added
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:
wallyweb wrote:Hello JGR,

I don't know if you remember the docking buoy from TTDPatch, but cirdan has this implemented in New Map Features such that if one builds a dock over water, one gets a docking buoy. Any chance of adding this most useful feature to your patch?
I can look into it at some point, from the little I saw of it previously I am not sure what the use case is and what value it adds.
Use case: For offshore industries that do not have a ship loading feature embedded. (example: fishing grounds in some sets)
Value: Saves the cost of raising an island at sea and attaching a dock to it.
Visual: Industries such as our local oil refinery have docking buoys for unloading crude. The case use here is mimicking reality (aka eye candy that has a function)
Graphics: Already done ... the current waypoint buoy.
Other possibilities: It opens up opportunities for creative patch developers. Follow HackaLittleBit's work starting here. The final result is most amazing. No more multiple ships occupying the same dock all at the same time, not to mention side berthing as opposed to a ship having to crash it's bow into a dock to load/unload.
Lucardes
Engineer
Engineer
Posts: 9
Joined: 19 Jan 2018 12:59

Re: JGR's Patch Pack

Post by Lucardes »

wallyweb wrote:
JGR wrote:
wallyweb wrote:Hello JGR,

I don't know if you remember the docking buoy from TTDPatch, but cirdan has this implemented in New Map Features such that if one builds a dock over water, one gets a docking buoy. Any chance of adding this most useful feature to your patch?
I can look into it at some point, from the little I saw of it previously I am not sure what the use case is and what value it adds.
Use case: For offshore industries that do not have a ship loading feature embedded. (example: fishing grounds in some sets)
Value: Saves the cost of raising an island at sea and attaching a dock to it.
Visual: Industries such as our local oil refinery have docking buoys for unloading crude. The case use here is mimicking reality (aka eye candy that has a function)
Graphics: Already done ... the current waypoint buoy.
Other possibilities: It opens up opportunities for creative patch developers. Follow HackaLittleBit's work starting here. The final result is most amazing. No more multiple ships occupying the same dock all at the same time, not to mention side berthing as opposed to a ship having to crash it's bow into a dock to load/unload.
I stand by what he says... An extra option for those who seek or for some "create" a world. I don't see anything breaking about this at all. even the cost that he mentioned it's really negligible. The idea here is to give the "Option" to expand your game-play and your "creative imagination". If we can include it and have it default setting Off. I see NO HARM at all not including this but rather more limiting our creative reach if we DON'T include it.


Patch it in, Default Setting Flag: Off
dasy2k1
Transport Coordinator
Transport Coordinator
Posts: 344
Joined: 20 Sep 2006 23:43
Location: UK
Contact:

Re: JGR's Patch Pack

Post by dasy2k1 »

I seem to be having trouble compiling the most recent git pull....

attached is the output from make when i try to compile (stdout and stderr)
Attachments
compilelog.txt
Make output
(2.04 KiB) Downloaded 72 times
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

dasy2k1 wrote:I seem to be having trouble compiling the most recent git pull....

attached is the output from make when i try to compile (stdout and stderr)
Thanks for letting me know about this, it should be fixed now.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

OzTrans wrote:Property 1B for stations (Minimum bridge height)
Nice feature, but more often than not we should also have the same property for bridges, some of them look outright ugly even if enough clearance has been given; thus we can disable some bridges from being built across stations or been given additional clearance. Just try to build a viaduct across a ground level station, on the other hand a wide span bridge should just be fine.
I am in a better position to look at this sort of thing now that I've done some work to support custom properties.
Disallowing stations and/or objects under particular bridge types, or increasing the clearance requirement of a particular bridge type both seem quite doable.

Would it be useful or necessary to have this vary across the length of the bridge (e.g. for arched bridges)?

I am also wondering if something should be done about pillars, as they can look particularly ugly when they land in the wrong place even if the bridge deck itself has a lot of clearance.
Having a "no pillars" flag for each tile edge might be an idea.
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:I am also wondering if something should be done about pillars, as they can look particularly ugly when they land in the wrong place even if the bridge deck itself has a lot of clearance.
Having a "no pillars" flag for each tile edge might be an idea.
This might be already possible. Each of the six bridge tables include code to have (or not have if 00) a pillar when used in conjunction with Graphic Resource Management (GRM).

Code: Select all

// Action6 - Modifies the contents of the following sprite
// <sprite-number> * <Length> 06 (<param-num> <param-size> <offset>){n} FF
   60 * 50	 06
		20 82 08  20 82 10 // 20 82 0C
		20 82 18  20 82 20 // 20 82 1C
		20 82 28  20 82 30 // 20 82 2C
		20 82 38  20 82 40 // 20 82 3C
		20 82 48  20 82 50 // 20 82 4C
		20 82 58  20 82 60 // 20 82 5C
		20 82 68  20 82 70 // 20 82 6C
		20 82 78  20 82 80 // 20 82 7C
		FF
// 06 bridges; 01 props; 01 info; Id 00 bridge #1; 0D bridge layout; 00 tableid; 01 numtables; spritedata;
   61 * 136	 00 06 01 01 00 0D 00 01
  		00 00 00 00  00 00 00 00  01 00 00 00  00 00 00 00 //rail X: Back&Floor, Front, Pillars, 0
  		02 00 00 00  00 00 00 00  03 00 00 00  00 00 00 00 //rail Y: Back&Floor, Front, Pillars, 0
  		00 00 00 00  00 00 00 00  01 00 00 00  00 00 00 00 //Road X: Back&Floor, Front, Pillars, 0
  		02 00 00 00  00 00 00 00  03 00 00 00  00 00 00 00 //Road Y: Back&Floor, Front, Pillars, 0
  		00 00 00 00  00 00 00 00  01 00 00 00  00 00 00 00 //Mono X: Back&Floor, Front, Pillars, 0
  		02 00 00 00  00 00 00 00  03 00 00 00  00 00 00 00 //Mono Y: Back&Floor, Front, Pillars, 0
  		00 00 00 00  00 00 00 00  01 00 00 00  00 00 00 00 //Mlev X: Back&Floor, Front, Pillars, 0
  		02 00 00 00  00 00 00 00  03 00 00 00  00 00 00 00 //Mlev Y: Back&Floor, Front, Pillars, 0
  // Action6 - Modifies the contents of the following sprite
   63 * 26	 06
		20 82 08  // 20 82 0C  20 82 10  
		20 82 18  // 20 82 1C  20 82 20
		20 82 28  // 20 82 2C  20 82 30
		20 82 38  // 20 82 3C  20 82 40
		20 82 48  // 20 82 4C  20 82 50
		20 82 58  // 20 82 5C  20 82 60
		20 82 68  // 20 82 6C  20 82 70
		20 82 78  // 20 82 7C  20 82 80
		FF
   64 * 136	 00 06 01 01 00 0D 01 01
  		00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00 //rail X: Back&Floor, Front, Pillars, 0
  		02 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00 //rail Y: Back&Floor, Front, Pillars, 0
  		00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00 //Road X: Back&Floor, Front, Pillars, 0
  		02 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00 //Road Y: Back&Floor, Front, Pillars, 0
  		00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00 //Mono X: Back&Floor, Front, Pillars, 0
  		02 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00 //Mono Y: Back&Floor, Front, Pillars, 0
  		00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00 //Mlev X: Back&Floor, Front, Pillars, 0
  		02 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00 //Mlev Y: Back&Floor, Front, Pillars, 0
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: JGR's Patch Pack

Post by Eddi »

i don't think that GRM is the right place for being aware of different ground tiles
User avatar
OzTrans
Tycoon
Tycoon
Posts: 1675
Joined: 04 Mar 2005 01:07

Re: JGR's Patch Pack

Post by OzTrans »

JGR wrote:I am also wondering if something should be done about pillars, as they can look particularly ugly when they land in the wrong place even if the bridge deck itself has a lot of clearance. Having a "no pillars" flag for each tile edge might be an idea.
Each bridge consists of 6 bridge elements plus the ramps, that are assembled to strict rules. Each element can have a pillar at the north end, the south end or both ends of each bridge element.

The rules dictate what looks good or not. We then have to decide on the min and max length. A true Arch Bridge can only have a length of 5.

To really implement good bridges requires Action 3-2-1 Support, but that has been wishful thinking for a long time. Currently, I'm happy how bridges can be done, except that rail types lack an important feature; i.e. applying property 12 for rail types not only to stations and depots, but also to bridges. BTW, this was discussed at length a decade ago, but not acted upon.

GRM together with Action-6s is vital for proper implementation of bridges; especially with different road surfaces, as well as various types of rail (normal, monorail, maglev) or in our case normal, narrow gauge and highspeed.
Attachments
Sample Bridge.png
Sample Bridge.png (41.96 KiB) Viewed 4541 times
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

I think that a full-on redesign of the bridge GRF system around Actions 1, 2 and 3, etc. would be a bit out of scope for me, much as that would probably be better.
Eddi wrote:i don't think that GRM is the right place for being aware of different ground tiles
I agree there.
To clarify my earlier thought, I was thinking of adding a flags property to the ground tile (i.e. stations), not to the bridges.
The current mechanism for bridges already specifies the presence/absence of pillars (albeit in a roundabout way), I was not proposing to change that.

Using as an example the default station graphics 2 platform semi-transparent roof span station, it would be reasonable for a sufficiently high bridge to be permitted to pass over it with pillars either side, but not for a pillar to come through the middle of the roof.
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:To clarify my earlier thought, I was thinking of adding a flags property to the ground tile (i.e. stations), not to the bridges.
The current mechanism for bridges already specifies the presence/absence of pillars (albeit in a roundabout way), I was not proposing to change that.
Thanks for the clarification.
Can your suggestion be implemented as a separate patch so that we can evaluate it's function?
My concern would be with bridges whose architecture would be uglified (new word for Oxford?) if a pillar would be missing.
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: JGR's Patch Pack

Post by Eddi »

wallyweb wrote:Can your suggestion be implemented as a separate patch so that we can evaluate it's function?
i'd lean towards "no" here. with a bridge rework, you need some very deep internal changes before you even can recreate the current behaviour, let alone add new functionality on top to have something to "evaluate". and given that that suggested bridge rework hasn't been happening for the past at least 10 years, ...
madrito
Engineer
Engineer
Posts: 37
Joined: 05 Jul 2018 15:38

Re: JGR's Patch Pack

Post by madrito »

JGR wrote:
madrito wrote:JGR's Patch Pack works .
only a programmable semaphore could be in better graphics -optional, e.g. 32bpp ready .
thanks
Someone else would have to draw them.
I for one don't use 32bpp, and am not an artist.
...
if it's possible
Attachments
progsignals.32.png
progsignals.32.png (108.25 KiB) Viewed 747 times
madrito
Engineer
Engineer
Posts: 37
Joined: 05 Jul 2018 15:38

Re: JGR's Patch Pack

Post by madrito »

then, to distinguish, can optionally change color "stop" = blue, green - white
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

I've added a bridge property to set which pillars are present for each of the bridge pieces, and a station property to set which pillars are not permitted on each of the station tiles.
See here for details.
These properties are already set for the default stations and bridges (i.e. if no station or bridge GRF are used).
This is in the jgrpp branch on github.
Ex TTDPatch Coder
Patch Pack, Github
MichalSoldat
Engineer
Engineer
Posts: 10
Joined: 21 Oct 2018 21:47

Re: JGR's Patch Pack

Post by MichalSoldat »

hi JGR,
I have seen this patch viewtopic.php?t=68894 is already implemented in your patch pack, but i can't find this setting: Image
Can you do something with this? :mrgreen:
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

MichalSoldat wrote:hi JGR,
I have seen this patch viewtopic.php?t=68894 is already implemented in your patch pack, but i can't find this setting: Image
Can you do something with this? :mrgreen:
It's only enabled in the scenario editor.

The version which enabled placing houses in game was included for a few versions, however it was later removed due to bugs/stability issues.
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:I've added a bridge property to set which pillars are present for each of the bridge pieces, and a station property to set which pillars are not permitted on each of the station tiles.
See here for details.
These properties are already set for the default stations and bridges (i.e. if no station or bridge GRF are used).
This is in the jgrpp branch on github.
Pulled and compiled as gc1df63a2.
Works as advertised for:
- Default stations and bridges
- Default stations and my Urban Transit Bridge (pillars) and my Carbon Composite Bridge (no pillars)
I will have to modify my ISR modification to test with GRF stations. This may take a couple of days.
:bow:
Dr. B. Ching
Engineer
Engineer
Posts: 109
Joined: 14 May 2011 10:58
Location: Sausagewood

Re: JGR's Patch Pack

Post by Dr. B. Ching »

I don't know how much effort it would take to implement (if it's more than a little, please don't bother), but click-draggable NewGRF objects and company-owned land would be a welcome feature. Just a minor quality of life improvement.

Kind Regards,
The Axe
My scenarios for JGRpp: Motor City (1910), Fortune Bay (1993)
User avatar
OzTrans
Tycoon
Tycoon
Posts: 1675
Joined: 04 Mar 2005 01:07

Re: JGR's Patch Pack

Post by OzTrans »

Good things are happening ...
Additions to NewGRF Specifications ... wrote:Property Mapping: C "A0PM"
...
The global variable 0x8D [TTD Version] is checked ...
...
The bit number MUST be in the range: 4 ≤ bit number ≤ 31 ...
TTD version [0x8D] is only a byte (according to GRF Specs), so the range of bits would be '4 ≤ bit number ≤ 7' or has 0x8D put on some weight ?

Just to clarify .. we can use any unused property ID as long as it is defined properly under 'Action 14 - Property Mapping for Action 0'.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Bing [Bot] and 4 guests