Wasteland [WIP] - 0.5.0 Released Sept 24, 2020!

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
Andrew350
Chairman
Chairman
Posts: 768
Joined: 19 Dec 2011 07:54
Location: Washington State, USA
Contact:

Re: Wasteland [WIP] - 0.3.1 Released 5-20-18

Post by Andrew350 »

cnww wrote:Unless I've misunderstood, the implication seems to be that a mineral mine has a randomized production level (e.g. 16 units every 256 ticks) when it's first created, and can only ever produce at either it's initial random level or 2x that level (while consuming wastelanders).
You are correct.

I tried many different things in an attempt to maintain the 'usual' production changes in addition to the wastelander boost, but everything I tried either failed or seemed to result in some weird side effects that negated it in some way. It's been a while so I don't remember exactly what I did originally, but I eventually settled on the way it is now because it's relatively easy (compared to what I was trying to do), and as far as I could tell it was similar to how FIRS worked anyway (no base production changes).

However, if indeed your code works as intended without any ill effects then I am very excited. :D I'll have to try it out tomorrow and test it for myself!
cnww
Engineer
Engineer
Posts: 17
Joined: 07 Sep 2008 02:38

Re: Wasteland [WIP] - 0.3.1 Released 5-20-18

Post by cnww »

It does seem to work, but it's a bit crude and unbalanced.

IMHO it would probably be better for gameplay if it was expanded to four or more switch blocks to make changes slower and a bit more random, and to allow some chance of industry closure.

For example the following:

Code: Select all

//Poor service: Usually decrease production to a minimum of 6 and rarely (p ~= 1.59%) cause closure of industries with very low production
random_switch (FEAT_INDUSTRIES, SELF, switch_primary_prod_bad) {
  1: CB_RESULT_IND_PROD_DECREMENT_BY_1; //Can trigger industry closure
  48: (production_rate_1 > 6 ? CB_RESULT_IND_PROD_DECREMENT_BY_1 : CB_RESULT_IND_PROD_NO_CHANGE);
  15: CB_RESULT_IND_PROD_NO_CHANGE;
}

//Mediocre service, allow some random variation tending towards decrease, no change of closure, usually no-change, small chance of increase
random_switch (FEAT_INDUSTRIES, SELF, switch_primary_prod_neutral) {
  16:  (production_rate_1 > 6 ? CB_RESULT_IND_PROD_DECREMENT_BY_1 : CB_RESULT_IND_PROD_NO_CHANGE);
  44: CB_RESULT_IND_PROD_NO_CHANGE;
  4:  (production_rate_1 < 255 ? CB_RESULT_IND_PROD_INCREMENT_BY_1 : CB_RESULT_IND_PROD_NO_CHANGE);
}

//Good service, rarely decrease production, usually increase or no-change
random_switch (FEAT_INDUSTRIES, SELF, switch_primary_prod_good) {
  4: (production_rate_1 > 6 ? CB_RESULT_IND_PROD_DECREMENT_BY_1 : CB_RESULT_IND_PROD_NO_CHANGE);
  30: CB_RESULT_IND_PROD_NO_CHANGE;
  30: (production_rate_1 < 255 ? CB_RESULT_IND_PROD_INCREMENT_BY_1 : CB_RESULT_IND_PROD_NO_CHANGE);
}

switch (FEAT_INDUSTRIES, SELF, switch_primary_prod_change, transported_last_month_pct_1) {
  0..25:   switch_primary_prod_bad;
  26..75:  switch_primary_prod_neutral;
  76..100: switch_primary_prod_good;
}
Then just call switch_primary_prod_change in place of "CB_RESULT_IND_PROD_NO_CHANGE" in the monthly_prod_change switch blocks.

The "production_rate_1 < 255" tests may be redundant: Based on what I observed with the version I hacked yesterday, it looks like OpenTTD caps production_rate_1 at around 60. I'm not sure if this is hard-coded in the engine or determined by something in the GRF file.

WARNING: The code above appears to be syntactically valid (i.e. nmlc compiles it without complaining), but I have not tested it in OpenTTD. I'll probably try it out after I get home this evening, and may edit this message later to fix stuff.

p.s. The code in this message is released under a Creative Commons CCZero 1.0 License (I may need to just make this my signature)
User avatar
Andrew350
Chairman
Chairman
Posts: 768
Joined: 19 Dec 2011 07:54
Location: Washington State, USA
Contact:

