Page 1 of 2

A way of listing-out all your scenario content

Posted: Thu Nov 16, 2017 11:03 pm
by shrewdlog
I've been tinkering with a way of listing the scenario content I have installed.

Currently, it can find all the scenarios I have and list the consists and stock they use (and it does this even for content in .ap files)

Output is CSV (for Excel/Google Docs) and quite basic (Route/Scenario Name/Consist Name/Unit Name and No) but I can expand on that.

Have YOU ever want to see all your scenarios listed in this way and if-so, what information would you like to see in there?

Note: I'll edit this with an example as-soon as I have one which isn't ENORMOUS - one thing about scenario content is there's a LOT of it!!

Re: A way of listing-out all your scenario content

Posted: Fri Nov 17, 2017 8:34 am
by AndiS
One thing many should want to know is the resources consumed by the carious vehicles in the scenario. The closest proxy to this would be the file size on the disk. I know it is a proxy but better than nothing.

Since people would be overwhelmed with the output if you list that for all scenarios, I would list it for one only.

Assuming that instances of the same vehicle share memory, it would be wise to show how many there are and the file size of one instance.

Since AI does not stay for the whole duration normally, it would be clever to display the start and end of the consist's run, too. That way it is easier to judge the total load.

By file size of the vehicle, I mean mostly the .geoPcDx files and all the textured that are referenced in it. For engines, there is cab, for coaches the passenger view. Maybe include boogies, though no one know how much they are shared. I would exclude couplings as they ought to be shared and present a constant load, plus they should be small. You may or may not include the base file and the simulation file, I guess they don't contribute much to memory consumption.

Next project would be to product a similar list of all the stock the user has installed, to help in finding cheap replacements for the most expensive items on your first list.

P.S.: because of the enormity of the output, I would offer your original list on a per-route basis, that will be big enough to chew at it.

Re: A way of listing-out all your scenario content

Posted: Fri Nov 17, 2017 1:37 pm
by davep
AndiS wrote:One thing many should want to know...

Not me, but I like the sound of
AndiS wrote: ...produce a similar list of all the stock the user has installed, to help in finding cheap replacements for the most expensive items on your first list.
It should be said though that RW Tools can produce such a list of scenarios, because I requested it from Mike who obliged.

Re: A way of listing-out all your scenario content

Posted: Fri Nov 17, 2017 5:25 pm
by 749006
shrewdlog wrote:I've been tinkering with a way of listing the scenario content I have installed.
You do realise this feature is in RW Tools as Davep mentioned.

You can either generate a list of stock used in a scenario or a list of stock that is in every scenario for a route.
And you can even generate a list of the Stock number used - which flags up if there is a duplicate vehicle number in the scenario

The results can be exported in to a CSV or Excel file

You might be reinventing the wheel :)

Peter

Re: A way of listing-out all your scenario content

Posted: Fri Nov 17, 2017 10:05 pm
by AndiS
I see it as a starting point. Initially, all such efforts duplicate RW-Tools because the latter does a lot of basic things that are used by many, and it has a nice interactive interface.

If you write your own program, you can go deeper into specific analysis. Then it can be well worth the exercise. But only then.
You really need to know the limits of RW-Tools before investing time into such things. Unless you do it for the fun of learning.

Re: A way of listing-out all your scenario content

Posted: Sat Nov 18, 2017 1:09 am
by shrewdlog
I created this script mainly because RW_Tools cannot look inside .ap files - so I either have to unpack those (and I really don't want to do that) or I can't see routes/content which use those (which is at least half the stuff I have)

As part of creating this listing script I've also made an .ap auto pack/unpack/repack tool (it will unpack an ap - it can repack changed files - it can also undo the unpacking without harming anything else!!) but it was the sheer pain on doing that which led me into finding a better way around it for viewing content.

I'm even considered creating my own version of serz so that I can handle scenario.bin files without needing it (it's the slowest part of the process by far) - I don't need it to be perfect (I'm only reading them - not writing them) so it's just a matter of finding the time to do that.

RW_Tools remains a really useful tool - just as the TS Route Editor is the best way to swap stock etc. - but I'm learning so much about the innards that I have other ideas (stock renumbering - engine swapping - it's all doable!!)

Re: A way of listing-out all your scenario content

Posted: Sat Nov 18, 2017 2:37 pm
by shrewdlog
I posted a reply here yesterday - it was moderated and apparently approved but never appeared!? - so let's try again

