OpenGFX Mars

Discuss, get help with, or post new graphics for TTDPatch and OpenTTD, using the NewGRF system, here. Graphics for plain TTD also acceptable here.

Moderator: Graphics Moderators

User avatar
Zephyris
Tycoon
Tycoon
Posts: 2890
Joined: 16 May 2007 16:59

Re: OpenGFX Mars [coders needed!]

Post by Zephyris »

skippern wrote:How is stations handled?
Exactly like normal stations really, see this post. This is just a graphics replacement when it comes to stations, no other changes are really possible.

Btw does anyone feel like doing some coding? I would love to see this set starting to come to life! Planetmaker has offered to take a look at coding the landscape stuff, but there are a lot of other things that can be done in parallel:
a) Mars base/landscape. Provides terrain/landscape graphics (ground tiles, basic roads, 'blank' rail tiles, foundations, trees, lighthouse+transmitter, river/canals). Will probably need to include default bridges.
b) Towns. Provides a bunch o' colony buildings.
c) Industries. Provides all industries and defines all cargo types.
d) Tracks & Trains. Provides rail types, coded as new rail types, and stations. Provides train vehicles.
e) Road & Rovers. Provides road vehicles, stations.
g) Aircraft. Provides aircraft and airport graphics.
h) Ships. Provides ship and dock/depot graphics.
i) Bridges.
The things in bold are pretty much finished, or can be finished very quickly once I work out what I have missed as the coding starts!
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2890
Joined: 16 May 2007 16:59

Re: OpenGFX Mars [coders needed!]

Post by Zephyris »

Farms
The ability to grow crops directly on the surface of Mars has probably been the single biggest development which has allowed the expansion of colonies. Supplied with suitable fertilizer and a steady water source genetically modified crops grow surprisingly well, taking advantage of the high CO2 content of the atmosphere. Farming centres also often house large numbers of animals, taking advantage of the combined food and oxygen generation of the crops to rear the livestock, although additional oxygen is normally required too. The farmland surrounding farming centres contrasts sharply from the surrounding landscape. The fertilised soil, carefully held in by extensive retaining walls, is rich in organic material and dark in colour. Irrigation pipes also run throughout the lines of crops, drip feeding individual plants with the water they vitally need. In many farms the retaining walls even extend under the crops, improving water retention and preventing the salts of the regolith reaching the soil and reducing crop growth.
Attachments
Preview1Farm_8bpp.png
Preview1Farm_8bpp.png (14.99 KiB) Viewed 4576 times
User avatar
STD
Tycoon
Tycoon
Posts: 1810
Joined: 02 Jul 2012 14:53
Location: Russia, Samara

Re: OpenGFX Mars [coders needed!]

Post by STD »

Farm looks fantastic, as with all other structures :D
[OpenTTD] STD screenshots
----------------------------------------------------------------------------------------------------------------------------------
[OpenTTD] STD saved games - My finished scenarios and saves from the game
My Youtube channel - OpenTTD | Wiki xUSSR set (RU) | Wiki xUSSR set (EN) | Download the latest version of the xUSSR set
TT Screenshot of the Month - the page editor | Screenshot Of The Month Contest Winner: August 2017
xeryon
Engineer
Engineer
Posts: 36
Joined: 05 Dec 2013 20:30

Re: OpenGFX Mars [coders needed!]

Post by xeryon »

I assume the farms will operate like standard farms and have an array of fields in the surrounding area or will they be more constrained?
User avatar
supermop
Tycoon
Tycoon
Posts: 1104
Joined: 21 Feb 2010 00:15
Location: Fitzroy North - 96

Re: OpenGFX Mars [coders needed!]

Post by supermop »

Just a suggestion: maybe the farm fields should be hoop-houses? That way the farm could choose to collect some of oxygen produced a little more easily, and maybe keep plants just a bit warmer.

Best,
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2890
Joined: 16 May 2007 16:59

Re: OpenGFX Mars [coders needed!]

Post by Zephyris »

maybe the farm fields should be hoop-houses?
I tried to draw these graphics, but without the ability to have separate ground tile and ground tile overlay (i.e. like a building) it was a messy hack...

That does relate to a long-standing feature request I would like: custom field tiles with a grf-definable ground tile and tile overlay, like a building. That would be great for improving existing field graphics, allowing forests to have "forest fields" which can be demolished/built through, and for things like greenhouses on fields like here...
User avatar
YNM
Tycoon
Tycoon
Posts: 3573
Joined: 22 Mar 2012 11:10
Location: West Java

Re: OpenGFX Mars [coders needed!]

Post by YNM »