Re: Wasteland [WIP] - 0.3.1 Released 5-20-18

Post by Andrew350 »

cnww wrote:It does seem to work, but it's a bit crude and unbalanced.
Literally describes everything I do :lol:

In all seriousness though, I still haven't had a chance to playtest it, I managed to distract myself with drawing tonight. But I'm looking forward to it, if it checks out then it's a big improvement for the set, and you've proven you're a better coder than me ;)

------------------------

My distractions tonight included finally finishing the unfinished monorail railtype, as well as drawing the rough beginnings of the new water pump, just to give a small preview of what's coming:
monorail_done.png
monorail_done.png (173.67 KiB) Viewed 4094 times
wip water pump.png
wip water pump.png (4.94 KiB) Viewed 4094 times
User avatar
V453000 :)
President
President
Posts: 946
Joined: 01 Feb 2011 11:22
Location: Beer

Re: Wasteland [WIP] - 0.3.1 Released 5-20-18

Post by V453000 :) »

Onwards to progress!

Hi!

P.S. Just felt like saying hi after a while.
ImageImageImage
Tony Pixel
Route Supervisor
Route Supervisor
Posts: 459
Joined: 14 Oct 2017 11:06
Location: Ukraine

Re: Wasteland [WIP] - 0.3.1 Released 5-20-18

Post by Tony Pixel »

I couldn't stop and upgraded the water pump :rolleyes:
Attachments
wip water pump.png
wip water pump.png (4.44 KiB) Viewed 4062 times
Image Image
Sprite artist and NewGRF developer, coding in NML. My projects:
NewGRFs: Not Enough Subways Set | North American Passenger Railroads | Elevated Subway Bridge | Tony Pixel's Subway Equipment Set (frozen)
Screenshots: New York City Subway Episodes
cnww
Engineer
Engineer
Posts: 17
Joined: 07 Sep 2008 02:38

Re: Wasteland [WIP] - 0.3.1 Released 5-20-18

Post by cnww »

I've played through 150 years in my slightly-hacked version of 0.3.0 and so far it seems to be working nicely.

Admittedly the 150 years in question were 1900-2050, so I've been using other people's vehicle sets the whole time. Aside from a little bit of bother about mail being replaced with wastelanders all the grfs seemed to work fairly nicely together (other than the aircraft sets, but this is the wrong place to have that conversation). There were a few vehicles (e.g. airplanes) where I had to be very careful about loading in order to avoid depopulating towns by transporting wastelanders. I screwed up on one town, and despite regular shipments of food, water and building materials it's population had dropped to 13 by the time I noticed (it was somewhere around 200 earlier).

The late-game economic shift caught me entirely by surprise. Around the start of the 21'st century I nearly went broke, which has never happened to me in a TTD game before. A large part of my network was dedicated to long-distance transport of food and water, and I was busy messing about setting up service for some new industries. It took me a year or two to notice that all those expensive trains and aircraft were losing money because the cities they were serving had stopped accepting food water and (in some cases) building materials.

Image

At first I thought this was a bug, then I realized that it was actually you being very, very clever, and that's why the trading post and food lab are configured to serve as fallback destinations for food and water, so: :bow:

Unfortunately I just hadn't built my network with that economic shift in mind, so I ended up shutting down half of my rail network for a few months so I could rebuild. I suspect that my next game will involve a great proliferation of conditional order jumps and tracks shared by multiple services.

