Page 102 of 104

Re: [UNIV] ISR - Industrial Stations Renewal

Posted: 30 Oct 2014 22:12
by Cadde
My situation
Fathom for a moment that i have my own compiled binaries of OTTD 1.2.1 with Chills Patchpack, in this one i have upped the limit on how many units of cargo a station can hold without "bleeding" to 250,000 units.
Alongside this, however somewhat irrelevant to my question, i have disabled delivery times for all but passengers and mail. (And maybe some other cargoes, i forgot. Long time since compile)
I can and intend to store cargo for an indefinite time in my stations, at a maximum of 250k units per station.
My idea was to use 5x5 grids (5x5 = 25 = 10k units per tile) of <insert cargo type here> storage plots. Like for instance the mineral tiles.

My/the problem and the question
The problem is that the 4 levels of "fillage" are set way lower than that 250k units limit i have.
I have never recompiled a GRF before.
So here's the questions...
  • Which files (NFO) would i need to edit (you don't have to list them, but just so i am sure what i am doing) to up the limits from what is normal for OTTD to my new specs?
  • I would like to have an example of what needs editing... Is this correct:
    "/includes/minerals.nfo @ Line 32, \w600 = 1536"
    That means "FULL" is set at 1536, would altering the WORD to 0x3D090 (250,000) make it so the "FULL" state is at the level i am seeking? (knowing full well that i intend to set this at something like 175k)
    Is there anything else i need to alter to make this work? Can i alter the "randomizer" so that, at lower levels, only a few of the tiles are decorated until i reach a stage where there's more than say 2500 units in each tile. Assuming each tile can hold 10k units each.
  • How do i compile this? (You don't have to answer, i could google but a hint would be nice)
  • Any other pitfalls?
Many thanks!

Re: [UNIV] ISR - Industrial Stations Renewal

Posted: 01 Nov 2014 17:44
by mart3p
Cadde wrote:[*]Which files (NFO) would i need to edit (you don't have to list them, but just so i am sure what i am doing) to up the limits from what is normal for OTTD to my new specs?
All occurrences of station property 10 would need changing. Search for "little/lots threshold".
Cadde wrote:[*]I would like to have an example of what needs editing... Is this correct:
"/includes/minerals.nfo @ Line 32, \w600 = 1536"
No, the escape "\w" means the value is decimal, so \w600 = 0x258. This sets the "full" threshold at 600 units of cargo.
Cadde wrote:... would altering the WORD to 0x3D090 (250,000) make it so the "FULL" state is at the level i am seeking? (knowing full well that i intend to set this at something like 175k)
The maximum size of a WORD is 0xFFFF = 65535. So 65,535 units is the maximum that can be set.

Additionally the GRF spec limits the maximum amount of cargo units at a station to 4095 for each cargo type..
Cadde wrote:Is there anything else i need to alter to make this work? Can i alter the "randomizer" so that, at lower levels, only a few of the tiles are decorated until i reach a stage where there's more than say 2500 units in each tile. Assuming each tile can hold 10k units each.
The thresholds for lower levels will be spread evenly between 0 and the value of the "full" threshold that is set.
Cadde wrote:[*]How do i compile this? (You don't have to answer, i could google but a hint would be nice)
Follow this guide (assuming you are using Windows). Except, for compiling ISR, NML is not required.
Cadde wrote:[*]Any other pitfalls?
Probably. :wink:

Re: [UNIV] ISR - Industrial Stations Renewal

Posted: 01 Nov 2014 20:09
by Eddi
mart3p wrote:Additionally the GRF spec limits the maximum amount of cargo units at a station to 4095 for each cargo type..
i don't think this has been accurate for a long time now.

Re: [UNIV] ISR - Industrial Stations Renewal

Posted: 01 Nov 2014 20:32
by Cadde
mart3p wrote:All occurrences of station property 10 would need changing. Search for "little/lots threshold".
Thanks, so basically it occurs in any number of files and names are "pointless" but assuming each of those properties has the "little/lots threshold" comment is enough? There are no places without this particular comment?
Can i also "safely" search for property 10 via some regex and assume that it's the same thing? If the "opcode" starts with 10 then it's that property? Or does it have to appear in some header (like i said, never actually done any editing and i will probably figure this one out either way but i'd rather not be bit by a bug i made somewhere 50 game years into the future.)

EDIT: Here is a perfect example of what i mean.

Code: Select all

  C:\Users\Cadde\Desktop\ISR\includes\wood.nfo (2 hits)
	Line 66: 		10 \w400 // set little/lots threshold
	Line 270: 		10 \w600 // set little/lots threshold
  C:\Users\Cadde\Desktop\ISR\includes\woodstat.nfo (1 hit)
	Line 155: 		10 \w400 // set little / lots threshold
Searching for "little/lots threshold" would miss the entry in woodstat.nfo. which has spaces in the comment.
I instead searched for "<tab>10 \w" which got me what i can only assume all of them. And some others but those are easy to ignore.
mart3p wrote:No, the escape "\w" means the value is decimal, so \w600 = 0x258. This sets the "full" threshold at 600 units of cargo.
I figured as much after i made my post, seeing the pile reach a "full" state after two 300 tonne loads. But on a related note, 1536 was a number from elsewhere that i had a faint recollection of.
mart3p wrote:The maximum size of a WORD is 0xFFFF = 65535. So 65,535 units is the maximum that can be set.

Additionally the GRF spec limits the maximum amount of cargo units at a station to 4095 for each cargo type..
Yes, you are indeed correct. I don't work in WORD/DWORD but the .Net specifications so i get easily confused.
Is this relevant though? Assuming what Eddi said doesn't apply, is the storage a WORD or a DWORD or something else? Seeing as how it's represented in decimal i mean.
If it isn't then 4095 vs 600 in the grand scheme of things (where i am looking for at least 175 thousand units as full) is irrelevant.
Let's hope it works.
mart3p wrote:The thresholds for lower levels will be spread evenly between 0 and the value of the "full" threshold that is set.
Thank you!

And thanks for the link and the excellent reply!

Re: [UNIV] ISR - Industrial Stations Renewal

Posted: 01 Nov 2014 21:04
by Eddi
what i said applies to the 4095 limit. this has either been lifted years ago, or it now applies to each (cargodist) link individually. probably both.

the 65535 limit still applies. you can't push a 2m wide object through a 1m wide door.

Re: [UNIV] ISR - Industrial Stations Renewal

Posted: 01 Nov 2014 21:10
by Cadde
Ah boo. At least it's better than 4096.
I might be able to live with that.
Thanks a lot Eddi for clarifying that.

EDIT:

Ok, an update on this little project of mine.
Turns out that i wasn't running the "full" 1.2.0 version but a release candidate of some sort. So anything ISR > 0.8.2 was out of the question.

But, at least i managed to compile 1.0.1 after figuring out i needed NFORenum... The correct one, not the old one. That gave me some questionmarks before i noticed that. (it wasn't mentioned on DaleStan's webpage.)
So then i ran into the version warning. Thinking this was something i did with my compile (already thinking my compile was on a RC build at the time) so i disabled the version check and got other errors. *sigh*
So i cloned the revision (60) just before the new version check.

With all this done so far, the makefile (the lack of any knowledge on my part of any of that stuff and cryptic errors) didn't want to finish... again.
For some reason it refused to make the .cnfo file, after a long time trying to find out why it didn't run the CPP i just ran it manually and made the tar_bundle and was FINALLY able to test this.
And, setting the value at 65535 left the platforms completely empty, no matter how many units were stored. I dropped it to 16384 and it ran one level and stopped animating after that.

So i finally tried 4095 and yep, it works just fine. But that is nowhere near my goal.
I am basically looking at compiling ChiPP against a proper 1.2.0 release with my personal modifications. :roll:
That will be "fun".

Anyways, i just wanted to let you know how i fared with my project. I would hate to just "hit and run".

Re: [UNIV] ISR - Industrial Stations Renewal

Posted: 16 Dec 2014 19:21
by Digitalfox
JRD wrote:They do not want you to work 32bpp graphics project?

Image

sprites 32bpp for ISR

____________
mart3p:
I'm sorry but I can not English, translator does not translate very well.

It's like writing "planetmaker"

on my web is partially modified GRF.
Hi JRD, would please share the source code of your ISR 32bpp?

I've been trying to update it to 1.0.1 but it's being hard and keeps failing on so many levels, my head hurts ;(

Re: [UNIV] ISR - Industrial Stations Renewal

Posted: 17 Dec 2014 11:52
by Eddy Arfik
Digitalfox wrote: Hi JRD, would please share the source code of your ISR 32bpp?

I've been trying to update it to 1.0.1 but it's being hard and keeps failing on so many levels, my head hurts ;(
I'm not sure there exists a "proper" source for the 32bpp version, JRD simply extended the 8bpp ISR sources with extra sprite definitions from what I can tell. That said, it should still be quite easy to add the 32bpp sprites to the ISR 1.0.1.
Decompile both the 32bpp 0.9.2 and the 8bpp 1.0.1 into the same folder, then open both .nfo files. For every line in the indstatr.nfo that looks like this

Code: Select all

   112 sprites/indstatr00.png  8bpp  210   40   64   31  -31    0 normal 
there will be a corresponding line in the indstatr_32.nfo with a bit extra info

Code: Select all

    92 sprites/indstatr_3200.png  8bpp  690   24   64   31  -31    0 normal
    | sprites/indstatr_3200.32.png 32bpp   18    8  259  129 -129   -2 zi4 
Simply cut & paste the appropriate lines from the 32bpp .nfo into the 8bpp .nfo, then recompile. Note that you will need to refer to the .png files as the sprite numbers are different between the two versions, also not all sprites have a 32bpp version.

Re: [UNIV] ISR - Industrial Stations Renewal

Posted: 17 Dec 2014 13:46
by JRD
Eddy Arfik is right, the source code is not only decompiled GRF (nfo).

see: http://www.tt-forums.net/viewtopic.php? ... 1#p1118981
also includes modified nfo.

or latest : http://dfiles.eu/files/8zsp3azw6

Re: [UNIV] ISR - Industrial Stations Renewal

Posted: 17 Dec 2014 17:53
by Digitalfox
Hey guys thanks for answering!

I didn't explain the whole picture.

If you go here: http://bundles.openttdcoop.org/isr/rele ... 1/?C=M&O=D

You have access to the full and commented NFO source of ISR.

I'm compiling that source, it has comments, sections, spaces, etc.. Helps a lot to understand when something begins and ends and also to modify anything.

The problem is that it is based on GRFv7, meaning it has xpos and ypos flipped compared to GRFv32 and also the source has pcx instead of png.

Now, I've converted the source to GRFv32 and also converted all the pcx to png, but I now have to reorder all the xpos and ypos and remove all the 01 and 09, I was merely trying to avoid such a huge task.

And then I have to add all the 32bpp and are no longer sorted like in the 0.9.* versions, so a lot of checking has to be made to make sure I don't screw up the order.

I thought maybe JRD did that for 0.9.* versions, and that would help a LOT, but ok I see it was a de/recompile of the GRF and he added the 32bpp sprites!

JRD, I know you have said before that you have no longer interest in 32bpp sprites, but any change of creating a few more sprites for example for the new Heavy Freight Station?

I keep checking your site once or two times a week for a surprise http://jrd.sweb.cz/ostatni.html :tongue:

Thanks guys.

Re: [UNIV] ISR - Industrial Stations Renewal

Posted: 20 Jan 2015 10:41
by alluke
Now that there are fenced tiles and road gates, rail gates are still missing. Also, would it be possible to have automatically fenced cargo tiles when there's at least one road/rail gate tile in the station? :)

Image

Re: [UNIV] ISR - Industrial Stations Renewal

Posted: 20 Jan 2015 21:08
by kamnet
Well, the doors on the sheds close whenever a train is coming in, I don't see why it's not technically possible to do the same with a fenced edge of a property. Just a matter of if the work to make it is worth the effort.

Re: [UNIV] ISR - Industrial Stations Renewal

Posted: 21 Jan 2015 01:47
by Eddi
fenced gates should be easily possible, but they should probably be placed manually, not automatically

Re: [UNIV] ISR - Industrial Stations Renewal

Posted: 21 Jan 2015 05:37
by JRD

Re: [UNIV] ISR - Industrial Stations Renewal

Posted: 23 Jan 2015 20:30
by mart3p
alluke wrote:Now that there are fenced tiles and road gates, rail gates are still missing.
Good idea, thanks for the suggestion. :D

I can't say when it will be done though, I have a few other projects I'm working on currently. :wink:
alluke wrote:Also, would it be possible to have automatically fenced cargo tiles when there's at least one road/rail gate tile in the station? :)
I'm afraid this one's not so simple. I have done some experiments with fenced cargo tiles and this still has a few issues to sort out. But searching every station tile for a road/rail gate tile, would be difficult if not impossible. :|

Re: [UNIV] ISR - Industrial Stations Renewal

Posted: 09 Feb 2015 19:58
by mart3p
Industrial Stations Renewal v1.0.2
ISR_nitrates_fruit.png
ISR_nitrates_fruit.png (69.04 KiB) Viewed 6723 times
Changes for ISR v1.0.2:
  • Support for new FIRS cargoes added:
    Nitrates added to mineral silo and all mineral platforms and tiles.
    Vehicle parts added to goods stations and all container and crate platforms and tiles.
    Beans added to fruit station, fruit platforms and tiles.
    Fix: Prevent minerals being shown when there are no minerals on the station. This could occur if there was another cargo type present.
    Fix: Correct track type is now shown when NuTracks or FRISS replace monorail or maglev tracks.
ISR v1.0.2 does not support TTDPatch. TTDPatch players should continue to use ISR v0.8.2.

ISR v1.0.2 is compatible with savegames using ISR v1.0.0 and v1.0.1.

It is available for download from BaNaNaS and the OpenTTD in-game content downloader.

Re: [UNIV] ISR - Industrial Stations Renewal

Posted: 09 Feb 2015 20:33
by andythenorth
Wow, quick FIRS support, thanks :D

Re: [UNIV] ISR - Industrial Stations Renewal

Posted: 10 Feb 2015 02:43
by kamnet
mart3p wrote:Industrial Stations Renewal v1.0.2
ISR v1.0.2 does not support TTDPatch. TTDPatch players should continue to use ISR v0.8.2.
Just curious, any plans to eventually update the TTDPatch version with some of the improvements in the OpenTTD version?

Re: [UNIV] ISR - Industrial Stations Renewal

Posted: 10 Feb 2015 09:31
by Auge
Hello
kamnet wrote:
mart3p wrote:Industrial Stations Renewal v1.0.2
ISR v1.0.2 does not support TTDPatch. TTDPatch players should continue to use ISR v0.8.2.
Just curious, any plans to eventually update the TTDPatch version with some of the improvements in the OpenTTD version?
<search />mart3p gave an explanation before he released the version 0.9.

Tschö, Auge

Re: [UNIV] ISR - Industrial Stations Renewal

Posted: 10 Feb 2015 16:50
by alluke
Nice! Could those nitrates tiles appear for ECS WDPR, since they look exactly like wood chips? :D