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: 2830
Joined: 16 May 2007 16:59

Re: OpenGFX Mars

Post by Zephyris »

ToxicFrog wrote: 09 Feb 2020 01:39Meanwhile, now that I've started fiddling around with it in-game again, I've decided what I really want to see is martian ships. Maybe the water is still very salty and acidic, rough on hull material, so you want to keep as much of the ship out of the water as possible...lots of hydrofoils and hovercraft, maybe a few ground-effect vehicles. Hmm.
Great to see you're interested in working on this! I'd love to see Mars polished up...

My thought on ships was very similar - large capacity high speed ships are good for game balance and matches well with world theme. I've been playing Mars with my ekranoplan set as a stop-gap...
ToxicFrog
Engineer
Engineer
Posts: 11
Joined: 06 Feb 2020 00:31

Re: OpenGFX Mars

Post by ToxicFrog »

Zephyris wrote: 09 Feb 2020 11:05
ToxicFrog wrote: 09 Feb 2020 01:39Meanwhile, now that I've started fiddling around with it in-game again, I've decided what I really want to see is martian ships. Maybe the water is still very salty and acidic, rough on hull material, so you want to keep as much of the ship out of the water as possible...lots of hydrofoils and hovercraft, maybe a few ground-effect vehicles. Hmm.
Great to see you're interested in working on this! I'd love to see Mars polished up...

My thought on ships was very similar - large capacity high speed ships are good for game balance and matches well with world theme. I've been playing Mars with my ekranoplan set as a stop-gap...
You can't just say that and not link the GRF! Especially if it has support for the Mars resources and not just passengers.

As for working on Mars...I don't know. I have no graphical abilities whatsoever. I do have some programming experience, but none of it with NML. I ended up in this thread because it looked like other people were going to start working on it :P

Maybe I can at least figure out how to integrate the ekranoplans into it, though, if you point me at the source code and are ok with that :)
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2830
Joined: 16 May 2007 16:59

Re: OpenGFX Mars

Post by Zephyris »

This is the GRF: viewtopic.php?t=39188
It's GRF only, ie. no NML source and I don't have any commented source or anything... I can't remember if I hacked together a version with the Mars cargo classes or if the GRF on tt-forums supports them.
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2830
Joined: 16 May 2007 16:59

Re: OpenGFX Mars

Post by Zephyris »

Though, thinking about it, there are plenty of little bugs which can be fixed purely by recoding!
ToxicFrog
Engineer
Engineer
Posts: 11
Joined: 06 Feb 2020 00:31

Re: OpenGFX Mars

Post by ToxicFrog »

Zephyris wrote: 09 Feb 2020 13:17 This is the GRF: viewtopic.php?t=39188
It's GRF only, ie. no NML source and I don't have any commented source or anything... I can't remember if I hacked together a version with the Mars cargo classes or if the GRF on tt-forums supports them.
This is probably a stupid question, but I can't find the GRF...do you mean the big block of code in this post?

E: ok, yes, I think that's a grfcodec NFO file. Looking at that and comparing it to the Mars PNMLs, I think the first order of business would be to translate that to NML because GRF-NFO looks absolutely miserable to work with.

E2: found the test GRF here, I think with the graphics from that and the stats from the NFO I can try cobbling something together.
ToxicFrog
Engineer
Engineer
Posts: 11
Joined: 06 Feb 2020 00:31

Re: OpenGFX Mars

Post by ToxicFrog »

I converted the definition of the Antonov Eska ekranoplan from that NFO into NML and compiled it, updated it for the Mars cargo types, and successfully loaded it into OTTD:

Image

(ignore the cargo ship, that was meant to be a passenger hovercraft but I put the wrong ship ID in or something)

Now that I've confirmed that I have a working NML, I can hack together something to automatically convert the rest of the NFO entries into NML. They'll still need to be price/speed/cargo balanced and whatnot, of course, but they should at least be easier to work with then.
ToxicFrog
Engineer
Engineer
Posts: 11
Joined: 06 Feb 2020 00:31