One odd thing I did notice was that even after growing them to a fairly respectable size, it was nearly impossible for me to turn a profit by transporting passengers. By the end I was using vactrains to haul passengers ~4000 tiles at supersonic speeds, and getting around $2,000,000 annual income against over $8,000,000 in running costs. I think that this was mainly due to the combination of cargodist and a daylength factor of 2 both reducing the number of passengers available for transport. I might have started making money if I played with lower running costs or just used passenger aircraft until the cities got large enough to support expensive passenger trains (and hack the aircraft sets I'm using so that they can be refitted to just passengers instead of passengers and wastelanders).

I'm going to try to add my newer industry-growth code into 0.3.1 and spend some time playing it over the weekend. I may even play with the correct vehicles, though I will miss vactrains and road hog.

p.s. I like the new water pump. I know next-to-nothing about art, but it looks to me like it will fit in nicely with a bit of shading and the right background. I'd be tempted to re-name it as a "Water Purifier", but I think that's mostly because I wasted close to $100 on FO3 and it's DLC and am thus emotionally compelled to try to believe that it was a good game.... One might work around that by having the purifier accept a cargo of "water chips" in low volume to increase output.

p.p.s. On the subject of Fallout references, have you considered adding a vault or bunker "industry" to the game? I'm imagining something that would only ever be generated at game start, and initially be non-functional (sealed) and then have a small chance each year to open up and start trading in passengers and high-tech goods of some sort. Graphics-wise it could be as simple as a single tile that's just a normal tunnel-entrance with an armored door drawn over it (look up "Bank Vault" on https://commons.wikimedia.org for a fair number of public-domain examples)
agentw4b
Traffic Manager
Traffic Manager
Posts: 216
Joined: 14 Apr 2017 15:51
Location: Czech Republic

Re: Wasteland [WIP] - 0.3.1 Released 5-20-18

Post by agentw4b »

Since the NewGRF Wasteland version has changed, I have improved my scenario (Fallout 1,2,3, Tactics Map) with this new version.

This: viewtopic.php?f=60&t=76896
Owner and admin of servers with names "Experimental games" .
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
Diesel Power
Traffic Manager
Traffic Manager
Posts: 222
Joined: 18 Jun 2016 19:05

Re: Wasteland [WIP] - 0.3.1 Released 5-20-18

Post by Diesel Power »

Just noticed a bug. Water seems to be weightless. A fully loaded tanker weighs the same as an empty one.

It's very difficult to make money early on. But i guess it's realistic considering there's just been a nuclear war!

Love the trucks where you can refit extra trailers. Great idea! Will there be "refit at station" for vehicles in future releases?
User avatar
Andrew350
Chairman
Chairman
Posts: 768
Joined: 19 Dec 2011 07:54
Location: Washington State, USA
Contact:

Re: Wasteland [WIP] - 0.3.1 Released 5-20-18

Post by Andrew350 »

Diesel Power wrote:Just noticed a bug. Water seems to be weightless.
Aha, good catch. Just looked through my notes and it was on my to do list to give cargoes a proper weight, but I never did it apparently. Nearly all cargoes are still set to 1, with the exception of water which is set to a ridiculously low fractional number :? No idea what I was doing with that, but I'll make sure to address it in the next update. Thanks!
Diesel Power wrote:Love the trucks where you can refit extra trailers. Great idea! Will there be "refit at station" for vehicles in future releases?
Do you mean autorefit? I have to be honest, I don't think I've ever actually used that feature and I don't know what it takes to implement it. I'll have to look into it :)
cnww wrote:p.p.s. On the subject of Fallout references, have you considered adding a vault or bunker "industry" to the game?
Sorry cnww, I read your post and forgot to answer back, I appreciate the report :D On the subject of Fallout references...I've tried to keep that somewhat minimal. Obviously there's a lot of inspiration drawn from the Fallout series, but also a lot of other works and personal ideas, so I try to keep things a little more generic. Vaults scattered across the wasteland would be very cool, but seem a bit too "specific", not to mention the issue of how to fit that into the existing economy without adding another needlessly complicated chain. I'm absolutely not against the idea, but much like the other economy ideas that have been proposed, I feel like it would be more appropriate as an add-on than something incorporated in the main set.

Basically, my view is this: The main industry chains are there to complete the town growth system and flesh out gameplay; the additional industry ideas (and they are endless) should be added separately. Not to say I'm completely against expanding the core industries, but there needs to be some good justification for it ;)

edit: also on your passenger income problem, I think you're right about something interfering; pax should easily be one of the most profitable cargoes! Of course if not then that is an issue; I look forward to hearing about any further developments.
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7239
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: Wasteland [WIP] - 0.3.1 Released 5-20-18

Post by Redirect Left »

So I haven't checked in on this thread for probably a year or two, I have to say, wow! You've made so much progress, and this looks even more amazing than it did at the start.
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
User avatar
andythenorth
Tycoon
Tycoon
Posts: 5656
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Re: Wasteland [WIP] - 0.3.1 Released 5-20-18

Post by andythenorth »

Andrew350 wrote:Do you mean autorefit? I have to be honest, I don't think I've ever actually used that feature and I don't know what it takes to implement it. I'll have to
Just a heads up, if you're changing the length of any vehicles with cb36, you can't do that on a station refit (OpenTTD does not like vehicle length changing at station). I didn't check your implementation, ignore me if this is not relevant :D
Diesel Power
Traffic Manager
Traffic Manager
Posts: 222
Joined: 18 Jun 2016 19:05

Re: Wasteland [WIP] - 0.3.1 Released 5-20-18

Post by Diesel Power »

I wasn't wanting to change rv length at stops (that would look weird), just cargos. It would be useful for backloads. I could haul minerals in one direction and iron ore in the other (if the industries line up).

Also in my currant game i was transporting water and chemicals via ships into the same dock, then onto road tankers for the rest of the journey, the "refit to available cargo" order would've been very useful here.

The whole wasteland mod is making think in ways I haven't had to before with this game. I love a challenge!
User avatar
Andrew350
Chairman
Chairman
Posts: 768
Joined: 19 Dec 2011 07:54
Location: Washington State, USA
Contact:

Re: Wasteland [WIP] - 0.3.1 Released 5-20-18

Post by Andrew350 »

andythenorth wrote:Just a heads up, if you're changing the length of any vehicles with cb36, you can't do that on a station refit (OpenTTD does not like vehicle length changing at station). I didn't check your implementation, ignore me if this is not relevant :D
Well the way I have it is that no cargo refit option "forces" a length change, i.e. converting to any other cargo always has an option for the same length. So a 4-trailer IORE truck can always be refitted to a 4-trailer MNRL truck, however there are different length (subtype) refits available. A quick glance at how autorefit works in-game suggests you can only pick a target cargo anyway, so can you just simply not enable autorefit for the cargo subtypes which change vehicle length, or is it a kind of all or nothing deal?

Otherwise autorefit doesn't seem hard to do, I'll definitely put it on my list for 0.4 :)
User avatar
andythenorth
Tycoon
Tycoon
Posts: 5656
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Re: Wasteland [WIP] - 0.3.1 Released 5-20-18

