Sprache Deutsch Language English

Menu:

Neuigkeiten:

12. April. 2012:
Erste Screenshots vom kommenden LS2011 Addon 2 sind jetzt online. Mehr…

7. Nov. 2011:
Neue Screenshots vom kommenden Skiregion-Simulator 2012 DLC1 von GIANTS Software sind jetzt online hier.

13. October 2011:
Die Vehikel, Anhänger und Geräteliste vom Skiregion-Simulator 2012 sind jetzt hier online.

26. Sept. 2011:
Neue Screenshots vom kommenden Skiregion-Simulator 2012 von GIANTS Software sind jetzt online hier.

15. Sept 2011:
www.sr-mods.de ist nun online

25. Februar 2011:
Demolition Company Gold kann jetzt bei Amazon vorbestellt werden.

03. September 2010:
Demolition Company nun auch für Mac verfügbar

28. August 2010:
Die englische Version von Demolition Company kann nun auch bei Steam gekauft werden.

25. Juli 2010:
Endlich ist es möglich neue zerstörbare Gebäude zu erstellen, mit unserem neuen Tool. Das Tool gibt es im Zerstörbare Objekte Erstellen Tutorial.

29. Juni 2010:
Blackburner's Mod Missionen absofort zum Download verfügbar.

27. Juni 2010:
Neuer Artikel über die Erstellung von Map Mods für Demolition Company.

6. Juni 2010:
Neue Demolition Company mods sind nun online.

25. Mai 2010:
Der neue Download-Bereich ist nun online.

24. Mai 2010:
Neuer Artikel über die Demolition Company Konsole Befehle hier.

21. Mai 2010:
Die offizielle Demolition Company Demo ist nun online. Herunterladen

28. April 2010:
Der offizielle Trailer ist nun online. Ansehen

25. April 2010:
www.dc-mods.de ist nun online



Letzte Änderung:
28. März 2014


Script Dokumentation LS 2013 - FruitUtil (Patch 1.4)

Script Dokumentation Übersicht
  1. Funktionen
    1. FruitUtil.registerFruitType(..)
    2. FruitUtil.registerFruitTypeWindrow(..)
    3. FruitUtil.registerFruitTypePreparing(..)

FruitUtil.registerFruitType

Description
Adds a new fruit type to the game. You first have to add new foliage layers to the map i3d which represent your foliage. There is a naming convention for the several layers. It automatically creates fill type as well. The created fill type can be access with FruitUtil.FRUITTYPE_<NameUpperCase>.
If the name is "wheat", the fruit type will be FruitUtil.FILLTYPE_WHEAT and the automatically created fill type will be Fillable.FILLTYPE_WHEAT.
You can convert between the fill type and the fruit type with:
local fillType = FruitUtil.fruitTypeToFillType[fruitType]
local fruitType = FruitUtil.fillTypeToFruitType[fillType]

Definition
function FruitUtil.registerFruitType(string name, string nameI18N, bool needsSeeding, bool allowsSeeding, bool useSeedingWidth, float directionSnapAngle, int minHarvestingGrowthState, int maxHarvestingGrowthState, int cutState, bool allowsPartialGrowthState, float pricePerLiter, float literPerSqm, float seedUsagePerSqm, bool partOfEconomy, string hudOverlayFilename, float4 fruitMapColor)

Arguments
stringnameThe name of the fruit type. This also definies the name of the foliage layer in the map i3d
stringnameI18NLocalized name of the fruit type used to display in the GUI
boolneedsSeedingDo we need to seed after we have cut the fruit?
boolallowsSeedingIs it possible to seed this fruit type?
booluseSeedingWidthIf true, the seeding is using the wide mode, as used for the sugar beet
floatdirectionSnapAngleIf not 0, this defines the angle snap size. E.g. for 90 degrees differences, use 0.5*math.pi
intminHarvestingGrowthStateThe minimum growth state the fruit needs to have to be cut.
intmaxHarvestingGrowthStateThe maximum growth state the fruit needs to have to be cut.
intcutStateThe state that represents the fruit after it is cut.
boolallowsPartialGrowthStateIf true, the value of the fruit is scaled by fruit type. E.g. used for grass.
floatpricePerLiterDefault price per liter of fruit when sold.
floatliterPerQmNumber of liters you get per qm.
floatseedUsagePerQmNumber of liters of seed per qm you need when seeding.
boolpartOfEconomyIf true, the price of the fruit will change based on the amount of fruit sold in the past.
stringhudOverlayFilenameFilename of the overlay texture, displayed on the hud (trailer fill type, seed selection). Note: This must be absolute, or relative to the game.exe. Use Utils.getFilename if you want to use this for a file located in your mod.
float4fruitMapColorAn array with 4 float to represent the r,g,b,a color of the fruit displayed in the overview map.

Examples
FruitUtil.registerFruitType("wheat", g_i18n:getText("wheat"),
  true, true, false, 0, 4, 6, 8, false, 0.29, 1.2, 0.1, true,
  "hud_fruit_wheat.png", {1, 1, 0, 1});

FruitUtil.registerFruitType("potato", g_i18n:getText("potato"),
  true, true, true, 0.5*math.pi, 9, 9, 8, false, 0.2, 4.0, 0.5, true,
  "hud_fruit_potato.png", {0.5, 0.25, 0.23, 1});


FruitUtil.registerFruitTypeWindrow

Description
Adds a windrow layer to the given fruit type.

Definition
function FruitUtil.registerFruitTypeWindrow(int fruitType, string windrowName, string windrowNameI18N, float windrowPricePerLiter, string windrowLiterPerSqm, bool windrowPartOfEconomy, string windrowHudOverlayFilename)

Arguments
intfruitTypeThe fruit type to change.
stringwindrowNameName of the windrow type. This also defines the name of the foliage layer in the map i3d
stringwindrowNameI18NLocalized name of the windrow type used to display in the GUI
floatwindrowPricePerLiterDefault price per liter of windrow type when sold.
floatwindrowLiterPerSqmNumber of liters you get per qm.
boolwindrowPartOfEconomyIf true, the price of the windrow type will change based on the amount sold in the past.
stringwindrowHudOverlayFilenameFilename of the overlay texture, displayed on the hud (trailer fill type, seed selection). Note: This must be absolute, or relative to the game.exe. Use Utils.getFilename if you want to use this for a file located in your mod.

Example
FruitUtil.registerFruitTypeWindrow(FruitUtil.FRUITTYPE_WHEAT,
  "wheat_windrow", g_i18n:getText("straw"), 0.04, 3, false,
  "hud_fill_straw.png");


FruitUtil.registerFruitTypePreparing

Description
Adds a layer that is displayed after preparing a field for cutting (e.g. topping potatoes).

Definition
function FruitUtil.registerFruitTypePreparing(int fruitType, string preparingOutputName, int minPreparingGrowthState, int maxPreparingGrowthState, int preparedGrowthState)

Arguments
intfruitTypeThe fruit type to change.
stringpreparingOutputNameName of the preparing output type. This also defines the name of the foliage layer in the map i3d
intminPreparingGrowthStateThe minimum growth state the fruit needs to have to be prepared.
intmaxPreparingGrowthStateThe maximum growth state the fruit needs to have to be prepared.
intpreparedGrowthStateThe state that represents the fruit after it is prepared.

Example
FruitUtil.registerFruitTypePreparing(FruitUtil.FRUITTYPE_POTATO,
  "potato_haulm", 5, 5, 9);




Script Dokumentation Übersicht