<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://war.app/index.php?action=history&amp;feed=atom&amp;title=Mod_API_Reference%3AClient_DescribeOrder</id>
	<title>Mod API Reference:Client DescribeOrder - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://war.app/index.php?action=history&amp;feed=atom&amp;title=Mod_API_Reference%3AClient_DescribeOrder"/>
	<link rel="alternate" type="text/html" href="https://war.app/wiki/index.php?title=Mod_API_Reference:Client_DescribeOrder&amp;action=history"/>
	<updated>2026-11-04T15:09:59Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://war.app/wiki/index.php?title=Mod_API_Reference:Client_DescribeOrder&amp;diff=8044&amp;oldid=prev</id>
		<title>Fizzer: Created page with &quot;Put the function in a file named &lt;code&gt;Client_DescribeOrder.lua&lt;/code&gt;:  &lt;pre&gt; function Client_DescribeOrder(game, order, description)     -- describe the order by calling functions on description end &lt;/pre&gt;  The client calls this hook when it shows one of your mod&#039;s orders in the orders list or in the turn history. Without it, the order&#039;s own text is shown, such as the &lt;code&gt;Message&lt;/code&gt; the order was created with.  Server hooks creat...&quot;</title>
		<link rel="alternate" type="text/html" href="https://war.app/wiki/index.php?title=Mod_API_Reference:Client_DescribeOrder&amp;diff=8044&amp;oldid=prev"/>
		<updated>2026-11-02T10:51:23Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Put the function in a file named &amp;lt;code&amp;gt;Client_DescribeOrder.lua&amp;lt;/code&amp;gt;:  &amp;lt;pre&amp;gt; function Client_DescribeOrder(game, order, description)     -- describe the order by calling functions on description end &amp;lt;/pre&amp;gt;  The client calls this hook when it shows one of &lt;a href=&quot;#Which_mod_describes_an_order&quot;&gt;your mod&amp;#039;s orders&lt;/a&gt; in the orders list or in the turn history. Without it, the order&amp;#039;s own text is shown, such as the &amp;lt;code&amp;gt;Message&amp;lt;/code&amp;gt; the order was created with.  Server hooks creat...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Put the function in a file named &amp;lt;code&amp;gt;Client_DescribeOrder.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function Client_DescribeOrder(game, order, description)&lt;br /&gt;
    -- describe the order by calling functions on description&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The client calls this hook when it shows one of [[#Which mod describes an order|your mod&amp;#039;s orders]] in the orders list or in the turn history. Without it, the order&amp;#039;s own text is shown, such as the &amp;lt;code&amp;gt;Message&amp;lt;/code&amp;gt; the order was created with.&lt;br /&gt;
&lt;br /&gt;
Server hooks create events and custom orders with a fixed message. This hook lets your mod word that message for the player who is looking at it. For example, it can say &amp;quot;you&amp;quot; instead of a player&amp;#039;s name, or show details that the message has no room for.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Argument !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;game&amp;lt;/code&amp;gt; || [[Mod API Reference:ClientGame|ClientGame]] || Information about the game.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;order&amp;lt;/code&amp;gt; || [[Mod API Reference:GameOrder|GameOrder]] || The order being shown. Read-only.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;description&amp;lt;/code&amp;gt; || table || The object you describe the order with. See below.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Both functions on &amp;lt;code&amp;gt;description&amp;lt;/code&amp;gt; return &amp;lt;code&amp;gt;description&amp;lt;/code&amp;gt;, so calls can be chained. Call them with a dot, not a colon.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;description.SetText(text)&amp;#039;&amp;#039;&amp;#039;: replaces the order&amp;#039;s text. Calling it again replaces what you set before. If you never call it, the order&amp;#039;s own text is shown.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;description.AddTooltipRow(text)&amp;#039;&amp;#039;&amp;#039;: adds a line to the order&amp;#039;s tooltip. Your lines are shown above the tooltip the order would normally have. Up to 10 lines are shown; any more are ignored and a warning is written to the mod log.&lt;br /&gt;
&lt;br /&gt;
Text is plain text and is cut to 200 characters.&lt;br /&gt;
&lt;br /&gt;
The hook runs every time the order is displayed, so keep it quick. It should always give the same result for the same order. If the hook errors, the error is shown once. After that, the hook isn&amp;#039;t called again until the game next refreshes, and the orders show their own text.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function Client_DescribeOrder(game, order, description)&lt;br /&gt;
    if (order.proxyType == &amp;#039;GameOrderCustom&amp;#039;) then&lt;br /&gt;
        description.SetText(&amp;#039;Fortified &amp;#039; .. game.Map.Territories[tonumber(order.Payload)].Name)&lt;br /&gt;
            .AddTooltipRow(&amp;#039;Fortified territories get +3 defense until the end of the next turn&amp;#039;);&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fizzer</name></author>
	</entry>
</feed>