FIRS Industry Replacement Set - Development

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
zc15-nyonker
Engineer
Engineer
Posts: 72
Joined: 02 Nov 2009 21:39
Location: Grand Rapids, Michigan, USA

Re: FIRS Industry Replacement Set - Development

Post by zc15-nyonker »

Yes! I would love to help! I'm no good at coding or drawing, and I've been waiting for a chance to help with the development of OTTD.
A fan of OTTD, Transport Empire
My creations: World Across Scenario
Steam power & local factories are the answer to America's problems. Oh, yeah. Representatives that represent are needed too.
User avatar
andythenorth
Tycoon
Tycoon
Posts: 5705
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Re: FIRS Industry Replacement Set - Development

Post by andythenorth »

Announcing - The Great Closure Code Beta Test!
Morning, fancy helping test something?
Simple simple simple. Just load the attached grf (no other grfs), and start a game using the settings in the screenshot.
Don't build anything. Check the map window and make a note of how many power stations exist at game start (should be around 6).

Then run the game on fast forward with the news history window open, and make a note of what date the power stations close. When the last power station has closed, you're done :) Post the starting industry count and the closure dates here for fame and gratitude!

This would be mighty helpful to me, as I have spent a couple of days staring at the game on fast forward. My time would be better spent on code or pixels, but this testing needs to be done before I can do a 0.1 release of FIRS. :D
firs-nightly.tar
(440 KiB) Downloaded 178 times
Attachments
closure_test_settings.png
closure_test_settings.png (39.2 KiB) Viewed 4094 times
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: FIRS Industry Replacement Set - Development

Post by Terkhen »

I have coded a hackish diff that outputs all industry creation and closing along with the current date.
log_industry_open_close_r19464.diff
(1.95 KiB) Downloaded 204 times
The fastest way to get these results into a text file is launching the patched OpenTTD as follows:

Code: Select all

./openttd -s null -m null -v null -t 1920 -g &> result.txt
This will create a new random game with the current settings and run it without GUI until 1940 (if you want to change that, the final year is hardcoded at the diff file).

The tar file contains 20 game logs I have created to test this diff, using the posted settings and ran for 20 years.
results.tar.gz
(16.96 KiB) Downloaded 151 times
I hope it is useful, tell me if there's something wrong :)
User avatar
andythenorth
Tycoon
Tycoon
Posts: 5705
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Re: FIRS Industry Replacement Set - Development

Post by andythenorth »

Terkhen wrote:The tar file contains 20 game logs I have created to test this diff, using the posted settings and ran for 20 years.
Terkhen, that's awesome.

Could any of you (hi readers) plot a chart from this data? I need to see the frequency / distribution of Power Station closures versus other industries, to see if there's any meaningful difference. I'm not much good with excel, matlab etc for this :o

cheers,

Andy
User avatar
DJ Nekkid
Tycoon
Tycoon
Posts: 2141
Joined: 30 Nov 2006 20:33

Re: FIRS Industry Replacement Set - Development

Post by DJ Nekkid »

i'll take a look in excel when i get home from work... Estimated done by 8tonight :)
Member of the
ImageImage
Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: FIRS Industry Replacement Set - Development

Post by Roujin »

Ooh, I want to give it a go too :) Let's see what I can come up with..
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: FIRS Industry Replacement Set - Development

Post by Kogut »

I prepared basic template.
One questions - Is it OK to make it in .ods? (format of open office).
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: FIRS Industry Replacement Set - Development

Post by Kogut »

Quick preview, only one test, only coal mine, forest and power station (easy to epand)
Attachments
FIRS quick preview.ods
(53.14 KiB) Downloaded 234 times
Przechwytywanie.PNG
Przechwytywanie.PNG (22.1 KiB) Viewed 4019 times
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: FIRS Industry Replacement Set - Development

Post by Roujin »

Okay, I'm done.. I see I'm not the first one, but maybe my results give further insight.. and they can be used to view further test data gained from Terkhens diff.


First, here's a hacky lua script. What does it do? It takes the output (in form of consecutively numbered files log01.txt etc.), reads them, interprets them, converts the difference values (got constructed / got closed) to absolute values, averages them and outputs it into a csv file.

