<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3ANamingConflictRequestNewName</id>
	<title>API:NamingConflictRequestNewName - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3ANamingConflictRequestNewName"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:NamingConflictRequestNewName&amp;action=history"/>
	<updated>2026-10-17T15:22:36Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.returnofreckoning.com/index.php?title=API:NamingConflictRequestNewName&amp;diff=30616&amp;oldid=prev</id>
		<title>Maintenance script: UI Lua API import (WAR 1.4.8)</title>
		<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:NamingConflictRequestNewName&amp;diff=30616&amp;oldid=prev"/>
		<updated>2026-10-16T19:47:24Z</updated>

		<summary type="html">&lt;p&gt;UI Lua API import (WAR 1.4.8)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{LuaApi|group=Pregame}}&lt;br /&gt;
Sends a new name for the selected character to the server, for characters that must be renamed because of a naming conflict.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NamingConflictRequestNewName(newName)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
;newName : &amp;lt;code&amp;gt;wstring&amp;lt;/code&amp;gt; – The new character name. It must be a wide string: &amp;lt;code&amp;gt;L&amp;quot;Name&amp;quot;&amp;lt;/code&amp;gt; works, &amp;lt;code&amp;gt;&amp;quot;Name&amp;quot;&amp;lt;/code&amp;gt; does not.&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
Nothing.&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* The call only works in the pregame state. At any other time it does nothing.&lt;br /&gt;
* An empty name is ignored.&lt;br /&gt;
* Otherwise the client stores the name on the character select screen and sends a name request for the currently selected character slot to the server.&lt;br /&gt;
* The answer arrives later. The stock rename window registers for &amp;lt;code&amp;gt;SystemData.Events.CHARACTER_PREGAME_NAMING_CONFLICT_RESPONSE&amp;lt;/code&amp;gt; to get it, and is opened on &amp;lt;code&amp;gt;CHARACTER_PREGAME_NAMING_CONFLICT_POP_UP_WINDOW&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Passing an ordinary Lua string or a number raises an &amp;#039;&amp;#039;Invalid Parameters&amp;#039;&amp;#039; error.&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
None besides the generic &amp;#039;&amp;#039;Invalid Parameters&amp;#039;&amp;#039; message when the argument is not a wide string.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
From &amp;lt;code&amp;gt;interfacecore/source/renamewindow.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local newName = TextEditBoxGetText( windowName..&amp;quot;TextInput&amp;quot; )&lt;br /&gt;
if( newName ~= L&amp;quot;&amp;quot; )&lt;br /&gt;
then&lt;br /&gt;
    LabelSetText( windowName..&amp;quot;MessageText&amp;quot;, GetPregameString( StringTables.Pregame.LABEL_RENAME_VALIDATING_NEW_NAME) )&lt;br /&gt;
    EA_Window_Rename.LockInput()&lt;br /&gt;
    NamingConflictRequestNewName( newName )&lt;br /&gt;
else&lt;br /&gt;
    LabelSetText( windowName..&amp;quot;MessageText&amp;quot;, GetPregameString( StringTables.Pregame.LABEL_RENAME_VALIDATING_ERROR ) )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:TextEditBoxGetText|TextEditBoxGetText]]&lt;br /&gt;
* [[API:PregameSetCharacterSelectPage|PregameSetCharacterSelectPage]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>