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.0 Released 8-20-16 - Testers wanted

Post by Andrew350 »

toha_bangbang wrote:will there be any changes to the current system that you have to deliver both cargoes and the shrinking of towns?
Not right now, no, I feel like I've got it where I want it. Nothing is set in stone though, so things may change in the future. :)
Fuerfrost
Engineer
Engineer
Posts: 25
Joined: 26 Jul 2017 22:07

Re: Wasteland [WIP] - 0.3.0 Released 8-20-16 - Testers wanted

Post by Fuerfrost »

Is this still being worked on or is it dead? If it's dead, does anyone else have any inclination to pick it up and carry the torch?
User avatar
kamnet
Moderator
Moderator
Posts: 8532
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Wasteland [WIP] - 0.3.0 Released 8-20-16 - Testers wanted

Post by kamnet »

Fuerfrost wrote:Is this still being worked on or is it dead? If it's dead, does anyone else have any inclination to pick it up and carry the torch?
Just because it's not being worked on doesn't mean it's dead. The previous post by Andrew350 seems to indicate that, for now, it's finished. Not dead.
User avatar
Andrew350
Chairman
Chairman
Posts: 768
Joined: 19 Dec 2011 07:54
Location: Washington State, USA
Contact:

Re: Wasteland [WIP] - 0.3.0 Released 8-20-16 - Testers wanted

Post by Andrew350 »

Don't worry, it's not dead, just on hold until I find the time.

I know I keep saying that and then months go by without progress, but I promise none of my sets are abandoned, including this one :wink:
Fuerfrost
Engineer
Engineer
Posts: 25
Joined: 26 Jul 2017 22:07

Re: Wasteland [WIP] - 0.3.0 Released 8-20-16 - Testers wanted

Post by Fuerfrost »

Good, because I freaking love this pack
User avatar
DeletedUser10
Traffic Manager
Traffic Manager
Posts: 204
Joined: 01 Jun 2017 10:03

Re: Wasteland [WIP] - 0.3.0 Released 8-20-16 - Testers wanted

Post by DeletedUser10 »

Destroyed houses (red houses) doesn't accept building material.
Town doesn't grow or fixed even clean food is delivered.
Are these two things bug?
Sent from my Ubuntu 16.04 LTS
User avatar
piratescooby
Route Supervisor
Route Supervisor
Posts: 449
Joined: 21 Nov 2014 12:39
Location: The Granite City.

Re: Wasteland [WIP] - 0.3.0 Released 8-20-16 - Testers wanted

Post by piratescooby »

ir1n1o57 wrote:Destroyed houses (red houses) doesn't accept building material.
Town doesn't grow or fixed even clean food is delivered.
Are these two things bug?
Had the same problem when I started playing , I am sure all cargos have to be delivered approx the same time , takes time but worth the challenge , the save file is from a ongoing experimental game made with jgrpp.0.20.1 and a shed load of grf's .I am finally getting the main town rebuilt .
Attachments
Jones & Co., 16th Oct 2183.sav
(2 MiB) Downloaded 95 times
User avatar
DeletedUser10
Traffic Manager
Traffic Manager
Posts: 204
Joined: 01 Jun 2017 10:03

Re: Wasteland [WIP] - 0.3.0 Released 8-20-16 - Testers wanted

Post by DeletedUser10 »

I delivered clean food and building materials into the town, but town is STILL destroyed.
Maybe irradiated food is required too, I think.
Sent from my Ubuntu 16.04 LTS
User avatar
piratescooby
Route Supervisor
Route Supervisor
Posts: 449
Joined: 21 Nov 2014 12:39
Location: The Granite City.

Re: Wasteland [WIP] - 0.3.0 Released 8-20-16 - Testers wanted

Post by piratescooby »

ir1n1o57 wrote:I delivered clean food and building materials into the town, but town is STILL destroyed.
Maybe irradiated food is required too, I think.
Do not forget about water ,also don't ship out to many wastelanders.
User avatar
Andrew350
Chairman
Chairman
Posts: 768
Joined: 19 Dec 2011 07:54
Location: Washington State, USA
Contact:

Re: Wasteland [WIP] - 0.3.0 Released 8-20-16 - Testers wanted

Post by Andrew350 »

Like piratescooby said, water is a key cargo for all town stages, and you have to make sure ALL cargoes are delivered in the same two month period or it won't count.
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: Wasteland [WIP] - 0.3.0 Released 8-20-16 - Testers wanted

Post by NekoMaster »

Remember kids, people die without water :)

no point in living in a place you can't get water. Why do you think most major cities today grew up around lakes or rivers or on the coast
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
cnww
Engineer
Engineer
Posts: 17
Joined: 07 Sep 2008 02:38

Re: Wasteland [WIP] - 0.3.0 Released 8-20-16 - Testers wanted