Post by andythenorth »

Andrew350 wrote:so can you just simply not enable autorefit for the cargo subtypes which change vehicle length, or is it a kind of all or nothing deal?
Autorefit allow/disallow is a cb result, so you can forbid it depending on the cargos. However that can cause silently broken vehicle orders, so it's not advised :twisted:
User avatar
Andrew350
Chairman
Chairman
Posts: 768
Joined: 19 Dec 2011 07:54
Location: Washington State, USA
Contact:

Re: Wasteland [WIP] - 0.3.1 Released 5-20-18

Post by Andrew350 »

Ok, so I've managed to get autorefit to work successfully even with the refittable articulated trucks. It seems to work as intended, the only thing that appears to cause any problems is if you select to refit to a cargo which isn't available at that station, but that's a user problem (famous last words :P). I'll have to do some more thorough testing but I think autorefit is a go for the next update!
andythenorth wrote:However that can cause silently broken vehicle orders...
There are already aspects of Wasteland that can cause silently broken vehicle orders even without autorefitting, so it's probably acceptable in this case :D
Diesel Power
Traffic Manager
Traffic Manager
Posts: 222
Joined: 18 Jun 2016 19:05

Re: Wasteland [WIP] - 0.3.1 Released 5-20-18

Post by Diesel Power »

Andrew350 wrote:but I think autorefit is a go for the next update!
That's great news!
Thank you for such a quick fix! :bow:
User avatar
Andrew350
Chairman
Chairman
Posts: 768
Joined: 19 Dec 2011 07:54
Location: Washington State, USA
Contact:

Re: Wasteland [WIP] - 0.3.1 Released 5-20-18

Post by Andrew350 »

Diesel Power wrote:That's great news! Thank you for such a quick fix!
You're welcome, it's a good feature to include :) But I should warn you, the upcoming 0.4 update is another big one adding and changing a lot of things, which means it probably won't be coming out quickly. It seems like every time I dive into the code I find something new that needs my attention on top of the already-planned features. I check one thing off and add one at the same time :roll:

Regardless of those "setbacks", work is progressing well. I've finished implementing autorefit support for ALL vehicles in Wasteland (no small task as it turns out!), fixed incorrect refit costs for some articulated trucks, fixed all those incorrectly animated sprites, added the new industry production changes by ccnw (along with ANIM flags), and many other things too tedious to list. But that's just the easy stuff, I've been grabbing the low-hanging fruit to delay the real work :P

