|
|
#1 |
|
Swordsman
Join Date: Jan 2009
Posts: 460
![]() |
Truncation of monster names
In my proto-variant, I have had a longstanding bug with monsters' names being truncated. For example, at one point
White worm mass appeared as: Wh and now the white worm masses were fine but Metallic green centipede appears as Me I'm pretty sure it has also happened with more than two characters in the string before getting cut off. Has anyone had this happen to them before? It strikes me that somehow a NULL character is getting written into the text descriptions or something like that. It mainly happens on my Windows build (the same creature getting mangled for each playtester in a given development version), but I have had the problem once on my Mac build. Any ideas? |
|
|
|
|
|
#2 |
|
Knight
Join Date: Apr 2007
Posts: 590
![]() |
Yes, there's a fairly awful hack in data loading dating back to the initial conversion to data files: all of the strings for monster names are stuffed into a single long C array containing the NUL-terminated representation of the strings in sequence. There's a few other instances. Look for ?_name and ?_text global variables for the large arrays, and name and text fields within *_type structs for offsets into these arrays.
It sounds like the construction and/or offsets into these arrays isn't going perfectly.
__________________
Zaiband: end the "I shouldn't have survived that" experience. V3.0.6 fork on Hg. Zaiband 3.0.10 ETA Mar. 7 2011 (Yes, schedule slipped. Latest testing indicates not enough assert() calls to allow release.) Z.C++: pre-alpha C/C++ compiler system (usable preprocessor). Also on Hg. Z.C++ 0.0.10 ETA December 31 2011 |
|
|
|
|
|
#3 | |
|
Apprentice
Join Date: Jan 2009
Location: Sweden
Posts: 54
![]() |
Quote:
http://forum.nppangband.org/viewtopic.php?id=151 gives a fix - at least for NPP. Hopefully it's the same bug and this helps. |
|
|
|
|
|
|
#4 | |
|
Swordsman
Join Date: Jan 2009
Posts: 460
![]() |
Quote:
|
|
|
|
|
|
|
#5 | |
|
Apprentice
Join Date: Jan 2009
Location: Sweden
Posts: 54
![]() |
Quote:
|
|
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| monster speed | PowerDiver | Vanilla | 2 | September 10, 2009 17:42 |
| Least Favorite Monster | ehertlein | Vanilla | 51 | May 23, 2009 20:29 |
| Interesting scroll names. | Whelk | Vanilla | 5 | May 14, 2008 10:51 |
| Monster AI | Malak Darkhunter | Vanilla | 3 | December 9, 2007 07:05 |
| Item names | Kiyoshi Aman | Vanilla | 3 | May 5, 2007 23:01 |