Only farms would generate fields around it right ? Japanese Landscape (and OpenGFX+Landscape) have altered the field graphics, so I thought it's quite easy to have a different graphics for martian farms, probably sorta of greenhouses with some piping around for the oxygen.
Last edited by YNM on 26 Jan 2014 05:04, edited 1 time in total.
YNM = yoursNotMine - Don't get it ?
「ヨーッスノットマイン」もと申します。
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2890
Joined: 16 May 2007 16:59

Re: OpenGFX Mars [coders needed!]

Post by Zephyris »

Let the coding begin! I have started by trying to get the trains/rail types coded. This is the first time I have ever tried nml, and I am very happy to get a vehicle running!
Attachments
VehCodingPrev.png
VehCodingPrev.png (24.61 KiB) Viewed 4349 times
Eddi
Tycoon
Tycoon
Posts: 8267
Joined: 17 Jan 2007 00:14

Re: OpenGFX Mars [coders needed!]

Post by Eddi »

YNM wrote:Only farms would generate fields around it right ? Japanese Landscape (and OpenGFX+Landscape) have altered the field graphics, so I thought it's quite easy to have a different graphics for martian farms, probably sorta of a greenhouses with some piping around for the oxygen.
every graphics in this game can be changed with a trivial sprite exchange. it's when you want something more flexible when you run into problems... there is only ever one kind of fields (with hardcoded seasonal alteration) so when you need two different backgrounds depending on ground type, this is not possible to code.

and when you have more flexible "field" graphics there's no need anymore to limit it to farms. like a dairy farm could plant "meadows" instead of fields, with cows on them. or a forest could plant trees (kinda opposite to the tropic sawmill), or even a power plant could "plant" power lines, or lots of other things.
User avatar
skippern
Traffic Manager
Traffic Manager
Posts: 195
Joined: 30 Oct 2013 13:57

Re: OpenGFX Mars [coders needed!]

Post by skippern »

Eddi wrote:
YNM wrote:Only farms would generate fields around it right ? Japanese Landscape (and OpenGFX+Landscape) have altered the field graphics, so I thought it's quite easy to have a different graphics for martian farms, probably sorta of a greenhouses with some piping around for the oxygen.
every graphics in this game can be changed with a trivial sprite exchange. it's when you want something more flexible when you run into problems... there is only ever one kind of fields (with hardcoded seasonal alteration) so when you need two different backgrounds depending on ground type, this is not possible to code.

and when you have more flexible "field" graphics there's no need anymore to limit it to farms. like a dairy farm could plant "meadows" instead of fields, with cows on them. or a forest could plant trees (kinda opposite to the tropic sawmill), or even a power plant could "plant" power lines, or lots of other things.
Having that type flexibility would be great, that way we could have a jungle canopy covering the road completely, power lines "growing" out from a power plant depending on power production, different types of fields depending on the type of farm, etc. I guess 1.4 are too far advanced to do any alterations, but this could be suggested to 1.5
Skippern
OpenTTD Mac user
User avatar
YNM
Tycoon
Tycoon
Posts: 3573
Joined: 22 Mar 2012 11:10
Location: West Java

Re: OpenGFX Mars [coders needed!]

Post by YNM »

Eddi wrote:and when you have more flexible "field" graphics there's no need anymore to limit it to farms. like a dairy farm could plant "meadows" instead of fields, with cows on them. or a forest could plant trees (kinda opposite to the tropic sawmill), or even a power plant could "plant" power lines, or lots of other things.
Have there any works on it yet ? Aren't it's also something that the author of FIRS were asking too ?
YNM = yoursNotMine - Don't get it ?
「ヨーッスノットマイン」もと申します。
Eddi
Tycoon
Tycoon
Posts: 8267
Joined: 17 Jan 2007 00:14

Re: OpenGFX Mars [coders needed!]

Post by Eddi »

No. Yes.
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2890
Joined: 16 May 2007 16:59

Re: OpenGFX Mars [coders needed!]

Post by Zephyris »

Right, I need some help! Any NML gurus out there?

I have put together a basic grf of the trains (ground trains and monorails) and their tracks, but have a few problems:
1. How do you replace the RAIL railtype? I have a feeling I am doing something wrong with my rail naming/translation table, but I am not sure.
2. Why are my rail underlay sprites acting crazy? It's like the grf doesn't know the junction underlay sprites are there.
3. Why is the rail overlay not correctly used on bridge slopes (when using path highlighting)?
4. How can I define a new cargo class (pressurised)?
Apart from that it is looking pretty good for a first effort.
Attachments
ogfx-mars-tracksandtrains.zip
(123.45 KiB) Downloaded 162 times
Transportman
Tycoon
Tycoon
Posts: 2781
Joined: 22 Feb 2011 18:34

