Community Forum

How to get field attributes

Forum Overview >> Scripting

CategoryScripting
Created17.07.2023 19:36


Riani Lothe (Rianilothe) 17.07.2023 19:36
Hi all. I've been reviewing the docs, source code and existing mods and learned a lot but can't find this information. How do we get the field attributes as shown in the crop type, growth and soil composition field maps (needs plowing/lime/rolling, fertilizer, weeds, etc)? I found a way to set those values using g_fieldManager "modifier.exececuteSet" (from the EasyDevControls mod) but there is no correlating "get" call that I could find.

Any help is appreciated, Thanks!

Riani Lothe (Rianilothe) 23.07.2023 18:53
I found the FieldUtil global that has all the Soil Composition attributes per field except for stones (see below). Still need info on stones and the stubble tillage, cultivated, plowed and seedbed attributes from the map "Growth" filters. The other items from that filter (Growing, Ready to Harvest, Harvested, Remove Foliage and Withered) are derived from the fruitType growth stages.

• WEED = FieldUtil.getMaxWeedState(field)
○ 0/nil = none
○ 1 small, pre-emergent
○ 2 med , pre-emergent
○ 3 small
○ 4 med
○ 5 large
○ 6 partial
○ 7 withered, small
○ 8 withered, med
○ 0 withered, large
• FERT = FieldUtil.getSprayFactor(field)
○ 0, .5, 1 = 0%, 50%, 100%
• PLOWING = FieldUtil.getPlowFactor(field)
○ 0 = needs plowing
• LIME = FieldUtil.getLimeFactor(field)
○ 0 = needs lime
• ROLLING = FieldUtil.getRollerFactor(field)
○ 0 = needs rolling
• MULCHED = FieldUtil.getStubbleFactor(field)
○ 1 = 1 mulched
• STONES
○ g_currentMission.stoneSystem?

Thanks,
Rianilothe

edits: clarification


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