The problem with RW_Tools is that it cannot see inside .ap files - you have to either unpack them all or it ignores their content, which is most of my routes!!

My script can read inside .ap files - no need to extract them - so it's WAY more convenient in that respect.

As part of creating this also made a utility to find all .ap files - for each one you have a choice of unpacking, repacking (updating any changed files) or deleting unpacked files - it was such a pain-in-the-. to create that I decided I needed a way to avoid that entirely tho...

If only I had a bit more idea on the content of .bin files I could parse those directly too - they're a BIT obscure, a 2-pipe-problem but I might find the time yet.

Anyway - here's my most basic output, obviously a LOT more info is required, it's a just a start (just 2 routes included here - WCML over Shap and Isle of Wight - one .ap and one unpacked)

https://docs.google.com/spreadsheets/d/ ... sp=sharing

Re: A way of listing-out all your scenario content

Posted: Sat Nov 25, 2017 9:26 pm
by shrewdlog
Just a quick update with a better example of the end-report

https://drive.google.com/open?id=1otDpP ... vVr6ljuytY

I've been fiddling with the script to make it easier for others to use - more soon...

Re: A way of listing-out all your scenario content

Posted: Sun Nov 26, 2017 5:24 pm
by 749006
shrewdlog wrote:As part of creating this listing script I've also made an .ap auto pack/unpack/repack tool (it will unpack an ap - it can repack changed files - it can also undo the unpacking without harming anything else!!) but it was the sheer pain on doing that which led me into finding a better way around it for viewing content.
Why do you need to 'repack' the *.ap file?

If I wish to un pack an *.ap file I find it, right click > 7Zip > Extract Here - please explain how that is a "Sheer Pain"?
Undoing the process is - Select all files, (that I unpacked) Delete.

You must be a Computer Programmer

Peter

Re: A way of listing-out all your scenario content

Posted: Sun Nov 26, 2017 7:33 pm
by AndiS
How did you guess that?
I tell you, if you are a programmer you do feel pain when you have to do the same thing five times.

And frankly speaking, it is to that simple. If you already have some files in that folder because you modified some bit, then unzip will ask you whether to overwrite or not and delete all will not be a good idea. So the correct process is: Unzip to an empty folder, then copy over the uncompressed files and overwrite. Not magic and can be automated.

Re: A way of listing-out all your scenario content

Posted: Sun Nov 26, 2017 8:15 pm
by TransportSteve
shrewdlog wrote:Have YOU ever want to see all your scenarios listed in this way and if-so, what information would you like to see in there?
Note: I'll edit this with an example as-soon as I have one which isn't ENORMOUS - one thing about scenario content is there's a LOT of it!!
Well, with respect, it's a nice idea, BUT, some of us on here are veterans and have been with this game since Kuju days, 10 YEARS AGO. I personally have in excess of over 250 routes from around the world, there is no way I would want to go through the whole issue of listing out all scenarios and their rolling stock content, it's just not feasible, and I presume you mean scenarios that are included with DLC off Steam in DTG's routes and locomotive and wagon packs? What about 3rd party creators, other routes we buy, say from Just Trains, etc, and individual Payware Scenario packs from the likes of Armstrong Powerhouse and Trains & Drivers, and the hundreds of kiddywinkies across the globe, and what about German and American routes, freeware and Payware, and of course, every other country from across Europe, I also have 5 Russian routes, 4 Chinese, not too mention ALL of the scenarios in the Steam Workshop that many of us have installed, how many hundreds of those do you think there are, and it changes every day of the week, if you do it for everywhere it's a monumental task, and one that I personally wouldn''t even bother starting, you are not the first person to attempt this sort of project, why do you think it has never been done before?
If it is just British scenario content, from the last 12 months, or, so, then that narrows down your task, of course, but, then, others might want you to expand and go further and further back, Steam started in 2009, that's 9 years ago next year, when will it end, how much spare time do you want to spend doing all of this, have you done a feasibility study for this project, it's not something you can just knock up over a weekend!!!
Don't get me wrong, I applaud your enthusiasm, but, I think you've bitten off a bit more than you can chew here, without realising it, unless you put in major restrictions, I hope you understand that this isn't something that is easy to complete unless you spend the appropriate amount of time in completing your assignment, which could be many weeks. And I wouldn't have thought that very many others on this forum would want to spend their limited spare hobby time doing this when they can be building routes, creating scenery items and driving trains.

Cheerz. Steve.

Re: A way of listing-out all your scenario content

