[Rseding91] [0.13.0] try to get flow statistic of force

This subforum contains all the issues which we already resolved.
KaleR
Burner Inserter
Burner Inserter
Posts: 14
Joined: Wed May 18, 2016 7:42 am
Contact:

[Rseding91] [0.13.0] try to get flow statistic of force

Post by KaleR »

Hello guys,

want to try the new feature to get flow statistic of forces.

used command:

Code: Select all

/c game.players[1].print(game.forces['MyForce'].entity_build_count_statistics.get_input_count('transport-belt'));
factorio.log
(8.63 KiB) Downloaded 225 times
My Mods: Teams, Statistic
Rseding91
Factorio Staff
Factorio Staff
Posts: 14345
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.13.0] try to get flow statistic of force

Post by Rseding91 »

Do you actually have a force called "MyForce"?

Can you upload the save file you're using?
If you want to get ahold of me I'm almost always on Discord.
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5286
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [Rseding91] [0.13.0] try to get flow statistic of force

Post by Klonan »

Thanks for the report,

This does indeed crash the game :)
KaleR
Burner Inserter
Burner Inserter
Posts: 14
Joined: Wed May 18, 2016 7:42 am
Contact:

Re: [Rseding91] [0.13.0] try to get flow statistic of force

Post by KaleR »

Hello,

i've written a private mod for my self containing serveral forces for me and my friends.
There are at the moment three players; each in an own force.

One force is called 'Mega Force'. The command and log file attatched was simplified for better reading.

the actual command was

Code: Select all

/c game.players[1].print(game.forces['Mega Force'].entity_build_count_statistics.get_input_count('transport-belt'));
Regards,
KaleR

EDIT:
glad I could help, your game is amazing.
My Mods: Teams, Statistic
KaleR
Burner Inserter
Burner Inserter
Posts: 14
Joined: Wed May 18, 2016 7:42 am
Contact:

Re: [Rseding91] [0.13.0] try to get flow statistic of force

Post by KaleR »

Perhaps I should mentioned that that the game crashes as well if I try to access read only parameter in LuaFlowStatistic (input_count and output_count).

My intension was to write all flow stats to an file and output these in a website so every one could check how far the other teams are.
My Mods: Teams, Statistic
Rseding91
Factorio Staff
Factorio Staff
Posts: 14345
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91] [0.13.0] try to get flow statistic of force

Post by Rseding91 »

Fixed for 0.13.1. It's just the entity_build_count_statistics one that's messed up, the rest should work fine.
If you want to get ahold of me I'm almost always on Discord.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14345
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91] [0.13.0] try to get flow statistic of force

Post by Rseding91 »

Also, game.player is your local player when typing in the console.

You don't need to use game.players[1].

Code: Select all

/c game.players.print(game.player.force.entity_build_count_statistics.get_input_count('transport-belt'))
Will print your forces build counts for transport belts.

Well.. in 0.13.0 it crashes but in 0.13.1 it will work :P
If you want to get ahold of me I'm almost always on Discord.
KaleR
Burner Inserter
Burner Inserter
Posts: 14
Joined: Wed May 18, 2016 7:42 am
Contact:

Re: [Rseding91] [0.13.0] try to get flow statistic of force

Post by KaleR »

thank you :)

I will look at it when 0.13.1 is released :)

game.player xD I know, but as mentioned in my earlier post, I run a small server with several friends ;) so game.player is not an option :)


Will there be a possibility to add code only to the server and not to the clients? like a statistic mod or somethin else? Because it doesn't make sense, that every clint will generate some output files with stuff which will only be needed by the server.

Regards,
KaleR
My Mods: Teams, Statistic
Rseding91
Factorio Staff
Factorio Staff
Posts: 14345
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91] [0.13.0] try to get flow statistic of force

Post by Rseding91 »

KaleR wrote:thank you :)

I will look at it when 0.13.1 is released :)

game.player xD I know, but as mentioned in my earlier post, I run a small server with several friends ;) so game.player is not an option :)


Will there be a possibility to add code only to the server and not to the clients? like a statistic mod or somethin else? Because it doesn't make sense, that every clint will generate some output files with stuff which will only be needed by the server.

Regards,
KaleR
I'm not sure what you're talking about. game.player is you in the game. You can also use the 3 state "allow commands" and set it up so admins can run commands but nobody else on the server.
If you want to get ahold of me I'm almost always on Discord.
KaleR
Burner Inserter
Burner Inserter
Posts: 14
Joined: Wed May 18, 2016 7:42 am
Contact:

Re: [Rseding91] [0.13.0] try to get flow statistic of force

Post by KaleR »

aaaaah xD

now I get it :)

game.player will be the player who is playing in the save game, not the other players joined the server :)

You never stop learning xD

Thanks :)
My Mods: Teams, Statistic
Post Reply

Return to “Resolved Problems and Bugs”