Atlas Type Reference - Operations III

From WorldForgeWiki
Jump to: navigation, search

perception

Character perceives something.

Base operator for all kind of perceptions

  • parent: info
  • specification: atlas_game
  • specification file:
<list name="attribute_order">
  <string>id</string>
  <string>parents</string>
  <string>children</string>
  <string>specification</string>
  <string>description</string>
  <string>long_description</string>
  <string>args_description</string>
  <string>example</string>
</list>
<string name="filename">operation.def</string>
<int name="lineno">134</int>
  • examples:
<string>Usually derived operations are used, general notes
                   on perceptions and actions:
                   <ul>
                   <li><b>action.from:</b> who made character to do something
                   (talk for example); usually character itself, but
                   not always, examples: 
                   <ul>
                     <li>atlas_irc_gateway does puppet characters it
                         has created for each nick from irc side
                     <li>admin teaches NPCs by making them to talk
                         itself
                     <li>possession by spell
                   </ul>
                   
                   <li><b>action.to:</b> same as character always

                   <li><b>perception.from:</b> who produced this perception:
                   always character itself (for example sound of talk)
                   (well... unless you are made to hallusinate ;-)

                   <li><b>perception.to:</b> you (unless you are
                   server, then it's target to receive perception)
                   </ul>

                   <b>conclusion:</b> should use perception.from instead of
                   inner action.from to decide who produced result
                   <br>
                   See <a href="#sound">sound</a> and 
                       <a href="#sight">sight</a>
                   for actual examples
                </string>
<map>
  <string name="objtype">op</string>
  <list name="parents">
    <string>perception</string>
  </list>
  <list name="args">
    <map>
      <string name="id">tree_8374</string>
      <map name="specification_file">
        <list name="attribute_order">
          <string>id</string>
        </list>
        <string name="filename">operation.def</string>
        <int name="lineno">177</int>
      </map>
    </map>
  </list>
  <map name="specification_file">
    <list name="attribute_order">
      <string>objtype</string>
      <string>parents</string>
      <string>args</string>
    </list>
    <string name="filename">operation.def</string>
    <int name="lineno">173</int>
  </map>
</map>

feel

Character feels something (with fingers usually)

  • parent: perception
  • specification file:
<list name="attribute_order">
  <string>id</string>
  <string>parents</string>
  <string>children</string>
  <string>description</string>
  <string>args_description</string>
  <string>example</string>
</list>
<string name="filename">operation.def</string>
<int name="lineno">653</int>
  • examples:
<map>
  <string name="objtype">op</string>
  <list name="parents">
    <string>feel</string>
  </list>
  <list name="args">
    <map>
      <string name="id">cloth_34</string>
      <string name="e_surface_type">rough</string>
      <map name="specification_file">
        <list name="attribute_order">
          <string>id</string>
          <string>e_surface_type</string>
        </list>
        <string name="filename">operation.def</string>
        <int name="lineno">663</int>
      </map>
    </map>
  </list>
  <map name="specification_file">
    <list name="attribute_order">
      <string>objtype</string>
      <string>parents</string>
      <string>args</string>
    </list>
    <string name="filename">operation.def</string>
    <int name="lineno">659</int>
  </map>
</map>

sight

Character sees something

  • parent: perception
  • specification file:
<list name="attribute_order">
  <string>id</string>
  <string>parents</string>
  <string>children</string>
  <string>description</string>
  <string>args_description</string>
  <string>example</string>
</list>
<string name="filename">operation.def</string>
<int name="lineno">410</int>
  • examples:
<string>See <a href="#perception">perception</a> operation too<br>
                Common example:</string>
<map>
  <string name="objtype">op</string>
  <list name="parents">
    <string>sight</string>
  </list>
  <list name="args">
    <map>
      <string name="id">grass1</string>
      <float name="stamp">989.24</float>
      <map name="specification_file">
        <list name="attribute_order">
          <string>id</string>
          <string>stamp</string>
        </list>
        <string name="filename">operation.def</string>
        <int name="lineno">422</int>
      </map>
    </map>
  </list>
  <map name="specification_file">
    <list name="attribute_order">
      <string>objtype</string>
      <string>parents</string>
      <string>args</string>
    </list>
    <string name="filename">operation.def</string>
    <int name="lineno">418</int>
  </map>
</map>
<string>Reply for looking at 'grass1':</string>
<map>
  <string name="objtype">op</string>
  <list name="parents">
    <string>sight</string>
  </list>
  <list name="args">
    <map>
      <string name="id">grass1</string>
      <list name="parents">
        <string>terrain</string>
      </list>
      <list name="contains">
        <string>path1</string>
        <string>tree1</string>
      </list>
      <string name="description">Grass plains</string>
      <list name="e_polygon">
        <list>
          <float>0.0</float>
          <float>0.0</float>
        </list>
        <list>
          <float>10.0</float>
          <float>0.0</float>
        </list>
        <list>
          <float>10.0</float>
          <float>0.0</float>
        </list>
        <list>
          <float>0.0</float>
          <float>10.0</float>
        </list>
        <list>
          <float>0.0</float>
          <float>0.0</float>
        </list>
      </list>
      <map name="specification_file">
        <list name="attribute_order">
          <string>id</string>
          <string>parents</string>
          <string>contains</string>
          <string>description</string>
          <string>e_polygon</string>
        </list>
        <string name="filename">operation.def</string>
        <int name="lineno">430</int>
      </map>
    </map>
  </list>
  <map name="specification_file">
    <list name="attribute_order">
      <string>objtype</string>
      <string>parents</string>
      <string>args</string>
    </list>
    <string name="filename">operation.def</string>
    <int name="lineno">426</int>
  </map>
</map>
<string>Event example:</string>
<map>
  <string name="objtype">op</string>
  <list name="parents">
    <string>sight</string>
  </list>
  <list name="args">
    <map>
      <string name="objtype">op</string>
      <list name="parents">
        <string>move</string>
      </list>
      <list name="args">
        <map>
          <string name="id">orc_23498</string>
          <string name="loc">grass1</string>
          <list name="pos">
            <float>0.5</float>
            <float>3.0</float>
            <float>0.0</float>
          </list>
          <map name="specification_file">
            <list name="attribute_order">
              <string>id</string>
              <string>loc</string>
              <string>pos</string>
            </list>
            <string name="filename">operation.def</string>
            <int name="lineno">450</int>
          </map>
        </map>
      </list>
      <map name="specification_file">
        <list name="attribute_order">
          <string>objtype</string>
          <string>parents</string>
          <string>args</string>
        </list>
        <string name="filename">operation.def</string>
        <int name="lineno">446</int>
      </map>
    </map>
  </list>
  <map name="specification_file">
    <list name="attribute_order">
      <string>objtype</string>
      <string>parents</string>
      <string>args</string>
    </list>
    <string name="filename">operation.def</string>
    <int name="lineno">442</int>
  </map>
</map>
appearance

Character sees something appearing: it literally appears or has it come in visible range

  • parent: sight
  • specification file:
<list name="attribute_order">
  <string>id</string>
  <string>parents</string>
  <string>children</string>
  <string>description</string>
  <string>args_description</string>
  <string>example</string>
</list>
<string name="filename">operation.def</string>
<int name="lineno">812</int>
  • examples:
<map>
  <string name="objtype">op</string>
  <list name="parents">
    <string>appearance</string>
  </list>
  <list name="args">
    <map>
      <string name="id">grass1</string>
      <float name="stamp">989.24</float>
      <map name="specification_file">
        <list name="attribute_order">
          <string>id</string>
          <string>stamp</string>
        </list>
        <string name="filename">operation.def</string>
        <int name="lineno">822</int>
      </map>
    </map>
  </list>
  <map name="specification_file">
    <list name="attribute_order">
      <string>objtype</string>
      <string>parents</string>
      <string>args</string>
    </list>
    <string name="filename">operation.def</string>
    <int name="lineno">818</int>
  </map>
</map>
disappearance

Character sees something disappearing: it literally disappears or has it gone too far to be visible

  • parent: sight
  • specification file:
<list name="attribute_order">
  <string>id</string>
  <string>parents</string>
  <string>children</string>
  <string>description</string>
  <string>args_description</string>
  <string>example</string>
</list>
<string name="filename">operation.def</string>
<int name="lineno">826</int>
  • examples:
<map>
  <string name="objtype">op</string>
  <list name="parents">
    <string>disappearance</string>
  </list>
  <list name="args">
    <map>
      <string name="id">grass1</string>
      <float name="stamp">989.24</float>
      <map name="specification_file">
        <list name="attribute_order">
          <string>id</string>
          <string>stamp</string>
        </list>
        <string name="filename">operation.def</string>
        <int name="lineno">836</int>
      </map>
    </map>
  </list>
  <map name="specification_file">
    <list name="attribute_order">
      <string>objtype</string>
      <string>parents</string>
      <string>args</string>
    </list>
    <string name="filename">operation.def</string>
    <int name="lineno">832</int>
  </map>
</map>

smell

Character smells something

  • parent: perception
  • specification file:
<list name="attribute_order">
  <string>id</string>
  <string>parents</string>
  <string>children</string>
  <string>description</string>
  <string>args_description</string>
  <string>example</string>
</list>
<string name="filename">operation.def</string>
<int name="lineno">637</int>
  • examples:
<string>Example (every operation might have from, 
to and time tags, not only this operation):</string>
<map>
  <string name="objtype">op</string>
  <list name="parents">
    <string>smell</string>
  </list>
  <string name="from">flower_34</string>
  <list name="args">
    <map>
      <string name="e_smell">sweet</string>
      <map name="specification_file">
        <list name="attribute_order">
          <string>e_smell</string>
        </list>
        <string name="filename">operation.def</string>
        <int name="lineno">650</int>
      </map>
    </map>
  </list>
  <map name="specification_file">
    <list name="attribute_order">
      <string>objtype</string>
      <string>parents</string>
      <string>from</string>
      <string>args</string>
    </list>
    <string name="filename">operation.def</string>
    <int name="lineno">645</int>
  </map>
</map>

sound

Character hears something

  • parent: perception
  • specification file:
<list name="attribute_order">
  <string>id</string>
  <string>parents</string>
  <string>children</string>
  <string>description</string>
  <string>args_description</string>
  <string>example</string>
</list>
<string name="filename">operation.def</string>
<int name="lineno">455</int>
  • examples:
<string>See <a href="#perception">perception</a> operation too<br>
                   Example (every operation might have from, 
to and time tags, not only this operation):</string>
<map>
  <string name="objtype">op</string>
  <list name="parents">
    <string>sound</string>
  </list>
  <string name="from">sentry_34</string>
  <list name="args">
    <map>
      <string name="objtype">op</string>
      <list name="parents">
        <string>talk</string>
      </list>
      <list name="args">
        <map>
          <string name="say">What has happened there?</string>
          <map name="specification_file">
            <list name="attribute_order">
              <string>say</string>
            </list>
            <string name="filename">operation.def</string>
            <int name="lineno">473</int>
          </map>
        </map>
      </list>
      <map name="specification_file">
        <list name="attribute_order">
          <string>objtype</string>
          <string>parents</string>
          <string>args</string>
        </list>
        <string name="filename">operation.def</string>
        <int name="lineno">469</int>
      </map>
    </map>
  </list>
  <map name="specification_file">
    <list name="attribute_order">
      <string>objtype</string>
      <string>parents</string>
      <string>from</string>
      <string>args</string>
    </list>
    <string name="filename">operation.def</string>
    <int name="lineno">464</int>
  </map>
</map>