pulling live data from game to outside

Started by karadeli, September 15, 2018, 06:20:43 AM

Previous topic - Next topic

karadeli

Hi, i'm playing rimworld for a while but it starts to annoy me that if i want to look at a pawns stat i need to open a tab that uses half of the screen. i want to pull simple things like food, rest, rec ect. from game to a text file or something.
like as an example i'd like to put an arduino and a lcd panel next to my main screen. in-game stats from pawn will saved to a json file than i will use it in that said arduino.
in the lcd i will see mood and rest percentage when i select a pawn without filling the screen with tabs. i know its a bit specific example but i play in a bit old laptop with low res. and small screen.
it would be nice if someone helps. :)

Canute

Multi-screen support is a long time suggestion for vanilla and mod's.
But currently noone managed/made anything that comes close to it.

Knight

I'm not an expert at C# but I would assume that you could call the stats of the pawn like normal and then integrate the ability to create a text file into the mod. From here you'd just format it and then use another program or script to read the text file and manipulate that as you will. If you're advanced enough at using C# then you could probably setup some sort of external application with a GUI that displays the information read from the text file made by the Rimworld mod.

It'd take a while and would be quite complex but it sounds reasonable and possible. You might be able to make a suggestion on here for it depending on how nice people are feeling.

Generally, though, you wouldn't be able to make the game itself display on your second screen. It'd almost certainly need to be done by another application altogether.

karadeli

Quote from: Canute on September 15, 2018, 06:47:11 AM
Multi-screen support is a long time suggestion for vanilla and mod's.
But currently noone managed/made anything that comes close to it.
Im not talking about multi screen setup. What im saying is a screen with a 2x16 or 4x16 character display.
Something like this.


******************
*Food  ######____*
*Rest  ########__*
******************

or


******************
* Parks, Soldier *
*Mood  ###_______*
*Food  ##########*
*Rest  #######___*
******************


Quote from: Knight on September 15, 2018, 08:17:50 AM
I'm not an expert at C# but I would assume that you could call the stats of the pawn like normal and then integrate the ability to create a text file into the mod. From here you'd just format it and then use another program or script to read the text file and manipulate that as you will. If you're advanced enough at using C# then you could probably setup some sort of external application with a GUI that displays the information read from the text file made by the Rimworld mod.

It'd take a while and would be quite complex but it sounds reasonable and possible. You might be able to make a suggestion on here for it depending on how nice people are feeling.

Generally, though, you wouldn't be able to make the game itself display on your second screen. It'd almost certainly need to be done by another application altogether.

after saving stuff to a text its easy to do rest. My strugle is reading stats then saving it to something out of the game.
Im just an ameteur in c# but i couldn't find it.

Knight

Quoteafter saving stuff to a text its easy to do rest. My strugle is reading stats then saving it to something out of the game.
Im just an ameteur in c# but i couldn't find it.

Try this - https://stackoverflow.com/questions/9907682/create-a-txt-file-if-doesnt-exist-and-if-it-does-append-a-new-line

Again, not 100% sure how Rimworld will react trying to save to an external file but it doesn't hurt to try.