Newgrf wishlist

Got an idea for OpenTTD? Post it here!

Moderator: OpenTTD Developers

User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5631
Joined: 13 Sep 2004 13:21
Location: The Moon

Newgrf wishlist

Post by PikkaBird »

  • Make ctrl-click reversing of train vehicles set var C8
  • Toggle bit 1 of var FF when train reverses
I'm sure to think of some more, I'll add them as I do. ;)
User avatar
stevenh
TTDPatch Developer
TTDPatch Developer
Posts: 759
Joined: 24 Jul 2005 05:07
Location: Canberra, Australia
Contact:

Re: Newgrf wishlist

Post by stevenh »

Var C8 goes to 0xFE 'or' 0xFF?
wiki states:0xC8 (Byte) Sprite type; FD for trains forward, FE or FF when reversed
And then where is bit 1.. .of Var 0xFF... *goes back to the searching*

I think I need to edit:

Code: Select all

static uint32 VehicleGetVariable(const ResolverObject *object, byte variable, byte parameter, bool *available)
To get the proper value returning to you, but I'm not so sure... Anyone of NewGRF knowledge in OTTD willing to lend a hand?


edit:... Is the following correct? It's at least started for those who know if it's correct.
Pikka, plz give me a GRF with testable situations :)
Attachments
VehicleReversing.patch
NewGRF Reverse Vehicles Goodness.
(1.64 KiB) Downloaded 104 times
User avatar
CMircea
Chairman
Chairman
Posts: 887
Joined: 29 Dec 2006 14:05

Re: Newgrf wishlist

Post by CMircea »

I guess it's UKRS? Sine in TTDP only the tank engines reverse when the train reverses.
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5631
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: Newgrf wishlist

Post by PikkaBird »

stevenh wrote:Var C8 goes to 0xFE 'or' 0xFF?
I don't know the difference, and I don't know that any grf author does, so just pick one (we check both easily enough).
And then where is bit 1.. .of Var 0xFF... *goes back to the searching*
http://wiki.ttdpatch.net/tiki-index.php ... _FE_and_FF_

Bit 0 rather than bit 1, sorry.
michael blunck
Tycoon
Tycoon
Posts: 5954
Joined: 27 Apr 2005 07:09
Contact:

Re: Newgrf wishlist

Post by michael blunck »

[C8]
PikkaBird wrote:I don't know the difference, and I don't know that any grf author does [...]
I´m using it (still) in DBXL 0.82 (VT08, VT11.5, ICE-TD, E95, E94, ICE-1: don´t know if it works correct in OTTD, though).

A typical sprite would be something like this:

Code: Select all

02 00 03 81 C8 00 FF 01
              00 00 00 FD    // forward
              01 00          // backward
regards
Michael
Image
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5631
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: Newgrf wishlist

Post by PikkaBird »

michael blunck wrote:I´m using it
Yes, I use it extensively (and it doesn't work in OTTD at the moment). What I meant by not knowing the difference is that I always return the same value for FE and FF, as you do.
User avatar
belugas
OpenTTD Developer
OpenTTD Developer
Posts: 1507
Joined: 05 Apr 2005 01:48
Location: Deep down the deepest blue
Contact:

Re: Newgrf wishlist

Post by belugas »

stevenh wrote:To get the proper value returning to you, but I'm not so sure... Anyone of NewGRF knowledge in OTTD willing to lend a hand?
I'm checking it, although it would have been peter_1138's expertise field.
I've never touched vehicles's grf code before...
There is a start to everything ;)

thanks for the effort, by the way. Really appreciated
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5631
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: Newgrf wishlist

Post by PikkaBird »

It used to work. As I speculated in the UKRS thread, it may have been broken when the new reversing behaviour (first loco/wagons reversable too) was introduced.

Also, I has another one, a bit more up Belugas' street: Using a custom house grf, I'm noticing that supposedly-overridden default houses are still appearing. Is house property 15 not functional?
User avatar
belugas
OpenTTD Developer
OpenTTD Developer
Posts: 1507
Joined: 05 Apr 2005 01:48
Location: Deep down the deepest blue
Contact:

Re: Newgrf wishlist

Post by belugas »

@stevenh : i think it really should be bit 8, since it affects the modflags uint16. Look at the included diff. Untested, not compiled. I cannot on this machine.

@PikkaBird: noted. Although this would have been a Maedhros's call ;) But this indeed i can more easily look at[0]. By the way, bugs.openttd.org should be more usefull than a forum topic to follow up and add stuff on, since we can more easily keep track of the whole stuff.

[0] Since when? any idea?
Attachments
c8.diff
My reading of c8
I have no clue about the spritenum change.
(1.57 KiB) Downloaded 126 times
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
User avatar
Maedhros
OpenTTD Developer
OpenTTD Developer
Posts: 603
Joined: 30 Mar 2006 18:24
Location: Durham, UK

Re: Newgrf wishlist

Post by Maedhros »

PikkaBird wrote:Also, I has another one, a bit more up Belugas' street: Using a custom house grf, I'm noticing that supposedly-overridden default houses are still appearing. Is house property 15 not functional?
House overrides are working perfectly with ttrs3 in r11290 for me - please could you post a sample of the NFO that isn't working?
No-one's more important than the earthworm.
User avatar
stevenh
TTDPatch Developer
TTDPatch Developer
Posts: 759
Joined: 24 Jul 2005 05:07
Location: Canberra, Australia
Contact:

Re: Newgrf wishlist

Post by stevenh »