Re: OpenGFX Mars [coders needed!]

Post by Transportman »

Zephyris wrote:Right, I need some help! Any NML gurus out there?

I have put together a basic grf of the trains (ground trains and monorails) and their tracks, but have a few problems:
1. How do you replace the RAIL railtype? I have a feeling I am doing something wrong with my rail naming/translation table, but I am not sure.
2. Why are my rail underlay sprites acting crazy? It's like the grf doesn't know the junction underlay sprites are there.
3. Why is the rail overlay not correctly used on bridge slopes (when using path highlighting)?
4. How can I define a new cargo class (pressurised)?
Apart from that it is looking pretty good for a first effort.
1: You can't replace the RAIL railtype (and the other defaults), but you can change their properties+graphics by coding a Railtype with the RAIL-label. I did the same with the Dutch Track Set, take a look at the code for Yard/station rail.
2: You should also provide sprites for tunnel entrances and level crossings. See this note.
3: Might be the same as 2, but do you have a screenshot of that?
4: You can't define new cargo classes as far as I know, but you can combine the available classes on cargoes you define.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
User avatar
skippern
Traffic Manager
Traffic Manager
Posts: 195
Joined: 30 Oct 2013 13:57

Re: OpenGFX Mars [coders needed!]

Post by skippern »

Transportman wrote: 4: You can't define new cargo classes as far as I know, but you can combine the available classes on cargoes you define.
That might be requested to be included in the game/API, but than the NewGRF will require version newer than the Nightly update where this cargo class is included. Maybe rather combine classes CC_HAZARDOUS,CC_LIQUID,CC_REFRIGERATED than creating a new cargo class?
Skippern
OpenTTD Mac user
Michi_cc
OpenTTD Developer
OpenTTD Developer
Posts: 619
Joined: 14 Jun 2004 23:27
Location: Berlin, Germany
Contact:

Re: OpenGFX Mars [coders needed!]

Post by Michi_cc »

Zephyris wrote: 4. How can I define a new cargo class (pressurised)?
By picking a free number from the table in http://newgrf-specs.tt-wiki.net/wiki/Ac ... s_.2816.29. If you also want a nice name instead of just a number you'd have to patch NML.

-- Michael Lutz
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2890
Joined: 16 May 2007 16:59

Re: OpenGFX Mars [coders needed!]

Post by Zephyris »

Transportman wrote:...but you can combine the available classes on cargoes you define.
Thanks for those tips, I will try them out.
Michi_cc wrote:By picking a free number from the table in http://newgrf-specs.tt-wiki.net/wiki/Ac ... s_.2816.29. If you also want a nice name instead of just a number you'd have to patch NML.
Fair enough. I think I will stick to learning nml before venturing into patching NML!

Coding has come along nicely, here's a teaser pic:
Attachments
Mars.png
Mars.png (84.52 KiB) Viewed 4098 times
User avatar
DanMacK
Tycoon
Tycoon
Posts: 3906
Joined: 27 Feb 2004 20:03
Location: Ontario, Canada
Contact:

Re: OpenGFX Mars [coders needed!]

Post by DanMacK »

Nice! Martian Terrain :P

I sent you some farm pods with the vehicles, would those work at all? They're intended to show growth as a field would.
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5602
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: OpenGFX Mars [coders needed!]

Post by PikkaBird »

Zephyris wrote: 4. How can I define a new cargo class (pressurised)?
Which cargos did you have in mind for this?

Since this is a very specific use and you're creating both the cargos and the vehicles, I would suggest simply customising the available cargos for vehicles using the cargo_allow_refit and cargo_disallow_refit properties.
Eddi
Tycoon
Tycoon
Posts: 8267
Joined: 17 Jan 2007 00:14

Re: OpenGFX Mars [coders needed!]

Post by Eddi »

cargo classes are a means for an industry set to allow existing vehicle sets to transport the cargo, as such, this interface should be as stable as possible. i think you should avoid adding cargo classes unless you have a really good reason, and instead try reinterprete existing cargo classes.

e.g. if only humans are affected by pressure, use the "passenger" cargo class. if some non-human cargo is also affected by pressure, use the "sheltered" cargo class. in these cases, exclude the "sheltered" and "passenger" class from every unpressurized wagon. (any wagon that includes the "sheltered" or "passenger" class may not exclude other cargo classes then, or you get circular exclusions, resulting in no wagon being able to transport the cargo)
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: GarryG and 60 guests