Page 1 of 1

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

Posted: Tue Jun 28, 2016 2:15 pm
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 189 times

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

Posted: Tue Jun 28, 2016 2:30 pm
by Rseding91
Do you actually have a force called "MyForce"?

Can you upload the save file you're using?

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

Posted: Tue Jun 28, 2016 2:32 pm
by Klonan
Thanks for the report,

This does indeed crash the game :)

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

Posted: Tue Jun 28, 2016 2:36 pm
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.

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

Posted: Tue Jun 28, 2016 2:41 pm
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.

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

Posted: Tue Jun 28, 2016 2:42 pm
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.

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

Posted: Tue Jun 28, 2016 2:44 pm
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

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

Posted: Tue Jun 28, 2016 2:56 pm
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

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

Posted: Tue Jun 28, 2016 3:00 pm
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.

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

Posted: Tue Jun 28, 2016 3:03 pm
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 :)