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 »

OzTrans wrote: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 ?
To a first approximation, all GRF global variables except 0x85 are 32 bits wide regardless of what the documentation says, the upper bits are still there even if they are nominally zero.
OzTrans wrote: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'.
Yes, so long as you check that the allocation of the property ID you want to use did work before you use the property, this is for compatibility with versions which don't have this mechanism.
Ex TTDPatch Coder
Patch Pack, Github
maxiecool2
Engineer
Engineer
Posts: 31
Joined: 28 Feb 2013 00:20

Re: JGR's Patch Pack

Post by maxiecool2 »

hey jdr
i would like to ad a patch request to add on

industry filter
http://bugs.openttd.org/task/5455
useful for sorting industries

wait for cargo patch
(spring didnt have a link)
useful for partial cargo pick up

i have no idea how to make a patch but heres an idea for those smarter than me
auto payback loan
a check box in the budget window when enabled, when the bank balance hits $10,000 it automatically pays it into to loan, either manually uncheck or automatically when loan hits zero!
thanks mat
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: JGR's Patch Pack

Post by Eddi »

JGR wrote:To a first approximation, all GRF global variables except 0x85 are 32 bits wide regardless of what the documentation says, the upper bits are still there even if they are nominally zero.
OpenTTD usually zeroes the upper bits, TTDPatch (does anyone still care about that?) probably reads random memory content. in any case, you shouldn't rely on this.
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Eddi wrote:TTDPatch (does anyone still care about that?)
In short, no.
For what it's worth the upper bits will be 0 anyway in the case of that particular variable. I've not checked the others.
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 »

Dr. B. Ching wrote: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
Click-dragging NewGRF objects is a bit problematic as they may occupy more than one tile, and the NewGRF can decide at build time if building is permitted.

I've implemented click-dragging land purchasing as a test, I've also added a land purchasing rate limit in the same way as clearing tiles, building trees, etc.
However even with a rate limit it seems much too easy to use bulk land purchasing for griefing and anti-competitive purposes.

Probably it will have to enabled by a default-off setting, however I'm open to suggestions on this.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
kamnet
Moderator
Moderator
Posts: 8548
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: JGR's Patch Pack

Post by kamnet »

I'm fine with a default-off setting. If any of those AI sons-of-youknowwhats try to grief me, I'll delete their sorry butts! :twisted: :twisted: :twisted:
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:
Dr. B. Ching wrote: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
Click-dragging NewGRF objects is a bit problematic as they may occupy more than one tile, and the NewGRF can decide at build time if building is permitted.

I've implemented click-dragging land purchasing as a test, I've also added a land purchasing rate limit in the same way as clearing tiles, building trees, etc.
However even with a rate limit it seems much too easy to use bulk land purchasing for griefing and anti-competitive purposes.

Probably it will have to enabled by a default-off setting, however I'm open to suggestions on this.
Rubidium did most of the original OpenTTD implementation of NewObjects. There was considerable discussion here, and I believe drag-and-drop construction was considered. That topic might be worth a look.

An on/off setting sounds reasonable. Default off sounds logical.

The maximum size of an object is 15x15 tiles. Would dragging such an object be reasonable?

EDIT: Can the on/off setting be implemented in Action0, Property 10 Object flags?
ecolortest
Engineer
Engineer
Posts: 19
Joined: 12 Oct 2016 07:46

Re: JGR's Patch Pack

Post by ecolortest »

Game crash at boot if OpenSFX installed in openttd jgrpp 0.28.0
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 »

Thanks for looking into it, and I'm fine with it being unavailable in multiplayer optionally or even entirely. I mainly use simple landscape tiles (included as NewGRF objects in OpenGFX) and sometimes company-owned land to prevent town growth along certain roads, which is quite a chore without click-dragging.

Kind Regards,
The Axe
My scenarios for JGRpp: Motor City (1910), Fortune Bay (1993)
madrito
Engineer
Engineer
Posts: 37
Joined: 05 Jul 2018 15:38

Re: JGR's Patch Pack

Post by madrito »

JGR wrote:... I'm open to suggestions ...
suggestion is that there should be some version with prog.singnals variant somehow "better".grf or otherwise and not necessarily permanently
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

ecolortest wrote:Game crash at boot if OpenSFX installed in openttd jgrpp 0.28.0
You'd most likely be better off just running natively, instead of trying to use Wine.
madrito wrote:
JGR wrote:... I'm open to suggestions ...
suggestion is that there should be some version with prog.singnals variant somehow "better".grf or otherwise and not necessarily permanently
I'll look into enabling them to be overridden by NewGRFs, it should not be too difficult to add this as an extension.
wallyweb wrote:Rubidium did most of the original OpenTTD implementation of NewObjects. There was considerable discussion here, and I believe drag-and-drop construction was considered. That topic might be worth a look.

An on/off setting sounds reasonable. Default off sounds logical.

