[MOD 0.12] TrainStats
Posted: Wed Jul 22, 2015 2:10 am
by d3phoenix
Type: Mod
Name: TrainStats
Description: Adds a command to provide detailed statistics of rail system.
License: MIT License (http://opensource.org/licenses/MIT)
Version: 1.0.0
Release: 2015-07-21
Tested-With-Factorio-Version: 0.12.17+
Category: Helper
Tags: Trains, Rail
Download-Url: https://www.dropbox.com/s/c1dnny7vbo97s ... _1.0.0.zip
Website:
Name: TrainStats
Description: Adds a command to provide detailed statistics of rail system.
License: MIT License (http://opensource.org/licenses/MIT)
Version: 1.0.0
Release: 2015-07-21
Tested-With-Factorio-Version: 0.12.17+
Category: Helper
Tags: Trains, Rail
Download-Url: https://www.dropbox.com/s/c1dnny7vbo97s ... _1.0.0.zip
Website:
License
License
The MIT License (MIT)
Copyright (c) <year> <copyright holders>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
The MIT License (MIT)
Copyright (c) <year> <copyright holders>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Long description
Long description
This is a mod I put together by request for ColonelWill on Twitch, who has a ridiculously large train system in his RSO megabase.
It adds a command to provide detailed statistics of your rail system.
Type this at the console (~) to run the count:
/c remote.call('trainstats','count')
The game will lag for a few seconds while the count runs (this takes longer the larger your map is), then it will respond with something like this:
This is a mod I put together by request for ColonelWill on Twitch, who has a ridiculously large train system in his RSO megabase.
It adds a command to provide detailed statistics of your rail system.
Type this at the console (~) to run the count:
/c remote.call('trainstats','count')
The game will lag for a few seconds while the count runs (this takes longer the larger your map is), then it will respond with something like this:
Code: Select all
--Train System Statistics-------------------------------------
Train Stops: 10 built, 0 stored, 10 total
Diesel Locomotives: 8 deployed, 2 stored, 10 total
FARLs: 2 deployed, 0 stored, 2 total
Cargo Wagons: 15 deployed, 2 stored, 17 total
Rail Tankers: 0 deployed, 0 stored, 0 total
Rail Signals: 243 built, 53 stored, 296 total
Chain Signals: 18 built, 12 stored, 30 total
Curved Rails: 62 built, 38 stored, 100 total
Straight Rails: 1984 built, 416 stored, 2400 total
-----------------------------------------------------------------
Version history
Version history
1.0.0 (2015-07-21): Initial Release
1.0.0 (2015-07-21): Initial Release
Limitations
Limitations
To minimize the lag, the script scans only *likely* inventories for the stored components to be found. It counts all items that are deployed on the map, and then checks the inventories of the following entity types:
"container","smart-container","logistic-container","cargo-wagon","roboport","assembling-machine","car","player"
(Note that in terms of the game code, the tank is a kind of "car", and all four types of logistics chest are covered by logistic container -- so this list covers more than it might look like at first glance.)
Ultimately this means is that if you have rail components stuffed some place weird, like the output of a furnace for example, they will not be counted.
The script also does not count any inventory items that have been left on the ground or on belts (also for performance reasons).
To minimize the lag, the script scans only *likely* inventories for the stored components to be found. It counts all items that are deployed on the map, and then checks the inventories of the following entity types:
"container","smart-container","logistic-container","cargo-wagon","roboport","assembling-machine","car","player"
(Note that in terms of the game code, the tank is a kind of "car", and all four types of logistics chest are covered by logistic container -- so this list covers more than it might look like at first glance.)
Ultimately this means is that if you have rail components stuffed some place weird, like the output of a furnace for example, they will not be counted.
The script also does not count any inventory items that have been left on the ground or on belts (also for performance reasons).