Bald hairstyle name fix during the character creation

Content and general development discussion, including quest scripts and server code. TMW Classic is a project comprising the Legacy tmwAthena server & the designated improved engine server based on evolHercules.


Forum rules

This forum houses many years of development, tracing back to some of the earliest posts that exist on the board.

Its current use is for the continued development of the server and game it has always served: TMW Classic.

Post Reply
User avatar
Reid
Lead Developer (SoM)
Lead Developer (SoM)
Posts: 1551
Joined: 15 May 2010, 21:39
Location: Artis
Contact:

Bald hairstyle name fix during the character creation

Post by Reid »

The Bald hairstyle is displayed as "Unknown Item" for a long time now, it's now possible to fix this bug with the recent add of the charcreation's manaplus file in the clientdata.
The problem is that there is simply no Bald hairstyle in the items.xml, the actual "Bald hairstyle" is just the use of a missing and wrong ID (i.e.: The client check for ID "0-19", but the 0 is a wrong ID.)

Here a patch for this problem:

Code: Select all

From 16eab811ca0bbac839055dfd061f47d48ce62a3a Mon Sep 17 00:00:00 2001
From: Reid Yaro <reidyaro@gmail.com>
Date: Sat, 19 Jan 2013 21:18:27 +0000
Subject: [PATCH] Correct "Unknown item" for Bald hairstyle.

---
 charcreation.xml |    2 +-
 items.xml        |    2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/charcreation.xml b/charcreation.xml
index c9b6bd7..13dd555 100644
--- a/charcreation.xml
+++ b/charcreation.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <chars>
     <haircolor min="0" max="11" />
-    <hairstyle min="0" max="19" />
+    <hairstyle min="1" max="20" />
     <stat min="1" max="9" sum="30" />
     <item id="1202"/>
     <item id="881"/>
diff --git a/items.xml b/items.xml
index fb43c6e..189587a 100644
--- a/items.xml
+++ b/items.xml
@@ -69,6 +69,8 @@
     <item id="-19" type="hairsprite" name="Long and Clipped">
         <sprite>hairstyles/hairstyle19.xml</sprite>
     </item>
+    <item id="-20" type="hairsprite" name="Bald">
+    </item>
 
     <!-- Treating the base sprite as equipment too will be useful when we
          implement other playable races -->
-- 
1.7.10.4
I added a new hairstyle ID, which will be used to be a real Bald hairstyle.
I also changed the hairstyle min and max number, to use hairstyle from the ID 1 to 20, it so requier a server limit fix, I don't know how to do it so I let you deal with this.
"Time is an illusion. Lunchtime doubly so."
-- Ford Prefect
User avatar
o11c
Grand Knight
Grand Knight
Posts: 2262
Joined: 20 Feb 2011, 21:09
Location: ^ ^

Re: Bald hairstyle name fix during the character creation

Post by o11c »

There's nothing wrong on the server side. If the client can't parse a hair ID of 0 due to its negative id scheme, that's its problem.

Any changing of server limits should be deferred until we decide what we actually want to do. I would like to get rid of the hard-coded maxima, but still allow the possibility of hair that can only be released via scripts (such as shock white)
Former programmer for the TMWA server.
User avatar
Reid
Lead Developer (SoM)
Lead Developer (SoM)
Posts: 1551
Joined: 15 May 2010, 21:39
Location: Artis
Contact:

Re: Bald hairstyle name fix during the character creation

Post by Reid »

o11c wrote:There's nothing wrong on the server side. If the client can't parse a hair ID of 0 due to its negative id scheme, that's its problem.

Any changing of server limits should be deferred until we decide what we actually want to do. I would like to get rid of the hard-coded maxima, but still allow the possibility of hair that can only be released via scripts (such as shock white)
Then you'll probably keep this "Unknown item" name again for a long time. :)
"Time is an illusion. Lunchtime doubly so."
-- Ford Prefect
Post Reply