Community Forum

How to read the current game xml file

Forum Overview >> Farming Simulator 2013

CategoryFarming Simulator 2013
Created02.02.2014 14:31

Gary Parkin (Gary_P) 02.02.2014 14:34
I would like to read the economy.xml file and get the greatDemands into a lua script.

I want to display some values in the pda. I have the pda part working but I need a reference to the current game.
Also is there a way to write scripts without having to restart the game on every edit?

Thank you

Samuel H. (modelleicher) 04.02.2014 09:53
XML Files are only updated (saved) when the game saves.. So i don't know if the XML File is really what you are after.. But in case, just loadXMLFile and one of the getXML... functions work fine for reading any kind of Data out of any kind of XML File..

Manuel Leithner - GIANTS Software 06.02.2014 12:20

currently there's no possibility to reload the scripts while playing. So a restart is necessary.

The great demands can directly access via lua:
g_currentMission.economyManager.greatDemands (table)

Note: Log in to post. Create a new account here.