Community Forum

Animal feed level

Forum Overview >> Scripting

CategoryScripting
Created17.03.2014 16:56


Dirk Peeters (Unknown) 17.03.2014 17:01
hi,

dus anybody know where the data is stored from the animals feeding storages, like grass, wheat_windrow, forage?
i wrote a litle function to save the asked table to a txt file so its handy to follow the flow.

i modified the saveGame/carreer.xml and vehicle.xml so i have some amount set on the storages.(pda info shown correct)
this info from the "vehicle.xml" i'm looking for true lua
[code]<onCreateLoadedObject id="7" numAnimals0="20" numAnimals1="0" liquidManureFillLevel="1250" manureHeapFillLevel="1230">
<tipTriggerFillLevel fillType="forage" tipTriggerIndex="1" fillLevel="1000" />
<tipTriggerFillLevel fillType="forage" tipTriggerIndex="2" fillLevel="1000" />
<tipTriggerFillLevel fillType="wheat_windrow" tipTriggerIndex="3" fillLevel="1000" />
<tipTriggerFillLevel fillType="grass_windrow" tipTriggerIndex="1" fillLevel="1100" />
<tipTriggerFillLevel fillType="grass_windrow" tipTriggerIndex="2" fillLevel="1100" />
<tipTriggerFillLevel fillType="silage" tipTriggerIndex="1" fillLevel="1110" />
<tipTriggerFillLevel fillType="silage" tipTriggerIndex="2" fillLevel="1110" />
<fillLevelMilk fillLevel="5000" />
</onCreateLoadedObject>[/code]

but when i go true the datastructure/tables all fillLevels stay 0.00000
i try going true "g_currentMission.husbandries"
[code]local milkLevel = g_currentMission.husbandries.cow.fillLevelMilk;
print ("milkLevel = " ..milkLevel);[/code]
normaly if i check the staticpage on the pda it had to be 5000L but it stay's 0 in the table.

output table "g_currentMission.husbandries.cow" asked
[code]-- File generated by Table info v0.5.
-- copyright 2014 by jengske_BE
-- This is a output of the table you asked.
--
strawPlaneMinY = 154.7.

useCowFeeding = true.

productivity = 0.

updateMinutes = 0.

tipTriggers = table: 13B63820.

numObjectsInPalletSpawnerTrigger = 0.

produceMilk = true.

updateMinutesInterval = 20.

nextDirtyFlag = 2.

fillLevelMilk = 0.

numAnimals = table: 13B63758.

isServer = true.

strawPlaneMaxFillLevel = 18000.

strawPlaneId = 21203.

manureHeap = table: 13B63A00.

automaticallySellMilk = true.

husbandryId = 30664.

totalNumAnimals = 0.

liquidManureTrigger = table: 13B63D48.

tipTriggersFillLevels = table: 13B63E38.

isRegistered = true.

isClient = true.

husbandryDirtyFlag = 1.

numVisibleAnimals = table: 13B63780.

strawPlaneMaxY = 155.

isManuallyReplicated = true.

baseDirectory = .

numSubTypes = 2.

id = 32.

virtualToVisibleAnimals = table: 13B63640.

typeName = cow.

dirtyMask = 0[/code]

thx
jeng

John Doe (Unknown) 04.12.2014 19:33
Have a look to the Anials HUD mod, most of the information you request are in


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