<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://war.app/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Kaninchen</id>
	<title>War.app Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://war.app/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Kaninchen"/>
	<link rel="alternate" type="text/html" href="https://war.app/wiki/Special:Contributions/Kaninchen"/>
	<updated>2026-04-18T19:56:57Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://war.app/wiki/index.php?title=Feature_Request_Forum&amp;diff=6738</id>
		<title>Feature Request Forum</title>
		<link rel="alternate" type="text/html" href="https://war.app/wiki/index.php?title=Feature_Request_Forum&amp;diff=6738"/>
		<updated>2024-08-21T19:13:01Z</updated>

		<summary type="html">&lt;p&gt;Kaninchen: /* Feature Requests and Mods */ Invite Revision: Changed it to be the same one as listed in https://www.warzone.com/wiki/Mod_Developers_Guide&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
The &#039;&#039;&#039;Feature Request Forum&#039;&#039;&#039; is your place to vote on what features you think Warzone should implement.  &lt;br /&gt;
&lt;br /&gt;
==How it works ==&lt;br /&gt;
&lt;br /&gt;
Any player can create a thread on this forum, which is then called a &#039;&#039;feature request&#039;&#039; or an &#039;&#039;idea&#039;&#039;.  Any player with votes can then vote on this idea, and the ideas with the most votes are displayed at the top of the forum by default.  You can also sort ideas by how recently they were added, or the most recent discussion reply.&lt;br /&gt;
&lt;br /&gt;
Like any other Warzone forum, players can also give thumbs-up and thumbs-down to feature requests.  However, these only affect its visibility and aren&#039;t official votes for it to be implemented.&lt;br /&gt;
&lt;br /&gt;
Players have votes based on their level, with votes unlocking at level 5, 10, 20, 30, 40, 50, 60, 62, 64, 66, and a bonus vote for members.  You can place up to three votes for any one idea.  Votes you cast are tied to your Warzone account and are public, so you can always see who voted on each individual feature request.&lt;br /&gt;
&lt;br /&gt;
At any time, you can always change your mind and take votes out of one idea and put them into another.&lt;br /&gt;
&lt;br /&gt;
If a feature you voted for is implemented or declined by Warzone, then you&#039;ll get your votes back and are free to put them into another idea.&lt;br /&gt;
&lt;br /&gt;
Note that any replies to a feature request are not considered part of the core idea.  When you vote, you&#039;re only voting for the features outlined in the top post of the forum.  Any replies are just considered discussion surrounding the idea.  If you need to augment or later change an idea after it&#039;s posted, you should create a new thread and encourage players to move their votes into the new one if they like that one more.&lt;br /&gt;
&lt;br /&gt;
Any Warzone account that is inactive for more than 30 days will automatically have its votes removed from all ideas.  If they sign in again, they&#039;re free to put their votes back.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Criteria for a new feature==&lt;br /&gt;
&lt;br /&gt;
While it would be great to implement every feature suggested, this simply isn&#039;t possible. There&#039;s no magic number of votes that a feature needs to get accepted; the point of voting is to see which features are most in-demand.   This is also important to avoid design-by-committee syndrome, since sometimes trying to please everyone ends up pleasing no one.&lt;br /&gt;
&lt;br /&gt;
Features are typically judged based on these criteria:&lt;br /&gt;
&lt;br /&gt;
* How good of a fit the feature is for Warzone&#039;s theme and direction.&lt;br /&gt;
* How much effort the feature takes to implement and maintain.&lt;br /&gt;
* How many votes the feature gets (i.e. how in-demand it is).&lt;br /&gt;
* Additionally, sometimes a feature can get implemented just because it happens to fall into an area of code that is being worked on for something else.&lt;br /&gt;
&lt;br /&gt;
== Multi-Ideas ==&lt;br /&gt;
&lt;br /&gt;
A single idea on the Feature Request forum should generally contain a single idea/feature/improvement.    Sometimes players create an idea that mentions multiple features.  Doing this is not disallowed, however, it is risky, and may not get you what you want.&lt;br /&gt;
&lt;br /&gt;
The advantage of creating a single idea with multiple features is that it appears more attractive to other voters.  If any one of your features appeals to a player, they&#039;re likely to vote on it, and therefore you&#039;re likely to get more votes.&lt;br /&gt;
&lt;br /&gt;
The problem comes when one or some of the features is implemented, but not all.  After this is done, the Warzone developers will simply mark it as Completed, even though only part of it was done.&lt;br /&gt;
&lt;br /&gt;
The reasoning is that if they leave the idea as it is, it would leave features up for voting that are completed.  If they edited the idea to remove the features implemented, leaving the ones not implemented, it would invalidate the vote numbers since there&#039;s no way of knowing what features people really wanted when they put their votes into that idea.&lt;br /&gt;
&lt;br /&gt;
Therefore, these ideas will just be closed as completed if any part of them is implemented.  After this is done, everyone who voted for them will get their votes back.  If the voters still desire a part of the idea that was not implemented, they can create a new idea specific to that part, and put their freshly acquired votes into that one one.&lt;br /&gt;
&lt;br /&gt;
== Feature Requests and Mods ==&lt;br /&gt;
&lt;br /&gt;
Sometimes, people submit ideas to the forum that can be implemented with Warzone&#039;s [[Mod Framework Capabilities|mod framework]].  This section outlines guideline for whether or not your idea belongs on the Feature Request Forum:&lt;br /&gt;
&lt;br /&gt;
First, if your idea &#039;&#039;cannot&#039;&#039; be implemented using the mod framework, then it&#039;s OK to submit to it the Feature Request forum.  You can either word it as a normal feature, or word it as an idea to add support to the mod framework.&lt;br /&gt;
&lt;br /&gt;
If your idea &#039;&#039;can&#039;&#039; be implemented using the mod framework, next determine if a mod already exists to accomplish it.  If a mod already exists, then it&#039;s OK to submit it to the Feature Request forum as an idea to convert a mod into a built-in feature.  Be sure to note in the description that your idea is to convert an existing mod into a built-in feature.  Note that these types of ideas will only be considered if the mod is already pretty popular.&lt;br /&gt;
&lt;br /&gt;
If your idea can be implemented using the mod framework, but no mod exists yet, you should &#039;&#039;not&#039;&#039; submit it as an idea to the Feature Request forum.  The next step in getting your idea to become reality is to get it created as a mod.  the Feature Request forum is not the appropriate place to pitch to mod developers, as the Feature Request forum is aimed at pitching your idea to the Warzone developers.  Instead, if you can&#039;t create the mod yourself or need help doing so, try the [https://www.warzone.com/Forum/f6-Programming Warzone Programming Forums] or [https://discord.com/invite/hqGkVXagyt Wazone Mod-Making Discord].&lt;br /&gt;
&lt;br /&gt;
== Multi-account voting is not allowed ==&lt;br /&gt;
&lt;br /&gt;
If you have multiple Warzone accounts, be sure to only cast votes from your main account and never your alts.  If you are caught voting on multiple accounts, you may face punishment up to and including having all of your accounts banned.&lt;br /&gt;
&lt;br /&gt;
[[Category:Warzone]]&lt;/div&gt;</summary>
		<author><name>Kaninchen</name></author>
	</entry>
	<entry>
		<id>https://war.app/wiki/index.php?title=Feature_Request_Forum&amp;diff=6736</id>
		<title>Feature Request Forum</title>
		<link rel="alternate" type="text/html" href="https://war.app/wiki/index.php?title=Feature_Request_Forum&amp;diff=6736"/>
		<updated>2024-08-21T15:27:00Z</updated>

		<summary type="html">&lt;p&gt;Kaninchen: /* Feature Requests and Mods */  Added links to Programming Forum and Mod Making Discord&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