The csv file has the different industry types in the columns and the date (month year) in the rows. Content of the cells is how many of that industry type existed at that date.
convert.zip
lua script to convert output of Terkhen's hack to something else in .csv format
(1.34 KiB) Downloaded 129 times
Second, here's the data I generated from Terkhens log files imported in a google spreadsheed and illustrated with nice line graphs: http://spreadsheets.google.com/pub?key= ... BHWQ&gid=4
When you're viewing the line graphs, you can click the colors of the legend to make the particular industry flash, to make them out in the mess :)
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage
User avatar
andythenorth
Tycoon
Tycoon
Posts: 5705
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Re: FIRS Industry Replacement Set - Development

Post by andythenorth »

Thanks for those.

So two things stand out.
- The initial dip. That's actually by design for the power station, but won't work for other industries. I'll have to think about that :o
- Roujin's chart shows that my nfo code makes only a little difference to the 'shape' of closures compared to game's code :|

Anyone want to run more tests? (I am coding something else right now!) Got a new new grf with changed values for:
- initial protection period
- likelihood of closure
Attachments
firs-nightly.tar
(440 KiB) Downloaded 161 times
Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: FIRS Industry Replacement Set - Development

Post by Roujin »

God, it takes ages. It already took ages to compile, and now it takes ages to run, too. Terkhen, how long is one go supposed to be with your method?
And I'm not even sure if the piping works at all, since I'm on windows. And the windows shell did not like "&>". I ran it just with ">" instead now, and have the bad feeling that it won't work...

Argh.

Well, if someone else would make a couple of test runs and post the results here (like Terkhen's results), I'd offer to convert them and put em in a spreadsheet with those line graphs again.
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage
frosch
OpenTTD Developer
OpenTTD Developer
Posts: 991
Joined: 20 Dec 2006 13:31
Location: Aschaffenburg

Re: FIRS Industry Replacement Set - Development

Post by frosch »

Roujin wrote:And I'm not even sure if the piping works at all, since I'm on windows. And the windows shell did not like "&>". I ran it just with ">" instead now, and have the bad feeling that it won't work...
You need glx' tool http://devs.openttd.org/~glx/convert.zip to turn openttd into a console application. Afaik you need to run the tool from the OTTD folder.
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: FIRS Industry Replacement Set - Development

Post by Terkhen »

The &> is to pipe stderr to the file. I don't remember what's the symbol for windows batch, but I'm afraid that you will end up with empty files using only >.

Edit: about the windows binary, just what frosch said.

I'm currently running another group of 20 games. I don't know how much time it took the last time because I left the computer, but shouldn't take more than an hour.
Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: FIRS Industry Replacement Set - Development

Post by Roujin »

frosch: Thanks, that's certainly going to be handy in future :) For now I'll wait for Terkhens results and work with them.

An hour for 20 runs? I can get nowhere near that..
Is the output also printed in release mode, or only in debug mode?

PS: ah, now that I know what to search for (piping stderr), it's easy to find the solution. It seems to be "2>" in windows.
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: FIRS Industry Replacement Set - Development

Post by Terkhen »

IIRC it should be printed in MSVC release mode too. It took roughly half an hour to run all 20 games.
Attachments
results_r660M.tar.gz
(16.67 KiB) Downloaded 150 times
Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: FIRS Industry Replacement Set - Development

Post by Roujin »

* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage
User avatar
DJ Nekkid
Tycoon
Tycoon
Posts: 2141
Joined: 30 Nov 2006 20:33

Re: FIRS Industry Replacement Set - Development

Post by DJ Nekkid »

graph :)
Attachments
2ndary2.png
Member of the
ImageImage
User avatar
George
Tycoon
Tycoon
Posts: 4364
Joined: 16 Apr 2003 16:09
Skype: george-vb
Location: Varna, Bulgaria
Contact:

Re: FIRS Industry Replacement Set - Development

Post by George »

DJ Nekkid wrote:graph :)
Cool. Could you make the same one for ECS beta 6 (http://george.zernebok.net/temp/ecs%2031/)?
Image Image Image Image
User avatar
DJ Nekkid
Tycoon
Tycoon
Posts: 2141
Joined: 30 Nov 2006 20:33

Re: FIRS Industry Replacement Set - Development

Post by DJ Nekkid »

if you provide me with similar datafiles that Terkhen have, no problem :)
Member of the
ImageImage
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: No registered users and 13 guests