Changed: Added IG Name Generator by Osquallo (thanks a lot for your amazing work!)

This commit is contained in:
kervala 2016-02-20 19:48:13 +01:00
parent a4e158b0a6
commit c44fe285a6
6 changed files with 762 additions and 10 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -8,6 +8,246 @@ if (outgame==nil) then
end
------------------------------------------------------------------------------------------------------------
-- Name generator.
--nb noms:
-- matis: male 621 - female 621 - surname 621
-- fyros: given name 14269, surname 841
-- zorai: given name one 318, given name two 644, surname 1287
-- tryker: given name 4500, surname 4335
function outgame:getFyrosName()
local nameResult = "";
local fullnameResult = "";
local nbFyrosGivenNames = 0;
for _ in pairs(fyrosGivenNames) do nbFyrosGivenNames = nbFyrosGivenNames + 1 end
local givenName = fyrosGivenNames[math.random(nbFyrosGivenNames)];
local nbFyrosSurnames = 0;
for _ in pairs(fyrosSurnames) do nbFyrosSurnames = nbFyrosSurnames + 1 end
local surname = fyrosSurnames[math.random(nbFyrosSurnames)];
fullnameResult = givenName .. " " .. surname;
nameResult = surname;
return fullnameResult, nameResult
end
function outgame:getMatisName(sex)
local nameResult = "";
local fullnameResult = "";
local dbNameSex = getDbProp("UI:TEMP:NAME_SEX");
if sex ~= nil then
dbNameSex = sex
end
if tonumber( dbNameSex )== 1 then
local nbMatisMaleNames = 0;
for _ in pairs(matisMaleNames) do nbMatisMaleNames = nbMatisMaleNames + 1 end
givenName = matisMaleNames[math.random(nbMatisMaleNames)];
else
local nbMatisFemaleNames = 0;
for _ in pairs(matisFemaleNames) do nbMatisFemaleNames = nbMatisFemaleNames + 1 end
givenName = matisFemaleNames[math.random(nbMatisFemaleNames)];
end
local nbMatisSurnames = 0;
for _ in pairs(matisSurnames) do nbMatisSurnames = nbMatisSurnames + 1 end
local surname = matisSurnames[math.random(nbMatisSurnames)];
fullnameResult = givenName .. " " .. surname;
nameResult = givenName;
return fullnameResult, nameResult
end
function outgame:getTrykerName()
local nameResult = "";
local fullnameResult = "";
local nbTrykerGivenNames = 0;
for _ in pairs(trykerGivenNames) do nbTrykerGivenNames = nbTrykerGivenNames + 1 end
local givenName = trykerGivenNames[math.random(nbTrykerGivenNames)];
local nbTrykerSurnames = 0;
for _ in pairs(trykerSurnames) do nbTrykerSurnames = nbTrykerSurnames + 1 end
local surname = trykerSurnames[math.random(nbTrykerSurnames)];
fullnameResult = surname .. " " .. givenName;
nameResult = givenName;
return fullnameResult, nameResult
end
function outgame:getZoraiName()
local nameResult = "";
local fullnameResult = "";
local nbGivenNameOne = 0;
for _ in pairs(zoraiGivenNameOne) do nbGivenNameOne = nbGivenNameOne + 1 end
local givenNameOne = zoraiGivenNameOne[math.random(nbGivenNameOne)];
local nbGivenNameTwo = 0;
for _ in pairs(zoraiGivenNameTwo) do nbGivenNameTwo = nbGivenNameTwo + 1 end
local givenNameTwo = zoraiGivenNameTwo[math.random(nbGivenNameTwo)];
local nbSurnames = 0;
for _ in pairs(zoraiSurnames) do nbSurnames = nbSurnames + 1 end
local surname = zoraiSurnames[math.random(nbSurnames)];
fullnameResult = surname .. " " .. givenNameOne .. "-" .. givenNameTwo;
nameResult = givenNameOne .. givenNameTwo;
return fullnameResult, nameResult
end
function outgame:procGenerateName()
local uiNameFull = getUI("ui:outgame:appear_name:name_full");
local uiGenText = getUI("ui:outgame:appear_name:eb");
local dbNameRace = getDbProp("UI:TEMP:NAME_RACE");
local dbNameSubRace = getDbProp("UI:TEMP:NAME_SUB_RACE");
local dbNameSubRace2 = getDbProp("UI:TEMP:NAME_SUB_RACE2");
local nameResult = "";
local fullnameResult = "";
-- Look at outgame:procUpdateNameRaceLabel() for the "race" list.
-- fy ma try zo -->
local givenName = "";
if tonumber( dbNameRace ) == 1 then
-- Fyros
fullnameResult, nameResult = self:getFyrosName()
elseif tonumber( dbNameRace ) == 2 then
-- Matis
fullnameResult, nameResult = self:getMatisName()
elseif tonumber( dbNameRace ) == 3 then
-- Tryker
fullnameResult, nameResult = self:getTrykerName()
elseif tonumber( dbNameRace ) == 4 then
-- Zorai
fullnameResult, nameResult = self:getZoraiName()
elseif tonumber( dbNameRace ) == 5 then
-- Maraudeurs
tempResult_1 = "";
tempResult_2 = "";
if tonumber(dbNameSubRace) == 1 then
-- Fyros
fullnameResult, tempResult_1 = self:getFyrosName()
elseif tonumber( dbNameSubRace ) == 2 then
-- Matis F
fullnameResult, tempResult_1 = self:getMatisName(2)
elseif tonumber( dbNameSubRace ) == 3 then
-- Matis M
fullnameResult, tempResult_1 = self:getMatisName(1)
elseif tonumber( dbNameSubRace ) == 4 then
-- Tryker
fullnameResult, tempResult_1 = self:getTrykerName()
elseif tonumber( dbNameSubRace ) == 5 then
-- Zorai
fullnameResult, tempResult_1 = self:getZoraiName()
end
if tonumber(dbNameSubRace2) == 1 then
-- Fyros
fullnameResult, tempResult_2 = self:getFyrosName()
elseif tonumber( dbNameSubRace2 ) == 2 then
-- Matis F
fullnameResult, tempResult_2 = self:getMatisName(2)
elseif tonumber( dbNameSubRace2 ) == 3 then
-- Matis M
fullnameResult, tempResult_2 = self:getMatisName(1)
elseif tonumber( dbNameSubRace2 ) == 4 then
-- Tryker
fullnameResult, tempResult_2 = self:getTrykerName()
elseif tonumber( dbNameSubRace2 ) == 5 then
-- Zorai
fullnameResult, tempResult_2 = self:getZoraiName()
end
fullnameResult = tempResult_1 .. " " .. tempResult_2
nameResult = tempResult_2
end
uiNameFull.hardtext = fullnameResult;
nameResult = string.gsub(nameResult, "'", "");
nameResult = string.gsub(nameResult, " ", "");
nameResult = string.gsub(nameResult, "-", "");
nameResult = string.lower( nameResult );
nameResult = nameResult:gsub("^%l", string.upper);
uiGenText.input_string = nameResult;
end
-- Name sex slider update.
function outgame:procUpdateNameSexLabel()
local nameSexType = { "uiCP_Sex_Male", "uiCP_Sex_Female" }
local uiNameSexText = getUI("ui:outgame:appear_name:name_sex_slider:name_sex");
local uiNameSex = getDbProp("UI:TEMP:NAME_SEX");
tempstr = tostring(i18n.get(nameSexType[tonumber(uiNameSex)]));
tempstr = string.lower( tempstr );
tempstr = (tempstr:gsub("^%l", string.upper));
uiNameSexText.hardtext= tempstr;
end
-- Name race slider update.
function outgame:procUpdateNameRaceLabel()
local nameRaceType = { "Fyros", "Matis", "Tryker", "Zoraï", "uiCP_Maraudeur" }
local uiNameRaceText = getUI("ui:outgame:appear_name:name_race_slider:name_race");
local dbNameRace = getDbProp("UI:TEMP:NAME_RACE");
local uiNameSexSlider = getUI("ui:outgame:appear_name:name_sex_slider");
local uiNameSubRaceSlider = getUI("ui:outgame:appear_name:name_sub_race_slider");
local uiNameSubRace2Slider = getUI("ui:outgame:appear_name:name_sub_race2_slider");
local uiNameGenerate = getUI("ui:outgame:appear_name:generate");
-- Show/Hide sex slider
uiNameGenerate.y = "-50"
if tonumber(dbNameRace) == 2 then
uiNameSexSlider.active = true;
uiNameGenerate.y = "-65"
else
uiNameSexSlider.active = false;
end
-- Show/Hide sub race slider
if tonumber(dbNameRace) == 5 then
uiNameSubRaceSlider.active = true;
uiNameSubRace2Slider.active = true;
uiNameGenerate.y = "-105"
else
uiNameSubRaceSlider.active = false;
uiNameSubRace2Slider.active = false;
end
uiNameRaceText.hardtext= tostring(nameRaceType[tonumber(dbNameRace)]);
end
local matisF = "Matis " .. (string.lower(tostring(i18n.get("uiCP_Sex_Female")) )):gsub("^%l", string.upper);
local matisM = "Matis " .. (string.lower(tostring(i18n.get("uiCP_Sex_Male")) )):gsub("^%l", string.upper);
function outgame:procUpdateNameSubRaceLabel()
local nameSubRaceType = { "Fyros", matisF, matisM, "Tryker", "Zoraï" }
local uiNameSubRaceText = getUI("ui:outgame:appear_name:name_sub_race_slider:name_race");
local dbNameSubRace = getDbProp("UI:TEMP:NAME_SUB_RACE");
uiNameSubRaceText.hardtext= tostring(nameSubRaceType[tonumber(dbNameSubRace)]);
end
function outgame:procUpdateNameSubRace2Label()
local nameSubRace2Type = { "Fyros", matisF, matisM, "Tryker", "Zoraï" }
local uiNameSubRace2Text = getUI("ui:outgame:appear_name:name_sub_race2_slider:name_race");
local dbNameSubRace2 = getDbProp("UI:TEMP:NAME_SUB_RACE2");
uiNameSubRace2Text.hardtext= tostring(nameSubRace2Type[tonumber(dbNameSubRace2)]);
end
------------------------------------------------------------------------------------------------------------
-- called to construct icons
function outgame:activePackElement(id, icon)