Post by cnww »

I encountered a problem trying to make a scenario using Wasteland 0.3.0 in JGR's patch pack. I suspect the cause is actually either something I did wrong in the scenario editor, or a bug in jgrpp, but either way I found that when I started the scenario all the secondary industries were closing down almost instantly (as in I could build the fastest vehicle I had to try to transport cargo to them and the industry would be gone before it arrived), with nearly all the chemical plants, cement plants, food labs, etc. disappearing by the time I hit April of the first in-game year.

Manual industries doesn't work for new industry sets, but I had a look at it's source code and then took advantage of Wasteland's GPL license to make a modified version.

The diff below can be applied to wasteland.nml to add an additional boolean parameter. It defaults to false, and when set to true it should prevent all secondary industries (Chemical Plants, Food Labs, Steel Mills, Cement Plants, Trading Posts and Offshore Colonies) from either closing down or being randomly built during the game. I haven't tested it extensively, but in theory it shouldn't prevent them from being built by a player or randomly generated at the start of a new game.

As an added bonus, I have also flagged all the appropriate sprites (and hopefully only those) with the ANIM flag so that nmlc won't keep spitting out animated pixel warnings.

I can post a modified grf, or separated patches (one for the parameter and one for the ANIM flags) here if anyone is interested, I'm holding off on the grf for the moment because I haven't modified much of the file header and I don't want to cause people to bug Andrew350 over any problems I may have created.
Attachments
wasteland-mod.diff
Patch for wasteland.nml
(149.38 KiB) Downloaded 94 times
User avatar
Andrew350
Chairman
Chairman
Posts: 768
Joined: 19 Dec 2011 07:54
Location: Washington State, USA
Contact:

Re: Wasteland [WIP] - 0.3.0 Released 8-20-16 - Testers wanted

Post by Andrew350 »

For the problem with industries closing down: I haven't seen this behavior myself, nor have I had any other reports about it. I just ran a quick test to make sure it wasn't a scenario thing, and had no industries close down after more than a year of game time (OpenTTD 1.6.1). That leads me to believe it's not a problem with the grf, but something with your game, maybe the patchpack. Might be worth bringing it up in the patchpack thread if you haven't already. Not much point in altering the grf if it's a problem elsewhere. :wink:

As for the animated pixel warnings, I've never seen those since I still compile with NML 0.3 :mrgreen: Could be useful to silence them I suppose for anyone wanting to compile on newer versions; however, looking through the changes it looks like the majority of sprites you've masked don't (and probably will never) have animated pixels. All of the vehicle sprites for example shouldn't have anything animated.
agentw4b
Traffic Manager
Traffic Manager
Posts: 215
Joined: 14 Apr 2017 15:51
Location: Czech Republic

Re: Wasteland [WIP] - 0.3.0 Released 8-20-16 - Testers wanted

Post by agentw4b »

The industries end when they do not receive all the raw materials in time, but I considered this in the Wasteland Newgrf as a normal phenomenon.
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
User avatar
Andrew350
Chairman
Chairman
Posts: 768
Joined: 19 Dec 2011 07:54
Location: Washington State, USA
Contact:

Re: Wasteland [WIP] - 0.3.0 Released 8-20-16 - Testers wanted

Post by Andrew350 »

Yes they will close down eventually, but they shouldn't all disappear within a few months, that's definitely not right!
cnww
Engineer
Engineer
Posts: 17
Joined: 07 Sep 2008 02:38

Re: Wasteland [WIP] - 0.3.0 Released 8-20-16 - Testers wanted

Post by cnww »

Andrew350 wrote:For the problem with industries closing down: I haven't seen this behavior myself, nor have I had any other reports about it.
Yeah, it's weirdly specific to that scenario. I think the bug, if there even is one, affects the scenario editor. I don't see the problem with "New Game" using Wasteland and jgrpp. I also tried creating a different scenario using exactly the same exe, settings and grfs and I didn't see the problem there either.

I suspect that I managed to do something that left all the industries in my problem scenario in a state where the game thinks they've been sitting idle for a long time. I tried destroying and re-building the industries in the editor, but that didn't seem to help at all.

While creating the scenario I did change both the start date and the grf configuration several times. I suspect that the latter may be the proximal cause, and would also lead most developers to, not unreasonably, respond to a bug report by asking me to go away and not come back until I can reproduce the problem in a game where I haven't messed with the newgrf settings while it was running.

I wouldn't have mentioned the problem here, except that I thought that the static secondaries patch might be of interest to someone (plenty of people have downloaded manual industries) and it seemed appropriate to explain why I made it.

p.s. For anybody who actually decides to apply that diff I posted, I have realized since posting it that I missed the offshore colony. If you want a full set of static secondary industries then you should change the colonies' life_type and prob_in_game values before compiling wasteland.nml (lines 3528 and 3541).
Andrew350 wrote:All of the vehicle sprites for example shouldn't have anything animated.
You sure about that?

