Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Mon Jul 16, 2018 8:30 pm

All times are UTC




Post new topic  Reply to topic  [ 203 posts ]  Go to page Previous 17 8 9 10 11 Next
Author Message
PostPosted: Tue May 22, 2018 7:00 am 
Offline
Route Supervisor
Route Supervisor
User avatar

Joined: Mon Dec 19, 2011 7:54 am
Posts: 394
Location: Washington State, USA
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!

_________________
WSF Ferry Set [WIP] || American Road Replacement Set || NightGFX Base Graphics Set || Wasteland [WIP] || RATT Roads (NRT Only)


Top
   
PostPosted: Tue May 22, 2018 3:25 pm 
Offline
Engineer
Engineer

Joined: Sun Sep 07, 2008 2:38 am
Posts: 10
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:
//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)


Top
   
PostPosted: Wed May 23, 2018 6:23 am 
Offline
Route Supervisor
Route Supervisor
User avatar

Joined: Mon Dec 19, 2011 7:54 am
Posts: 394
Location: Washington State, USA
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:

Attachment:
monorail_done.png
monorail_done.png [ 173.67 KiB | Viewed 919 times ]

Attachment:
wip water pump.png
wip water pump.png [ 4.94 KiB | Viewed 919 times ]

_________________
WSF Ferry Set [WIP] || American Road Replacement Set || NightGFX Base Graphics Set || Wasteland [WIP] || RATT Roads (NRT Only)


Top
   
PostPosted: Wed May 23, 2018 11:50 am 
Offline
President
President
User avatar

Joined: Tue Feb 01, 2011 11:22 am
Posts: 909
Location: Beer
Onwards to progress!

Hi!

P.S. Just felt like saying hi after a while.

_________________
ImageImageImage


Top
   
PostPosted: Wed May 23, 2018 6:47 pm 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Sat Oct 14, 2017 11:06 am
Posts: 341
Location: Mariupol, Ukraine.
I couldn't stop and upgraded the water pump :rolleyes:


Attachments:
wip water pump.png
wip water pump.png [ 4.44 KiB | Viewed 861 times ]

_________________
Image
Sprite artist and NewGRF developer, NML coder. My projects:
Screenshots: New York City Subway Episodes
NewGRFs: Not Enough Subways Set | North American Passenger Railroads | Elevated Subway Bridge | Over-sized Train Set | Tony Pixel's Subway Equipment Set

I use GPLv2+ license.
Top
   
PostPosted: Fri May 25, 2018 1:19 pm 
Offline
Engineer
Engineer

Joined: Sun Sep 07, 2008 2:38 am
Posts: 10
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)


Top
   
PostPosted: Fri May 25, 2018 4:05 pm 
Offline
Engineer
Engineer

Joined: Fri Apr 14, 2017 3:51 pm
Posts: 88
Location: Czech Republic
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:
Experimental games 01 (92.63.57.152:3979), Experimental games 02 (92.63.57.152:3879), Experimental games 03 (92.63.57.152:3779).
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
My newGRFs: ---


Top
   
PostPosted: Thu May 31, 2018 10:07 pm 
Online
Engineer
Engineer

Joined: Sat Jun 18, 2016 7:05 pm
Posts: 37
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?


Top
   
PostPosted: Fri Jun 01, 2018 6:50 am 
Offline
Route Supervisor
Route Supervisor
User avatar

Joined: Mon Dec 19, 2011 7:54 am
Posts: 394
Location: Washington State, USA
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.

_________________
WSF Ferry Set [WIP] || American Road Replacement Set || NightGFX Base Graphics Set || Wasteland [WIP] || RATT Roads (NRT Only)


Top
   
PostPosted: Fri Jun 01, 2018 7:25 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Jan 22, 2005 7:31 pm
Posts: 6328
Location: Wakefield, West Yorkshire
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
Worst Behaved IRC Member of 2008, 2009 & 2010 - Go Me!


Top
   
PostPosted: Sat Jun 02, 2018 6:00 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Mar 31, 2007 2:23 pm
Posts: 4676
Location: Lost in Music
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

_________________
FIRS Industry Replacement Set (Released) | HEQS Heavy Equipment Set (trucks, industrial trams and more) (Finished)
Squid Ate FISH (ships) (Released) | CHIPS Has Improved Players' Stations (Finished)
Iron Horse (trains, released) | Termite (tracks for Iron Horse, released) | Busy Bee (game script, released)