Re: OpenGFX Mars

Post by ToxicFrog »

All GEVs have been converted to NML:

Image

Compiled GRF, source code. Based on ogfx-mars-aircraft and thus GPL2. Cargo classes have been set to disallow liquids and hazardous materials but allow basically everything else, and default to passengers.

Note that this is a straightforward automated conversion of kamnet's NFO from the Ekranoplan thread with minor changes to support Mars cargoes, so it inherits all the problems of that NFO:
- purchase and running costs are too low (tens or hundreds of credits)
- capacities are far too high (3,880 colonists or tonnes of cargo)
- there's no cargo-specific capacity multipliers, so 1 colonist == 1 tonne of cargo; some life support will be needed but 900kg of life support per 100kg of colonist is pretty unreasonable
- vehicles are far too slow (this appears to be a limitation of OTTD itself; ship speeds are capped at 127.5 km/h and unlike airplanes there's no separate multiplier you can adjust)

The vehicles are all present and can be purchased, though, and are separately sprited for passengers and cargo, and with all of them converted into NML, balancing for cost, speed, and capacity should be a lot easier. This could also easily be used as a base for a non-Mars ekranoplan pack, and might even work out of the box if you removed the mars cargos.pnml and disable_items calls and recompiled.
User avatar
kamnet
Moderator
Moderator
Posts: 7576
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: OpenGFX Mars

Post by kamnet »

ToxicFrog wrote: 10 Feb 2020 03:18 The vehicles are all present and can be purchased, though, and are separately sprited for passengers and cargo, and with all of them converted into NML, balancing for cost, speed, and capacity should be a lot easier. This could also easily be used as a base for a non-Mars ekranoplan pack, and might even work out of the box if you removed the mars cargos.pnml and disable_items calls and recompiled.
Here's a spreadsheet with some realistic stats for some of the ekranoplans. https://is.gd/w0CNIU
ToxicFrog
Engineer
Engineer
Posts: 11
Joined: 06 Feb 2020 00:31

Re: OpenGFX Mars

Post by ToxicFrog »

I tried writing a cargo_capacity callback so that it would have more room for passengers than 1 tonne of capacity == 1 passenger and what I ended up doing was creating a vehicle where the cargo capacity is multiplied by 4 every time you refit it to and then from passengers. Oops.

I'm not sure if I'm holding it wrong, or if this is the reason why refittable vehicles in OTTD are generally "anything but passengers" -- perhaps the real solution is just to divide them into "passenger" and "cargo" GEVs (or even have passenger & cargo variants of each one) rather than trying to permit refits between passengers and not-passengers.
kamnet wrote: 10 Feb 2020 03:46 Here's a spreadsheet with some realistic stats for some of the ekranoplans. https://is.gd/w0CNIU
Thanks! I'm not sure I have the wherewithal to translate that into OpenTTD stats, but that looks very useful to whoever eventually does.

What's the "Class A/B" column? There's a comment on the header but the classes it lists are completely different. It's also not clear what "pax" is.
User avatar
kamnet
Moderator
Moderator
Posts: 7576
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: OpenGFX Mars

Post by kamnet »

ToxicFrog wrote: 11 Feb 2020 01:27 I tried writing a cargo_capacity callback so that it would have more room for passengers than 1 tonne of capacity == 1 passenger and what I ended up doing was creating a vehicle where the cargo capacity is multiplied by 4 every time you refit it to and then from passengers. Oops.

I'm not sure if I'm holding it wrong, or if this is the reason why refittable vehicles in OTTD are generally "anything but passengers" -- perhaps the real solution is just to divide them into "passenger" and "cargo" GEVs (or even have passenger & cargo variants of each one) rather than trying to permit refits between passengers and not-passengers.
kamnet wrote: 10 Feb 2020 03:46 Here's a spreadsheet with some realistic stats for some of the ekranoplans. https://is.gd/w0CNIU
Thanks! I'm not sure I have the wherewithal to translate that into OpenTTD stats, but that looks very useful to whoever eventually does.

What's the "Class A/B" column? There's a comment on the header but the classes it lists are completely different. It's also not clear what "pax" is.
Oops, I didn't fill that out!

Class A = Craft operates only in ground effect and under 20m.
Class B = Craft that can fly outside of ground effect under 150m
Class C = Craft that can fly above 150m and use ground effect.

Probably useless data for OpenTTD purposes, since ekranoplans are treated as ships and we can't have planes that truly take off and land on open water.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9424
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: OpenGFX Mars

Post by planetmaker »

ToxicFrog wrote: 11 Feb 2020 01:27What's the "Class A/B" column? There's a comment on the header but the classes it lists are completely different. It's also not clear what "pax" is.
PAX is a common abbreviation for 'passengers'.
User avatar
Gadg8eer
Traffic Manager
Traffic Manager
Posts: 190
Joined: 14 Dec 2019 14:22

Re: OpenGFX Mars

Post by Gadg8eer »

planetmaker wrote: 11 Feb 2020 09:04 ...
Help. The repository is broken. Can I please get the NML source code for OpenGFX Mars?
I have Asperger's, please be easy on me about stuff. My apologies if I've been a problem for you in the past.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9424
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: OpenGFX Mars

Post by planetmaker »

The repository works just fine for me...

Code: Select all

& [planetmaker:~/ottd/grfdev] [base] 255 $ hg clone https://kallithea.openttdcoop.org/opengfx-mars ogfxm
requesting all changes
adding changesets
adding manifests
adding file changes
added 54 changesets with 74 changes to 9 files
new changesets aac6fc1d6f67:0817a7521747
updating to branch default
cloning subrepo aircraft from https://kallithea.openttdcoop.org/opengfx-mars-aircraft
requesting all changes
adding changesets
adding manifests
adding file changes
added 5 changesets with 26 changes to 18 files
new changesets fe7c32abda8a:3eb7236f7b28
cloning subrepo airports from https://kallithea.openttdcoop.org/opengfx-mars-airports
requesting all changes
adding changesets
adding manifests
adding file changes
added 3 changesets with 17 changes to 14 files
new changesets 7cf3aae8c450:e15a0a25737e
cloning subrepo graphics from https://kallithea.openttdcoop.org/opengfx-mars-graphics
requesting all changes
adding changesets
adding manifests                                                                                     
adding file changes
added 75 changesets with 1925 changes to 1582 files                                                  
new changesets c6548e15c15a:cb4f6ed29482
cloning subrepo houses from https://kallithea.openttdcoop.org/opengfx-mars-houses
requesting all changes
adding changesets
adding manifests
adding file changes
added 64 changesets with 110 changes to 50 files
new changesets 2ef71e96a1e6:5a67ec641605
cloning subrepo industries from https://kallithea.openttdcoop.org/opengfx-mars-industries
requesting all changes
adding changesets
adding manifests
adding file changes
added 52 changesets with 164 changes to 36 files
new changesets 04f6d239d12a:067b637c4831
cloning subrepo landscape from https://kallithea.openttdcoop.org/opengfx-mars-landscape
requesting all changes
adding changesets
adding manifests                                                                                     
adding file changes
added 15 changesets with 33 changes to 18 files
new changesets 8ffbf173502a:5d2138f69800
cloning subrepo rv from https://kallithea.openttdcoop.org/opengfx-mars-rv
requesting all changes
adding changesets
adding manifests
adding file changes
added 13 changesets with 32 changes to 21 files
new changesets 3e01595b66b6:ca0ca4da22e3
cloning subrepo townnames from https://kallithea.openttdcoop.org/opengfx-mars-townnames
requesting all changes
adding changesets
adding manifests
adding file changes
added 4 changesets with 19 changes to 16 files
new changesets 0154e8db4113:95a7adb491b1
cloning subrepo trains from https://kallithea.openttdcoop.org/opengfx-mars-trains
requesting all changes
adding changesets
adding manifests                                                                                     
adding file changes
added 16 changesets with 47 changes to 24 files
new changesets 15f434f28de2:d04eb4b270c3
9 files updated, 0 files merged, 0 files removed, 0 files unresolved
Forum mail or e-mail simply might not work for size reasons... so please clone or download from above mentioned repo URL:

Code: Select all

1& [planetmaker:~/ottd/grfdev] [base] $ du -h ogfxm
114M	ogfxm
User avatar
Gadg8eer
Traffic Manager
Traffic Manager
Posts: 190
Joined: 14 Dec 2019 14:22

Re: OpenGFX Mars

Post by Gadg8eer »

I created a version of the house NewGRF which modifies the start date. The habitats are gradually introduced over the course of several decades, starting in 2030 with small homes. The full set of buildings will be constructed from 2070 until the end of time, giving a futuristic feel to the future in standard OpenTTD games. Supports mail and parcel cargos, which the original NewGRF didn't. Full credits to planetmaker and everyone else involved with the original OpenGFX Mars Habitats.
Attachments
ogfx-mars-houses_late-start.tar
OpenGFX Mars Houses - Late Start
(210 KiB) Downloaded 56 times
I have Asperger's, please be easy on me about stuff. My apologies if I've been a problem for you in the past.
User avatar
Gadg8eer
Traffic Manager
Traffic Manager
Posts: 190
Joined: 14 Dec 2019 14:22

Re: OpenGFX Mars

Post by Gadg8eer »

ToxicFrog wrote: 10 Feb 2020 03:18...
Zephyris wrote: 09 Feb 2020 13:20...
Is anyone able to help me figure out how OpenGFX Mars Industries handles sprite alignment? The habitats were simple, but industries look like they use some special code that I've had no luck in dissecting.

All I really want to do is change the availability dates (easy enough) and align the sprites to the base set (OpenGFX Mars uses a different alignment for some godforsaken reason).
I have Asperger's, please be easy on me about stuff. My apologies if I've been a problem for you in the past.
User avatar
Erato
Director
Director
Posts: 636
Joined: 25 May 2015 09:09
Location: The Netherlands

Re: OpenGFX Mars

Post by Erato »

I was thinking of doing a playthrough with this, and then I remembered just how many bugs there were, and I couldn't not fix them. Did you know pretty much every sprite was 1 pixel too far to the left?
I didn't fix all the bugs that have been reported, but I fixed a fair share of the bugs that bothered me most.
Here's a download:
OpenGFXMarsFixed.rar
(763.87 KiB) Downloaded 39 times
And a list of all the bugfixes:
Pretty much everything:
- everything was 1px too far to the left

Industry
- Life Support industry sprite less blurry
- Regolith Mine layout had wrong tile
- Ore Mine conveyor belts
- Cargoes now have colours

Roads & rails
- Fixed company colours on depots
- Removed pink pixels from maglev

Road vehicles
- Fixed sprite offsets

Trains
- Fixed sprite offsets, including for dual headed trains

Graphical glitches that I noticed, but won't solve:
- Fences on farmland not lining up neatly
- Weird sprite overlapping at bay bus stops
- That one road tunnel glitch
- Airports need to be shifted a pixel to the right, but I never play with planes, so I don't want to fix this

I also made an object set
Attachments
OpenGFXMarsFixed_Source.rar
Download the full source from the devzone. I deleted a bunch of stuff to make it smaller than the 25MB limit.
(9.11 MiB) Downloaded 17 times
No pics no clicks. Seriously.
ImageImageImageImageImageImageImage
Michpi
Engineer
Engineer
Posts: 50
Joined: 03 Feb 2021 18:51

Re: OpenGFX Mars

Post by Michpi »

I tried this set and founded a number of bugs.
As far as I understand, this set isn't developed anymore :(
So I started bug fixing by myself and couldn't stop :)
For now I changed some things and planning to public modified version of this set .
But I have a couple of questions.
- Is the name "Ogfxmars V2" good choice?
- Shall I change GRFID or leave it the same?
- I have small problem with the Terraforming Plant. I wish it was not the pure black hole industry but play more important role in playthrough. But I have no idea for it's role. Any advice/suggestion?
User avatar
Erato
Director
Director
Posts: 636
Joined: 25 May 2015 09:09
Location: The Netherlands

Re: OpenGFX Mars

Post by Erato »

Michpi wrote: 07 Jun 2021 05:52 I tried this set and founded a number of bugs.
As far as I understand, this set isn't developed anymore :(
So I started bug fixing by myself and couldn't stop :)
Feel free to make use of my code, as I already fixed quite a few issues.
Michpi wrote: 07 Jun 2021 05:52 - Shall I change GRFID or leave it the same?
If you want to publish it, you'll have to change the GRFID, because that's what BaNaNaS uses to tell apart NewGRFs.
No pics no clicks. Seriously.
ImageImageImageImageImageImageImage
Michpi
Engineer
Engineer
Posts: 50
Joined: 03 Feb 2021 18:51

OpenGFX Mars V2

Post by Michpi »

I wish to introduce OgfxMars V2.
Based on Erato's patched version.
OGFXMarsV2.zip
(1.09 MiB) Downloaded 15 times
This archive contains the complete set of ogfxmars grf, some of them are unmodified.

Changelog

Bugfixes
Empty trains now show it's capacity
Latest engines will never expire
Fixed some sprites offsets
Added missing sprites for goods factory's building stage
Bulk RV shows its cargo
Fixed NW and NE railway tunnel view

Changes
Industry
Many changes. The main are:
Decreased cargo payments rate
Goods factory needs both plastic and components to produce
Farm increases it's production rate if any cargo delivered and greatly increases if both cargo delivered
Added new cargo: tired colonists and industry: recreation center
Mines (Regolith, Ore, Ice) now accept machinery and colonists, and produce regolith/ore/water and tired colonists. Base production rate of mines is rather low and can't be increased. But you can increase output by delivering cargo. For best results colonists and machinery should be delivered at the same time with ratio 1:1, otherwise the increasing of the output will be not so big. Colonists after work become tired. Tired colonists (at least 50%) must be transported to the recreation center, otherwise colonist productivity will drop. The productivity of the colonists is falling fast, but growing a bit slowly.
Life Support center and Fusion Power Plant influence city growth mechanic, see Houses.

Trains
Railtype has maximal speed limit and is shown only if there are appropriated engines available at that moment
Changed speed of trains: ground trains are a bit faster, maglev are slower, monorail are nearly the same
Changed capacity of wagons: now ground trains have the biggest capacity and maglev - the smallest. So now there is the choice between slower, more capacity trains and the faster, but lower capacity ones.
Increased running costs (and price) for trains and added for wagons

RV
The first generation of RV appears in 1930

Aircraft
Increased running cost and price
Slightly decreased passengers capacity
Planes can carry only colonists and tired colonists, helicopters can carry only freight

Houses
Added small habitat house
City can be at different level (0-5)
In dependence on the city level different houses will be building in the city
In order to develop the city (increase its level) you have to build Life Support center and supply it with all needed cargo at least once in 3 months. Otherwise the city level will be decreased. To achive level 4 and 5 city needs electricity, which produced by Fusion Power plant. Hydrogen must regularly be delivered to power plant.
After reaching level 5, you must still deliver all the supplies to the city, otherwise the level will fall.
(All city's data are shown in the Life Support window)

Recommended starting year: 1930/1932
Hope you'll enjoy it :)
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: 2TallTyler and 16 guests