View file

@ -2,6 +2,10 @@
<root id="outgame" x="0" y="0" w="1024" h="768" active="false" />
<lua file="names_matis.lua" />
<lua file="names_fyros.lua" />
<lua file="names_zorai.lua" />
<lua file="names_tryker.lua" />
<lua file="out_v2_appear.lua" />
<!-- ********************** -->
@ -43,6 +47,18 @@
<variable entry="UI:TEMP:NAME_VALID" type="sint64" value="-1" />
<!-- Name Generator. -->
<!-- We start at 1 not 0. -->
<variable entry="UI:TEMP:NAME_RACE" type="sint64" value="1" />
<!-- used for marauder names. -->
<variable entry="UI:TEMP:NAME_SUB_RACE" type="sint64" value="1" />
<variable entry="UI:TEMP:NAME_SUB_RACE2" type="sint64" value="1" />
<!-- you will have to change the max value of the slider too, since it seam not working to set it using that var directly. -->
<variable entry="UI:TEMP:NAME_RACE_NB" type="sint64" value="5" />
<!-- We start at 1 not 0. -->
<variable entry="UI:TEMP:NAME_SEX" type="sint64" value="1" />
<!-- End Name Generator. -->
<template name="char_var_dec" id="#id" >
<variable entry="#id:PEOPLE" type="sint64" value="1" />
<variable entry="#id:VPA:SEX" type="sint64" value="1" />
@ -1254,20 +1270,25 @@
<!-- * ENTER NAME * -->
<!-- ************** -->
<group type="modal" id="appear_name" posref="MM MM" w="400" h="450"
<group type="modal" id="appear_name" posref="MM MM" w="400" h="680"
mouse_pos="false" escapable="false" exit_click_out="false"
on_active="proc" on_active_params="proc_appear_name_active"
display="false"
>
<instance template="outgame_popup" id="back" posref="TL TL" />
<view type="text" id="text" posref="TM TM" x="0" y="-56" color="255 255 255 255" global_color="false" fontsize="17" multi_line="true" multi_line_space="0"
line_maxw="350" shadow="true" hardtext="uiCP_Name_Enter" />
<group type="edit_box" id="eb" posparent="text" posref="BM TM" x="0" y="-8" w="300" h="52" render_layer="4" child_resize_h="true"
<!-- NamingPolicy -->
<ctrl style="opt_button" id="name_policy" posref="BM BM" posparent="text" x="0" y="-40" hardtext="uiCP_Name_Policy"
text_color_over="208 258 16 255" text_color_normal="255 255 46 255" text_color_pushed="108 158 16 255"
onover="play_sound" params_over="name=specie_but_over"
onclick_l="open_url" params_l="cfg_ConditionsTermsURL" />
<!-- onclick_l="open_url" params_l="cfg_NamingPolicyURL" /> -->
<group type="edit_box" id="eb" posparent="name_policy" posref="BM TM" x="0" y="-8" w="300" h="52" render_layer="4" child_resize_h="true"
onenter="proc" params="proc_appear_name_enter"
onchange="proc" onchange_params="proc_appear_name_change"
prompt="" enter_loose_focus="true" reset_focus_on_hide="true"
@ -1278,9 +1299,9 @@
fontsize="20" shadow="true" global_color="false" case="%case_first_string_letter_up" />
</group>
<view type="text" id="invalid" posref="BM TM" posparent="eb" x="0" y="0" color="255 255 96 255" global_color="false" fontsize="15" shadow="true" hardtext="uiCP_Name_Invalid" />
<view type="text" id="invalid" posref="TM TM" posparent="eb" x="0" y="20" color="255 255 96 255" global_color="false" fontsize="15" shadow="true" hardtext="uiCP_Name_Invalid" />
<ctrl style="valid_txt_button" id="submit" posref="BM BM" x="0" y="8" hardtext="uiCP_Name_Submit"
<ctrl style="valid_txt_button" id="submit" posref="BM BM" x="0" y="15" hardtext="uiCP_Name_Submit"
onover="play_sound" params_over="name=specie_but_over"
onclick_l="proc" params_l="proc_appear_name_enter" />
@ -1288,6 +1309,118 @@
onover="play_sound" params_over="name=specie_but_over"
onclick_l="proc" params_l="proc_appear_name_cancel" />
<!-- Name Generator -->
<!-- voir coter widgets.xml pour les template de checkbox et autre -->
<view type="text" id="name_generator" x="0" y="-30" posparent="eb" posref="BM BM" multi_line="false" render_layer="4"
fontsize="10" shadow="true" global_color="false" case="%case_first_string_letter_up" hardtext="uiCP_Name_Generator"
on_active="proc" on_active_params="proc_init_name_generator" />
<!-- Full generated name with spaces and quote before being clean to match the login name pattern. -->
<view type="text" id="name_full" x="0" y="-15" posparent="eb" posref="BM BM" multi_line="false" render_layer="4"
fontsize="14" color="200 200 200 255" shadow="true" global_color="false" case="%case_first_string_letter_up" />
<!-- Slider Name Race -->
<group id="name_race_slider" posparent="name_generator" posref="BM BM" x="0" y="-55" w="200" h="48" >
<view type="bitmap" id="left" posref="TL TL" texture="opt_on_l.tga" y="-6" />
<view type="bitmap" id="right" posref="TR TR" texture="opt_on_r.tga" y="-6" />
<view type="bitmap" id="middle" posref="TM TM" scale="true" sizeref="w" h="32" w="-64" y="-5" texture="opt_on_m.tga"/>
<ctrl type="button" button_type="push_button" tx_normal="blank.tga" tx_pushed="opt_on_l_over.tga" tx_over="opt_on_l_over.tga" scale="true" w="32" h="32"
color="0 0 0 0" col_over="255 255 255 128" col_pushed="255 255 255 255"
id="but_back" posref="TL TL" x="0" y="-6"
onclick_l="proc" params_l="proc_appear_name_race_sub_one" />
<ctrl type="button" button_type="push_button" tx_normal="blank.tga" tx_pushed="opt_on_r_over.tga" tx_over="opt_on_r_over.tga" scale="true" w="32" h="32"
color="0 0 0 0" col_over="255 255 255 128" col_pushed="255 255 255 255"
id="but_next" posref="TR TR" x="0" y="-6"
onclick_l="proc" params_l="proc_appear_name_race_add_one" />
<view type="text" id="name_race" case="%case_first_string_letter_up" posparent="name_generator" posref="TL TL" x="0" y="0" hardtext="Fyros" color="255 255 255 255" fontsize="11"/>
<ctrl type="scroll" id="name_race_scroll" posparent="name_race_slider" posref="MM MM" x="0" y="0" w="160" h="32"
vertical="false" align="L" min="1" max="5" value="UI:TEMP:NAME_RACE" tracksize="40"
tx_topright="" tx_middle="slider_m.tga" tx_bottomleft=""
onscroll="proc" params="proc_appear_name_race_label_change" />
</group>
<!-- Slider Name Sub Race -->
<group id="name_sub_race_slider" posparent="name_race_slider" posref="BM BM" x="0" y="-40" w="200" h="48" >
<view type="bitmap" id="left" posref="TL TL" texture="opt_on_l.tga" y="-6" />
<view type="bitmap" id="right" posref="TR TR" texture="opt_on_r.tga" y="-6" />
<view type="bitmap" id="middle" posref="TM TM" scale="true" sizeref="w" h="32" w="-64" y="-5" texture="opt_on_m.tga"/>
<ctrl type="button" button_type="push_button" tx_normal="blank.tga" tx_pushed="opt_on_l_over.tga" tx_over="opt_on_l_over.tga" scale="true" w="32" h="32"
color="0 0 0 0" col_over="255 255 255 128" col_pushed="255 255 255 255"
id="but_back" posref="TL TL" x="0" y="-6"
onclick_l="proc" params_l="proc_appear_name_sub_race_sub_one" />
<ctrl type="button" button_type="push_button" tx_normal="blank.tga" tx_pushed="opt_on_r_over.tga" tx_over="opt_on_r_over.tga" scale="true" w="32" h="32"
color="0 0 0 0" col_over="255 255 255 128" col_pushed="255 255 255 255"
id="but_next" posref="TR TR" x="0" y="-6"
onclick_l="proc" params_l="proc_appear_name_sub_race_add_one" />
<view type="text" id="surname" case="%case_first_string_letter_up" posparent="name_sub_race_slider" posref="TL TL" x="0" y="0" hardtext="uiCP_Surame" color="255 255 255 255" fontsize="11"/>
<view type="text" id="name_race" case="%case_first_string_letter_up" posparent="name_sub_race_slider" posref="TR TL" x="-100" y="0" hardtext="Fyros" color="255 255 255 255" fontsize="11"/>
<ctrl type="scroll" id="name_race_scroll" posparent="name_sub_race_slider" posref="MM MM" x="0" y="0" w="160" h="32"
vertical="false" align="L" min="1" max="5" value="UI:TEMP:NAME_SUB_RACE" tracksize="40"
tx_topright="" tx_middle="slider_m.tga" tx_bottomleft=""
onscroll="proc" params="proc_appear_name_sub_race_label_change" />
</group>
<!-- Slider Name Sub Race2 -->
<group id="name_sub_race2_slider" posparent="name_sub_race_slider" posref="BM BM" x="0" y="-40" w="200" h="48" >
<view type="bitmap" id="left" posref="TL TL" texture="opt_on_l.tga" y="-6" />
<view type="bitmap" id="right" posref="TR TR" texture="opt_on_r.tga" y="-6" />
<view type="bitmap" id="middle" posref="TM TM" scale="true" sizeref="w" h="32" w="-64" y="-5" texture="opt_on_m.tga"/>
<ctrl type="button" button_type="push_button" tx_normal="blank.tga" tx_pushed="opt_on_l_over.tga" tx_over="opt_on_l_over.tga" scale="true" w="32" h="32"
color="0 0 0 0" col_over="255 255 255 128" col_pushed="255 255 255 255"
id="but_back" posref="TL TL" x="0" y="-6"
onclick_l="proc" params_l="proc_appear_name_sub_race2_sub_one" />
<ctrl type="button" button_type="push_button" tx_normal="blank.tga" tx_pushed="opt_on_r_over.tga" tx_over="opt_on_r_over.tga" scale="true" w="32" h="32"
color="0 0 0 0" col_over="255 255 255 128" col_pushed="255 255 255 255"
id="but_next" posref="TR TR" x="0" y="-6"
onclick_l="proc" params_l="proc_appear_name_sub_race2_add_one" />
<view type="text" id="name" case="%case_first_string_letter_up" posparent="name_sub_race2_slider" posref="TL TL" x="0" y="0" hardtext="uiCP_Name" color="255 255 255 255" fontsize="11"/>
<view type="text" id="name_race" case="%case_first_string_letter_up" posparent="name_sub_race2_slider" posref="TR TL" x="-100" y="0" hardtext="Fyros" color="255 255 255 255" fontsize="11"/>
<ctrl type="scroll" id="name_race_scroll" posparent="name_sub_race2_slider" posref="MM MM" x="0" y="0" w="160" h="32"
vertical="false" align="L" min="1" max="5" value="UI:TEMP:NAME_SUB_RACE2" tracksize="40"
tx_topright="" tx_middle="slider_m.tga" tx_bottomleft=""
onscroll="proc" params="proc_appear_name_sub_race2_label_change" />
</group>
<!-- Slider Name Sex -->
<group id="name_sex_slider" posparent="name_race_slider" posref="BM BM" x="0" y="-40" w="200" h="48" >
<view type="bitmap" id="left" posref="TL TL" texture="opt_on_l.tga" y="-6" />
<view type="bitmap" id="right" posref="TR TR" texture="opt_on_r.tga" y="-6" />
<view type="bitmap" id="middle" posref="TM TM" scale="true" sizeref="w" h="32" w="-64" y="-5" texture="opt_on_m.tga"/>
<ctrl type="button" button_type="push_button" tx_normal="blank.tga" tx_pushed="opt_on_l_over.tga" tx_over="opt_on_l_over.tga" scale="true" w="32" h="32"
color="0 0 0 0" col_over="255 255 255 128" col_pushed="255 255 255 255"
id="but_back" posref="TL TL" x="0" y="-6"
onclick_l="proc" params_l="proc_appear_name_sex_sub_one" />
<ctrl type="button" button_type="push_button" tx_normal="blank.tga" tx_pushed="opt_on_r_over.tga" tx_over="opt_on_r_over.tga" scale="true" w="32" h="32"
color="0 0 0 0" col_over="255 255 255 128" col_pushed="255 255 255 255"
id="but_next" posref="TR TR" x="0" y="-6"
onclick_l="proc" params_l="proc_appear_name_sex_add_one" />
<view type="text" id="name_sex" posparent="name_race_slider" posref="TL TL" x="0" y="0" hardtext="uiCP_Sex_Male" case="%case_first_string_letter_up" color="255 255 255 255" fontsize="11"/>
<ctrl type="scroll" id="name_sex_scroll" posparent="name_sex_slider" posref="MM MM" x="0" y="0" w="160" h="32"
vertical="false" align="L" min="1" max="2" value="UI:TEMP:NAME_SEX" tracksize="40"
tx_topright="" tx_middle="slider_m.tga" tx_bottomleft="" />
</group>
<ctrl style="valid_txt_button" id="generate" posref="BM BM" posparent="name_race_slider" x="0" y="-100" hardtext="uiCP_Name_Generate"
onover="play_sound" params_over="name=specie_but_over"
onclick_l="proc" params_l="proc_appear_name_generate" />
<!-- End Name Generator -->
</group>
@ -1396,6 +1529,24 @@
<action handler="set" params="target_property=ui:outgame:appear_name:invalid:active|value=0" />
<action handler="set" params="target_property=ui:outgame:appear_name:eb:input_string|value=''" />
<action handler="set_keyboard_focus" params="target=ui:outgame:appear_name:eb|select_all=false" />
<!-- Name generator init. -->
<action handler="set" params="target_property=ui:outgame:appear_name:name_sex_slider:name_sex_scroll:value|value=add(@UI:TEMP:CHAR3D:VPA:SEX,1)" />
<action handler="set" params="target_property=ui:outgame:appear_name:name_race_slider:name_race_scroll:value|value=add(@UI:TEMP:CHAR3D:PEOPLE,1)" />
<action handler="set" params="target_property=ui:outgame:appear_name:name_sub_race_slider:name_race_scroll:value|value=1" />
<action handler="set" params="target_property=ui:outgame:appear_name:name_sub_race2_slider:name_race_scroll:value|value=1" />
<action handler="set" params="dblink=UI:TEMP:NAME_SEX|value=add(@UI:TEMP:CHAR3D:VPA:SEX,1)" />
<action handler="set" params="dblink=UI:TEMP:NAME_RACE|value=add(@UI:TEMP:CHAR3D:PEOPLE,1)" />
<action handler="set" params="dblink=UI:TEMP:NAME_SUB_RACE|value=1" />
<action handler="set" params="dblink=UI:TEMP:NAME_SUB2_RACE|value=1" />
<action handler="lua:outgame:procUpdateNameSexLabel()" />
<action handler="lua:outgame:procUpdateNameRaceLabel()" />
<action handler="lua:outgame:procUpdateNameSubRaceLabel()" />
<action handler="lua:outgame:procUpdateNameSubRace2Label()" />
<!-- End Name Generator. -->
</proc>
<proc id="proc_appear_name_change">
@ -1469,6 +1620,61 @@
<action handler="set" cond="eq(@UI:TEMP:NAME_VALID,0)" params="target_property=ui:outgame:appear_name:invalid:active|value=1" />
</proc>
<!-- Name Generator. -->
<proc id="proc_appear_name_generate">
<action handler="lua:outgame:procGenerateName()" />
</proc>
<!-- Name Sex. -->
<proc id="proc_appear_name_sex_label_change">
<action handler="lua:outgame:procUpdateNameSexLabel()" />
</proc>
<proc id="proc_appear_name_sex_add_one">
<action handler="set" params="dblink=UI:TEMP:NAME_SEX|value=min(add(@UI:TEMP:NAME_SEX,1),2)" />
<action handler="lua:outgame:procUpdateNameSexLabel()" />
</proc>
<proc id="proc_appear_name_sex_sub_one">
<action handler="set" params="dblink=UI:TEMP:NAME_SEX|value=max(sub(@UI:TEMP:NAME_SEX,1),1)" />
<action handler="lua:outgame:procUpdateNameSexLabel()" />
</proc>
<!-- Name Race. -->
<proc id="proc_appear_name_race_label_change">
<action handler="lua:outgame:procUpdateNameRaceLabel()" />
</proc>
<proc id="proc_appear_name_race_add_one">
<action handler="set" params="dblink=UI:TEMP:NAME_RACE|value=min(add(@UI:TEMP:NAME_RACE,1),@UI:TEMP:NAME_RACE_NB)" />
<action handler="lua:outgame:procUpdateNameRaceLabel()" />
</proc>
<proc id="proc_appear_name_race_sub_one">
<action handler="set" params="dblink=UI:TEMP:NAME_RACE|value=max(sub(@UI:TEMP:NAME_RACE,1),1)" />
<action handler="lua:outgame:procUpdateNameRaceLabel()" />
</proc>
<!-- Name Sub Race. -->
<proc id="proc_appear_name_sub_race_label_change">
<action handler="lua:outgame:procUpdateNameSubRaceLabel()" />
</proc>
<proc id="proc_appear_name_sub_race_add_one">
<action handler="set" params="dblink=UI:TEMP:NAME_SUB_RACE|value=min(add(@UI:TEMP:NAME_SUB_RACE,1),5)" />
<action handler="lua:outgame:procUpdateNameSubRaceLabel()" />
</proc>
<proc id="proc_appear_name_sub_race_sub_one">
<action handler="set" params="dblink=UI:TEMP:NAME_SUB_RACE|value=max(sub(@UI:TEMP:NAME_SUB_RACE,1),1)" />
<action handler="lua:outgame:procUpdateNameSubRaceLabel()" />
</proc>
<!-- Name Sub Race2. -->
<proc id="proc_appear_name_sub_race2_label_change">
<action handler="lua:outgame:procUpdateNameSubRace2Label()" />
</proc>
<proc id="proc_appear_name_sub_race2_add_one">
<action handler="set" params="dblink=UI:TEMP:NAME_SUB_RACE2|value=min(add(@UI:TEMP:NAME_SUB_RACE2,1),5)" />
<action handler="lua:outgame:procUpdateNameSubRace2Label()" />
</proc>
<proc id="proc_appear_name_sub_race2_sub_one">
<action handler="set" params="dblink=UI:TEMP:NAME_SUB_RACE2|value=max(sub(@UI:TEMP:NAME_SUB_RACE2,1),1)" />
<action handler="lua:outgame:procUpdateNameSubRace2Label()" />
</proc>
<!-- End Name Generator. -->
<proc id="proc_appear_name_server_test">
<action handler="proc" params="proc_appear_name_enter2"
cond="and(eq(@UI:CURRENT_SCREEN,%screen_appear),eq(@UI:SERVER_RECEIVED_VALID,1))" />