![]() |
#1 |
Swordsman
Join Date: Jun 2011
Location: Germany
Age: 51
Posts: 426
![]() |
monster knowledge
Still working on a variant version, which restricts itself to modifying /lib/gamedata files.
My goal ... to modify the monsters in monster.txt. To make a complete redo of that, i have to redo monster_base.txt as well. While i change monster_base.txt the monster knowledge information available with '~' => monster knowledge seems to be hardcoded in some way. version 3.5.1: i redo monster_base.txt but monster knowledge seems hardcoded version 4.0.4: same as in 3.5.1, ancient dragons and dragons show up below the same group in monster knowledge, is that hardcoded??? (cause i noticed no file in gamedata which seems to define those groups) version 4.2.0: now suddenly a new 'group' shows up not defined in monster_base.txt, for example 'Men' group for 'townfolks' group. Anyone can tell me if changing monster_base.txt can cause conflicts with (still) hardcoded tables? I got some issues starting a new game in version 3.5.1 if i use an opened player file (no issues in the 1st try using a new player file).
__________________
Blondes are more fun! |
![]() |
![]() |
![]() |
#2 |
Veteran
Join Date: May 2012
Location: Adelaide, Australia
Posts: 2,435
![]() |
Hardcoded
For 4.x in ui-knowledge.c Code:
/** * ------------------------------------------------------------------------ * MONSTERS * ------------------------------------------------------------------------ */ /** * Description of each monster group. */ static struct { const wchar_t *chars; const char *name; } monster_group[] = { { (const wchar_t *)-1, "Uniques" }, { L"A", "Ainur" }, { L"a", "Ants" }, { L"b", "Bats" }, { L"B", "Birds" }, { L"C", "Canines" }, { L"c", "Centipedes" }, { L"uU", "Demons" }, { L"dD", "Dragons" }, { L"vE", "Elementals/Vortices" }, { L"e", "Eyes/Beholders" }, { L"f", "Felines" }, { L"G", "Ghosts" }, { L"OP", "Giants/Ogres" }, { L"g", "Golems" }, { L"H", "Harpies/Hybrids" }, { L"h", "Hominids (Elves, Dwarves)" }, { L"M", "Hydras" }, { L"i", "Icky Things" }, { L"FI", "Insects" }, { L"j", "Jellies" }, { L"K", "Killer Beetles" }, { L"k", "Kobolds" }, { L"L", "Lichs" }, { L"tp", "Men" }, { L".$!?=~_", "Mimics" }, { L"m", "Molds" }, { L",", "Mushroom Patches" }, { L"n", "Nagas" }, { L"o", "Orcs" }, { L"q", "Quadrupeds" }, { L"Q", "Quylthulgs" }, { L"R", "Reptiles/Amphibians" }, { L"r", "Rodents" }, { L"S", "Scorpions/Spiders" }, { L"s", "Skeletons/Drujs" }, { L"J", "Snakes" }, { L"l", "Trees/Ents" }, { L"T", "Trolls" }, { L"V", "Vampires" }, { L"W", "Wights/Wraiths" }, { L"w", "Worms/Worm Masses" }, { L"X", "Xorns/Xarens" }, { L"y", "Yeeks" }, { L"Y", "Yeti" }, { L"Z", "Zephyr Hounds" }, { L"z", "Zombies" }, { NULL, NULL } }; |
![]() |
![]() |
![]() |
#3 |
Swordsman
Join Date: Jun 2011
Location: Germany
Age: 51
Posts: 426
![]() |
code snip
Thanks Wobbly!
__________________
Blondes are more fun! |
![]() |
![]() |
![]() |
#4 |
Prophet
Join Date: Apr 2007
Location: Seattle, WA
Posts: 5,999
Donated: $40
![]() |
Tibarius--
Yeah those lists are hardcoded, and they kinda have to be. Some of the sets require special code for particular members of the list (like uniques have no specific letter associated with them.) But you should have seen the nightmarish original code--each set had its own special purpose menu code. It was utterly non-portable and non-maintainable, written with no function pointers. Just reams of prototypical spaghetti code. I cut thousands of lines when I cleaned it up--even whils adding 2 more datasets for the hell of it. All you need are an initializer, a couple comparators, and a lore function to add a new set. |
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Knowledge base | CivBesch | Vanilla | 11 | October 17, 2017 18:48 |
4.0.1 Artifact knowledge | mwnahas | Vanilla | 1 | July 29, 2015 06:46 |
Self-Knowledge | Cauldron | Vanilla | 4 | June 21, 2009 22:02 |
Monster knowledge menu - bug | JamesDoyle | Vanilla | 1 | March 1, 2009 11:10 |
possible monster knowledge bug - bronze golem | bebo | Vanilla | 2 | February 28, 2009 20:21 |