The maximum size of an object is 15x15 tiles. Would dragging such an object be reasonable?

EDIT: Can the on/off setting be implemented in Action0, Property 10 Object flags?
In terms of gameplay/UI, as far as I am aware there is no other case in the game where you can drag place multiple objects which are larger than one tile.

I suppose that I could add a flag, but from a user point of view it could seem inconsistent that some objects are seemingly draggable and others not for no obvious reason.
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:In terms of gameplay/UI, as far as I am aware there is no other case in the game where you can drag place multiple objects which are larger than one tile.
Good. :D
I suppose that I could add a flag, but from a user point of view it could seem inconsistent that some objects are seemingly draggable and others not for no obvious reason.
Actually, is an off/on switch really necessary? Just because the function is always available doesn't mean that the player has to use it. A simple click+hold+drag should be sufficient to prevent accidental dragging.
User avatar
Pyoro
Tycoon
Tycoon
Posts: 2558
Joined: 17 Oct 2008 12:17
Location: Virgo Supercluster

Re: JGR's Patch Pack

Post by Pyoro »

wallyweb wrote:
I suppose that I could add a flag, but from a user point of view it could seem inconsistent that some objects are seemingly draggable and others not for no obvious reason.
Actually, is an off/on switch really necessary? Just because the function is always available doesn't mean that the player has to use it. A simple click+hold+drag should be sufficient to prevent accidental dragging.
Or use CTRL to modify behavior. It already does that for a bunch of things.
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 »

Yeah, CTRL-click would be a workable compromise, I think.

Kind Regards,
The Axe
My scenarios for JGRpp: Motor City (1910), Fortune Bay (1993)
User avatar
kamnet
Moderator
Moderator
Posts: 8548
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: JGR's Patch Pack

Post by kamnet »

Tried out 0.28.0 and started to crash, also crashing with 0.27.1.
Only thing I've changed is that I've maxed out NewGRFs (255 in-game, and 4 static).
Here's the dump files if you want to take a look.

edit: After experimenting for a few hours, I think I've found something interesting. The game will load with 242 NewGRFs. Any more than that and it will crash upon game creation. This also appears to include static NewGRFs.
Attachments
crash-2018-11-24.tar
(19.96 MiB) Downloaded 63 times
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

kamnet wrote:Tried out 0.28.0 and started to crash, also crashing with 0.27.1.
Only thing I've changed is that I've maxed out NewGRFs (255 in-game, and 4 static).
Here's the dump files if you want to take a look.

edit: After experimenting for a few hours, I think I've found something interesting. The game will load with 242 NewGRFs. Any more than that and it will crash upon game creation. This also appears to include static NewGRFs.
Thanks for letting me know about this, I've pushed an update which should resolve this.
I will do some more checking on due course though.
Ex TTDPatch Coder
Patch Pack, Github
lugo
Engineer
Engineer
Posts: 100
Joined: 12 Oct 2010 13:55

Re: JGR's Patch Pack

Post by lugo »

JGR wrote: [*]Freight train through load (added in v0.24.0)
This is an alternative loading mode for freight trains for the case where the train is longer then the platform.
Hi, does anyone know how i would go about using the above mentioned feature?
User avatar
SquireJames
Tycoon
Tycoon
Posts: 1863
Joined: 07 Aug 2004 11:56
Skype: squirejames5
Location: Stoke-on-Trent
Contact:

Re: JGR's Patch Pack

Post by SquireJames »

When you have a freight train selected, choose "through load" in the same way as you tell trains whether to stop at the near end of the platform or the far end of the platform (click again and it should change to "through load" )
Image
lugo
Engineer
Engineer
Posts: 100
Joined: 12 Oct 2010 13:55

Re: JGR's Patch Pack

Post by lugo »

SquireJames wrote:When you have a freight train selected, choose "through load" in the same way as you tell trains whether to stop at the near end of the platform or the far end of the platform (click again and it should change to "through load" )
Well, using jgrpp-0.28.0 and having a freight train selected, i can only cycle through "near end", "middle" and "far end".
I'm trying to create a "through load" order for Train 19 in the attached savegame.
Attachments
Elbhaven Transport, 13th Jan 1929.sav
(1.5 MiB) Downloaded 59 times
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7240
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: JGR's Patch Pack

Post by Redirect Left »

I suspect these two ideas are a lot harder to implement than it sounds like but;

it'd be nice to able to press 'Go To' when route plotting, but then have it stay in that mode when we select a station, and not have to go back and press 'Go To' again for the next station, and so on and so forth.

It'd also be pretty neat to be able to have an option which then routes the train back from its current point, through all the stations already chosen. So if i was going from A to F, via B C D & E. Usually i'd have to sleect A to F seperate, then again E to B. Would be amazing if we could just click say "end route" and then it automatically routes its way back through the identical route chosen on the return.

Are either of these viable, do you think?
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Google [Bot] and 10 guests