Most of the vehicle sprites I flagged were ships, so I just started a new game in 2090 and built an "Arcadia" and a "Eurybia" (the two freighters available at the time, both vehicles I flagged as having animated sprites). Both ships have visible-in-game flashing red features near the stern when traveling in any direction except down. The Eurybia's look like flashing navigation lights, I think the Arcadia's animation is either accidental or intended to represent an open fire for a steam boiler.

I'm fairly certain that I have incorrectly flagged some sprites that aren't animated, but are part of a spriteset that includes animated sprites. The problem I had was that nmlc warnings gave the wrong line numbers: It reported the line where the spriteset started rather than the line where the offending sprite was defined. So when I started off manually adding ANIM flags I just flagged all the sprites in each block nmlc complained about.

I didn't realize until I'd already made quite a few changes that I could work out the exact sprite it was complaining about by comparing the coordinates, and I didn't go back to fix my overzealous flagging. As a result, in many cases I flagged all the members of a spriteset as animated if any sprites in the set had animated pixels. I don't think I added ANIM flags to any sprites in spritesets that don't have at least one animated sprite.

If you like, I'm willing to go back over the sprites more carefully (i.e. write a script to parse the nmlc warnings and flag exactly the sprites they refer to) and upload a new diff.
User avatar
Andrew350
Chairman
Chairman
Posts: 768
Joined: 19 Dec 2011 07:54
Location: Washington State, USA
Contact:

Re: Wasteland [WIP] - 0.3.0 Released 8-20-16 - Testers wanted

Post by Andrew350 »

cnww wrote:While creating the scenario I did change both the start date and the grf configuration several times. I suspect that the latter may be the proximal cause, and would also lead most developers to, not unreasonably, respond to a bug report by asking me to go away and not come back until I can reproduce the problem in a game where I haven't messed with the newgrf settings while it was running.
If it hasn't happened again, then that's probably the cause. Now go away until you reproduce it cleanly :P
cnww wrote:I wouldn't have mentioned the problem here, except that I thought that the static secondaries patch might be of interest to someone (plenty of people have downloaded manual industries) and it seemed appropriate to explain why I made it.
I can see the benefit, it can be very frustrating building up a whole network only to have the target industry disappear, especially in Wasteland. In fact I was thinking more about it yesterday, and I almost think turning off spawning/closing of all industries would make sense, especially considering the environment. Plus, it looks a little odd to see a "new" industry get built only to end up as rubble, or having a clearly abandoned factory announce that it's shutting down :lol: It would lead to a more "static" map, which is honestly more realistic given the circumstances of the game world. That leaves the player to fund new industries if they have to, but otherwise the world would just kind of stay as it was. That's more or less how I envisioned the play style from the beginning anyway, I just never changed the standard spawning behavior for gameplay reasons, but now I'm thinking I definitely should :P

I'll keep "normal" behavior as an option (maybe with primary and secondary kept separate), but I think the static industries are actually more in the spirit of the set. :)
cnww wrote:
Andrew350 wrote:All of the vehicle sprites for example shouldn't have anything animated.
You sure about that?
Whoops, I guess I never zoomed in to see those pixels flashing. Those sprites are just borrowed from OpenGFX anyway as placeholders, but they shouldn't be animated. I'll fix that.
cnww wrote:If you like, I'm willing to go back over the sprites more carefully (i.e. write a script to parse the nmlc warnings and flag exactly the sprites they refer to) and upload a new diff.
If you'd like, yes. :) I won't use it on my own build (yet), but if you provide a patch with just the ANIM flags I can also add it as a separate file in the source bundle of the next release, that way others have easy access to it for compiling with newer versions of NML (and it doesn't just end up buried in this thread).

I wasn't planning on making an 0.3.1, but now I'm hoping to work on these little changes (and a couple others) and maybe get a minor release out tomorrow :)
cnww
Engineer
Engineer
Posts: 17
Joined: 07 Sep 2008 02:38

Re: Wasteland [WIP] - 0.3.0 Released 8-20-16 - Testers wanted

Post by cnww »

It turns out it's difficult to script template changes, so I ended up adding flags to a few templates by hand.

I think the attached diff adds the minimal set of ANIM flags needed to compile wasteland-0.3.0 with nmlc 0.4.4 without animated pixel warnings, but it's possible that the flags in template_train_88 might apply to a few non-animated sprites using that template.

AFAICT the sloped terrain templates are only used for terrain with water, so they should be correct because all water is animated.