Posted: Sun Nov 26, 2017 10:24 pm
by gptech
shrewdlog wrote:repacking (updating any changed files)
Which would be undone if you ever need to verify the game or the pack was updated. It also goes against a major point of having a .ap archive; an untouched store of as supplied files.

Re: A way of listing-out all your scenario content

Posted: Thu Dec 07, 2017 12:27 am
by shrewdlog
gptech wrote:
shrewdlog wrote:repacking (updating any changed files)
Which would be undone if you ever need to verify the game or the pack was updated. It also goes against a major point of having a .ap archive; an untouched store of as supplied files.
But slow to reply here but there ARE situations where you'd want to repack an AP - esp if you make your own content - and Steam only overwrites original content, not stuff you've "cloned" to make your own changes (and you can stop Steam overwriting stuff too!)

I've seen evidence that better AP management would make the game run better - quite a few of the AP files contain duplicated content/content which has been copied into the wrong place (making AP files larger than necessary)

You can just unpack 1 file from an AP and the game will read that and ignore the copy in the AP too - Steam won't interfere with that 1 file either - this is how I fix the awful controls in most EMUs ;0

Re: A way of listing-out all your scenario content

Posted: Thu Dec 07, 2017 12:29 am
by shrewdlog
TransportSteve wrote:
shrewdlog wrote:Have YOU ever want to see all your scenarios listed in this way and if-so, what information would you like to see in there?
Note: I'll edit this with an example as-soon as I have one which isn't ENORMOUS - one thing about scenario content is there's a LOT of it!!
Well, with respect, it's a nice idea, BUT, some of us on here are veterans and have been with this game since Kuju days, 10 YEARS AGO. I personally have in excess of over 250 routes from around the world, there is no way I would want to go through the whole issue of listing out all scenarios and their rolling stock content, it's just not feasible, and I presume you mean scenarios that are included with DLC off Steam in DTG's routes and locomotive and wagon packs? What about 3rd party creators, other routes we buy, say from Just Trains, etc, and individual Payware Scenario packs from the likes of Armstrong Powerhouse and Trains & Drivers, and the hundreds of kiddywinkies across the globe, and what about German and American routes, freeware and Payware, and of course, every other country from across Europe, I also have 5 Russian routes, 4 Chinese, not too mention ALL of the scenarios in the Steam Workshop that many of us have installed, how many hundreds of those do you think there are, and it changes every day of the week, if you do it for everywhere it's a monumental task, and one that I personally wouldn''t even bother starting, you are not the first person to attempt this sort of project, why do you think it has never been done before?
If it is just British scenario content, from the last 12 months, or, so, then that narrows down your task, of course, but, then, others might want you to expand and go further and further back, Steam started in 2009, that's 9 years ago next year, when will it end, how much spare time do you want to spend doing all of this, have you done a feasibility study for this project, it's not something you can just knock up over a weekend!!!
Don't get me wrong, I applaud your enthusiasm, but, I think you've bitten off a bit more than you can chew here, without realising it, unless you put in major restrictions, I hope you understand that this isn't something that is easy to complete unless you spend the appropriate amount of time in completing your assignment, which could be many weeks. And I wouldn't have thought that very many others on this forum would want to spend their limited spare hobby time doing this when they can be building routes, creating scenery items and driving trains.

Cheerz. Steve.
I get what you're saying but the fact I can list stuff without having to unpack AP files is the main reason I made the thing - it's already been useful so the only question is

a - do I just use it
b - do I waste a load of time making it useful to others

I've done b a lot of times for no reason result - hence posting things like this to gauge interest - is what I'm doing ;0

Re: A way of listing-out all your scenario content

Posted: Thu Dec 07, 2017 9:04 pm
by 749006
shrewdlog wrote: But slow to reply here but there ARE situations where you'd want to repack an AP - esp if you make your own content - and Steam only overwrites original content, not stuff you've "cloned" to make your own changes
If you repack your Something.ap in to Something-altered.ap would not the game not be looking in the original Something.ap?
shrewdlog wrote: I've seen evidence that better AP management would make the game run better - quite a few of the AP files contain duplicated content/content which has been copied into the wrong place (making AP files larger than necessary)
But if you have two different DLC, like the 421 and 423 Southern emu's then they would have duplicated files in both packs.
shrewdlog wrote: You can just unpack 1 file from an AP and the game will read that and ignore the copy in the AP too - Steam won't interfere with that 1 file either - this is how I fix the awful controls in most EMUs ;0
Which is what most people do.
They just don't repack the file into a *.ap format

Peter