FIRS Industry Replacement Set - releases

Find and discuss all the latest NewGRF releases for TTDPatch and OpenTTD here.

Moderator: Graphics Moderators

User avatar
3iff
Tycoon
Tycoon
Posts: 1094
Joined: 21 Oct 2005 09:26
Location: Birmingham, England

Re: FIRS Industry Set - 1.3.0 released 23rd December 2013

Post by 3iff »

I suspected as much and just downloaded Python 2.7.6. in preparation.

I'd suggest if that's the case then the "how to compile" doc might need amending.

Ok, let's try again... AH, that's a bit more responsive, but I now bump into another error. This is going to be a fun time :cry:

File ".\src\cargo.py", line 17, in <module>
from chameleon import PageTemplateLoader # chameleon used in most template cases
ImportError: No module named chameleon
make: *** [firs-pnml] Error 1

Apologies for being a nuisance.

Aha, just found some more information about dependencies...more downloading to do.
This should be on the "How to compile" doc...Maybe I can amend it.
User avatar
andythenorth
Tycoon
Tycoon
Posts: 5658
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Re: FIRS Industry Set - 1.3.0 released 23rd December 2013

Post by andythenorth »

3iff wrote:This should be on the "How to compile" doc...Maybe I can amend it.
If you can figure out the steps and describe them neatly, I'll add it to the 'compiling' section of docs.
http://bundles.openttdcoop.org/firs/pus ... #compiling

If you can't figure out the steps, jump in #openttd irc and see if I'm there.

If you find any other docs that look outdated, let me know, cheers.
User avatar
3iff
Tycoon
Tycoon
Posts: 1094
Joined: 21 Oct 2005 09:26
Location: Birmingham, England

Re: FIRS Industry Set - 1.3.0 released 23rd December 2013

Post by 3iff »

Thanks. I somehow managed to miss that page, discovered it indirectly from the firs source code.

Anyway, I have Chameleon downloaded and unpacked but I've not the slightest clue what to do with it. It looks like source code and I can't persuade firs to 'use' it or even see it.

I'm relatively new to compilers and python, I've been away from 'proper' computers for too long and have become a windows zombie. It would help if the instructions for these packages were able to explain themselves better...not your fault.

At this point I'm probably going to give up trying to compile firs and manually edit the firs.nml file.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: FIRS Industry Set - 1.3.0 released 23rd December 2013

Post by planetmaker »

3iff wrote:Thanks. I somehow managed to miss that page, discovered it indirectly from the firs source code.

Anyway, I have Chameleon downloaded and unpacked but I've not the slightest clue what to do with it. It looks like source code and I can't persuade firs to 'use' it or even see it.

I'm relatively new to compilers and python, I've been away from 'proper' computers for too long and have become a windows zombie. It would help if the instructions for these packages were able to explain themselves better...not your fault.

At this point I'm probably going to give up trying to compile firs and manually edit the firs.nml file.
Chameleon is a python package. Thus you install it just like you installed ply and PIL (which you likely did for your NML? Or is that not needed on windows with the binary we deliver?)
User avatar
3iff
Tycoon
Tycoon
Posts: 1094
Joined: 21 Oct 2005 09:26
Location: Birmingham, England

Re: FIRS Industry Set - 1.3.0 released 23rd December 2013

Post by 3iff »

For NML, I just unpacked it into a folder and it works straight away, no 'extra work' required. It comes with a few python files and a python27.dll, so that was minimal work for me.

Some of these other things are, shall we say, not very intuitive.


But wait, I find some instructions...just NOT in the "how to" file! Why do they do that? Anyway, I've now had to install setuptools (even obtaining that was tricky) and have now managed to install chameleon. I may have to do the same for markdown, so that's quite an adventure.

It looks promising...

SUCCESS. It made a nice tar file with a firs.grf and everything!

I'm now writing a small guide for doing what I've spent the last 8 hours struggling with. Now to try installing it on my home machine and then I can tackle messing around with the source.
User avatar
3iff
Tycoon
Tycoon
Posts: 1094
Joined: 21 Oct 2005 09:26
Location: Birmingham, England

Re: FIRS Industry Set - 1.3.0 released 23rd December 2013

Post by 3iff »