The latest distraction included working some more on the new maglev tracktype as shown below: (note the train is from the 2cc set and not included)
maglev_wip.png
maglev_wip.png (32.41 KiB) Viewed 3538 times
This tracktype (or something similar) will most likely end up in 0.4 alongside the recently completed monorail, but I'm not sure if any vehicles for these will be included yet, it depends on whether I get around to it (they can easily be added later). In any case they will still be usable by 3rd party vehicle sets :)

I'm also working on adding some new graphics for industries (as seen earlier), but the big change in 0.4 will be the finalization of the standard industry layouts, such that hopefully no more savegame-breaking will have to occur, at least that's my hope. If I do it right, the code base will be set up so that I can simply add new features without breaking existing ones or causing me a massive migraine by sifting through a mess of outdated, scrambled code. Obviously nothing is guaranteed, but I'd like to not have to start a new game with every new release, and I'm sure you agree, so I'm working on making that happen (in a sane way for me :mrgreen: )
User avatar
Andrew350
Chairman
Chairman
Posts: 768
Joined: 19 Dec 2011 07:54
Location: Washington State, USA
Contact:

Re: Wasteland [WIP] - 0.4.0 Released July 8, 2018!

Post by Andrew350 »

Update time!

After much delay, the 0.4 release of Wasteland is finally ready!
Brown & Co., 24th Jul 3000.png
Brown & Co., 24th Jul 3000.png (107.93 KiB) Viewed 3391 times
This major release brings a host of new and improved features:

- Random primary industry production changes based on service. Provided by cnww, it looked promising as posted initially, but it ended up taking a lot of additional effort to get it to work correctly due to how random_switches work. Long story, but the result is hopefully worth it! (Note: this obviously doesn't affect games using the 'static industries' settings)

- Improved industry spawning behavior. No longer will new industries spawn already destroyed, or constantly revert back to rubble during the game. Now only industries built during initial map generation will appear destroyed; new industries built during gameplay will appear new or 'disused' instead, giving a better feeling of progress throughout the game. This also applies to industries which have previously been serviced.

- Added Autorefit support for all vehicles. This one is pretty self-explanatory :wink:

- Removed the 'class' system for road vehicles. A silly idea that wasn't going anywhere, so I replaced it with the propulsion types that were already in place anyway (Petroleum, Electric, Nuclear). Pretty much the same but makes more sense this way, just adjusted some costs to match the new focus on engine types. Also did the same for trains, but that has less effect.

- New graphics for the Water Pump! As teased earlier and seen in the picture above. Note that the Water Pump does not have a "destroyed" variant, it always looks the same regardless of when it's built.

- Many other things. See the changelog for full details.

Of course this is another major update which has changed a lot of things (+3200 lines of code, +700kB file size, yikes!), so there may be some bugs present, although I hope not! It is also unfortunate that this release does have to break savegame compatibility once more, but hopefully this is the last time! I hope to make all future releases savegame compatible from here on, barring of course any major issues which may arise. Most of the code base should be done now with this release, so most of the updates from now on should be more graphics-focused and less prone to breaking :)

Also in anticipation of this release I took the time to update much of the information on the website to reflect the current state of the set. Still could use some TLC and will be updating over time, but it is now hopefully more representative of what's actually included ;) Might be worth a read if you haven't checked it out in a while: http://andrew350.users.tt-forums.net/pr ... teland.php

As usual you can find the .grf in the first post of this topic or on the online content. Please let me know if you encounter any issues. Enjoy! :)
arikover
Route Supervisor
Route Supervisor
Posts: 466
Joined: 15 Jun 2007 09:27
Skype: madchimiste
Location: Berlin, Deutschland

Re: Wasteland [WIP] - 0.4.0 Released July 8, 2018!

Post by arikover »

Congratulations on your work! I really like the way it completely changes from the standard OTTD gameplay, as well as the new features you implemented since the last time I tried it. It really has a Fallout-y taste!

I have a question: as far as I can tell, you're using the standard OTTD graphics for the vehicles, right? Have you got some concept designs for the vehicles (general look), or nothing planned yet?
*edit* yes you have, I hadn't read the website properly.

Keep up the good work!
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: Amazon [Bot], mipol and 16 guests