The &#039;&#039;&#039;Feature Request Forum&#039;&#039;&#039; is your place to vote on what features you think Warzone should implement.  &lt;br /&gt;
&lt;br /&gt;
==How it works ==&lt;br /&gt;
&lt;br /&gt;
Any player can create a thread on this forum, which is then called a &#039;&#039;feature request&#039;&#039; or an &#039;&#039;idea&#039;&#039;.  Any player with votes can then vote on this idea, and the ideas with the most votes are displayed at the top of the forum by default.  You can also sort ideas by how recently they were added, or the most recent discussion reply.&lt;br /&gt;
&lt;br /&gt;
Like any other Warzone forum, players can also give thumbs-up and thumbs-down to feature requests.  However, these only affect its visibility and aren&#039;t official votes for it to be implemented.&lt;br /&gt;
&lt;br /&gt;
Players have votes based on their level, with votes unlocking at level 5, 10, 20, 30, 40, 50, 60, 62, 64, 66, and a bonus vote for members.  You can place up to three votes for any one idea.  Votes you cast are tied to your Warzone account and are public, so you can always see who voted on each individual feature request.&lt;br /&gt;
&lt;br /&gt;
At any time, you can always change your mind and take votes out of one idea and put them into another.&lt;br /&gt;
&lt;br /&gt;
If a feature you voted for is implemented or declined by Warzone, then you&#039;ll get your votes back and are free to put them into another idea.&lt;br /&gt;
&lt;br /&gt;
Note that any replies to a feature request are not considered part of the core idea.  When you vote, you&#039;re only voting for the features outlined in the top post of the forum.  Any replies are just considered discussion surrounding the idea.  If you need to augment or later change an idea after it&#039;s posted, you should create a new thread and encourage players to move their votes into the new one if they like that one more.&lt;br /&gt;
&lt;br /&gt;
Any Warzone account that is inactive for more than 30 days will automatically have its votes removed from all ideas.  If they sign in again, they&#039;re free to put their votes back.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Criteria for a new feature==&lt;br /&gt;
&lt;br /&gt;
While it would be great to implement every feature suggested, this simply isn&#039;t possible. There&#039;s no magic number of votes that a feature needs to get accepted; the point of voting is to see which features are most in-demand.   This is also important to avoid design-by-committee syndrome, since sometimes trying to please everyone ends up pleasing no one.&lt;br /&gt;
&lt;br /&gt;
Features are typically judged based on these criteria:&lt;br /&gt;
&lt;br /&gt;
* How good of a fit the feature is for Warzone&#039;s theme and direction.&lt;br /&gt;
* How much effort the feature takes to implement and maintain.&lt;br /&gt;
* How many votes the feature gets (i.e. how in-demand it is).&lt;br /&gt;
* Additionally, sometimes a feature can get implemented just because it happens to fall into an area of code that is being worked on for something else.&lt;br /&gt;
&lt;br /&gt;
== Multi-Ideas ==&lt;br /&gt;
&lt;br /&gt;
A single idea on the Feature Request forum should generally contain a single idea/feature/improvement.    Sometimes players create an idea that mentions multiple features.  Doing this is not disallowed, however, it is risky, and may not get you what you want.&lt;br /&gt;
&lt;br /&gt;
The advantage of creating a single idea with multiple features is that it appears more attractive to other voters.  If any one of your features appeals to a player, they&#039;re likely to vote on it, and therefore you&#039;re likely to get more votes.&lt;br /&gt;
&lt;br /&gt;
The problem comes when one or some of the features is implemented, but not all.  After this is done, the Warzone developers will simply mark it as Completed, even though only part of it was done.&lt;br /&gt;
&lt;br /&gt;
The reasoning is that if they leave the idea as it is, it would leave features up for voting that are completed.  If they edited the idea to remove the features implemented, leaving the ones not implemented, it would invalidate the vote numbers since there&#039;s no way of knowing what features people really wanted when they put their votes into that idea.&lt;br /&gt;
&lt;br /&gt;
Therefore, these ideas will just be closed as completed if any part of them is implemented.  After this is done, everyone who voted for them will get their votes back.  If the voters still desire a part of the idea that was not implemented, they can create a new idea specific to that part, and put their freshly acquired votes into that one one.&lt;br /&gt;
&lt;br /&gt;
== Feature Requests and Mods ==&lt;br /&gt;
&lt;br /&gt;
Sometimes, people submit ideas to the forum that can be implemented with Warzone&#039;s [[Mod Framework Capabilities|mod framework]].  This section outlines guideline for whether or not your idea belongs on the Feature Request Forum:&lt;br /&gt;
&lt;br /&gt;
First, if your idea &#039;&#039;cannot&#039;&#039; be implemented using the mod framework, then it&#039;s OK to submit to it the Feature Request forum.  You can either word it as a normal feature, or word it as an idea to add support to the mod framework.&lt;br /&gt;
&lt;br /&gt;
If your idea &#039;&#039;can&#039;&#039; be implemented using the mod framework, next determine if a mod already exists to accomplish it.  If a mod already exists, then it&#039;s OK to submit it to the Feature Request forum as an idea to convert a mod into a built-in feature.  Be sure to note in the description that your idea is to convert an existing mod into a built-in feature.  Note that these types of ideas will only be considered if the mod is already pretty popular.&lt;br /&gt;
&lt;br /&gt;
If your idea can be implemented using the mod framework, but no mod exists yet, you should &#039;&#039;not&#039;&#039; submit it as an idea to the Feature Request forum.  The next step in getting your idea to become reality is to get it created as a mod.  the Feature Request forum is not the appropriate place to pitch to mod developers, as the Feature Request forum is aimed at pitching your idea to the Warzone developers.  Instead, if you can&#039;t create the mod yourself or need help doing so, try the [https://www.warzone.com/Forum/f6-Programming Warzone Programming Forums] or [https://discord.gg/p5BuCQBtMH Wazone Mod-Making Discord].&lt;br /&gt;
&lt;br /&gt;
== Multi-account voting is not allowed ==&lt;br /&gt;
&lt;br /&gt;
If you have multiple Warzone accounts, be sure to only cast votes from your main account and never your alts.  If you are caught voting on multiple accounts, you may face punishment up to and including having all of your accounts banned.&lt;br /&gt;
&lt;br /&gt;
[[Category:Warzone]]&lt;/div&gt;</summary>
		<author><name>Kaninchen</name></author>
	</entry>
	<entry>
		<id>https://war.app/wiki/index.php?title=Mod_Security&amp;diff=6136</id>
		<title>Mod Security</title>
		<link rel="alternate" type="text/html" href="https://war.app/wiki/index.php?title=Mod_Security&amp;diff=6136"/>
		<updated>2024-06-01T14:35:58Z</updated>

		<summary type="html">&lt;p&gt;Kaninchen: /* SendGameCustomMessage */  grammatical error fixed&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In a [https://en.wikipedia.org/wiki/Client%E2%80%93server_model Client-Server Relationship] it is very important that the Server checks &#039;&#039;&#039;everything&#039;&#039;&#039; the client sends to it.&lt;br /&gt;
This is because someone who is proficient in programming (a Hacker for example) can modify any data the client sends to the server.&lt;br /&gt;
It&#039;s therefore important to employ a [https://en.wikipedia.org/wiki/Zero_trust_security_model zero trust policy] when creating mods&lt;br /&gt;
&lt;br /&gt;
== Possible security weak points ==&lt;br /&gt;
=== SendGameCustomMessage ===&lt;br /&gt;
[[Mod_API_Reference:ClientGame|Main article]]&amp;lt;br&amp;gt;&lt;br /&gt;
An attacker can modify the payload in any way they desire. Let&#039;s take a Diplomacy Mod for example, where the Host can decide which player should win at any time. A naive approach using [[Mod_Hooks#Server Hooks|Server_GameCustomMessage(...)]] would be&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
function Server_GameCustomMessage(game, playerID, payload, setReturn)&lt;br /&gt;
    if payload.type == &amp;quot;makePlayerWin&amp;quot; then&lt;br /&gt;
        makePlayerWin(game, payload.playerid)&lt;br /&gt;
        -- makePlayerWin(game, playerid) could be a function that later on adds an order which sets the territory owner of every territory to the player associated with the supplied playerid&lt;br /&gt;
    elseif ... -- other functionality&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
An attacker with the associated playerid of (for example) &#039;&#039;&#039;12345&#039;&#039;&#039; who analyzed the source code of the mod (remember, the source code of every mod is publicly available on [https://github.com/ Github]) can now see that the Hook never actually checks if the client who sent the CustomServerMessage is really the host (indicated by the &#039;&#039;&#039;playerID&#039;&#039;&#039; parameter of the &#039;&#039;&#039;Server_GameCustomMessage&#039;&#039;&#039; function). The attacker could therefore send following Lua table to the Server:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    type = &amp;quot;makePlayerWin&amp;quot;,&lt;br /&gt;
    playerid = 12345&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and automatically win as soon as the turn advances. The actual process is more complicated but that&#039;s about how an attacker could use the security vulnerability to gain a decisive advantage.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
The obvious and right solution is to additionally check inside the &#039;&#039;if condition&#039;&#039; if the &#039;&#039;&#039;playerID&#039;&#039;&#039; supplied to &#039;&#039;&#039;Server_GameCustomMessage&#039;&#039;&#039; belongs to the host.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function Server_GameCustomMessage(game, playerID, payload, setReturn)&lt;br /&gt;
    if payload.type == &amp;quot;makePlayerWin&amp;quot; and game.ServerGame.Settings.StartedBy == playerID then&lt;br /&gt;
        makePlayerWin(game, payload.playerid)&lt;br /&gt;
    elseif ... -- other functionality&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
this now makes the functionality secure against custom client data crafted by an attacker&lt;br /&gt;
&lt;br /&gt;
===GameOrderCustom===&lt;br /&gt;
[[Mod_API_Reference:GameOrderCustom|Main article]]&amp;lt;br&amp;gt;&lt;br /&gt;
The Server [[Mod Hooks]] which accept the &#039;&#039;&#039;GameOrderCustom&#039;&#039;&#039; should only depend on the payload, as hackers may, as with &#039;&#039;&#039;SendGameCustomMessage&#039;&#039;&#039;, modify all fields (&#039;&#039;&#039;Message&#039;&#039;&#039;, &#039;&#039;&#039;Payload&#039;&#039;&#039;, &#039;&#039;&#039;CostOpt&#039;&#039;&#039; and &#039;&#039;&#039;OccursInPhaseOpt&#039;&#039;&#039;) to gain an advantage. Note that, since hackers can modify &#039;&#039;&#039;Payload&#039;&#039;&#039; too, it is essential to verify that it was even possible for the player to send the received &#039;&#039;&#039;Payload&#039;&#039;&#039; in the first place. All other Fields should be recreated by the Server.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Mod Developers Guide]]&lt;/div&gt;</summary>
		<author><name>Kaninchen</name></author>
	</entry>
	<entry>
		<id>https://war.app/wiki/index.php?title=Mod_Developers_Guide&amp;diff=6092</id>
		<title>Mod Developers Guide</title>
		<link rel="alternate" type="text/html" href="https://war.app/wiki/index.php?title=Mod_Developers_Guide&amp;diff=6092"/>
		<updated>2024-04-18T17:07:31Z</updated>

		<summary type="html">&lt;p&gt;Kaninchen: added Mod Security to See Also, please see discussion to discuss if it should get its own section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes information necessary for making [[Mods]].&lt;br /&gt;
&lt;br /&gt;
This guide assumes that you know the Lua programming language.  If you&#039;ve worked with other languages, such as Javascript, Lua should be very easy to learn.  Many tutorials are available on the internet if you search for them.&lt;br /&gt;
&lt;br /&gt;
Note that you must be a Warzone [[member]] to develop mods, as mods are a member feature.&lt;br /&gt;
&lt;br /&gt;
== Getting started creating a mod ==&lt;br /&gt;
&lt;br /&gt;
There are two ways to load mod code into Warzone: Using the Standalone Client, or directly uploading from your editor.  Uploading from your editor is the preferred way since it allows for more rapid iteration.  However, it also requires an extension to your editor, which only exists for VS Code.  If you want to develop from an editor other than VS Code, or if you want to develop without an active internet connection, you should use the Standalone Client method.&lt;br /&gt;
&lt;br /&gt;
=== Developing with the Standalone Client ===&lt;br /&gt;
&lt;br /&gt;
# Open the page https://www.warzone.com/EnableModDevelopment to enable mod development for your Warzone account.&lt;br /&gt;
# Download the [[Standalone Client]] and run it.&lt;br /&gt;
# Obtain the source code to an example mod, such as the Randomized Wastelands Mod from https://github.com/FizzerWL/ExampleMods/tree/master/RandomizedWastelandsMod.  Download the lua files to a folder on your device. (The easiest way is to use Github&#039;s &amp;quot;Download zip&amp;quot; button if you&#039;re not a git user)&lt;br /&gt;
# Launch the Standalone Client, sign in.  Click the &amp;quot;Mod Development Console&amp;quot; button.  You can also use the hotkey Ctrl+Shift+M to bring up this dialog any time, and also note that this dialog can be docked to sides of your screen if you wish.&lt;br /&gt;
# Click the &amp;quot;Create New Mod&amp;quot; button and give your mod a name.&lt;br /&gt;
# Provide path to your folder with lua files that you downloaded in step 3.&lt;br /&gt;
# Click Submit to create the mod.&lt;br /&gt;
# From the single-player main menu, click &amp;quot;Custom Game&amp;quot;, then scroll down and click Change Mods.&lt;br /&gt;
# You should see the mod you created here.  Check the box to turn it on and click Submit.&lt;br /&gt;
# If you&#039;ve cloned the Randomized Wastelands mod, you&#039;ll also need to turn on wastelands if you want it to do anything.  You can also turn off fog to more easily see its effects.  Create the game, and see the wastelands be adjusted!&lt;br /&gt;
&lt;br /&gt;
Now you can make modifications to the lua code, press the &amp;quot;Reload code&amp;quot; button and try them out! &lt;br /&gt;
&lt;br /&gt;
=== Developing with direct upload from your editor ===&lt;br /&gt;
&lt;br /&gt;
# Open the page https://www.warzone.com/EnableModDevelopment to enable mod development for your Warzone account.&lt;br /&gt;
# Install VS Code from https://code.visualstudio.com/ &lt;br /&gt;
# Obtain the source code to an example mod, such as the Randomized Wastelands Mod from https://github.com/FizzerWL/ExampleMods/tree/master/RandomizedWastelandsMod.  Download the lua files to a folder on your device. (The easiest way is to use Github&#039;s &amp;quot;Download zip&amp;quot; button if you&#039;re not a git user)&lt;br /&gt;
# Download the Warzone Mod Helper VS Code extension VSIX file from https://github.com/FizzerWL/WarzoneModHelper/releases.  Install it by launching VS Code, pressing Ctrl+Shift+P, entering &amp;quot;Install from VSIX&amp;quot; and selecting the VSIX file you downloaded.&lt;br /&gt;
# (optional) Install the Lua IDE extension: https://marketplace.visualstudio.com/items?itemName=sumneko.lua&lt;br /&gt;
# Open the Mod Development Console at https://www.warzone.com/Mods/Develop&lt;br /&gt;
# Click the &amp;quot;Create New Mod&amp;quot; button and give your mod a name.  Ensure the &amp;quot;Development&amp;quot; box is checked.  After creating it, make note of your Mod ID.&lt;br /&gt;
# In VS Code, open the RandomizedWastelandsMod folder you downloaded earlier.  Open one of the lua files in this folder.&lt;br /&gt;
# Visit https://www.warzone.com/API/GetAPIToken and copy your API Token to the clipboard.&lt;br /&gt;
# In VS Code, press Ctrl+Shift+P and select &amp;quot;Upload Mod&amp;quot;.  Enter your Mod ID you noted earlier, and paste your API Token when prompted.  Ensure it says &amp;quot;Mod updated successfully&amp;quot; in the bottom right corner.&lt;br /&gt;
# Now that your mod is updated, let&#039;s run it. Visit https://www.warzone.com/SinglePlayer?CustomGame=1 and click Change Mods.  You should see the mod you created here.  Check the box to turn it on and click Submit.&lt;br /&gt;
# If you&#039;ve cloned the Randomized Wastelands mod, you&#039;ll also need to turn on wastelands if you want it to do anything.  You can also turn off fog to more easily see its effects.  Create the game, and see the wastelands be adjusted!&lt;br /&gt;
&lt;br /&gt;
Now you can make modifications to the lua code, press and invoke the &amp;quot;Upload Mod&amp;quot; feature again to try them out!&lt;br /&gt;
&lt;br /&gt;
Be sure to read the rest of this page for essential information on mod development.&lt;br /&gt;
&lt;br /&gt;
== Video Tutorial == &lt;br /&gt;
&lt;br /&gt;
If you prefer to learn via video, check out this YouTube tutorial on how to make a mod:  https://www.youtube.com/watch?v=mwVDv5PXyrg&lt;br /&gt;
&lt;br /&gt;
== Hooks ==&lt;br /&gt;
&lt;br /&gt;
Warzone will call into a mod&#039;s lua code using what are called &#039;&#039;&#039;hooks&#039;&#039;&#039;.  For example, it will call a hook named &amp;lt;code&amp;gt;Server_StartGame&amp;lt;/code&amp;gt; when a game is beginning and give your mod an opportunity to change things about how the map is set up.&lt;br /&gt;
&lt;br /&gt;
For full details on what hooks are available, see [[Mod Hooks]].&lt;br /&gt;
&lt;br /&gt;
== Sharing code with &amp;quot;require&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
You can call the &amp;quot;require&amp;quot; function to share code between different lua files.  &lt;br /&gt;
&lt;br /&gt;
For example, if you have utility functions in a file named &#039;Utilities.lua&#039;, simply write &amp;lt;code&amp;gt;require(&#039;Utilities&#039;)&amp;lt;/code&amp;gt; at the top of another file to include it (omit the &amp;lt;code&amp;gt;.lua&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Note that all lua files must be in the same directory (subdirectories are currently not supported).&lt;br /&gt;
&lt;br /&gt;
== Printing Output ==&lt;br /&gt;
&lt;br /&gt;
In lua, you can print output with lua&#039;s &amp;lt;code&amp;gt;print&amp;lt;/code&amp;gt; function.  For example: &amp;lt;code&amp;gt;print(&amp;quot;Hello, world!&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see this output, open the Mod Development Console (Ctrl+Shift+M) and click View Mod Output.  Then create a single-player game using that mod, and when the print statement runs, you&#039;ll see the output appear in this window in real-time.&lt;br /&gt;
&lt;br /&gt;
This is useful to assist in debugging.&lt;br /&gt;
&lt;br /&gt;
In multi-player games, the output of mods that run on the server is currently not viewable anywhere, unless the mod crashes which will display recently printed lines in a report in the Mod Development Console.  For this reason, it&#039;s easier to debug mods in single-player before moving to multi-player.&lt;br /&gt;
&lt;br /&gt;
== Global State ==&lt;br /&gt;
&lt;br /&gt;
Never assume any state will persist, unless specifically called out in the documentation.  For example, don&#039;t write to a global variable in one hook and access it in another.&lt;br /&gt;
&lt;br /&gt;
If you try to in a single-player game, you may find that global state does persist.  However, don&#039;t be tempted to rely on this, since globals are always wiped in multi-player, and globals will also get wiped in single-player if someone saves and re-loads their game.  Therefore, ensure you code as if globals will never persist between hook calls, except where explicitly allowed.&lt;br /&gt;
&lt;br /&gt;
== Data Storage ==&lt;br /&gt;
&lt;br /&gt;
Mods can store public, private, or player-specific data within a game.  See [[Mod Game Data Storage]] for details.&lt;br /&gt;
&lt;br /&gt;
== Mod Timeout ==&lt;br /&gt;
&lt;br /&gt;
Note that if a game takes more than a minute to advance, the mods will time out and the game will not advance.  This time counts all mods enabled for that game combined, so mod authors should work to ensure their mods are efficient as possible.&lt;br /&gt;
&lt;br /&gt;
If a game times out more than 10 times in a row, Warzone will end the game automatically.&lt;br /&gt;
&lt;br /&gt;
== Tips ==&lt;br /&gt;
&lt;br /&gt;
Be sure to test in multi-player!  When running Server code in multi-player, your lua code runs on the Warzone server which uses a different lua engine.  In theory, everything should be the same, but there is still an opportunity for differences.  To ensure everything you&#039;re doing works, it&#039;s recommended you test in multi-player, not only before you&#039;re ready to go public, but also occasionally during your development process.&lt;br /&gt;
&lt;br /&gt;
Note that all mods uploaded to Warzone must use the MIT license, or something equally or more permissable.  Any mods without a license specified are assumed to be using MIT.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Mod Security]]&lt;br /&gt;
* [[Mod API Reference]]&lt;br /&gt;
* [[Mod Backwards Compatibility]]&lt;br /&gt;
* [[Public Mods]]&lt;br /&gt;
* [[Mod Hooks]]&lt;br /&gt;
* [[Mod Game Data Storage]]&lt;br /&gt;
* [https://discord.gg/hqGkVXagyt Warzone Mod Makers Discord]&lt;br /&gt;
&lt;br /&gt;
[[Category:Mod Developers Guide]]&lt;/div&gt;</summary>
		<author><name>Kaninchen</name></author>
	</entry>
	<entry>
		<id>https://war.app/wiki/index.php?title=Talk:Mod_Developers_Guide&amp;diff=6091</id>
		<title>Talk:Mod Developers Guide</title>
		<link rel="alternate" type="text/html" href="https://war.app/wiki/index.php?title=Talk:Mod_Developers_Guide&amp;diff=6091"/>
		<updated>2024-04-18T17:07:18Z</updated>

		<summary type="html">&lt;p&gt;Kaninchen: added talk + question&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Should [[Mod Security]] have it&#039;s own section? ==&lt;br /&gt;
I have linked the [[Mod Security]] wiki page, but since safety is usually priority number one, I wanted to ask if we should add its own section for it with a short description and link to the main article.&lt;/div&gt;</summary>
		<author><name>Kaninchen</name></author>
	</entry>
	<entry>
		<id>https://war.app/wiki/index.php?title=Mod_API_Reference:GameOrderCustom&amp;diff=6090</id>
		<title>Mod API Reference:GameOrderCustom</title>
		<link rel="alternate" type="text/html" href="https://war.app/wiki/index.php?title=Mod_API_Reference:GameOrderCustom&amp;diff=6090"/>
		<updated>2024-04-18T16:58:22Z</updated>

		<summary type="html">&lt;p&gt;Kaninchen: Forgot to remove that part yesterday&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;GameOrderCustom&#039;&#039;&#039;:  Subclass of [[Mod API Reference:GameOrder|GameOrder]].  This order does nothing on its own, but it can be used by mods for custom orders.  GameOrderCustom is typically sent up from clients to the server, in contrast to [[Mod API Reference:GameOrderEvent|GameOrderEvent]] which is typically sent down from the server to clients.&lt;br /&gt;
&lt;br /&gt;
In order to make sure your mod doesn&#039;t break when used in conjunction with other mods, you should prepend a unique string (such as the name of your mod plus an underscore) to the Payload.  When reading a GameOrderCustom, check if the payload starts with your unique string, and if it doesn&#039;t it means this order isn&#039;t one your mod made and you should ignore it.  If you act on another mod&#039;s messages, or skip them, it will create unexpected behavior for your mod or another mod.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Message&#039;&#039;&#039; &#039;&#039;string&#039;&#039;: The message that will appear in the orders list.  This is what players see.&lt;br /&gt;
* &#039;&#039;&#039;Payload&#039;&#039;&#039; &#039;&#039;string&#039;&#039;: Data the mod wishes to store along with this order, but does not want players to see.&lt;br /&gt;
* &#039;&#039;&#039;CostOpt&#039;&#039;&#039; &#039;&#039;Table&amp;lt;[[Mod API Reference:ResourceType|ResourceType]] (enum),integer&amp;gt;&#039;&#039;: Defines how much gold the order will cost the player in a [[Commerce]] game.  This should only be set in commerce games.  If CostOpt is set to nil, then it&#039;s assumed to be the same as having a cost of 0.   The game will take care of taking the player&#039;s resources away correctly, both on the client and server, when inserting an order with a cost into their orders list.&lt;br /&gt;
* &#039;&#039;&#039;OccursInPhaseOpt&#039;&#039;&#039; &#039;&#039;[[Mod API Reference:Nullable|Nullable]]&amp;lt;[[Mod API Reference:TurnPhase|TurnPhase]] (enum)&amp;gt;&#039;&#039;:  If not nil, then orders will be forced to be placed in this phase.  Players will not be able to move this order above an order of a lower phase, or below an order of a higher phase.  Added in v5.22.0.&lt;br /&gt;
&lt;br /&gt;
[[Mod_Security|Mod security]] should be applied to [[Mod_Hooks|Mod Hooks]] working with this card&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;WL.GameOrderCustom.Create&#039;&#039;&#039;(&#039;&#039;&#039;playerID&#039;&#039;&#039; &#039;&#039;[[Mod API Reference:PlayerID|PlayerID]]&#039;&#039;, &#039;&#039;&#039;message&#039;&#039;&#039; &#039;&#039;string&#039;&#039;, &#039;&#039;&#039;payload&#039;&#039;&#039; &#039;&#039;string&#039;&#039;, &#039;&#039;&#039;costOpt&#039;&#039;&#039; &#039;&#039;Table&amp;lt;[[Mod API Reference:ResourceType|ResourceType]] (enum),integer&amp;gt;&#039;&#039;) (static) returns [[Mod API Reference:GameOrderCustom|GameOrderCustom]]:&lt;br /&gt;
[[Category:Mod API Reference]]&lt;/div&gt;</summary>
		<author><name>Kaninchen</name></author>
	</entry>
	<entry>
		<id>https://war.app/wiki/index.php?title=Mod_Hooks&amp;diff=6089</id>
		<title>Mod Hooks</title>
		<link rel="alternate" type="text/html" href="https://war.app/wiki/index.php?title=Mod_Hooks&amp;diff=6089"/>
		<updated>2024-04-18T16:55:03Z</updated>

		<summary type="html">&lt;p&gt;Kaninchen: /* Server Hooks */ changed the location for the Mod Security hint so there isn&amp;#039;t a random dot floating around&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Warzone will call into a [[Mods|mod&#039;s]] lua code using what are called &#039;&#039;&#039;hooks&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
For example, it will call a hook named Server_StartGame when a game is beginning and give your mod an opportunity to change things about how the map is set up.&lt;br /&gt;
&lt;br /&gt;
If you provide a function with the name listed here, and in a file with the name listed here, it will be called as explained.  Note that both the function name and the file name are case-sensitive.&lt;br /&gt;
&lt;br /&gt;
== Server Hooks ==&lt;br /&gt;
&lt;br /&gt;
*Server_Created (Server_Created.lua)&lt;br /&gt;
** Called in every game when the game is first created.  In multi-player, this means it&#039;s called before players even accept or join the request for the game.  This is the only place that game settings can be changed.&lt;br /&gt;
** Return value: None.&lt;br /&gt;
** Arguments: &lt;br /&gt;
# [[Mod API Reference:Game|Game]]: Provides read-only information about the game.&lt;br /&gt;
# [[Mod API Reference:GameSettings|GameSettings]]: (writable) Allows your mod to change the game&#039;s settings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server_StartDistribution (Server_StartDistribution.lua)&lt;br /&gt;
** Called in any game set to manual territory distribution before players select their picks.  This hook is not called in any game configured to automatic territory distribution.  This is called after the standing has been built (wastelands and pickable territories have already been placed and initial cards have already been given out.)&lt;br /&gt;
** Return value: None.&lt;br /&gt;
** Arguments: &lt;br /&gt;
# [[Mod API Reference:Game|Game]]: Provides read-only information about the game.&lt;br /&gt;
# [[Mod API Reference:GameStanding|Standing]]: (writable) Allows your mod to change the standing before players see it.  For example, a mod could change the number of armies on any territory, control which territories are pickable, or define what cards each player starts with.&lt;br /&gt;
  &lt;br /&gt;
  &lt;br /&gt;
* Server_StartGame (Server_StartGame.lua)&lt;br /&gt;
** Called when the game starts the first turn.  In a manual territory distribution game, this is called after all players have entered their picks.  In an automatic territory distribution game, this is called when the game starts. This is called after the standing has been built (picks have been given out)&lt;br /&gt;
** Return value: None.&lt;br /&gt;
** Arguments: &lt;br /&gt;
# [[Mod API Reference:Game|Game]]: Provides read-only information about the game.&lt;br /&gt;
# [[Mod API Reference:GameStanding|Standing]]: (writable) Allows your mod to change the the standing before players see it.  For example, a mod could change the number of armies on any territory, control which players control which territories, or define what cards each player starts with.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server_AdvanceTurn_Start (Server_AdvanceTurn.lua)&lt;br /&gt;
** Called whenever the server begins processing a normal turn (not territory picking).  This gives mods an opportunity to insert orders at the start of a turn, before any player&#039;s orders are added.  All of the Server_AdvanceTurn_* hooks share global state within a single turn, so global variables can be read and written reliably by mods.&lt;br /&gt;
** Arguments:&lt;br /&gt;
# [[Mod API Reference:Game|Game]]: Provides read-only information about the game.&lt;br /&gt;
# addNewOrder: A function that you can call to add a [[Mod API Reference:GameOrder|GameOrder]] to the start of the turn.  You may call this function multiple times if you wish to add multiple orders.  Pass a single GameOrder as the first argument to this function.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server_AdvanceTurn_Order (Server_AdvanceTurn.lua)&lt;br /&gt;
** Called whenever the server processes a player&#039;s order during a normal turn (not territory picking).  This gives mods an opportunity to skip the order, modify it, or let it process normally. &amp;lt;br/&amp;gt;This hook is called after the results of the order have been computed, but before it has been applied to the [[Mod API Reference:GameStanding|standing]].  For example, when looking at an [[Mod API Reference:GameOrderAttackTransfer|Attack/Transfer order]] that represents a territory being captured, the standing will still show the territory as uncaptured.  &amp;lt;br/&amp;gt;All of the Server_AdvanceTurn_* turns share global state within a single turn, so global variables can be read and written reliably by mods.&lt;br /&gt;
** Arguments:&lt;br /&gt;
# [[Mod API Reference:Game|Game]]: Provides read-only information about the game.&lt;br /&gt;
# [[Mod API Reference:GameOrder|GameOrder]]: The order being processed. (read-only)&lt;br /&gt;
# [[Mod API Reference:GameOrderResult|GameOrderResult]]: The result of the order being processed. This is writable, so mods can change the result.  Currently, only [[Mod API Reference:GameOrderAttackTransferResult|GameOrderAttackTransferResult]] has writable fields.&lt;br /&gt;
# skipThisOrder: A function that you can call to indicate that this order should be skipped.  This should be called with one of three values, listed below.  If it is called multiple times, the last call overrides the previous calls.&lt;br /&gt;
## WL.ModOrderControl.Keep: Indicates this order should be processed normally.  This is the default value, and all orders will default to Keep if skipThisOrder is not called.&lt;br /&gt;
## WL.ModOrderControl.Skip: Indicates this order should be skipped.  It won&#039;t appear in the orders list at all and it will be as if the order never existed.  A [[Mod API Reference:GameOrderEvent|GameOrderEvent]] will be written into the orders list to tell the player who entered this order that their order was skipped.&lt;br /&gt;
## WL.ModOrderControl.SkipAndSupressSkippedMessage: Same as Skip, except that the GameOrderEvent is not written.  This should be used with care, as players will want to know why their order didn&#039;t appear in the orders list.  This should only be used if you use some other mechanism to explain to the player why their order was not present, or if this is an order that your mod inserted and therefore no players were expecting it.&lt;br /&gt;
# addNewOrder: A function that you can call to add a [[Mod API Reference:GameOrder|GameOrder]] to the start of the turn.  You may call this function multiple times if you wish to add multiple orders.  Pass a single GameOrder as the first argument to this function.   Optionally, you can also pass &amp;quot;true&amp;quot; as a second argument to this function to make your new order get skipped if the order this hook was called on gets skipped, either by your mod or another mod.  This second argument was added in [[Mod_API_Reference:IsVersionOrHigher|5.17.0]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server_AdvanceTurn_End (Server_AdvanceTurn.lua)&lt;br /&gt;
** Called whenever the server finishes processing a normal turn (not territory picking).  This gives mods an opportunity to insert orders at the end of a turn, after all player&#039;s orders are added.  All of the Server_AdvanceTurn_* turns share global state within a single turn, so global variables can be read and written reliably by mods.&lt;br /&gt;
** Arguments:&lt;br /&gt;
# [[Mod API Reference:Game|Game]]: Provides read-only information about the game.&lt;br /&gt;
# addNewOrder: A function that you can call to add a [[Mod API Reference:GameOrder|GameOrder]] to the start of the turn.  You may call this function multiple times if you wish to add multiple orders.  Pass a single GameOrder as the first argument to this function.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server_GameCustomMessage (Server_GameCustomMessage.lua)&lt;br /&gt;
** Called whenever your mod calls [[Mod API Reference:ClientGame|ClientGame]].SendGameCustomMessage.  This gives mods a way to communicate between the client and server outside of a turn advancing.  Note that if a mod changes Mod.PublicGameData or Mod.PlayerGameData, the clients that can see those changes and have the game open will automatically receive a refresh event with the updated data, so this message can also be used to push data from the server to clients.&lt;br /&gt;
** [[Mod_Security|Mod security]] should be applied when working with this Hook&lt;br /&gt;
** Arguments:&lt;br /&gt;
# [[Mod API Reference:Game|Game]]: Provides read-only information about the game.&lt;br /&gt;
# [[Mod API Reference:PlayerID|PlayerID]]: The ID of the player who invoked this call.&lt;br /&gt;
# payload: The data passed as the &#039;&#039;payload&#039;&#039; parameter to SendGameCustomMessage.  Must be a lua table.&lt;br /&gt;
# setReturn: Optionally, a function that sets what data will be returned back to the client.  If you wish to return data, pass a table as the sole argument to this function.  Not calling this function will result in an empty table being returned.&lt;br /&gt;
&lt;br /&gt;
== Client Hooks ==&lt;br /&gt;
&lt;br /&gt;
* Client_PresentConfigureUI (Client_PresentConfigureUI.lua)&lt;br /&gt;
** Called when a player checks your mod on the Create Game page.  If your mod has any configurable settings, you should create UI controls on the screen to allow players to configure them using the [[Mod API Reference:UI|UI API]].  Mods should also check the &amp;lt;code&amp;gt;[https://www.warzone.com/wiki/Mod_Game_Data_Storage Mod.Settings]&amp;lt;/code&amp;gt; global to see if any settings are already defined, and if they are, default their UI state to match that.&lt;br /&gt;
** Arguments: &lt;br /&gt;
# rootParent: Pass this as an argument to the top-level UI element your mod creates.  See the [[Mod API Reference:UI|UI API]] for details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Client_SaveConfigureUI (Client_SaveConfigureUI.lua)&lt;br /&gt;
** Called when a player submits the Create Game Mod page with your mod checked.  If your mod presented any UI in Client_PresentConfigureUI, your mod should persist any settings into the &amp;lt;code&amp;gt;Mod.Settings&amp;lt;/code&amp;gt; global during this hook.  This is the only place that &amp;lt;code&amp;gt;Mod.Settings&amp;lt;/code&amp;gt; should ever be written to.&lt;br /&gt;
** Arguments: &lt;br /&gt;
# alert: A function callback that takes a string.  If the user has configured anything wrong with your UI, you can call this to notify them of their mistake.  Calling this function will also abort the save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Client_PresentSettingsUI (Client_PresentSettingsUI.lua)&lt;br /&gt;
** Called when a player opens the Game Settings panel of a game that has your mod included.  If your mod has any configurable settings, you should read them out of the global &amp;lt;code&amp;gt;Mod.Settings&amp;lt;/code&amp;gt; and show them to the player here using the [[Mod API Reference:UI|UI API]].&lt;br /&gt;
** Arguments: &lt;br /&gt;
# rootParent: Pass this as an argument to the top-level UI element your mod creates.  See the [[Mod API Reference:UI|UI API]] for details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Client_PresentMenuUI (Client_PresentMenuUI.lua)&lt;br /&gt;
** If present, games with this mod enabled will have a new button on the menu.  When the player clicks that button, this mod hook is invoked and the resulting UI will be shown to the player in a dialog.  See [[Mod API Reference:UI|UI API]].&lt;br /&gt;
** Arguments: &lt;br /&gt;
# rootParent: Pass this as an argument to the top-level UI element your mod creates.  See the [[Mod API Reference:UI|UI API]] for details.&lt;br /&gt;
# setMaxSize: Function mods can call to set the maximum size of the dialog.  Pass two numbers: the width and the height.  Note that screen sizes can vary a lot, so you can never be sure you&#039;ll get the size you request, so plan on making your UI work in all sizes.&lt;br /&gt;
# setScrollable: Function mods can call to set whether the dialog is scrollable horizontally or vertically.  Pass two booleans: the first determines if it&#039;s horizontally scrollable, and the second determines if it&#039;s vertically scrollable.  The default is false, true.&lt;br /&gt;
# [[Mod API Reference:ClientGame|ClientGame]]: Information about the game.&lt;br /&gt;
# close: Function that, when called, will close the current dialog.  Takes no arguments and returns nothing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Client_GameRefresh (Client_GameRefresh.lua)&lt;br /&gt;
** Invoked whenever the client gets data about this game from the server.  This can be used to check for updated Mod.PublicGameData or Mod.PlayerGameData, documented at [[Mod Game Data Storage]].   The client refresh timing is different between single-player and multi-player, and in multi-player can also vary depending on the user&#039;s internet connection (such as whether they&#039;re connected by websocket, long polling socket, or normal polling).  Therefore, a mod should never write code that breaks if Client_GameRefresh is called at unexpected times.&lt;br /&gt;
** Arguments: &lt;br /&gt;
# [[Mod API Reference:ClientGame|ClientGame]]: Information about the game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Client_PresentCommercePurchaseUI (Client_PresentCommercePurchaseUI.lua)&lt;br /&gt;
** Invoked whenever the player clicks the &amp;quot;Build&amp;quot; button in a commerce game.  This can be used to present UI to allow the player to spend their gold on things.&lt;br /&gt;
** Arguments:&lt;br /&gt;
# rootParent: Pass this as an argument to the top-level UI element your mod creates.  See the [[Mod API Reference:UI|UI API]] for details.&lt;br /&gt;
# [[Mod API Reference:ClientGame|ClientGame]]: Information about the game.&lt;br /&gt;
# close: Function that, when called, will close the current dialog.  Takes no arguments and returns nothing.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
Any hooks that start with &amp;lt;code&amp;gt;Server_&amp;lt;/code&amp;gt; are run on the server in multi-player games, and on the client in single-player games.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
No hooks have return values.  Meaning, it doesn&#039;t matter if you return any values from your hook functions.  Instead, the mod framework gives you callbacks to call to affect things.  This is preferred over return values for a few reasons.  First, it allows mods to call the callbacks early on or late on in their function, which can be easier than a return statement which must come at the end.  Second, it allows mods to simply not call the callback, which can signal to Warzone that the mod doesn&#039;t care about the result of this.  This can be important in some cases where multiple mods that define the same hook.  Sometimes the mods instructions can conflict and Warzone must decide which to obey.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Mod Developers Guide]]&lt;br /&gt;
* [[Mod Game Data Storage]]&lt;br /&gt;
[[Category:Mod Developers Guide]]&lt;/div&gt;</summary>
		<author><name>Kaninchen</name></author>
	</entry>
	<entry>
		<id>https://war.app/wiki/index.php?title=Mod_Hooks&amp;diff=6084</id>
		<title>Mod Hooks</title>
		<link rel="alternate" type="text/html" href="https://war.app/wiki/index.php?title=Mod_Hooks&amp;diff=6084"/>
		<updated>2024-04-17T21:13:02Z</updated>

		<summary type="html">&lt;p&gt;Kaninchen: /* Server Hooks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Warzone will call into a [[Mods|mod&#039;s]] lua code using what are called &#039;&#039;&#039;hooks&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
For example, it will call a hook named Server_StartGame when a game is beginning and give your mod an opportunity to change things about how the map is set up.&lt;br /&gt;
&lt;br /&gt;
If you provide a function with the name listed here, and in a file with the name listed here, it will be called as explained.  Note that both the function name and the file name are case-sensitive.&lt;br /&gt;
&lt;br /&gt;
== Server Hooks ==&lt;br /&gt;
&lt;br /&gt;
*Server_Created (Server_Created.lua)&lt;br /&gt;
** Called in every game when the game is first created.  In multi-player, this means it&#039;s called before players even accept or join the request for the game.  This is the only place that game settings can be changed.&lt;br /&gt;
** Return value: None.&lt;br /&gt;
** Arguments: &lt;br /&gt;
# [[Mod API Reference:Game|Game]]: Provides read-only information about the game.&lt;br /&gt;
# [[Mod API Reference:GameSettings|GameSettings]]: (writable) Allows your mod to change the game&#039;s settings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server_StartDistribution (Server_StartDistribution.lua)&lt;br /&gt;
** Called in any game set to manual territory distribution before players select their picks.  This hook is not called in any game configured to automatic territory distribution.  This is called after the standing has been built (wastelands and pickable territories have already been placed and initial cards have already been given out.)&lt;br /&gt;
** Return value: None.&lt;br /&gt;
** Arguments: &lt;br /&gt;
# [[Mod API Reference:Game|Game]]: Provides read-only information about the game.&lt;br /&gt;
# [[Mod API Reference:GameStanding|Standing]]: (writable) Allows your mod to change the standing before players see it.  For example, a mod could change the number of armies on any territory, control which territories are pickable, or define what cards each player starts with.&lt;br /&gt;
  &lt;br /&gt;
  &lt;br /&gt;
* Server_StartGame (Server_StartGame.lua)&lt;br /&gt;
** Called when the game starts the first turn.  In a manual territory distribution game, this is called after all players have entered their picks.  In an automatic territory distribution game, this is called when the game starts. This is called after the standing has been built (picks have been given out)&lt;br /&gt;
** Return value: None.&lt;br /&gt;
** Arguments: &lt;br /&gt;
# [[Mod API Reference:Game|Game]]: Provides read-only information about the game.&lt;br /&gt;
# [[Mod API Reference:GameStanding|Standing]]: (writable) Allows your mod to change the the standing before players see it.  For example, a mod could change the number of armies on any territory, control which players control which territories, or define what cards each player starts with.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server_AdvanceTurn_Start (Server_AdvanceTurn.lua)&lt;br /&gt;
** Called whenever the server begins processing a normal turn (not territory picking).  This gives mods an opportunity to insert orders at the start of a turn, before any player&#039;s orders are added.  All of the Server_AdvanceTurn_* hooks share global state within a single turn, so global variables can be read and written reliably by mods.&lt;br /&gt;
** Arguments:&lt;br /&gt;
# [[Mod API Reference:Game|Game]]: Provides read-only information about the game.&lt;br /&gt;
# addNewOrder: A function that you can call to add a [[Mod API Reference:GameOrder|GameOrder]] to the start of the turn.  You may call this function multiple times if you wish to add multiple orders.  Pass a single GameOrder as the first argument to this function.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server_AdvanceTurn_Order (Server_AdvanceTurn.lua)&lt;br /&gt;
** Called whenever the server processes a player&#039;s order during a normal turn (not territory picking).  This gives mods an opportunity to skip the order, modify it, or let it process normally. &amp;lt;br/&amp;gt;This hook is called after the results of the order have been computed, but before it has been applied to the [[Mod API Reference:GameStanding|standing]].  For example, when looking at an [[Mod API Reference:GameOrderAttackTransfer|Attack/Transfer order]] that represents a territory being captured, the standing will still show the territory as uncaptured.  &amp;lt;br/&amp;gt;All of the Server_AdvanceTurn_* turns share global state within a single turn, so global variables can be read and written reliably by mods.&lt;br /&gt;
** Arguments:&lt;br /&gt;
# [[Mod API Reference:Game|Game]]: Provides read-only information about the game.&lt;br /&gt;
# [[Mod API Reference:GameOrder|GameOrder]]: The order being processed. (read-only)&lt;br /&gt;
# [[Mod API Reference:GameOrderResult|GameOrderResult]]: The result of the order being processed. This is writable, so mods can change the result.  Currently, only [[Mod API Reference:GameOrderAttackTransferResult|GameOrderAttackTransferResult]] has writable fields.&lt;br /&gt;
# skipThisOrder: A function that you can call to indicate that this order should be skipped.  This should be called with one of three values, listed below.  If it is called multiple times, the last call overrides the previous calls.&lt;br /&gt;
## WL.ModOrderControl.Keep: Indicates this order should be processed normally.  This is the default value, and all orders will default to Keep if skipThisOrder is not called.&lt;br /&gt;
## WL.ModOrderControl.Skip: Indicates this order should be skipped.  It won&#039;t appear in the orders list at all and it will be as if the order never existed.  A [[Mod API Reference:GameOrderEvent|GameOrderEvent]] will be written into the orders list to tell the player who entered this order that their order was skipped.&lt;br /&gt;
## WL.ModOrderControl.SkipAndSupressSkippedMessage: Same as Skip, except that the GameOrderEvent is not written.  This should be used with care, as players will want to know why their order didn&#039;t appear in the orders list.  This should only be used if you use some other mechanism to explain to the player why their order was not present, or if this is an order that your mod inserted and therefore no players were expecting it.&lt;br /&gt;
# addNewOrder: A function that you can call to add a [[Mod API Reference:GameOrder|GameOrder]] to the start of the turn.  You may call this function multiple times if you wish to add multiple orders.  Pass a single GameOrder as the first argument to this function.   Optionally, you can also pass &amp;quot;true&amp;quot; as a second argument to this function to make your new order get skipped if the order this hook was called on gets skipped, either by your mod or another mod.  This second argument was added in [[Mod_API_Reference:IsVersionOrHigher|5.17.0]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server_AdvanceTurn_End (Server_AdvanceTurn.lua)&lt;br /&gt;
** Called whenever the server finishes processing a normal turn (not territory picking).  This gives mods an opportunity to insert orders at the end of a turn, after all player&#039;s orders are added.  All of the Server_AdvanceTurn_* turns share global state within a single turn, so global variables can be read and written reliably by mods.&lt;br /&gt;
** Arguments:&lt;br /&gt;
# [[Mod API Reference:Game|Game]]: Provides read-only information about the game.&lt;br /&gt;
# addNewOrder: A function that you can call to add a [[Mod API Reference:GameOrder|GameOrder]] to the start of the turn.  You may call this function multiple times if you wish to add multiple orders.  Pass a single GameOrder as the first argument to this function.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server_GameCustomMessage (Server_GameCustomMessage.lua)&lt;br /&gt;
** Called whenever your mod calls [[Mod API Reference:ClientGame|ClientGame]].SendGameCustomMessage.  This gives mods a way to communicate between the client and server outside of a turn advancing.  Note that if a mod changes Mod.PublicGameData or Mod.PlayerGameData, the clients that can see those changes and have the game open will automatically receive a refresh event with the updated data, so this message can also be used to push data from the server to clients.&lt;br /&gt;
** Arguments:&lt;br /&gt;
# [[Mod API Reference:Game|Game]]: Provides read-only information about the game.&lt;br /&gt;
# [[Mod API Reference:PlayerID|PlayerID]]: The ID of the player who invoked this call.&lt;br /&gt;
# payload: The data passed as the &#039;&#039;payload&#039;&#039; parameter to SendGameCustomMessage.  Must be a lua table.&lt;br /&gt;
# setReturn: Optionally, a function that sets what data will be returned back to the client.  If you wish to return data, pass a table as the sole argument to this function.  Not calling this function will result in an empty table being returned.&lt;br /&gt;
**[[Mod_Security|Mod security]] should be applied when working with this Hook&lt;br /&gt;
&lt;br /&gt;
== Client Hooks ==&lt;br /&gt;
&lt;br /&gt;
* Client_PresentConfigureUI (Client_PresentConfigureUI.lua)&lt;br /&gt;
** Called when a player checks your mod on the Create Game page.  If your mod has any configurable settings, you should create UI controls on the screen to allow players to configure them using the [[Mod API Reference:UI|UI API]].  Mods should also check the &amp;lt;code&amp;gt;[https://www.warzone.com/wiki/Mod_Game_Data_Storage Mod.Settings]&amp;lt;/code&amp;gt; global to see if any settings are already defined, and if they are, default their UI state to match that.&lt;br /&gt;
** Arguments: &lt;br /&gt;
# rootParent: Pass this as an argument to the top-level UI element your mod creates.  See the [[Mod API Reference:UI|UI API]] for details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Client_SaveConfigureUI (Client_SaveConfigureUI.lua)&lt;br /&gt;
** Called when a player submits the Create Game Mod page with your mod checked.  If your mod presented any UI in Client_PresentConfigureUI, your mod should persist any settings into the &amp;lt;code&amp;gt;Mod.Settings&amp;lt;/code&amp;gt; global during this hook.  This is the only place that &amp;lt;code&amp;gt;Mod.Settings&amp;lt;/code&amp;gt; should ever be written to.&lt;br /&gt;
** Arguments: &lt;br /&gt;
# alert: A function callback that takes a string.  If the user has configured anything wrong with your UI, you can call this to notify them of their mistake.  Calling this function will also abort the save.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Client_PresentSettingsUI (Client_PresentSettingsUI.lua)&lt;br /&gt;
** Called when a player opens the Game Settings panel of a game that has your mod included.  If your mod has any configurable settings, you should read them out of the global &amp;lt;code&amp;gt;Mod.Settings&amp;lt;/code&amp;gt; and show them to the player here using the [[Mod API Reference:UI|UI API]].&lt;br /&gt;
** Arguments: &lt;br /&gt;
# rootParent: Pass this as an argument to the top-level UI element your mod creates.  See the [[Mod API Reference:UI|UI API]] for details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Client_PresentMenuUI (Client_PresentMenuUI.lua)&lt;br /&gt;
** If present, games with this mod enabled will have a new button on the menu.  When the player clicks that button, this mod hook is invoked and the resulting UI will be shown to the player in a dialog.  See [[Mod API Reference:UI|UI API]].&lt;br /&gt;
** Arguments: &lt;br /&gt;
# rootParent: Pass this as an argument to the top-level UI element your mod creates.  See the [[Mod API Reference:UI|UI API]] for details.&lt;br /&gt;
# setMaxSize: Function mods can call to set the maximum size of the dialog.  Pass two numbers: the width and the height.  Note that screen sizes can vary a lot, so you can never be sure you&#039;ll get the size you request, so plan on making your UI work in all sizes.&lt;br /&gt;
# setScrollable: Function mods can call to set whether the dialog is scrollable horizontally or vertically.  Pass two booleans: the first determines if it&#039;s horizontally scrollable, and the second determines if it&#039;s vertically scrollable.  The default is false, true.&lt;br /&gt;
# [[Mod API Reference:ClientGame|ClientGame]]: Information about the game.&lt;br /&gt;
# close: Function that, when called, will close the current dialog.  Takes no arguments and returns nothing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Client_GameRefresh (Client_GameRefresh.lua)&lt;br /&gt;
** Invoked whenever the client gets data about this game from the server.  This can be used to check for updated Mod.PublicGameData or Mod.PlayerGameData, documented at [[Mod Game Data Storage]].   The client refresh timing is different between single-player and multi-player, and in multi-player can also vary depending on the user&#039;s internet connection (such as whether they&#039;re connected by websocket, long polling socket, or normal polling).  Therefore, a mod should never write code that breaks if Client_GameRefresh is called at unexpected times.&lt;br /&gt;
** Arguments: &lt;br /&gt;
# [[Mod API Reference:ClientGame|ClientGame]]: Information about the game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Client_PresentCommercePurchaseUI (Client_PresentCommercePurchaseUI.lua)&lt;br /&gt;
** Invoked whenever the player clicks the &amp;quot;Build&amp;quot; button in a commerce game.  This can be used to present UI to allow the player to spend their gold on things.&lt;br /&gt;
** Arguments:&lt;br /&gt;
# rootParent: Pass this as an argument to the top-level UI element your mod creates.  See the [[Mod API Reference:UI|UI API]] for details.&lt;br /&gt;
# [[Mod API Reference:ClientGame|ClientGame]]: Information about the game.&lt;br /&gt;
# close: Function that, when called, will close the current dialog.  Takes no arguments and returns nothing.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
Any hooks that start with &amp;lt;code&amp;gt;Server_&amp;lt;/code&amp;gt; are run on the server in multi-player games, and on the client in single-player games.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
No hooks have return values.  Meaning, it doesn&#039;t matter if you return any values from your hook functions.  Instead, the mod framework gives you callbacks to call to affect things.  This is preferred over return values for a few reasons.  First, it allows mods to call the callbacks early on or late on in their function, which can be easier than a return statement which must come at the end.  Second, it allows mods to simply not call the callback, which can signal to Warzone that the mod doesn&#039;t care about the result of this.  This can be important in some cases where multiple mods that define the same hook.  Sometimes the mods instructions can conflict and Warzone must decide which to obey.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Mod Developers Guide]]&lt;br /&gt;
* [[Mod Game Data Storage]]&lt;br /&gt;
[[Category:Mod Developers Guide]]&lt;/div&gt;</summary>
		<author><name>Kaninchen</name></author>
	</entry>
	<entry>
		<id>https://war.app/wiki/index.php?title=Mod_API_Reference:GameOrderCustom&amp;diff=6083</id>
		<title>Mod API Reference:GameOrderCustom</title>
		<link rel="alternate" type="text/html" href="https://war.app/wiki/index.php?title=Mod_API_Reference:GameOrderCustom&amp;diff=6083"/>
		<updated>2024-04-17T21:10:55Z</updated>

		<summary type="html">&lt;p&gt;Kaninchen: removed text about hackers, replaced with a link to the Mod Security wiki page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;GameOrderCustom&#039;&#039;&#039;:  Subclass of [[Mod API Reference:GameOrder|GameOrder]].  This order does nothing on its own, but it can be used by mods for custom orders.  GameOrderCustom is typically sent up from clients to the server, in contrast to [[Mod API Reference:GameOrderEvent|GameOrderEvent]] which is typically sent down from the server to clients.&lt;br /&gt;
&lt;br /&gt;
In order to make sure your mod doesn&#039;t break when used in conjunction with other mods, you should prepend a unique string (such as the name of your mod plus an underscore) to the Payload.  When reading a GameOrderCustom, check if the payload starts with your unique string, and if it doesn&#039;t it means this order isn&#039;t one your mod made and you should ignore it.  If you act on another mod&#039;s messages, or skip them, it will create unexpected behavior for your mod or another mod.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Message&#039;&#039;&#039; &#039;&#039;string&#039;&#039;: The message that will appear in the orders list.  This is what players see.&lt;br /&gt;
* &#039;&#039;&#039;Payload&#039;&#039;&#039; &#039;&#039;string&#039;&#039;: Data the mod wishes to store along with this order, but does not want players to see.&lt;br /&gt;
* &#039;&#039;&#039;CostOpt&#039;&#039;&#039; &#039;&#039;Table&amp;lt;[[Mod API Reference:ResourceType|ResourceType]] (enum),integer&amp;gt;&#039;&#039;: Defines how much gold the order will cost the player in a [[Commerce]] game.  This should only be set in commerce games.  If CostOpt is set to nil, then it&#039;s assumed to be the same as having a cost of 0.   The game will take care of taking the player&#039;s resources away correctly, both on the client and server, when inserting an order with a cost into their orders list.&lt;br /&gt;
* &#039;&#039;&#039;OccursInPhaseOpt&#039;&#039;&#039; &#039;&#039;[[Mod API Reference:Nullable|Nullable]]&amp;lt;[[Mod API Reference:TurnPhase|TurnPhase]] (enum)&amp;gt;&#039;&#039;:  If not nil, then orders will be forced to be placed in this phase.  Players will not be able to move this order above an order of a lower phase, or below an order of a higher phase.  Added in v5.22.0.&lt;br /&gt;
&#039;&#039;&#039;Important to note&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Mod_Security|Mod security]] should be applied to [[Mod_Hooks|Mod Hooks]] working with this card&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;WL.GameOrderCustom.Create&#039;&#039;&#039;(&#039;&#039;&#039;playerID&#039;&#039;&#039; &#039;&#039;[[Mod API Reference:PlayerID|PlayerID]]&#039;&#039;, &#039;&#039;&#039;message&#039;&#039;&#039; &#039;&#039;string&#039;&#039;, &#039;&#039;&#039;payload&#039;&#039;&#039; &#039;&#039;string&#039;&#039;, &#039;&#039;&#039;costOpt&#039;&#039;&#039; &#039;&#039;Table&amp;lt;[[Mod API Reference:ResourceType|ResourceType]] (enum),integer&amp;gt;&#039;&#039;) (static) returns [[Mod API Reference:GameOrderCustom|GameOrderCustom]]:&lt;br /&gt;
[[Category:Mod API Reference]]&lt;/div&gt;</summary>
		<author><name>Kaninchen</name></author>
	</entry>
	<entry>
		<id>https://war.app/wiki/index.php?title=Mod_Security&amp;diff=6082</id>
		<title>Mod Security</title>
		<link rel="alternate" type="text/html" href="https://war.app/wiki/index.php?title=Mod_Security&amp;diff=6082"/>
		<updated>2024-04-17T21:07:26Z</updated>

		<summary type="html">&lt;p&gt;Kaninchen: Created page with &amp;quot;In a [https://en.wikipedia.org/wiki/Client%E2%80%93server_model Client-Server Relationship] it is very important that the Server checks &amp;#039;&amp;#039;&amp;#039;everything&amp;#039;&amp;#039;&amp;#039; the client sends to it...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In a [https://en.wikipedia.org/wiki/Client%E2%80%93server_model Client-Server Relationship] it is very important that the Server checks &#039;&#039;&#039;everything&#039;&#039;&#039; the client sends to it.&lt;br /&gt;
This is because someone who is proficient in programming (a Hacker for example) can modify any data the client sends to the server.&lt;br /&gt;
It&#039;s therefore important to employ a [https://en.wikipedia.org/wiki/Zero_trust_security_model zero trust policy] when creating mods&lt;br /&gt;
&lt;br /&gt;
== Possible security weak points ==&lt;br /&gt;
=== SendGameCustomMessage ===&lt;br /&gt;
[[Mod_API_Reference:ClientGame|Main article]]&amp;lt;br&amp;gt;&lt;br /&gt;
An attacker can modify the payload in any way they desire. Let&#039;s take a Diplomacy Mod for example, where the Host can decide which player should win at any time. A naive approach using [[Mod_Hooks#Server Hooks|Server_GameCustomMessage(...)]] would be&lt;br /&gt;
    function Server_GameCustomMessage(game, playerID, payload, setReturn)&lt;br /&gt;
        if payload.type == &amp;quot;makePlayerWin&amp;quot; then&lt;br /&gt;
            makePlayerWin(game, payload.playerid)&lt;br /&gt;
            -- makePlayerWin(game, playerid) could be a function that later on adds a order which sets the territory owner of every territory to the player associated with the supplied playerid&lt;br /&gt;
        elsif ... -- other functionality&lt;br /&gt;
    end&lt;br /&gt;
An attacker with the associated playerid of (for example) &#039;&#039;&#039;12345&#039;&#039;&#039; who analyzed the source code of the mod (remember, the source code of every mod is publicly available on [https://github.com/ Github]) can now see that the Hook never actually checks if the client who sent the CustomServerMessage is really the host (indicated by the &#039;&#039;&#039;playerID&#039;&#039;&#039; parameter of the &#039;&#039;&#039;Server_GameCustomMessage&#039;&#039;&#039; function). The attacker could therefore send following Lua table to the Server:&lt;br /&gt;
    {&lt;br /&gt;
        type = &amp;quot;makePlayerWin&amp;quot;,&lt;br /&gt;
        playerid = 12345&lt;br /&gt;
    }&lt;br /&gt;
and automatically win as soon as the turn advances. The actual process is more complicated but that&#039;s about how an attacker could use the security vulnerability to gain a decisive advantage.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
The obvious and right solution is to additionally check inside the &#039;&#039;if condition&#039;&#039; if the &#039;&#039;&#039;playerID&#039;&#039;&#039; supplied to &#039;&#039;&#039;Server_GameCustomMessage&#039;&#039;&#039; belongs to the host.&lt;br /&gt;
   function Server_GameCustomMessage(game, playerID, payload, setReturn)&lt;br /&gt;
        if payload.type == &amp;quot;makePlayerWin&amp;quot; and game.ServerGame.Settings.StartedBy == playerID then&lt;br /&gt;
            makePlayerWin(game, payload.playerid)&lt;br /&gt;
        elsif ... -- other functionality&lt;br /&gt;
    end&lt;br /&gt;
this now makes the functionality secure against custom client data crafted by an attacker&lt;br /&gt;
&lt;br /&gt;
===GameOrderCustom===&lt;br /&gt;
[[Mod_API_Reference:GameOrderCustom|Main article]]&amp;lt;br&amp;gt;&lt;br /&gt;
The Server [[Mod Hooks]] which accept the &#039;&#039;&#039;GameOrderCustom&#039;&#039;&#039; should only depend on the payload, as hackers may, as with &#039;&#039;&#039;SendGameCustomMessage&#039;&#039;&#039;, modify all fields (&#039;&#039;&#039;Message&#039;&#039;&#039;, &#039;&#039;&#039;Payload&#039;&#039;&#039;, &#039;&#039;&#039;CostOpt&#039;&#039;&#039; and &#039;&#039;&#039;OccursInPhaseOpt&#039;&#039;&#039;) to gain an advantage. Note that, since hackers can modify &#039;&#039;&#039;Payload&#039;&#039;&#039; too, it is essential to verify that it was even possible for the player to send the received &#039;&#039;&#039;Payload&#039;&#039;&#039; in the first place. All other Fields should be recreated by the Server.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kaninchen</name></author>
	</entry>
	<entry>
		<id>https://war.app/wiki/index.php?title=Mod_Developers_Guide&amp;diff=6063</id>
		<title>Mod Developers Guide</title>
		<link rel="alternate" type="text/html" href="https://war.app/wiki/index.php?title=Mod_Developers_Guide&amp;diff=6063"/>
		<updated>2024-03-19T18:16:32Z</updated>

		<summary type="html">&lt;p&gt;Kaninchen: /* Global State */  spelling error&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes information necessary for making [[Mods]].&lt;br /&gt;
&lt;br /&gt;
This guide assumes that you know the Lua programming language.  If you&#039;ve worked with other languages, such as Javascript, Lua should be very easy to learn.  Many tutorials are available on the internet if you search for them.&lt;br /&gt;
&lt;br /&gt;
Note that you must be a Warzone [[member]] to develop mods, as mods are a member feature.&lt;br /&gt;
&lt;br /&gt;
== Getting started creating a mod ==&lt;br /&gt;
&lt;br /&gt;
There are two ways to load mod code into Warzone: Using the Standalone Client, or directly uploading from your editor.  Uploading from your editor is the preferred way since it allows for more rapid iteration.  However, it also requires an extension to your editor, which only exists for VS Code.  If you want to develop from an editor other than VS Code, or if you want to develop without an active internet connection, you should use the Standalone Client method.&lt;br /&gt;
&lt;br /&gt;
=== Developing with the Standalone Client ===&lt;br /&gt;
&lt;br /&gt;
# Open the page https://www.warzone.com/EnableModDevelopment to enable mod development for your Warzone account.&lt;br /&gt;
# Download the [[Standalone Client]] and run it.&lt;br /&gt;
# Obtain the source code to an example mod, such as the Randomized Wastelands Mod from https://github.com/FizzerWL/ExampleMods/tree/master/RandomizedWastelandsMod.  Download the lua files to a folder on your device. (The easiest way is to use Github&#039;s &amp;quot;Download zip&amp;quot; button if you&#039;re not a git user)&lt;br /&gt;
# Launch the Standalone Client, sign in.  Click the &amp;quot;Mod Development Console&amp;quot; button.  You can also use the hotkey Ctrl+Shift+M to bring up this dialog any time, and also note that this dialog can be docked to sides of your screen if you wish.&lt;br /&gt;
# Click the &amp;quot;Create New Mod&amp;quot; button and give your mod a name.&lt;br /&gt;
# Provide path to your folder with lua files that you downloaded in step 3.&lt;br /&gt;
# Click Submit to create the mod.&lt;br /&gt;
# From the single-player main menu, click &amp;quot;Custom Game&amp;quot;, then scroll down and click Change Mods.&lt;br /&gt;
# You should see the mod you created here.  Check the box to turn it on and click Submit.&lt;br /&gt;
# If you&#039;ve cloned the Randomized Wastelands mod, you&#039;ll also need to turn on wastelands if you want it to do anything.  You can also turn off fog to more easily see its effects.  Create the game, and see the wastelands be adjusted!&lt;br /&gt;
&lt;br /&gt;
Now you can make modifications to the lua code, press the &amp;quot;Reload code&amp;quot; button and try them out! &lt;br /&gt;
&lt;br /&gt;
=== Developing with direct upload from your editor ===&lt;br /&gt;
&lt;br /&gt;
# Open the page https://www.warzone.com/EnableModDevelopment to enable mod development for your Warzone account.&lt;br /&gt;
# Install VS Code from https://code.visualstudio.com/ &lt;br /&gt;
# Obtain the source code to an example mod, such as the Randomized Wastelands Mod from https://github.com/FizzerWL/ExampleMods/tree/master/RandomizedWastelandsMod.  Download the lua files to a folder on your device. (The easiest way is to use Github&#039;s &amp;quot;Download zip&amp;quot; button if you&#039;re not a git user)&lt;br /&gt;
# Download the Warzone Mod Helper VS Code extension VSIX file from https://github.com/FizzerWL/WarzoneModHelper/releases.  Install it by launching VS Code, pressing Ctrl+Shift+P, entering &amp;quot;Install from VSIX&amp;quot; and selecting the VSIX file you downloaded.&lt;br /&gt;
# (optional) Install the Lua IDE extension: https://marketplace.visualstudio.com/items?itemName=sumneko.lua&lt;br /&gt;
# Open the Mod Development Console at https://www.warzone.com/Mods/Develop&lt;br /&gt;
# Click the &amp;quot;Create New Mod&amp;quot; button and give your mod a name.  Ensure the &amp;quot;Development&amp;quot; box is checked.  After creating it, make note of your Mod ID.&lt;br /&gt;
# In VS Code, open the RandomizedWastelandsMod folder you downloaded earlier.  Open one of the lua files in this folder.&lt;br /&gt;
# Visit https://www.warzone.com/API/GetAPIToken and copy your API Token to the clipboard.&lt;br /&gt;
# In VS Code, press Ctrl+Shift+P and select &amp;quot;Upload Mod&amp;quot;.  Enter your Mod ID you noted earlier, and paste your API Token when prompted.  Ensure it says &amp;quot;Mod updated successfully&amp;quot; in the bottom right corner.&lt;br /&gt;
# Now that your mod is updated, let&#039;s run it. Visit https://www.warzone.com/SinglePlayer?CustomGame=1 and click Change Mods.  You should see the mod you created here.  Check the box to turn it on and click Submit.&lt;br /&gt;
# If you&#039;ve cloned the Randomized Wastelands mod, you&#039;ll also need to turn on wastelands if you want it to do anything.  You can also turn off fog to more easily see its effects.  Create the game, and see the wastelands be adjusted!&lt;br /&gt;
&lt;br /&gt;
Now you can make modifications to the lua code, press and invoke the &amp;quot;Upload Mod&amp;quot; feature again to try them out!&lt;br /&gt;
&lt;br /&gt;
Be sure to read the rest of this page for essential information on mod development.&lt;br /&gt;
&lt;br /&gt;
== Video Tutorial == &lt;br /&gt;
&lt;br /&gt;
If you prefer to learn via video, check out this YouTube tutorial on how to make a mod:  https://www.youtube.com/watch?v=mwVDv5PXyrg&lt;br /&gt;
&lt;br /&gt;
== Hooks ==&lt;br /&gt;
&lt;br /&gt;
Warzone will call into a mod&#039;s lua code using what are called &#039;&#039;&#039;hooks&#039;&#039;&#039;.  For example, it will call a hook named &amp;lt;code&amp;gt;Server_StartGame&amp;lt;/code&amp;gt; when a game is beginning and give your mod an opportunity to change things about how the map is set up.&lt;br /&gt;
&lt;br /&gt;
For full details on what hooks are available, see [[Mod Hooks]].&lt;br /&gt;
&lt;br /&gt;
== Sharing code with &amp;quot;require&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
You can call the &amp;quot;require&amp;quot; function to share code between different lua files.  &lt;br /&gt;
&lt;br /&gt;
For example, if you have utility functions in a file named &#039;Utilities.lua&#039;, simply write &amp;lt;code&amp;gt;require(&#039;Utilities&#039;)&amp;lt;/code&amp;gt; at the top of another file to include it (omit the &amp;lt;code&amp;gt;.lua&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Note that all lua files must be in the same directory (subdirectories are currently not supported).&lt;br /&gt;
&lt;br /&gt;
== Printing Output ==&lt;br /&gt;
&lt;br /&gt;
In lua, you can print output with lua&#039;s &amp;lt;code&amp;gt;print&amp;lt;/code&amp;gt; function.  For example: &amp;lt;code&amp;gt;print(&amp;quot;Hello, world!&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see this output, open the Mod Development Console (Ctrl+Shift+M) and click View Mod Output.  Then create a single-player game using that mod, and when the print statement runs, you&#039;ll see the output appear in this window in real-time.&lt;br /&gt;
&lt;br /&gt;
This is useful to assist in debugging.&lt;br /&gt;
&lt;br /&gt;
In multi-player games, the output of mods that run on the server is currently not viewable anywhere, unless the mod crashes which will display recently printed lines in a report in the Mod Development Console.  For this reason, it&#039;s easier to debug mods in single-player before moving to multi-player.&lt;br /&gt;
&lt;br /&gt;
== Global State ==&lt;br /&gt;
&lt;br /&gt;
Never assume any state will persist, unless specifically called out in the documentation.  For example, don&#039;t write to a global variable in one hook and access it in another.&lt;br /&gt;
&lt;br /&gt;
If you try to in a single-player game, you may find that global state does persist.  However, don&#039;t be tempted to rely on this, since globals are always wiped in multi-player, and globals will also get wiped in single-player if someone saves and re-loads their game.  Therefore, ensure you code as if globals will never persist between hook calls, except where explicitly allowed.&lt;br /&gt;
&lt;br /&gt;
== Data Storage ==&lt;br /&gt;
&lt;br /&gt;
Mods can store public, private, or player-specific data within a game.  See [[Mod Game Data Storage]] for details.&lt;br /&gt;
&lt;br /&gt;
== Mod Timeout ==&lt;br /&gt;
&lt;br /&gt;
Note that if a game takes more than a minute to advance, the mods will time out and the game will not advance.  This time counts all mods enabled for that game combined, so mod authors should work to ensure their mods are efficient as possible.&lt;br /&gt;
&lt;br /&gt;
If a game times out more than 10 times in a row, Warzone will end the game automatically.&lt;br /&gt;
&lt;br /&gt;
== Tips ==&lt;br /&gt;
&lt;br /&gt;
Be sure to test in multi-player!  When running Server code in multi-player, your lua code runs on the Warzone server which uses a different lua engine.  In theory, everything should be the same, but there is still an opportunity for differences.  To ensure everything you&#039;re doing works, it&#039;s recommended you test in multi-player, not only before you&#039;re ready to go public, but also occasionally during your development process.&lt;br /&gt;
&lt;br /&gt;
Note that all mods uploaded to Warzone must use the MIT license, or something equally or more permissable.  Any mods without a license specified are assumed to be using MIT.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Mod API Reference]]&lt;br /&gt;
* [[Mod Backwards Compatibility]]&lt;br /&gt;
* [[Public Mods]]&lt;br /&gt;
* [[Mod Hooks]]&lt;br /&gt;
* [[Mod Game Data Storage]]&lt;br /&gt;
* [https://discord.gg/hqGkVXagyt Warzone Mod Makers Discord]&lt;br /&gt;
&lt;br /&gt;
[[Category:Mod Developers Guide]]&lt;/div&gt;</summary>
		<author><name>Kaninchen</name></author>
	</entry>
	<entry>
		<id>https://war.app/wiki/index.php?title=Mod_API_Reference:GameOrderCustom&amp;diff=6062</id>
		<title>Mod API Reference:GameOrderCustom</title>
		<link rel="alternate" type="text/html" href="https://war.app/wiki/index.php?title=Mod_API_Reference:GameOrderCustom&amp;diff=6062"/>
		<updated>2024-03-19T16:31:05Z</updated>

		<summary type="html">&lt;p&gt;Kaninchen: Added a warning due to possible hacking&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;GameOrderCustom&#039;&#039;&#039;:  Subclass of [[Mod API Reference:GameOrder|GameOrder]].  This order does nothing on its own, but it can be used by mods for custom orders.  GameOrderCustom is typically sent up from clients to the server, in contrast to [[Mod API Reference:GameOrderEvent|GameOrderEvent]] which is typically sent down from the server to clients.&lt;br /&gt;
&lt;br /&gt;
In order to make sure your mod doesn&#039;t break when used in conjunction with other mods, you should prepend a unique string (such as the name of your mod plus an underscore) to the Payload.  When reading a GameOrderCustom, check if the payload starts with your unique string, and if it doesn&#039;t it means this order isn&#039;t one your mod made and you should ignore it.  If you act on another mod&#039;s messages, or skip them, it will create unexpected behavior for your mod or another mod.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Message&#039;&#039;&#039; &#039;&#039;string&#039;&#039;: The message that will appear in the orders list.  This is what players see.&lt;br /&gt;
* &#039;&#039;&#039;Payload&#039;&#039;&#039; &#039;&#039;string&#039;&#039;: Data the mod wishes to store along with this order, but does not want players to see.&lt;br /&gt;
* &#039;&#039;&#039;CostOpt&#039;&#039;&#039; &#039;&#039;Table&amp;lt;[[Mod API Reference:ResourceType|ResourceType]] (enum),integer&amp;gt;&#039;&#039;: Defines how much gold the order will cost the player in a [[Commerce]] game.  This should only be set in commerce games.  If CostOpt is set to nil, then it&#039;s assumed to be the same as having a cost of 0.   The game will take care of taking the player&#039;s resources away correctly, both on the client and server, when inserting an order with a cost into their orders list.&lt;br /&gt;
* &#039;&#039;&#039;OccursInPhaseOpt&#039;&#039;&#039; &#039;&#039;[[Mod API Reference:Nullable|Nullable]]&amp;lt;[[Mod API Reference:TurnPhase|TurnPhase]] (enum)&amp;gt;&#039;&#039;:  If not nil, then orders will be forced to be placed in this phase.  Players will not be able to move this order above an order of a lower phase, or below an order of a higher phase.  Added in v5.22.0.&lt;br /&gt;
&#039;&#039;&#039;Important to note&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Server [[Mod_Hooks]] which accept the &#039;&#039;&#039;GameOrderCustom&#039;&#039;&#039; should only depend on the payload, as hackers may modify all fields (&#039;&#039;&#039;Message&#039;&#039;&#039;, &#039;&#039;&#039;Payload&#039;&#039;&#039;, &#039;&#039;&#039;CostOpt&#039;&#039;&#039; and &#039;&#039;&#039;OccursInPhaseOpt&#039;&#039;&#039;) to gain an advantage. Note that, since hackers can modify &#039;&#039;&#039;Payload&#039;&#039;&#039; too, it is essential to verify that it was even possible for the player to send the received &#039;&#039;&#039;Payload&#039;&#039;&#039; in the first place. All other Fields should be recreated by the Server.&lt;br /&gt;
== Functions ==&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;WL.GameOrderCustom.Create&#039;&#039;&#039;(&#039;&#039;&#039;playerID&#039;&#039;&#039; &#039;&#039;[[Mod API Reference:PlayerID|PlayerID]]&#039;&#039;, &#039;&#039;&#039;message&#039;&#039;&#039; &#039;&#039;string&#039;&#039;, &#039;&#039;&#039;payload&#039;&#039;&#039; &#039;&#039;string&#039;&#039;, &#039;&#039;&#039;costOpt&#039;&#039;&#039; &#039;&#039;Table&amp;lt;[[Mod API Reference:ResourceType|ResourceType]] (enum),integer&amp;gt;&#039;&#039;) (static) returns [[Mod API Reference:GameOrderCustom|GameOrderCustom]]:&lt;br /&gt;
[[Category:Mod API Reference]]&lt;/div&gt;</summary>
		<author><name>Kaninchen</name></author>
	</entry>
	<entry>
		<id>https://war.app/wiki/index.php?title=User:Kaninchen&amp;diff=4947</id>
		<title>User:Kaninchen</title>
		<link rel="alternate" type="text/html" href="https://war.app/wiki/index.php?title=User:Kaninchen&amp;diff=4947"/>
		<updated>2019-04-26T22:32:24Z</updated>

		<summary type="html">&lt;p&gt;Kaninchen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;My Ingamename is the same as my Wiki-Name (Kaninchen)&lt;/div&gt;</summary>
		<author><name>Kaninchen</name></author>
	</entry>
	<entry>
		<id>https://war.app/wiki/index.php?title=Diplomacy_Gametype&amp;diff=4946</id>
		<title>Diplomacy Gametype</title>
		<link rel="alternate" type="text/html" href="https://war.app/wiki/index.php?title=Diplomacy_Gametype&amp;diff=4946"/>
		<updated>2019-04-26T22:27:50Z</updated>

		<summary type="html">&lt;p&gt;Kaninchen: /* PE (Public Enemy) */ Changed a &amp;quot;too&amp;quot; to a &amp;quot;to&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Diplomacy gametype&#039;&#039;&#039; is a user created &amp;quot;custom&amp;quot; game with a set of rules in a FFA to be followed to play the game as a real world scenario of deceiving enemies, making valuable alliances, making &amp;quot;declarations&amp;quot; of war, and eventually being the last one standing, however, the game can be [[Vote to end|voted to end]] if an alliance claims &amp;quot;victory&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Rules&#039;&#039;&#039; ==&lt;br /&gt;
Common rules consist of:&lt;br /&gt;
&lt;br /&gt;
# No attacking other players without declaring war on them in public chat so as to give the enemy a fair chance. Often both Sides have to wait a turn to attack after the war-declaration&lt;br /&gt;
# No attacking an player without warning &#039;&#039;(in some games this is known as &amp;quot;[https://en.wikipedia.org/wiki/Blitzkrieg Blitzkrieging]&amp;quot;, German for &amp;quot;Lighting War&amp;quot;.)&#039;&#039;&lt;br /&gt;
# Alliances are encouraged. Some games require alliances be made public, some allow it to be private. Allies are a good way of invading successfully or defending from a stronger enemy.&lt;br /&gt;
#Maximum Number of Allies a Player can have &#039;&#039;(Even if Alliances are encouraged, there&#039;s sometimes a limit so Alliances won&#039;t get too big)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Other possible rules consist of:&lt;br /&gt;
#Only Hosts can declare PEs&lt;br /&gt;
#Gangbanging forbidden/allowed &#039;&#039;(Gangbanging in this case means that many Players together attack one alone Player (Like a 5vs1). Often a Player alone can&#039;t defend himself from several Players, that&#039;s why it&#039;s often forbidden.)&#039;&#039;&lt;br /&gt;
#Claims (doesn&#039;t) have to be respected &#039;&#039;(Claiming means, that a Player says that a Bonus on Neutral or booted territory is his. Often Claiming doesn&#039;t need to be respected)&#039;&#039;&lt;br /&gt;
#Reasons for war (not) needed &#039;&#039;(Sometimes, there must be a Reason to declare War to reduce War-Mongering. An example could be that somebody didn&#039;t respected your Claim or somebody attacked your Ally.)&#039;&#039;&lt;br /&gt;
#Roleplay mandatory &#039;&#039;(Means, that Players actually have to Roleplay, and don&#039;t treat the Diplomacy-Game like any other Warzone-Game)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If a player breaks the custom rules of the Diplomacy Game, they aren&#039;t breaking the actual [[Rules]] of Warzone. They only become a PE for this Diplomacy-game.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;PE&#039;&#039;&#039; (&#039;&#039;&#039;P&#039;&#039;&#039;ublic &#039;&#039;&#039;E&#039;&#039;&#039;nemy)===&lt;br /&gt;
Players which break Rules in a Diplomacy Games are often called a &amp;quot;PE&amp;quot;, which is short for &#039;&#039;&#039;P&#039;&#039;&#039;ublic &#039;&#039;&#039;E&#039;&#039;&#039;nemy.&lt;br /&gt;
In many Diplomacy Games only the Hosts can (un)declare PEs, but sometimes the Hosts also allows normal Players to (un)declare PEs.&lt;br /&gt;
&lt;br /&gt;
Often all Players which are adjacent to a PE can attack the PE without warning/permission and even have to attack the PE, if they&#039;re able to. Somebody who won&#039;t attack a PE or even are helping a PE might become a PE itself.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Origin&#039;&#039;&#039; ==&lt;br /&gt;
While the exact creator is not known as after its obscure creation other users quickly copied the rules and made spinoffs, the user &amp;quot;Soviet Russia Buddy&amp;quot; takes the most credit for creating the game. His first game was known as &amp;quot;Reality Warfare, A New Way Of Playing&amp;quot;, which was then shortened to &amp;quot;Reality Warfare&amp;quot; which its current name is. This can be disputed by Le Count H who was laying the foundation in scenarios in late September of 2012. These were initially unfair due their emphasis on giving nations overwhelming advantages due to their size. His games became extremely popular the following summer. Another user named &amp;quot;Zecit&amp;quot; coined the term &amp;quot;Public Enemy&amp;quot; in his game &amp;quot;Simulation World&amp;quot;, which is used in many Diplomacy games. Out of all hosts commonly making these games, he (presumably male) has the most amount of rules and hosts games at least once a day. However, not all of them are rules and rather more creative and realistic additions, one of which is a rule involving capitals, and some are guidelines that can be used to be more &amp;quot;diplomatic&amp;quot;. People who have played with him have said they have played that gametype with him for almost 2 years. When asked where he got his possibly original idea, he said he had been playing a 24FFA with no fog when he noticed that everyone had to have secret alliances as no one was attacking anyone.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Current&#039;&#039;&#039; ==&lt;br /&gt;
Currently, many different players host these games. Most of them are 6FFAs, but Soviet Russia Buddy and others host 24FFAs, or sometimes less for scenario diplomacy games. While many players attribute many different users for its creation, many only use 3-4 of Soviet Russia Buddy&#039;s original rules, usually copying them word for word. Alternatively, rules are slacked and public declarations are only required if a player wants to be &amp;quot;trustworthy&amp;quot;. Many diplomacy games involve a strong element of roleplay, as players play as if they were a character in whichever world the game is set in. This works especially well with maps of universes from fantasy novels, such as George RR Martin&#039;s &amp;quot;Song of Ice and Fire&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Diplomacy mods&#039;&#039;&#039;==&lt;br /&gt;
The most requested feature from Uservoice, [https://warlight.uservoice.com/forums/77051-warlight-features/suggestions/1088481-peace-treaties Peace Treaties], has been implemented as a [[Mod]]. The [[Advanced Diplomacy Mod]] and [[Diplomacy]] mod remove the need for players to be &amp;quot;trustworthy&amp;quot;, as declarations are not needed anymore, since if you are at peace with someone, you cannot attack each other.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;em&amp;gt;Warning: As of November 2018, there are bugs with the Advanced Diplomacy mod. Use the [[Diplomacy]] mod instead&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Other==&lt;br /&gt;
&lt;br /&gt;
Common [[settings]] are &amp;quot;no fog&amp;quot; or &amp;quot;slight fog&amp;quot;, so as to know if someone really did blitzkrieg. All [[cards]] are often enabled to allow for interesting storyline twists to occur in the game. &lt;br /&gt;
&lt;br /&gt;
Also most Diplomacy-games are Multi-Day Games, so everyone can react easily and unstressed and because Diplomacy-Games often have many Players. But also some are Real-Time with a high Boot-Time.&lt;br /&gt;
&lt;br /&gt;
Most hosts make the game a [[Ranked versus Practice|practice game]].&lt;br /&gt;
&lt;br /&gt;
Most hosts also use [[custom scenarios]], if they aren&#039;t able to use custom scenarios, they usually choose [[manual distribution]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Variants]]&lt;/div&gt;</summary>
		<author><name>Kaninchen</name></author>
	</entry>
	<entry>
		<id>https://war.app/wiki/index.php?title=Diplomacy_Gametype&amp;diff=4910</id>
		<title>Diplomacy Gametype</title>
		<link rel="alternate" type="text/html" href="https://war.app/wiki/index.php?title=Diplomacy_Gametype&amp;diff=4910"/>
		<updated>2019-03-20T17:33:11Z</updated>

		<summary type="html">&lt;p&gt;Kaninchen: Fixed a small typo.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Diplomacy gametype&#039;&#039;&#039; is a user created &amp;quot;custom&amp;quot; game with a set of rules in a FFA to be followed to play the game as a real world scenario of deceiving enemies, making valuable alliances, making &amp;quot;declarations&amp;quot; of war, and eventually being the last one standing, however, the game can be [[Vote to end|voted to end]] if an alliance claims &amp;quot;victory&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Rules&#039;&#039;&#039; ==&lt;br /&gt;
Common rules consist of:&lt;br /&gt;
&lt;br /&gt;
# No attacking other players without declaring war on them in public chat so as to give the enemy a fair chance. Often both Sides have to wait a turn to attack after the war-declaration&lt;br /&gt;
# No attacking an player without warning &#039;&#039;(in some games this is known as &amp;quot;[https://en.wikipedia.org/wiki/Blitzkrieg Blitzkrieging]&amp;quot;, German for &amp;quot;Lighting War&amp;quot;.)&#039;&#039;&lt;br /&gt;
# Alliances are encouraged. Some games require alliances be made public, some allow it to be private. Allies are a good way of invading successfully or defending from a stronger enemy.&lt;br /&gt;
#Maximum Number of Allies a Player can have &#039;&#039;(Even if Alliances are encouraged, there&#039;s sometimes a limit so Alliances won&#039;t get too big)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Other possible rules consist of:&lt;br /&gt;
#Only Hosts can declare PEs&lt;br /&gt;
#Gangbanging forbidden/allowed &#039;&#039;(Gangbanging in this case means that many Players together attack one alone Player (Like a 5vs1). Often a Player alone can&#039;t defend himself from several Players, that&#039;s why it&#039;s often forbidden.)&#039;&#039;&lt;br /&gt;
#Claims (doesn&#039;t) have to be respected &#039;&#039;(Claiming means, that a Player says that a Bonus on Neutral or booted territory is his. Often Claiming doesn&#039;t need to be respected)&#039;&#039;&lt;br /&gt;
#Reasons for war (not) needed &#039;&#039;(Sometimes, there must be a Reason to declare War to reduce War-Mongering. An example could be that somebody didn&#039;t respected your Claim or somebody attacked your Ally.)&#039;&#039;&lt;br /&gt;
#Roleplay mandatory &#039;&#039;(Means, that Players actually have to Roleplay, and don&#039;t treat the Diplomacy-Game like any other Warzone-Game)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If a player breaks the custom rules of the Diplomacy Game, they aren&#039;t breaking the actual [[Rules]] of Warzone. They only become a PE for this Diplomacy-game.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;PE&#039;&#039;&#039; (&#039;&#039;&#039;P&#039;&#039;&#039;ublic &#039;&#039;&#039;E&#039;&#039;&#039;nemy)===&lt;br /&gt;
Players which break Rules in a Diplomacy Games are often called a &amp;quot;PE&amp;quot;, which is short for &#039;&#039;&#039;P&#039;&#039;&#039;ublic &#039;&#039;&#039;E&#039;&#039;&#039;nemy.&lt;br /&gt;
In many Diplomacy Games only the Hosts can (un)declare PEs, but sometimes the Hosts also allows normal Players to (un)declare PEs.&lt;br /&gt;
&lt;br /&gt;
Often all Players which are adjacent to a PE can attack the PE without warning/permission and even have to attack the PE, if they&#039;re able too. Somebody who won&#039;t attack a PE or even are helping a PE might become a PE itself.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Origin&#039;&#039;&#039; ==&lt;br /&gt;
While the exact creator is not known as after its obscure creation other users quickly copied the rules and made spinoffs, the user &amp;quot;Soviet Russia Buddy&amp;quot; takes the most credit for creating the game. His first game was known as &amp;quot;Reality Warfare, A New Way Of Playing&amp;quot;, which was then shortened to &amp;quot;Reality Warfare&amp;quot; which its current name is. This can be disputed by Le Count H who was laying the foundation in scenarios in late September of 2012. These were initially unfair due their emphasis on giving nations overwhelming advantages due to their size. His games became extremely popular the following summer. Another user named &amp;quot;Zecit&amp;quot; coined the term &amp;quot;Public Enemy&amp;quot; in his game &amp;quot;Simulation World&amp;quot;, which is used in many Diplomacy games. Out of all hosts commonly making these games, he (presumably male) has the most amount of rules and hosts games at least once a day. However, not all of them are rules and rather more creative and realistic additions, one of which is a rule involving capitals, and some are guidelines that can be used to be more &amp;quot;diplomatic&amp;quot;. People who have played with him have said they have played that gametype with him for almost 2 years. When asked where he got his possibly original idea, he said he had been playing a 24FFA with no fog when he noticed that everyone had to have secret alliances as no one was attacking anyone.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Current&#039;&#039;&#039; ==&lt;br /&gt;
Currently, many different players host these games. Most of them are 6FFAs, but Soviet Russia Buddy and others host 24FFAs, or sometimes less for scenario diplomacy games. While many players attribute many different users for its creation, many only use 3-4 of Soviet Russia Buddy&#039;s original rules, usually copying them word for word. Alternatively, rules are slacked and public declarations are only required if a player wants to be &amp;quot;trustworthy&amp;quot;. Many diplomacy games involve a strong element of roleplay, as players play as if they were a character in whichever world the game is set in. This works especially well with maps of universes from fantasy novels, such as George RR Martin&#039;s &amp;quot;Song of Ice and Fire&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Diplomacy mods&#039;&#039;&#039;==&lt;br /&gt;
The most requested feature from Uservoice, [https://warlight.uservoice.com/forums/77051-warlight-features/suggestions/1088481-peace-treaties Peace Treaties], has been implemented as a [[Mod]]. The [[Advanced Diplomacy Mod]] and [[Diplomacy]] mod remove the need for players to be &amp;quot;trustworthy&amp;quot;, as declarations are not needed anymore, since if you are at peace with someone, you cannot attack each other.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;em&amp;gt;Warning: As of November 2018, there are bugs with the Advanced Diplomacy mod. Use the [[Diplomacy]] mod instead&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Other==&lt;br /&gt;
&lt;br /&gt;
Common [[settings]] are &amp;quot;no fog&amp;quot; or &amp;quot;slight fog&amp;quot;, so as to know if someone really did blitzkrieg. All [[cards]] are often enabled to allow for interesting storyline twists to occur in the game. &lt;br /&gt;
&lt;br /&gt;
Also most Diplomacy-games are Multi-Day Games, so everyone can react easily and unstressed and because Diplomacy-Games often have many Players. But also some are Real-Time with a high Boot-Time.&lt;br /&gt;
&lt;br /&gt;
Most hosts make the game a [[Ranked versus Practice|practice game]].&lt;br /&gt;
&lt;br /&gt;
Most hosts also use [[custom scenarios]], if they aren&#039;t able to use custom scenarios, they usually choose [[manual distribution]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Variants]]&lt;/div&gt;</summary>
		<author><name>Kaninchen</name></author>
	</entry>
	<entry>
		<id>https://war.app/wiki/index.php?title=Diplomacy_Gametype&amp;diff=4905</id>
		<title>Diplomacy Gametype</title>
		<link rel="alternate" type="text/html" href="https://war.app/wiki/index.php?title=Diplomacy_Gametype&amp;diff=4905"/>
		<updated>2019-02-25T13:45:47Z</updated>

		<summary type="html">&lt;p&gt;Kaninchen: Fixed some typos&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Diplomacy gametype&#039;&#039;&#039; is a user created &amp;quot;custom&amp;quot; game with a set of rules in a FFA to be followed to play the game as a real world scenario of deceiving enemies, making valuable alliances, making &amp;quot;declarations&amp;quot; of war, and eventually being the last one standing, however, the game can be [[Vote to end|voted to end]] if an alliance claims &amp;quot;victory&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Rules&#039;&#039;&#039; ==&lt;br /&gt;
Common rules consist of:&lt;br /&gt;
&lt;br /&gt;
# No attacking other players without declaring war on them in public chat so as to give the enemy a fair chance. Often both Sides have to wait a turn to attack after the war-declaration&lt;br /&gt;
# No attacking an player without warning &#039;&#039;(in some games this is known as &amp;quot;[https://en.wikipedia.org/wiki/Blitzkrieg Blitzkrieging]&amp;quot;, German for &amp;quot;Lighting War&amp;quot;.)&#039;&#039;&lt;br /&gt;
# Alliances are encouraged. Some games require alliances be made public, some allow it to be private. Allies are a good way of invading successfully or defending from a stronger enemy.&lt;br /&gt;
#Maximum Number of Allies a Player can have &#039;&#039;(Even if Alliances are encouraged, there&#039;s sometimes a limit so Alliances won&#039;t get too big)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Other possible rules consist of:&lt;br /&gt;
#Only Hosts can declare PEs&lt;br /&gt;
#Gangbaning forbidden/allowed &#039;&#039;(Gangbanging in this case means that many Players together attack one alone Player (Like a 5vs1). Often a Player alone can&#039;t defend himself from several Players, that&#039;s why it&#039;s often forbidden.)&#039;&#039;&lt;br /&gt;
#Claims (doesn&#039;t) have to be respected &#039;&#039;(Claiming means, that a Player says that a Bonus on Neutral or booted territory is his. Often Claiming doesn&#039;t need to be respected)&#039;&#039;&lt;br /&gt;
#Reasons for war (not) needed &#039;&#039;(Sometimes, there must be a Reason to declare War to reduce War-Mongering. An example could be that somebody didn&#039;t respected your Claim or somebody attacked your Ally.)&#039;&#039;&lt;br /&gt;
#Roleplay mandatory &#039;&#039;(Means, that Players actually have to Roleplay, and don&#039;t treat the Diplomacy-Game like any other Warzone-Game)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If a player breaks the custom rules of the Diplomacy Game, they aren&#039;t breaking the actual [[Rules]] of Warzone. They only become a PE for this Diplomacy-game.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;PE&#039;&#039;&#039; (&#039;&#039;&#039;P&#039;&#039;&#039;ublic &#039;&#039;&#039;E&#039;&#039;&#039;nemy)===&lt;br /&gt;
Players which break Rules in a Diplomacy Games are often called a &amp;quot;PE&amp;quot;, which is short for &#039;&#039;&#039;P&#039;&#039;&#039;ublic &#039;&#039;&#039;E&#039;&#039;&#039;nemy.&lt;br /&gt;
In many Diplomacy Games only the Hosts can (un)declare PEs, but sometimes the Hosts also allows normal Players to (un)declare PEs.&lt;br /&gt;
&lt;br /&gt;
Often all Players which are adjacent to a PE can attack the PE without warning/permission and even have to attack the PE, if they&#039;re able too. Somebody who won&#039;t attack a PE or even are helping a PE might become a PE itself.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Origin&#039;&#039;&#039; ==&lt;br /&gt;
While the exact creator is not known as after its obscure creation other users quickly copied the rules and made spinoffs, the user &amp;quot;Soviet Russia Buddy&amp;quot; takes the most credit for creating the game. His first game was known as &amp;quot;Reality Warfare, A New Way Of Playing&amp;quot;, which was then shortened to &amp;quot;Reality Warfare&amp;quot; which its current name is. This can be disputed by Le Count H who was laying the foundation in scenarios in late September of 2012. These were initially unfair due their emphasis on giving nations overwhelming advantages due to their size. His games became extremely popular the following summer. Another user named &amp;quot;Zecit&amp;quot; coined the term &amp;quot;Public Enemy&amp;quot; in his game &amp;quot;Simulation World&amp;quot;, which is used in many Diplomacy games. Out of all hosts commonly making these games, he (presumably male) has the most amount of rules and hosts games at least once a day. However, not all of them are rules and rather more creative and realistic additions, one of which is a rule involving capitals, and some are guidelines that can be used to be more &amp;quot;diplomatic&amp;quot;. People who have played with him have said they have played that gametype with him for almost 2 years. When asked where he got his possibly original idea, he said he had been playing a 24FFA with no fog when he noticed that everyone had to have secret alliances as no one was attacking anyone.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Current&#039;&#039;&#039; ==&lt;br /&gt;
Currently, many different players host these games. Most of them are 6FFAs, but Soviet Russia Buddy and others host 24FFAs, or sometimes less for scenario diplomacy games. While many players attribute many different users for its creation, many only use 3-4 of Soviet Russia Buddy&#039;s original rules, usually copying them word for word. Alternatively, rules are slacked and public declarations are only required if a player wants to be &amp;quot;trustworthy&amp;quot;. Many diplomacy games involve a strong element of roleplay, as players play as if they were a character in whichever world the game is set in. This works especially well with maps of universes from fantasy novels, such as George RR Martin&#039;s &amp;quot;Song of Ice and Fire&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Diplomacy mods&#039;&#039;&#039;==&lt;br /&gt;
The most requested feature from Uservoice, [https://warlight.uservoice.com/forums/77051-warlight-features/suggestions/1088481-peace-treaties Peace Treaties], has been implemented as a [[Mod]]. The [[Advanced Diplomacy Mod]] and [[Diplomacy]] mod remove the need for players to be &amp;quot;trustworthy&amp;quot;, as declarations are not needed anymore, since if you are at peace with someone, you cannot attack each other.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;em&amp;gt;Warning: As of November 2018, there are bugs with the Advanced Diplomacy mod. Use the [[Diplomacy]] mod instead&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Other==&lt;br /&gt;
&lt;br /&gt;
Common [[settings]] are &amp;quot;no fog&amp;quot; or &amp;quot;slight fog&amp;quot;, so as to know if someone really did blitzkrieg. All [[cards]] are often enabled to allow for interesting storyline twists to occur in the game. &lt;br /&gt;
&lt;br /&gt;
Also most Diplomacy-games are Multi-Day Games, so everyone can react easily and unstressed and because Diplomacy-Games often have many Players. But also some are Real-Time with a high Boot-Time.&lt;br /&gt;
&lt;br /&gt;
Most hosts make the game a [[Ranked versus Practice|practice game]].&lt;br /&gt;
&lt;br /&gt;
Most hosts also use [[custom scenarios]], if they aren&#039;t able to use custom scenarios, they usually choose [[manual distribution]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Variants]]&lt;/div&gt;</summary>
		<author><name>Kaninchen</name></author>
	</entry>
	<entry>
		<id>https://war.app/wiki/index.php?title=Diplomacy_Gametype&amp;diff=4904</id>
		<title>Diplomacy Gametype</title>
		<link rel="alternate" type="text/html" href="https://war.app/wiki/index.php?title=Diplomacy_Gametype&amp;diff=4904"/>
		<updated>2019-02-24T14:16:12Z</updated>

		<summary type="html">&lt;p&gt;Kaninchen: Added Rules; Modified existing Rules; Added Public-Enemy-Section in Rules; Added &amp;quot;Other&amp;quot; Section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Diplomacy gametype&#039;&#039;&#039; is a user created &amp;quot;custom&amp;quot; game with a set of rules in a FFA to be followed to play the game as a real world scenario of deceiving enemies, making valuable alliances, making &amp;quot;declarations&amp;quot; of war, and eventually being the last one standing, however, the game can be [[Vote to end|voted to end]] if an alliance claims &amp;quot;victory&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Rules&#039;&#039;&#039; ==&lt;br /&gt;
Common rules consist of:&lt;br /&gt;
&lt;br /&gt;
# No attacking other players without declaring war on them in public chat so as to give the enemy a fair chance. Often both Sides have to wait a turn to attack after the war-declaration&lt;br /&gt;
# No attacking an player without warning &#039;&#039;(in some games this is known as &amp;quot;[https://en.wikipedia.org/wiki/Blitzkrieg Blitzkrieging]&amp;quot;, German for &amp;quot;Lighting War&amp;quot;.)&#039;&#039;&lt;br /&gt;
# Alliances are encouraged. Some games require alliances be made public, some allow it to be private. Allies are a good way of invading successfully or defending from a stronger enemy.&lt;br /&gt;
#Maximum Number of Allies a Player can have &#039;&#039;(Even if Alliances are encouraged, there&#039;s sometimes a limit so Alliances won&#039;t get too big)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Other possible rules consist of:&lt;br /&gt;
#Only Hosts can declare PEs&lt;br /&gt;
#Gangbaning forbidden/allowed &#039;&#039;(Gangbanging in this case means that many Players together attack one alone Player (Like a 5vs1). Often a Player alone can&#039;t defend himself from several Players, that&#039;s why it&#039;s often forbidden.)&#039;&#039;&lt;br /&gt;
#Claims (doesn&#039;t) have to be respected &#039;&#039;(Claiming means, that a Player says that a Bonus in Neutral or booted terrirory is his. Often Claiming doesn&#039;t need to be respected)&#039;&#039;&lt;br /&gt;
#Reasons for war (not) needed &#039;&#039;(Sometimes, there must be a Reason to declare War to reduce War-Mongering. An example could be that somebody didn&#039;t respected your Claim or somebody attacked your Ally.)&#039;&#039;&lt;br /&gt;
#Roleplay mandatory &#039;&#039;(Means, that Players actually have to Roleplay, and don&#039;t treat the Diplomacy-Game like any other Warzone-Game)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If a player breaks the custom rules of the Diplomacy Game, they aren&#039;t breaking the actual [[Rules]] of Warzone. They only become a PE for this Diplomacy-game.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;PE&#039;&#039;&#039; (&#039;&#039;&#039;P&#039;&#039;&#039;ublic &#039;&#039;&#039;E&#039;&#039;&#039;nemy)===&lt;br /&gt;
Players which break Rules in a Diplomatic Games are often called a &amp;quot;PE&amp;quot;, which is short for &#039;&#039;&#039;P&#039;&#039;&#039;ublic &#039;&#039;&#039;E&#039;&#039;&#039;nemy.&lt;br /&gt;
In many Diplomatic Games only the Hosts can (un)declare PEs, but sometimes the Hosts also allows normal Players to (un)declare PEs.&lt;br /&gt;
&lt;br /&gt;
Often all Players which are adjected to a PE can attack the PE without warning/permission and even have to attack the PE, if they&#039;re able too. Somebody who won&#039;t attack a PE or even are helping a PE might become a PE itself.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Origin&#039;&#039;&#039; ==&lt;br /&gt;
While the exact creator is not known as after its obscure creation other users quickly copied the rules and made spinoffs, the user &amp;quot;Soviet Russia Buddy&amp;quot; takes the most credit for creating the game. His first game was known as &amp;quot;Reality Warfare, A New Way Of Playing&amp;quot;, which was then shortened to &amp;quot;Reality Warfare&amp;quot; which its current name is. This can be disputed by Le Count H who was laying the foundation in scenarios in late September of 2012. These were initially unfair due their emphasis on giving nations overwhelming advantages due to their size. His games became extremely popular the following summer. Another user named &amp;quot;Zecit&amp;quot; coined the term &amp;quot;Public Enemy&amp;quot; in his game &amp;quot;Simulation World&amp;quot;, which is used in many Diplomacy games. Out of all hosts commonly making these games, he (presumably male) has the most amount of rules and hosts games at least once a day. However, not all of them are rules and rather more creative and realistic additions, one of which is a rule involving capitals, and some are guidelines that can be used to be more &amp;quot;diplomatic&amp;quot;. People who have played with him have said they have played that gametype with him for almost 2 years. When asked where he got his possibly original idea, he said he had been playing a 24FFA with no fog when he noticed that everyone had to have secret alliances as no one was attacking anyone.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Current&#039;&#039;&#039; ==&lt;br /&gt;
Currently, many different players host these games. Most of them are 6FFAs, but Soviet Russia Buddy and others host 24FFAs, or sometimes less for scenario diplomacy games. While many players attribute many different users for its creation, many only use 3-4 of Soviet Russia Buddy&#039;s original rules, usually copying them word for word. Alternatively, rules are slacked and public declarations are only required if a player wants to be &amp;quot;trustworthy&amp;quot;. Many diplomacy games involve a strong element of roleplay, as players play as if they were a character in whichever world the game is set in. This works especially well with maps of universes from fantasy novels, such as George RR Martin&#039;s &amp;quot;Song of Ice and Fire&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Diplomacy mods&#039;&#039;&#039;==&lt;br /&gt;
The most requested feature from Uservoice, [https://warlight.uservoice.com/forums/77051-warlight-features/suggestions/1088481-peace-treaties Peace Treaties], has been implemented as a [[Mod]]. The [[Advanced Diplomacy Mod]] and [[Diplomacy]] mod remove the need for players to be &amp;quot;trustworthy&amp;quot;, as declarations are not needed anymore, since if you are at peace with someone, you cannot attack each other.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;em&amp;gt;Warning: As of November 2018, there are bugs with the Advanced Diplomacy mod. Use the [[Diplomacy]] mod instead&amp;lt;/em&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Other==&lt;br /&gt;
&lt;br /&gt;
Common [[settings]] are &amp;quot;no fog&amp;quot; or &amp;quot;slight fog&amp;quot;, so as to know if someone really did blitzkrieg. All [[cards]] are often enabled to allow for interesting storyline twists to occur in the game. &lt;br /&gt;
&lt;br /&gt;
Also most Diplomacy-games are Multi-Day Games, so everyone can react easily and unstressed and because Diplomacy-Games often have many Players. But also some are Real-Time with a high Boot-Time.&lt;br /&gt;
&lt;br /&gt;
Most hosts make the game a [[Ranked versus Practice|practice game]].&lt;br /&gt;
&lt;br /&gt;
Most hosts also use [[custom scenarios]], if they aren&#039;t able to use custom scenarios, they usually choose [[manual distribution]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Variants]]&lt;/div&gt;</summary>
		<author><name>Kaninchen</name></author>
	</entry>
	<entry>
		<id>https://war.app/wiki/index.php?title=Advanced_Strategy&amp;diff=4903</id>
		<title>Advanced Strategy</title>
		<link rel="alternate" type="text/html" href="https://war.app/wiki/index.php?title=Advanced_Strategy&amp;diff=4903"/>
		<updated>2019-02-18T20:59:17Z</updated>

		<summary type="html">&lt;p&gt;Kaninchen: (Hiding your income)Formatted the Text; Added an Image.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
So you think you have internalized the [[Basic Strategy|basic strategies]] of the game and know your way around? Good.&lt;br /&gt;
This page will teach you some advanced techniques and help you understand the subtleties of game-play.&lt;br /&gt;
==Picking Territories==&lt;br /&gt;
In games with [[manual distribution]] of territories picking the right starting position(s) is essential. Especially ladder games require you to choose wisely.&lt;br /&gt;
&lt;br /&gt;
Aspects to consider:&lt;br /&gt;
* Prefer starting spots in smaller [[bonuses]] over those in large ones. Often a 3er completed in turn 1 is worth more than a 5er in turn 3. Aim for those bonuses first that can be completed in the least amount of turns.&lt;br /&gt;
* Don&#039;t just look for the starting bonus itself, also take further expansion possibilities into consideration. What will your income be in turn 3, 4 or 5?&lt;br /&gt;
* Sometimes even larger bonuses can be completed in a single turn when there are 2 or 3 adjacent starting locations. However, you cannot be sure you get all 2 or 3 of these spots, so in those cases you always need a plan B.&lt;br /&gt;
* Avoid bonuses with [[wastelands]], at least in the beginning.&lt;br /&gt;
* Bonuses only pay off if they generate more income than you lost armies taking them. Example: A bonus worth 4 with 10 [[neutral]]s in it will cost you (neutrals x [[Offense and defense kill rates|defensive kill rate]]) armies, say 10 x 0.7 = ~7 armies on average. It will pay off in the 2nd turn already. Taking a bonus worth 4 with 20 neutrals you may lose ~14 armies, so it will only pay off if you can hold it for at least 4 turns.&lt;br /&gt;
* Always place enough picks to avoid ending up with random spots. In a 1v1 with 3 starting spots you need 6 picks. In a 2v2 with 2 starting spots you need at least 6 picks as well, better 8 in case your teammate forgets about coordinating his picks with yours.&lt;br /&gt;
* In larger [[Team Games|team games]], always communicate with your team. On large maps pick a general starting area. The closer you start together, the less borders there are to defend. Mind your expansion capabilities though.&lt;br /&gt;
* You can check your teammates&#039; orders and see where they intend to start: Click their name in the list, then click &amp;quot;View Teammate&#039;s orders&amp;quot;.&lt;br /&gt;
* ...&lt;br /&gt;
* ... (how to place counter picks)&lt;br /&gt;
* ... (how to find out your opponents&#039; starting locations)&lt;br /&gt;
* Once deployment has taken place if you didnt get any of your first 3 choices you therefore know that your opponent has these territories.&lt;br /&gt;
&lt;br /&gt;
==Deployment==&lt;br /&gt;
Think carefully where you will deploy, this can determine whether you win or lose.&lt;br /&gt;
&lt;br /&gt;
Here are some aspects to consider, when deploying:&lt;br /&gt;
* Are you attacking neutral or your enemy(ies) or both?&lt;br /&gt;
* Will this affect your spread rate? How?&lt;br /&gt;
* Do you actually need to deploy there?&lt;br /&gt;
* Will your enemy(ies) attack you?&lt;br /&gt;
* Do you want to have enough armies to just defend from them or attack them?&lt;br /&gt;
* Approximately, how many armies will you lose?&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
==Sequence of Commands==&lt;br /&gt;
&lt;br /&gt;
Timing is always of great importance. One single key attack happening too early or too late can turn your rock-solid victory into an embarrassing defeat.&lt;br /&gt;
&lt;br /&gt;
Your means of manipulating the order of events are the [[Orders List|list of orders]] to the right of the game board and the [[order priority card]] and [[order delay card]]. Unfortunately the latter two are not always at your disposal, so primarily you have to concentrate on your order of commands.&lt;br /&gt;
&lt;br /&gt;
Of course there are no rules that apply to all game situations, but here are some general considerations:&lt;br /&gt;
* In most games, the kill rates are set slightly in favor of the defendant. So it is a very common situation that you want to delay an attack as long as possible, to make sure your opponents attack happens first (if he attacks!). To achieve that without an order delay card, you have to put as many dummy moves as possible at the top of your list of orders. Move some armies in the rear territories back and forth, or better yet bring them to the front lines. Attack some neutrals in the meantime. Just make that most important attack of yours the very last item on your list.&lt;br /&gt;
* When moving reinforcements from the rear to the front lines, move the biggest stack first OR reinforce the most vulnerable position first.&lt;br /&gt;
* When attacking neutrals, attack those where you do not expect interference from other players first, if your stack is just big enough to break the neutral. Try to delay those attacks on neutrals where you might encounter other players as much as possible, let your opponent clear those neutrals for you. Just make sure he does not see it coming.&lt;br /&gt;
* However, if you attack a neutral with a big stack, most often because you anticipate an encounter with a player there or because you&#039;ll knock at her/his bonuses, usually the sooner the better: this way any later move towards your freshly settled stack should crush onto your strong defense. The few casualties suffered breaking the neutral won&#039;t be as costly to recover as attacking second yourself on a supposedly equally powerful stack as yours.&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
==Probabilities==&lt;br /&gt;
&lt;br /&gt;
The [[Analyzer Tool|analyzer tool]] is your best friend. It allows you to estimate if your attacks will fail or succeed and thus can give you a good first risk assessment.&lt;br /&gt;
You can also use it to calculate the chances for multiple attacks combined, but since it only shows one attack at a time you will have to do some simple calculations yourself.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
*You have 10 armies to deploy.&lt;br /&gt;
*There are 2 bonuses of equal value you could complete, but you only have armies for one of them.&lt;br /&gt;
*So you want to know the odds.&lt;br /&gt;
&lt;br /&gt;
# Bonus 1:&lt;br /&gt;
:# You are missing 3 territories, each occupied by 2 neutrals.&lt;br /&gt;
:# Since you have 10 armies at your disposal, you can attack two neutral territories with 3 armies each, and one with 4 armies. If you hover your mouse cursor over the dots in the upper graph of the analyzer tool, it will tell you the odds for each attack.&lt;br /&gt;
:# For a single 3vs2 attack there is a 71% chance of taking the territory.&lt;br /&gt;
:# For a single 4vs2 attack the chance is 93%.&lt;br /&gt;
:# To get the extra bonus armies next turn, all 3 attacks have to succeed, so your combined chances of taking that bonus are:&amp;lt;br&amp;gt;&lt;br /&gt;
71% x 71% x 93% = &#039;&#039;&#039;~46,8%&#039;&#039;&#039;&lt;br /&gt;
# Bonus 2:&lt;br /&gt;
:# You are missing 2 territories, one with 2 neutrals and the other one with 4 neutrals.&lt;br /&gt;
:# Single chance for the 3 vs. 2 attack: 71%&lt;br /&gt;
:# Single chance for the 7 vs. 4 attack: 84%&lt;br /&gt;
:# Combined odds:&lt;br /&gt;
71% x 84% = &#039;&#039;&#039;~59,6%&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
So in this case the odds for completing the 2nd bonus are significantly better than for the 1st one.&lt;br /&gt;
&lt;br /&gt;
;Note:In ladder games the [[Luck Modifier|luck modifier]] is lower (16%), so the results look a bit different:&lt;br /&gt;
&lt;br /&gt;
#Bonus 1:&lt;br /&gt;
:79% x 79% x 100% = &#039;&#039;&#039;~62,4%&#039;&#039;&#039;&lt;br /&gt;
#Bonus 2:&lt;br /&gt;
:79% x 98% = &#039;&#039;&#039;~77,4%&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Hiding your income==&lt;br /&gt;
{{stub|section}}&lt;br /&gt;
In large FFAs or team games it isn&#039;t all about the hard numbers. The impressions other players have of your relative strength are very important to strong-arming other players into alliances or avoiding coalitions formed against you.&lt;br /&gt;
&lt;br /&gt;
In fog games, taking special notice of the number of troops you deploy that are visible to each player is crucial to influencing other players&#039; impressions.&lt;br /&gt;
&lt;br /&gt;
Reinforcements can also be deployed in territories non-adjacent to the enemy and then airlifted or transferred towards the front lines. In such cases you avoid giving the enemy an assured minimum on your income.&lt;br /&gt;
&lt;br /&gt;
https://i.imgur.com/lZNHDJN.png&lt;br /&gt;
&lt;br /&gt;
==Guides written by other players==&lt;br /&gt;
&lt;br /&gt;
Odin/GG&lt;br /&gt;
https://drive.google.com/file/d/0B024HXqzvoGCejhhajNFa1ZOVlE/edit?pref=2&amp;amp;pli=1&lt;br /&gt;
&lt;br /&gt;
Norman/M&#039;Hunters&lt;br /&gt;
https://docs.google.com/document/d/1ERn5UL2-K6d5VUmK8zkWA1j1m1GIqPUiHCYmbWBufw4/edit&lt;br /&gt;
&lt;br /&gt;
Benjamin628&lt;br /&gt;
https://docs.google.com/document/d/1NyhCpIQKShAbWGXicO_ph9whV_UyMS-3a7_re0C7R8Y/edit&lt;br /&gt;
&lt;br /&gt;
==Bonuses==&lt;br /&gt;
{{stub|section}}&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Basic Strategy]]&lt;br /&gt;
* [[Strategic 1 v 1]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Strategies]]&lt;/div&gt;</summary>
		<author><name>Kaninchen</name></author>
	</entry>
	<entry>
		<id>https://war.app/wiki/index.php?title=User:Kaninchen&amp;diff=4902</id>
		<title>User:Kaninchen</title>
		<link rel="alternate" type="text/html" href="https://war.app/wiki/index.php?title=User:Kaninchen&amp;diff=4902"/>
		<updated>2019-02-18T19:32:51Z</updated>

		<summary type="html">&lt;p&gt;Kaninchen: Created page with &amp;quot;Big Chungus&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Big Chungus&lt;/div&gt;</summary>
		<author><name>Kaninchen</name></author>
	</entry>
	<entry>
		<id>https://war.app/wiki/index.php?title=Attack_teammates_warning&amp;diff=4898</id>
		<title>Attack teammates warning</title>
		<link rel="alternate" type="text/html" href="https://war.app/wiki/index.php?title=Attack_teammates_warning&amp;diff=4898"/>
		<updated>2019-02-17T09:43:46Z</updated>

		<summary type="html">&lt;p&gt;Kaninchen: Updated Image; Removed the Checkbox-Paragraph (It was outdated); Changed the Start and Ending of the 1. Paragraph.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;https://i.imgur.com/kH6iAb9.png&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;Attack teammate?&#039;&#039;-warning message pops up when you choose to attack your teammate in a game. It is merely a friendly warning explaining that you are targeting a fellow teammate. This dialog box lets you choose between &#039;&#039;&#039;Attack my teammate&#039;&#039;&#039; and &#039;&#039;&#039;Transfer to my teammate&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Whatever selected here will change the &amp;quot;Treat Teammates as Enemies&amp;quot; check-box that exists on the attack/transfer dialog.  This checkbox is ultimately what determines whether or not the attack will attack your teammate - this dialog is just a handy way to check or uncheck the box.&lt;/div&gt;</summary>
		<author><name>Kaninchen</name></author>
	</entry>
</feed>