Search found 8 matches

by MisterBrownZA
Wed Nov 04, 2015 10:17 am
Forum: Modding help
Topic: Comparing color tables and GUIStyle
Replies: 4
Views: 5137

Re: Comparing color tables and GUIStyle

-snip-
Never done anything with that, either.[/quote]
Thanks for the assistance.

Was wondering about the table values as well... Will compare values instead then, thank you very much!

GUIstyle isn't documented very well, and I can't find a solid working example of implementation.

I have tried ...
by MisterBrownZA
Wed Nov 04, 2015 5:48 am
Forum: Modding help
Topic: Comparing color tables and GUIStyle
Replies: 4
Views: 5137

Comparing color tables and GUIStyle

Greetings,

I would like to know the following:

1. How would I be able to compare the current player color with a color table of my own (granted my own table has the full rgba).
eg.
if (game.player.color == mycolors.white || game.local_player.color == mycolors.white) then
--#change player color ...
by MisterBrownZA
Wed Nov 04, 2015 5:19 am
Forum: Modding help
Topic: How to get multiplayer name?
Replies: 4
Views: 5041

Re: How to get multiplayer name?

Quick question. I couldn't find local_player.print() method in the wiki, so wasn't sure how I was supposed to do this.

Lua/Game#local_player
Lua/Player#print

I'm guessing v.name returns the player's "get_localised_entity_name"

That contains whatever the player entered in options -> other ...
by MisterBrownZA
Wed Nov 04, 2015 5:19 am
Forum: Modding help
Topic: How to log my results for debug ?
Replies: 5
Views: 6466

Re: How to log my results for debug ?

ratchetfreak wrote:https://forums.factorio.com/wiki/inde ... write_file

Code: Select all

Game.write_file("MyMod_logOutput.txt", textToLog, true)
Thanks for this!

Along with that

print(serpent.block())

I'm ready to debug now! Is there a way I can close this thread ?
by MisterBrownZA
Tue Nov 03, 2015 9:35 am
Forum: Modding help
Topic: How to get multiplayer name?
Replies: 4
Views: 5041

Re: How to get multiplayer name?



for _, v in pairs(game.players) do game.local_player.print(v.name) end

Amazing! So easy!

Quick question. I couldn't find local_player.print() method in the wiki, so wasn't sure how I was supposed to do this.

I'll try this when I get home tonight.

I'm guessing v.name returns the player's ...
by MisterBrownZA
Tue Nov 03, 2015 9:29 am
Forum: Modding help
Topic: How to log my results for debug ?
Replies: 5
Views: 6466

Re: How to log my results for debug ?

Hi prg,

thanks for the speedy response.

That's correct. I can't generate a log file using factorio.exe > debug.log.

There's no way for me to currently see a dump of the text.

Anyone know how to replicate this for windows ? Should I be running a dedicated server ?

---------------------

I will ...
by MisterBrownZA
Tue Nov 03, 2015 5:26 am
Forum: Modding help
Topic: How to log my results for debug ?
Replies: 5
Views: 6466

How to log my results for debug ?

I saw there was a post by a user who used factorio.exe > my.log or something like that...

But since the update, he wasn't able to log his print() anymore.

Has a solution for this problem be found yet ?

What is the best way to investigate a table, real-time ?

It's silly that each individual ...
by MisterBrownZA
Tue Nov 03, 2015 5:23 am
Forum: Modding help
Topic: How to get multiplayer name?
Replies: 4
Views: 5041

How to get multiplayer name?

Greetings everyone,

I eventually decided to join the forum - as I can't find any questions/answers relating to my problem.

I'd like to access game.players - multiplayer name for each player who has joined.

I hope someone can help me with this

Go to advanced search