PikkaBird wrote:Bit 0 rather than bit 1, sorry.
belugas wrote:i think it really should be bit 8, since it affects the modflags uint16.
belugas, once Pikka had said FF and bit zero I'd realised how I was affecting the lower 8 bits of FE and not FF... my update this morning would've changed the '1' to an '8'... so... Thanks :)

Pikka, what's next? Trees for Pineapples that you're about to finish? :P
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5631
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: Newgrf wishlist

Post by PikkaBird »

Maedhros wrote:please could you post a sample of the NFO that isn't working?
Well they're just action 0 properties, so there's no fancy NFO.

The grf in question is this one. It should override all the default temperate buildings, but I'm still seeing the originals in OTTD (the little churches, for example).
User avatar
belugas
OpenTTD Developer
OpenTTD Developer
Posts: 1507
Joined: 05 Apr 2005 01:48
Location: Deep down the deepest blue
Contact:

Re: Newgrf wishlist

Post by belugas »

I'll try it tonigh.
One little note:
sprites 5 to 12 , the Action 04 ones: should not they be 04 07 instead of 04 09? From what i read, you do not define industry tiles text, plus, there is no Action 04 of feature 09 :)
The 08 xx 15 xx scheme of Action 00 seems to be fine. dunnno. Got to check

[edit] : I'm not sure of what i see, but i THINK you defined the chruches in sprite 112. And i see no override in this pseudo-sprite [/edit]
[edit] : same for sprite 311, 345, but i do not know if it is inntentionnal [/edit]
Last edited by belugas on 19 Oct 2007 17:15, edited 1 time in total.
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5631
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: Newgrf wishlist

Post by PikkaBird »

belugas wrote:should not they be 04 07 instead of 04 09? From what i read, you do not define industry tiles text, plus, there is no Action 04 of feature 09
Those are actually DC generic texts, rather than feature texts, so the feature byte used doesn't really matter.
belugas wrote:[edit] : I'm not sure of what i see, but i THINK you defined the chruches in sprite 112. And i see no override in this pseudo-sprite [/edit]
The override is in sprite 111. I should actually move it to a different building altogether - my church is a four-tile building, and that causes problems if the grf is deactivated. But that's not the problem here, because it happens with all the other buildings too. I just chose the churches as an example because the small default churches stand out.

Edit: 112, 311 and 345 are all the "additional" tiles of four tile buildings, which is why they don't override anything.
User avatar
Maedhros
OpenTTD Developer
OpenTTD Developer
Posts: 603
Joined: 30 Mar 2006 18:24
Location: Durham, UK

Re: Newgrf wishlist

Post by Maedhros »

PikkaBird wrote:Well they're just action 0 properties, so there's no fancy NFO.

The grf in question is this one. It should override all the default temperate buildings, but I'm still seeing the originals in OTTD (the little churches, for example).
Ok. If Belugas doesn't get there first, I'll take a look at it tomorrow. :)
No-one's more important than the earthworm.
User avatar
belugas
OpenTTD Developer
OpenTTD Developer
Posts: 1507
Joined: 05 Apr 2005 01:48
Location: Deep down the deepest blue
Contact:

Re: Newgrf wishlist

Post by belugas »

PikkaBird wrote:Those are actually DC generic texts, rather than feature texts, so the feature byte used doesn't really matter.
Why didn't you used 04 48 then? It actually works, when looking at the sources, tough. It just go in the "default unspecified catch all basket". But is' just... strange looking ;)
PikkaBird wrote:The override is in sprite 111. I should actually move it to a different building altogether - my church is a four-tile building, and that causes problems if the grf is deactivated.
That does not make sens to me, I'm sorry to say so. You have a substitute and an override of house 03 on 111. Then, on 112, you substitute 3 times the house 0C, 0D, 0E. It's like... i'm scratching my head...
Anyway, i'm still not at home for testing. Sadly
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Newgrf wishlist

Post by DaleStan »

PikkaBird wrote:
belugas wrote:should not they be 04 07 instead of 04 09? From what i read, you do not define industry tiles text, plus, there is no Action 04 of feature 09
Those are actually DC generic texts, rather than feature texts, so the feature byte used doesn't really matter.
Yes it does. For non-48-features, the text is only loaded if the corresponding new* switch is turned on.

In fact, the same (s/text/sprite/) applies for all of actions 0-4. Of course, as I've said before, feature 08 is the same as feature 48; both are always loaded.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5631
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: Newgrf wishlist

Post by PikkaBird »

DaleStan wrote:Yes it does. For non-48-features, the text is only loaded if the corresponding new* switch is turned on.
I am aware of that, and I didn't say it had no effect. Just that it doesn't bother me enough to fix it yet (the grf is not officially released).

...And of course, in OTTD, there are no new* switches anyway.
User avatar
belugas
OpenTTD Developer
OpenTTD Developer
Posts: 1507
Joined: 05 Apr 2005 01:48
Location: Deep down the deepest blue
Contact:

Re: Newgrf wishlist

Post by belugas »

Regarding the train reversing stuff, I have a request to make:
I would like to know which grf to use, with which train, which circumstance should i try inorder to have which result. I want to test my patch, i tried with DBXL, but since i do not now what to look for, it's hard to say "It's done"...
And the trains that i've tried do not triggered the debug on get variable FE/FF.

So i'm pretty much feeling helpless right now...
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5631
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: Newgrf wishlist

Post by PikkaBird »

Try UKRS and the tank engines or the class 20.
Post Reply

Return to “OpenTTD Suggestions”

Who is online

Users browsing this forum: No registered users and 2 guests