From d0b2262fc38ecfa47671e1738d657b4317238499 Mon Sep 17 00:00:00 2001 From: wushin Date: Tue, 26 Jan 2016 13:32:37 -0600 Subject: Move gender selection to intro dialogue --- world/conf/char_athena.conf | 8 +++---- world/map/db/const.txt | 2 +- world/map/npc/029-2/sorfina.txt | 38 +++++++++++++++++++++++++++++----- world/map/npc/029-2/stat_reset.txt | 12 +++++++++-- world/map/npc/029-2/tanisha.txt | 3 ++- world/map/npc/functions/barber.txt | 11 ++++++++++ world/map/npc/functions/change_sex.txt | 24 --------------------- world/map/npc/functions/headstyles.txt | 11 +++++++--- 8 files changed, 69 insertions(+), 40 deletions(-) delete mode 100644 world/map/npc/functions/change_sex.txt diff --git a/world/conf/char_athena.conf b/world/conf/char_athena.conf index 64f8b082..3e0fa61d 100644 --- a/world/conf/char_athena.conf +++ b/world/conf/char_athena.conf @@ -45,17 +45,17 @@ min_name_length: 4 char_slots: 9 // max hair style and hair color -max_hair_style: 20 -max_hair_color: 11 +max_hair_style: 1 +max_hair_color: 1 // the minimum value for stats (str, agi, ...) min_stat_value: 1 // the maximum value for stats (str, agi, ...) -max_stat_value: 9 +max_stat_value: 1 // the sum of all stats combined (str + agi + int + ...) -total_stat_sum: 30 +total_stat_sum: 6 // Filename of the file which receives the online players list in text online_txt_filename: online.txt diff --git a/world/map/db/const.txt b/world/map/db/const.txt index 71f1f06c..d3b42ee4 100644 --- a/world/map/db/const.txt +++ b/world/map/db/const.txt @@ -14,7 +14,7 @@ Hp 5 1 MaxHp 6 1 Sp 7 1 MaxSp 8 1 -//StatusPoint 9 1 +StatusPoint 9 1 BaseLevel 11 1 //SkillPoint 12 1 Class 19 1 diff --git a/world/map/npc/029-2/sorfina.txt b/world/map/npc/029-2/sorfina.txt index 9e35b549..9d2d4bb3 100644 --- a/world/map/npc/029-2/sorfina.txt +++ b/world/map/npc/029-2/sorfina.txt @@ -26,13 +26,43 @@ L_Start: mes "\"You didn't have any possessions on you when we found you and no one knows who you are.\""; mes "Do you have a name?"; menu - strcharinfo(0), L_name; + strcharinfo(0), L_Name; -L_name: +L_Name: mes "[Old Woman]"; mes "\"Well " + strcharinfo(0) + " what else can you tell me about yourself?.\""; menu - "Umm... I... I don't remember anything...", L_KnowNothing; + "I'm a woman from ...", L_Woman, + "I'm a man that lived in ...", L_Man, + "My home is in ...", L_N; + +L_Woman: + set Sex, 0; + goto L_Species; + +L_Man: + set Sex, 1; + goto L_Species; + +L_N: + set Sex, 2; + goto L_Species; + +L_Species: + mes "[Old Woman]"; + mes "\"Go on. If you need to think a bit, take your time.\""; + menu + "... Tulimshar in Tonori ... I'm a Talpan.", L_Talpan; + +L_Talpan: + set Class, 1; + goto L_AnythingElse; + +L_AnythingElse: + mes "[Old Woman]"; + mes "\"Anything else you can remember?\""; + menu + "Umm... no... I... I don't remember anything else...", L_KnowNothing; L_KnowNothing: mes "[Old Woman]"; @@ -342,7 +372,6 @@ L_Block: mes "[Server/Client Notice]"; mes "The explanations in this tutorial are based on the official client, Manaplus."; mes "If you're using another client, settings and controls may be different."; - callfunc "ChangeSex"; callfunc "GameRules"; close; } @@ -353,7 +382,6 @@ L_Block: mes "[Server/Client Notice]"; mes "The explanations in this tutorial are based on the official client, Manaplus."; mes "If you're using another client, settings and controls may be different."; - callfunc "ChangeSex"; callfunc "GameRules"; close; } diff --git a/world/map/npc/029-2/stat_reset.txt b/world/map/npc/029-2/stat_reset.txt index 6123f632..427a1da5 100644 --- a/world/map/npc/029-2/stat_reset.txt +++ b/world/map/npc/029-2/stat_reset.txt @@ -11,11 +11,18 @@ mes "[Jessie]"; mes "\"I know a spell that will"; mes "reset status points on the youngings."; + mes ""; + mes "I can also change their appearance.\""; next; menu "Reset my stats",L_Reset, + "Change my appearance", L_Appearance, "Forget about it",L_Pass; +L_Appearance: + callfunc "Barber"; + goto L_Pass; + L_Reset: resetstatus; @@ -35,8 +42,9 @@ L_Sorry: mes "\"My spell only works on the very young, sorry.\""; next; mes "\"You can try Mailvox in the Tulimshar Bazaar or Wyara in the Potion Shop in Hurnscald.\""; - next; - goto L_Close; + menu + "Change my appearance", L_Appearance, + "Bye", L_Close; L_Close: close; diff --git a/world/map/npc/029-2/tanisha.txt b/world/map/npc/029-2/tanisha.txt index d69195a5..7142721e 100644 --- a/world/map/npc/029-2/tanisha.txt +++ b/world/map/npc/029-2/tanisha.txt @@ -110,7 +110,8 @@ L_StatsRe: next; mes "\"Think about how you want to play before assigning the points.\""; mes "\"My Uncle sitting at the counter knows a spell to help the younglings reset their stats.\""; - mes "\"He also knows of mages with even more powerful reset spells.\""; + mes "\"He can also change your hair style and color, along with your gender.\""; + mes "\"Furthermore, he knows of mages with even more powerful reset spells for your stats.\""; next; if (QL_BEGIN == 7) goto L_Money; diff --git a/world/map/npc/functions/barber.txt b/world/map/npc/functions/barber.txt index effa3436..54732418 100644 --- a/world/map/npc/functions/barber.txt +++ b/world/map/npc/functions/barber.txt @@ -179,10 +179,12 @@ L_Debug: mes "Class: " + Class; mes "Style: " + getlook(LOOK_HAIR_STYLE); mes "Color: " + getlook(LOOK_HAIR_COLOR); + mes "Gender: " + Sex; menu "edit| Set Class", L_DebugClass, "edit| Set Style", L_DebugStyle, "edit| Set Color", L_DebugColor, + "edit| Set Gender", L_DebugGender, "toggle| Simulate logout", L_DebugLogout, "Close", L_Done; @@ -216,4 +218,13 @@ L_DebugColor: setlook LOOK_HAIR_COLOR, @dbg_color; set @dbg_color, 0; goto L_Debug; + +L_DebugGender: + set @dbg_gender, 0; + mes "input gender (0-3)"; + input @dbg_gender; + if (@dbg_gender >= 0 && @dbg_gender <= 3) + set Sex, @dbg_gender; + set @dbg_gender, 0; + goto L_Debug; } diff --git a/world/map/npc/functions/change_sex.txt b/world/map/npc/functions/change_sex.txt deleted file mode 100644 index f81334f6..00000000 --- a/world/map/npc/functions/change_sex.txt +++ /dev/null @@ -1,24 +0,0 @@ -function|script|ChangeSex -{ - mes "Please select a character gender:"; - menu - "Female.", L_Female, - "Male.", L_Male, - "Non-binary.", L_NonBinary; - -L_Female: - set @sex, 0; - goto L_Change; - -L_Male: - set @sex, 1; - goto L_Change; - -L_NonBinary: - set @sex, 3; - goto L_Change; - -L_Change: - set Sex, @sex; - return; -} diff --git a/world/map/npc/functions/headstyles.txt b/world/map/npc/functions/headstyles.txt index 02cc895f..1098c80c 100644 --- a/world/map/npc/functions/headstyles.txt +++ b/world/map/npc/functions/headstyles.txt @@ -3,10 +3,9 @@ function|script|fixHeadStyles { - if (Class < 1 || Class > 5) // usable classes - set Class, 1; // it is impossible to use custom styling for class 0 in m+ so default is 1 - callfunc "getHeadStyles"; + if ((TUT_var < 1 || QL_BEGIN < 1) && StatusPoint < 1) + goto L_RandomHair; // on first login set @style, getlook(LOOK_HAIR_STYLE); // FIXME: this needs to be a param in the future set @color, getlook(LOOK_HAIR_COLOR); // FIXME: this needs to be a param in the future if (@style < 1 || @style > getarraysize(@HairStyles$)) // leftover from previous attempt at classes @@ -17,6 +16,12 @@ function|script|fixHeadStyles set @color, 15 * (Class - 1); // it is possible to style color 0 but not style 0 since style is treated as an item setlook LOOK_HAIR_COLOR, @color; // FIXME: this needs to be a param in the future return; + +L_RandomHair: + resetstatus; // <= important! gives 48 stat points + setlook LOOK_HAIR_STYLE, rand(1, getarraysize(@HairStyles$)); + setlook LOOK_HAIR_COLOR, rand((15 * (Class - 1)),((15 * (Class - 1)) + (getarraysize(@HairColors$) - 1))); + return; } function|script|getHeadStyles -- cgit v1.2.3-70-g09d2