Road Hog (road vehicles, released)


Top
   
PostPosted: Sat Jun 02, 2018 7:47 pm 
Online
Engineer
Engineer

Joined: Sat Jun 18, 2016 7:05 pm
Posts: 37
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!


Top
   
PostPosted: Sun Jun 03, 2018 1:15 am 
Offline
Route Supervisor
Route Supervisor
User avatar

Joined: Mon Dec 19, 2011 7:54 am
Posts: 394
Location: Washington State, USA
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 :)

_________________
WSF Ferry Set [WIP] || American Road Replacement Set || NightGFX Base Graphics Set || Wasteland [WIP] || RATT Roads (NRT Only)


Top
   
PostPosted: Sun Jun 03, 2018 6:47 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Mar 31, 2007 2:23 pm
Posts: 4676
Location: Lost in Music
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:

_________________
FIRS Industry Replacement Set (Released) | HEQS Heavy Equipment Set (trucks, industrial trams and more) (Finished)
Squid Ate FISH (ships) (Released) | CHIPS Has Improved Players' Stations (Finished)
Iron Horse (trains, released) | Termite (tracks for Iron Horse, released) | Busy Bee (game script, released)

Road Hog (road vehicles, released)


Top
   
PostPosted: Mon Jun 04, 2018 5:19 am 
Offline
Route Supervisor
Route Supervisor
User avatar

Joined: Mon Dec 19, 2011 7:54 am
Posts: 394
Location: Washington State, USA
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

_________________
WSF Ferry Set [WIP] || American Road Replacement Set || NightGFX Base Graphics Set || Wasteland [WIP] || RATT Roads (NRT Only)


Top
   
PostPosted: Mon Jun 04, 2018 9:27 pm 
Online
Engineer
Engineer

Joined: Sat Jun 18, 2016 7:05 pm
Posts: 37
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:


Top
   
PostPosted: Thu Jun 07, 2018 6:32 am 
Offline
Route Supervisor
Route Supervisor
User avatar

Joined: Mon Dec 19, 2011 7:54 am
Posts: 394
Location: Washington State, USA
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)

Attachment:
maglev_wip.png
maglev_wip.png [ 32.41 KiB | Viewed 363 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: )

_________________
WSF Ferry Set [WIP] || American Road Replacement Set || NightGFX Base Graphics Set || Wasteland [WIP] || RATT Roads (NRT Only)


Top
   
PostPosted: Sun Jul 08, 2018 8:55 am 
Offline
Route Supervisor
Route Supervisor
User avatar

Joined: Mon Dec 19, 2011 7:54 am
Posts: 394
Location: Washington State, USA
Update time!

After much delay, the 0.4 release of Wasteland is finally ready!

Attachment:
Brown & Co., 24th Jul 3000.png
Brown & Co., 24th Jul 3000.png [ 107.93 KiB | Viewed 216 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! :)

_________________
WSF Ferry Set [WIP] || American Road Replacement Set || NightGFX Base Graphics Set || Wasteland [WIP] || RATT Roads (NRT Only)


Top
   
PostPosted: Tue Jul 10, 2018 3:58 pm 
Offline
Transport Coordinator
Transport Coordinator

Joined: Fri Jun 15, 2007 9:27 am
Posts: 364
Skype: madchimiste
Location: Berlin, Deutschland
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!

_________________
Some screenshots of mine...


Top
   
PostPosted: Thu Jul 12, 2018 6:13 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Oct 17, 2005 8:56 pm
Posts: 3301
Location: Estonia
This is coming together nicely! Fine work!

_________________
TT-Screenshot Of The Month - 2012 July, winner!
TT-Screenshot Of The Month - 2013 May, winner tie with Purno!
TT-Screenshot Of The Month - 2014 February, winner!
TT-Screenshot Of The Month - 2014 June, winner tie with alluke!
TT-Screenshot Of The Month - 2014 April, winner!

My screen shot thread ---> Have a look


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 203 posts ]  Go to page Previous 17 8 9 10 11 Next

All times are UTC


Who is online

Users browsing this forum: Diesel Power and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2018 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2018.
Hosted by Zernebok Hosting.