Help in manipulating building CC with code
Moderator: Graphics Moderators
Help in manipulating building CC with code
Hello Everyone,
I have recently resumed my long running love affair with TTD (for about the 10th time in as many years). One of the things that have always appealed to me about the patch and OTTD was the ability to muck about in the GRF's. I have been studying up on the NewGRF documentation. But perhaps you could help point me in the right direction.
Is it possible though code to manipulate the CC portions of buildings? I rather prefer subdued CC, and would like as an example, to reduce the amount of CC in the airports replacing it with red.
I know that I can certainly replace the sprites and I am comfortable doing that, but for me it would be interesting if I could achieve this with code.
Thanks in advance and Happy New Year to all.
I have recently resumed my long running love affair with TTD (for about the 10th time in as many years). One of the things that have always appealed to me about the patch and OTTD was the ability to muck about in the GRF's. I have been studying up on the NewGRF documentation. But perhaps you could help point me in the right direction.
Is it possible though code to manipulate the CC portions of buildings? I rather prefer subdued CC, and would like as an example, to reduce the amount of CC in the airports replacing it with red.
I know that I can certainly replace the sprites and I am comfortable doing that, but for me it would be interesting if I could achieve this with code.
Thanks in advance and Happy New Year to all.
Re: Help in manipulating building CC with code
What portion of a building is CC and what is not is actually defined in the graphics. In some cases the code can only enable/disable it completely or set specific colours. So in this case you would need to paint over the graphics.
Re: Help in manipulating building CC with code
Hello Foobar,
Thank you kindly. As I have been puzzling over this, I ran across the Combined Airport Set (newairportw.grf) For me, this grf works in OTTD but only with the default parameters, none of the others are visible.
So I understand the forums philosophy of "if you want something done, do it yourself" and I completely agree. It seems like adding the feature I want would be much easier using an existing grf. But, as I am still floundering a bit in all of the changes since I was last fairly knowledgeable, any help in briefly explaining or at least hinting what direction I need to take to make this grf fully compatible with OTTD 1.2 or higher would be greatly appreciated.
Kind Regards,
Thank you kindly. As I have been puzzling over this, I ran across the Combined Airport Set (newairportw.grf) For me, this grf works in OTTD but only with the default parameters, none of the others are visible.
So I understand the forums philosophy of "if you want something done, do it yourself" and I completely agree. It seems like adding the feature I want would be much easier using an existing grf. But, as I am still floundering a bit in all of the changes since I was last fairly knowledgeable, any help in briefly explaining or at least hinting what direction I need to take to make this grf fully compatible with OTTD 1.2 or higher would be greatly appreciated.
Kind Regards,
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Help in manipulating building CC with code
Really? See yourself, this looks distinctly different to me...Hi-Torque wrote:Hello Foobar,
Thank you kindly. As I have been puzzling over this, I ran across the Combined Airport Set (newairportw.grf) For me, this grf works in OTTD but only with the default parameters, none of the others are visible.
And mind: if you play with the OpenGFX base set: a portion of its airport sprites is actually borrowed from this set or a slightly modified version of it - so not every parameter setting will have a huge effect - especially if it refers to skidd13's sprites.
- Attachments
-
- with settings
- combined_airports.png (64.67 KiB) Viewed 2156 times
-
- default graphics (OpenGFX)
- no_combined_airports.png (89.39 KiB) Viewed 2156 times
-
- other parameters
- combined_airports2.png (61.06 KiB) Viewed 2152 times
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: Help in manipulating building CC with code
Hi Planetmaker,
Thank you for taking the time to reply. Ok, well I will do a bit of troubleshooting to see what the conflict is. Then I can use this grf to learn from.
Thank you all!
Thank you for taking the time to reply. Ok, well I will do a bit of troubleshooting to see what the conflict is. Then I can use this grf to learn from.
Thank you all!
Re: Help in manipulating building CC with code
Is this possible for vehicles, and if so, how?In some cases the code can only enable/disable it completely or set specific colours.
Re: Help in manipulating building CC with code
Yes, you can. First and foremost there's a property flag to enable 2CC.
On top of that you can apply specific recolour palettes, regardless of player colour. See http://www.tt-wiki.net/wiki/NMLTutorial/Train_recolour for an example.
And if that's not enough you can specify custom recolour palettes. I used this for instance in the Dutch Trainset for cargo recolouring. These are the recolour sprites: http://dev.openttdcoop.org/projects/dut ... rites.pnml, which are called from a vehicle's graphics block: http://dev.openttdcoop.org/projects/dut ... _item.pnml
On top of that you can apply specific recolour palettes, regardless of player colour. See http://www.tt-wiki.net/wiki/NMLTutorial/Train_recolour for an example.
And if that's not enough you can specify custom recolour palettes. I used this for instance in the Dutch Trainset for cargo recolouring. These are the recolour sprites: http://dev.openttdcoop.org/projects/dut ... rites.pnml, which are called from a vehicle's graphics block: http://dev.openttdcoop.org/projects/dut ... _item.pnml
Who is online
Users browsing this forum: No registered users and 11 guests