Returns the property value of an object definition by its name in the
DefCore.txt.
If the requested entry is an id list (e.g. "Components" in DefCore.txt) an even iEntryNr will return the listed id and an uneven iEntryNr will return the matching count (see example).
var wdt = GetDefCoreVal("Width", "DefCore", GetID());
Determines the width of an object. The last two parameters might be omitted in this case.
Log(" Eine Werkstatt benötigt folgendes Material:");
for(var i = 0;; i++)
{
var id = GetDefCoreVal("Components", "DefCore", WRKS, i*2);
if(!id) break;
var cnt = GetDefCoreVal("Components", "DefCore", WRKS, i*2+1);
Log("%d x %s", cnt, GetName(0, id));
}
Determines the necessary components for construction of a workshop.
The loop will run until GetDefCoreVal returns id 0 which means the end of the list