If you can figure out the steps and describe them neatly, I'll add it to the 'compiling' section of docs.
I've now written a page of instructions for novices (those new to compiling code, including myself). I'll be working on it for a while to make it more coherent. It basically describes what programs are needed, how to install them and test the installation by compiling the current code.

Is it best to send it to you via PM?

I'll be looking through the code soon. I already have quite a few ideas...at least I can do experiments on the code now.
User avatar
3iff
Tycoon
Tycoon
Posts: 1094
Joined: 21 Oct 2005 09:26
Location: Birmingham, England

Re: FIRS Industry Set - 1.3.0 released 23rd December 2013

Post by 3iff »

Ok. It'll be tomorrow as it's still very basic and messy...(which won't change all that much). Hopefully it will be of some use.


I had been hoping to make a code change but I cannot fathom a way to do it. I have a feeling that it can't be done.

example:
industry = Industry(id='arable_farm',
prod_multiplier='[7, 7]',

I wanted to have it so the [7, 7] is actually 2 randomish numbers (say in a range of 4-9, randomly different for each farm created) so that grain and sugarbeet can be produced at different levels rather than in equal amounts. This would apply to each arable farm independantly and one farm could produce more grain while another might grow more sugar beet rather than the split be 50-50 as it is now.

My various attempts have not got me anywhere and I've a feeling these can't be randomised in the way I'm attempting. I'm still thinking though.
User avatar
3iff
Tycoon
Tycoon
Posts: 1094
Joined: 21 Oct 2005 09:26
Location: Birmingham, England

Re: FIRS Industry Set - 1.3.0 released 23rd December 2013

Post by 3iff »

As promised, a set of instructions for getting all that's needed for compiling FIRS and perhaps other stuff too. Let's call this the first draft.

Please feel free to make any comments and suggestions. This can of course be copied elsewhere if you wish...free and gratis. A credit would be nice. I know formatting is essentially non-existent at the moment.

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

Compiling FIRS - For novices - For Windows.
Novices refers to those who haven't tried something like this before. This installation was done on windows XP. I have a feeling that some aspects of this setup will not function in W98 (if anyone is still using that) so Win XP is the absolute minimum...and that's becoming obsolete.
-------------------
You NEED the following. If something is missing or not properly installed then the compile won't work. Trust me, I know.

MinGW. See the wiki page for installing this. http://wiki.openttd.org/Compiling_on_Wi ... troduction
(Other compiliers are available but the wiki has comprehensive instructions for MinGW)

These are the files I downloaded and the locations. You should get the latest stable versions unless indicated otherwise.
NML 0.3.0 or later. http://bundles.openttdcoop.org/nml/releases/
Python 2.7.6 (THIS version, not a later version). https://www.python.org/downloads/
Setuptools (needed to install Chameleon and Markdown). https://pypi.python.org/pypi/setuptools#downloads setuptools-3.4.4.zip
Chameleon (templates). https://pypi.python.org/pypi/Chameleon Chameleon-2.15.tar.gz
Markdown (text to html). https://pypi.python.org/pypi/Markdown Markdown-2.4.zip or Markdown-2.4.tar.gz

Tortoisehg (source management system). http://tortoisehg.bitbucket.org/download/windows.html version 2.11.2
Tortoise docs http://tortoisehg.readthedocs.org/en/latest/index.html

FIRS source code (all of it) http://dev.openttdcoop.org/projects/firs hg checkout clone via tortoisehg
This is used to pull the source to your machine and 'manage' it correctly. Read the tortoise docs!

Download all of these.
---------------------------------------
Install MinGW (See the wiki page as indicated above)

Install Python 2.7 (fairly easy). Just install it where you like.

Unpack Chameleon, Markdown and Setuptools into the Python folder. I put them into a folder I called Scripts but I'm not sure if that is right or necessary. It may well be fine to have them in their own folders.

Open a command prompt and move across to setuptools folder. (I'm presuming you know how to do that?)

'type' python setup.py install
This will install the program from the files you just extracted.

That should install setuptools. If it works, lots of text will scroll in the window. Look out for any indication of errors. That's not what you will be wanting to see. (If python can't be found then see below "Setting the paths")

Now move over to the Chameleon folder and do the same command. Check for error reports.
Now move over to the Markdown folder and do the same command. Check for error reports.

Unpack the NML files into a folder. I called mine NML.

The Firs sourcecode should be downloaded. It is generally best to use TortoiseHG (or some similar system) to get a proper version of the source. That's what I did. Doing it this way ensures that you get ALL the latest code in the correct folders, and in one go. You may need to read some documentation to get this right.

That should be the end of the installations.
----------------

Setting the paths:

You need to ensure that the necessary paths are added so that when you issue commands, the correct files can be found by the operating system.

To do this, rightclick "My Computer", select "Properties", "Advanced", "Environmental Variables"
Look for "Path" in the lower window. Select that line and click "Edit".
Now CAREFULLY add the necessary paths for Python, MinGW and NML... separated with a semicolon and obviously relevant for your installation. Don't use \utils\ if you put them in \programs\ !! Also don't erase the current path selection. It's easy to do if you're not careful. If in doubt, press CANCEL and have another try.

Example >>> (existing paths);c:\utils\nml;c:\utils\python;c:\utils\MinGW

----------------
You can now migrate (in the console window) to the firs folder where there will be a file called 'makefile'. To properly test the system, let's compile the current version of the code.

'type' make

The firs source should now be compiled into a huge 13meg+ file (firs.nml), a firs.grf file (this is the one you need) and a firs.tar file. Compiling takes a few minutes, depending on how powerful your PC is...

If you got this far, congratulations. Now if you're so inclined you can make changes to the Firs source and recompile to have a new grf with your personal modifications. It's likely you will need to research NML and possibly python to understand the current code and allow you to understand the changes you make.

Finally, this should open the gate to obtaining source code for other grf files and making changes there too. If you wish to help someone with their grf, just ask them, I'm sure they will appreciate the help.

You can now also compile the ottd source and that opens up a whole world of coding. You can modify existing code and write your own patches.
Logarifm
Engineer
Engineer
Posts: 4
Joined: 14 May 2014 18:22

Re: FIRS Industry Set - 1.3.0 released 23rd December 2013

Post by Logarifm »

Hello!

I hope anyone know how to fix my problem. I have OpenTTD 1.4.0 on Ubuntu Linux 14.04. I have installed FIRS 1.3.0 via "online content manager". I also install various vehicle sets: 2cc Train Set, Old Wagons with New Cargos 1.1, North American Renewal Set (NARS) 2 and others. So, the problem is: I can not fill trains (and other transport) with FIRS cargo! They move only traditional cargo. I tried to activate practically every set of vehicle from the readme files, but no one worked! I can not understand, why? There are absolutely no error messages at start up of the game. I use only two NewGrf: FIRS and vehicle set. This problem exists in every climate. God knows why...

Thanks in advance!
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: FIRS Industry Set - 1.3.0 released 23rd December 2013

Post by Alberth »

I don't know how to fix your problem, but afaik it works as intended.

Just tested it with OpenGFX+trains, and as you can see in the picture, the train is loading clay.
firs_opengfx+trains.png
firs_opengfx+trains.png (467.98 KiB) Viewed 813 times
In my experience, the trick with trying NewGRF extensions is to use as few as you can.

Note that you may have to refit wagons after buying them, to get it to load the wanted cargo. The default cargo of the Bulk wagon is timber, not clay.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: FIRS Industry Set - 1.3.0 released 23rd December 2013

Post by planetmaker »

Logarifm wrote:Hello!

I hope anyone know how to fix my problem. I have OpenTTD 1.4.0 on Ubuntu Linux 14.04. I have installed FIRS 1.3.0 via "online content manager". I also install various vehicle sets: 2cc Train Set, Old Wagons with New Cargos 1.1, North American Renewal Set (NARS) 2 and others. So, the problem is: I can not fill trains (and other transport) with FIRS cargo! They move only traditional cargo. I tried to activate practically every set of vehicle from the readme files, but no one worked! I can not understand, why? There are absolutely no error messages at start up of the game. I use only two NewGrf: FIRS and vehicle set. This problem exists in every climate. God knows why...

Thanks in advance!
All the vehicle sets you mentioned should - on their own - give you trains which can transport all cargoes of FIRS (maybe with some exceptions when using the "Old Wagons, New Cargoes" which might fail for one or two, dunno). What you might need to do, though, after you bought the wagon(s), is to refit them in the depot to the cargo you actually want it to transport - other wise you'll always have their default cargo which most likely is not the one you want.

If the problem persists even when you refitted the wagons in a depot, then please post a savegame which shows your problem.

Cheers,
pm
Logarifm
Engineer
Engineer
Posts: 4
Joined: 14 May 2014 18:22

Re: FIRS Industry Set - 1.3.0 released 23rd December 2013

Post by Logarifm »

Dear planetmaker and Alberth!

Thank you!!! :bow: I forget to refit my wagons!! What a fool I am! :oops: I am going to use OpenGFX+trains now, they are pretty nice! Thank you one more time! :D
Wahazar
Tycoon
Tycoon
Posts: 1451
Joined: 18 Jan 2014 18:10

Re: FIRS Industry Set - 1.3.0 released 23rd December 2013

Post by Wahazar »

By the way, maybe it would be useful option, to automatically refit car if bought via purchase menu with specific cargo filtered.
For example, in 2cctrains, I choose "wood" in purchase menu, got gondola and flatbed, choose one - and after purchase, this car is already refitted.
Formerly known as: McZapkie
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, wired, ECS industry extension, V4 CEE train set, HotHut.
Another favorite games: freeciv longturn, OHOL/2HOL.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: FIRS Industry Set - 1.3.0 released 23rd December 2013

Post by planetmaker »

McZapkie wrote:By the way, maybe it would be useful option, to automatically refit car if bought via purchase menu with specific cargo filtered.
For example, in 2cctrains, I choose "wood" in purchase menu, got gondola and flatbed, choose one - and after purchase, this car is already refitted.
Yes, it would.
User avatar
FLHerne
Tycoon
Tycoon
Posts: 1543
Joined: 12 Jul 2011 12:09
Location: St Ives, Cambs, UK

Re: FIRS Industry Set - 1.3.0 released 23rd December 2013

Post by FLHerne »

There's a patch for that. Still applies straightforwardly to new trunk, unless something's changed recently.
planetmaker (6 years ago) wrote:This is a great feature and patch. I hope it'll make it into trunk
Well, why don't you commit it? :(
Temporary Permanent signature filling text. Content coming soon delayed indefinitely! Oh, and I have had a screenshot thread.
Linux user (XMonad DWM/KDE, Arch), IRC obsessive and rail enthusiast. No longer building robots; now I ring church bells.
Author of an incredibly boring stickied post about NewGRFs.
Damrus
Engineer
Engineer
Posts: 21
Joined: 23 Apr 2014 14:23

Re: FIRS Industry Set - 1.3.0 released 23rd December 2013

Post by Damrus »

Hey there,

I've got a question on how to do something related to this GRF.

I love FIRS but what has always been bugging me about the quarries is the way the look (exactly like the claypits). Now I know there are GRF's that change the visuals for some industries like the coal plant and the Iron mine. (seen here: http://www.tt-forums.net/viewtopic.php?t=21389)

But is there an easy way for a noob like me to change the look of the quarry? I don't mind making the visuals. Its the GRF part that would be hard for me. And If I did make something I'd make something looking more like this: http://www.tt-wiki.net/wiki/ECS_Constru ... ._Clay_pit. or this http://upload.wikimedia.org/wikipedia/c ... Orosei.jpg

Is there a file I can replace or something ''Simple'' Like that?
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: FIRS Industry Set - 1.3.0 released 23rd December 2013

Post by planetmaker »

I'm afraid there's no way which is that simple.

The graphics need a layout. And the layout needs to be attached to the industry in the NewGRF's source. It's of equal complexity to create an add-on NewGRF which overrides the graphics and layout for the FIRS industries or to alter FIRS source code itself.
Damrus
Engineer
Engineer
Posts: 21
Joined: 23 Apr 2014 14:23

Re: FIRS Industry Set - 1.3.0 released 23rd December 2013

Post by Damrus »

Thank you for the fast reply! : ]

Guess Ill have to figure out how to!

Or if I can exchange some work for work :p
Post Reply

Return to “Graphics Releases”

Who is online

Users browsing this forum: No registered users and 31 guests