<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE doc
  SYSTEM '../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../clonk.xsl"?>
<doc>
  <title>GetDefCoreVal, GetObjectVal, GetScenarioVal</title>
  <h>GetDefCoreVal, GetObjectVal, GetScenarioVal</h>
  <part>
    <text>
      <ul>
        <li>GetDefCoreVal(string entry, string section, id definition);</li>
        <li>GetObjectVal(string entry, string section, object obj);</li>
        <li>GetObjectInfoCoreVal(string entry, string section, object obj);</li>
        <li>GetScenarioVal(string entry, string section);</li>
        <li>GetPlayerVal(string entry, string section, int player);</li>
        <li>GetPlayerInfoCoreVal(string entry, string section, int player);</li>
      </ul>
    </text>
    <text>This family of functions provide direct access to all properties of the respective object as stored in the definition files.</text>
    <text>Each function corresponds to the following files:</text>
    <text>
      <table>
        <rowh>
          <col>Function</col>
          <col>File</col>
        </rowh>
        <row>
          <col>GetDefCoreVal</col>
          <col>DefCore.txt</col>
        </row>
        <row>
          <col>GetObjectVal</col>
          <col>Objects.txt</col>
        </row>
        <row>
          <col>GetObjectInfoCoreVal</col>
          <col>*.oci (in player files)</col>
        </row>
        <row>
          <col>GetScenarioVal</col>
          <col>Scenario.txt</col>
        </row>
        <row>
          <col>GetPlayerVal</col>
          <col>scenario.txt</col>
        </row>
        <row>
          <col>GetPlayerInfoCoreVal</col>
          <col>Player.txt</col>
        </row>
      </table>
    </text>
    <text>The property to be accessed is referenced through its name and section, if applicable (if no value is given for the section, all sections will be searched for the property). If a matching property was not found or does not correspond to a valid C4Script data type (e.g. ID lists) the result is <code>nil</code>.</text>
    <text>If <code>nil</code> is given for obj/definition in a call to GetObjectVal, the object or the definition of the object from which the call was made is used.</text>
    <text>There is a number of additional wrapper functions located in System.ocg/GetXVal.c. These functions allow for easy access to various common Get*Val functions (e.g. <code>GetObjWidth()</code> for <code><i>GetObjectVal</i>("Width", 0)</code>).</text>
  </part>
  <author>Peter</author><date>2001-11</date>
</doc>