As an aside: I compiled both the original and patched versions of wasteland.nml and the resulting grf files are bit-for-bit identical. This suggests that literally the only effect of the ANIM flag is to suppress any "x of y pixels are animated" warning nmlc would have otherwise generated for the sprite the flag is applied to.
Attachments
wasteland-anim-flags.diff
(156.42 KiB) Downloaded 97 times
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 »

Thanks cnww for providing the patch, I've included that in the source bundle attached in the first post. :)

========================

And on that note, 0.3.1 is now released and posted in the usual places. This update only adds a couple of things and is only useful for starting new games; any current saves can continue using 0.3.0 without missing anything. What's changed:

- A new parameter for disabling the included railtypes, as per NekoMaster's request

- Two more parameters for enabling static primary and secondary industries (thanks to cnww)

- and a couple of other very minor code changes

So not a lot of features to get excited about, unless you're interested in keeping industries from spawning or closing down, or want to use a track set(s) for different trains. Enjoy :)
cnww
Engineer
Engineer
Posts: 17
Joined: 07 Sep 2008 02:38

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

Post by cnww »

Glad to see you updating :D

I've been playing the custom scenario I mentioned earlier, and I noticed something odd: Mineral mine production never seems to increase even at 100% transported. This scenario is known to be slightly broken, but I thought I'd look into it anyway and see if I could figure out why.

I'm sufficiently unfamiliar with NML that I may have this totally wrong, but AFAICT the code for mineral mines works as follows:

Line 1070 sets the production level randomly to a value ranging from 6 to 32 (using the switch block starting on line 519) when a mineral mine is built.

Line 1071 sets the "random_prod_change" callback to always return CB_RESULT_IND_PROD_NO_CHANGE so mineral production cannot change randomly.

Line 1068 sets the "monthly_prod_change" callback to use a switch "switch_mineral_mine_reset_wastelander_amount".

The "switch_mineral_mine_reset_wastelander_amount" switch statement starting on line 1028 sets or clears a variable depending whether the industry has wastelanders, but doesn't change the underlying production rate.

Then actual production is determined by the "mineral_mine_produce_256_ticks" which produces at either the production rate or 2x the production rate depending on the wastelanders variable set in the other switch (which it may also update), but again, doesn't seem to change the underlying production rate.

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).

If that's true, is it a bug or a feature?

p.s. Line numbers are from 0.3.1. The scenario is using my slightly-hacked 0.3.0, but the relevant code seems to be the same in both versions.

--------
EDIT:

I added a simple monthly production change to mineral mines by creating a new switch block that does simple increment/decrement changes based on the percent of cargo transported. It ended up looking like this:

Code: Select all

switch (FEAT_INDUSTRIES, SELF, switch_primary_prod_change, transported_last_month_pct_1) {
  0..25:   (production_rate_1 > 6 ? CB_RESULT_IND_PROD_DECREMENT_BY_1 : CB_RESULT_IND_PROD_NO_CHANGE);
  26..75:  CB_RESULT_IND_PROD_NO_CHANGE;
  75..100: (production_rate_1 < 255 ? CB_RESULT_IND_PROD_INCREMENT_BY_1 : CB_RESULT_IND_PROD_NO_CHANGE);
}

switch (FEAT_INDUSTRIES, SELF, switch_mineral_mine_reset_wastelander_amount, [
  STORE_PERM(LOAD_PERM(0), 1),
  STORE_PERM(0, 0)
  ]) {
  //CB_RESULT_IND_PROD_NO_CHANGE;
  switch_primary_prod_change;
}
It seems to work as I intended:

I have a mineral mine that's been producing either 48 or 54 units per month for the last 53 years (AFAICT it's production rate is 6 and the production interval allows it to produce 8 or 9 times per calendar month).

I applied the code change in late November, and as of February 1 it's showing production of 63 units for the month of January, which is in the area I'd expect.

In theory a call to switch_primary_prod_change could replace the current CB_RESULT_IND_PROD_NO_CHANGE in all the wastelander-accepting industries (which I think may all suffer from the same lack of increases) as long as they only produce one cargo.

I am worried that it may break things if I deliver wastelanders to a mineral mine where production_rate_1 is already over 127, as that would give it a total production rate over 255. According to https://newgrf-specs.tt-wiki.net/wiki/N ... _variables the limit is 255, but I'm not sure if your produce block works around that (i.e. I don't know if actual production limited to 255 units per cycle or if it's just that production_rate_1 is an 8-bit unsigned int).

p.s. In case anybody wants to use it, I am releasing the code above under a Creative Commons CCZero 1.0 License (i.e. you can do whatever you like with my code, but still need to respect Andrew350's GPL license for his stuff).

EDIT2: Added an extra conditional to the switch block so it won't almost-instantly close down unserviced mines. I should probably add some sort of counter like the NML industry example, but currently I'm too lazy so it just never lowers the production rate below 6.
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: No registered users and 9 guests