<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.wesnoth.org/index.php?action=history&amp;feed=atom&amp;title=User%3ACeltic_Minstrel%2FUnitBehaviourProposal</id>
	<title>User:Celtic Minstrel/UnitBehaviourProposal - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.wesnoth.org/index.php?action=history&amp;feed=atom&amp;title=User%3ACeltic_Minstrel%2FUnitBehaviourProposal"/>
	<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Celtic_Minstrel/UnitBehaviourProposal&amp;action=history"/>
	<updated>2026-04-12T12:56:18Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.16</generator>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=User:Celtic_Minstrel/UnitBehaviourProposal&amp;diff=57653&amp;oldid=prev</id>
		<title>Celtic Minstrel: New proposal for unit behaviour</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=User:Celtic_Minstrel/UnitBehaviourProposal&amp;diff=57653&amp;oldid=prev"/>
		<updated>2016-03-29T13:48:42Z</updated>

		<summary type="html">&lt;p&gt;New proposal for unit behaviour&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This is an idea for generalizing the &amp;quot;unit formulas&amp;quot; concept.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang='wml'&amp;gt;&lt;br /&gt;
[unit]&lt;br /&gt;
    [ai]&lt;br /&gt;
        [behavior]&lt;br /&gt;
            id=some_id&lt;br /&gt;
            engine=fai&lt;br /&gt;
            # Same as the old syntax for unit formulas&lt;br /&gt;
            formula=&amp;quot;move(me.loc, dest_loc)&amp;quot; # Or loop_formula&lt;br /&gt;
            priority=3&lt;br /&gt;
            [vars]&lt;br /&gt;
                dest_loc=&amp;quot;loc(12,20)&amp;quot;&lt;br /&gt;
            [/vars]&lt;br /&gt;
        [/behavior]&lt;br /&gt;
        # ai_special could translate to something like this:&lt;br /&gt;
        [behavior]&lt;br /&gt;
            id=some_id2&lt;br /&gt;
            engine=cpp&lt;br /&gt;
            mode=guardian&lt;br /&gt;
        [/behavior]&lt;br /&gt;
        # And you could do similar things in Lua, too:&lt;br /&gt;
        [behavior]&lt;br /&gt;
            id=some_id3&lt;br /&gt;
            engine=lua&lt;br /&gt;
            priority=5 # Or, evaluation=&amp;lt;&amp;lt; ... &amp;gt;&amp;gt; for variable priorities&lt;br /&gt;
            code=&amp;lt;&amp;lt;&lt;br /&gt;
                local me, cfg, data = ...&lt;br /&gt;
                ai.move(me.loc, cfg.dest_x, dest_cfg.y)&lt;br /&gt;
            &amp;gt;&amp;gt;&lt;br /&gt;
            [args]&lt;br /&gt;
                dest_x,dest_y=12,20&lt;br /&gt;
            [/args]&lt;br /&gt;
        [/behavior]&lt;br /&gt;
    [/ai]&lt;br /&gt;
[/unit]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Celtic Minstrel</name></author>
		
	</entry>
</feed>