A new look for the createnpc command

Discussion about the development of POL's official distribution scripts.

Moderators: POL Developer, Distro Developer

Post Reply
Distro Developer
Posts: 2754
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas

A new look for the createnpc command

Post by Yukiko » Mon Dec 23, 2019 12:00 am

I have been working on improving the createnpc command. I also wanted to add a taxonomical designation to each type of NPC; e.g. Dragons would be classified as draco, Cows, Bulls, Goats, and Sheep as bovidae. Some of the taxonomical names are derived from "standard" classifications of animals but as UO deals with creatures that do not exist in the world today, I had to be inventive in creating new categories, For example, Undead are classified under the immortuos category. I relied on Google Translate and the Latin language heavily for the new categories.

Part of my desire to have classifications for NPCs was to eventually do something nice with the Animal Lore skill but also to use these taxonomical names in the createnpc command. Below are screen shots of the createnpc commands operation.

When you type the .createnpc command with no template you will receive a gump like this. I have selected the category daemonium.
cnpc tax sel.jpg
With daemonium selected, if you click the "OKAY" button you will receive a gump listing all NPCs that are in the daemonium classification.
cnpc NPC sel.jpg
I realize there is a learning curve to using this command if I use classifications for the NPC group selection. I could change from using the taxonomical names to using a small, abbreviated, list of NPCs for designating the categories. It would require a little more effort but it can be done. The old way was to show pictures, art tiles of miniature NPCs, that generally pertained to NPCs in that category. There are at least two complications with the picture method. First, the picture may not give enough information to the GM about the NPCs in that category. The second problem is that a separate part of the npcdesc.cfg file would need to be updated each time a new NPC was added. After adding the NPC definition, you would then need to add the template name to the category list in the proper category. Using my method you need only add a custom property, Taxonomty, in the NPC definition.
In the definition for a brown bear note the Taxonomy property at the end:

Code: Select all

NpcTemplate bear
    Name                   a brown bear
    script                 animal
    ObjType                0xd3
    Color                  0
    TrueColor              33784
    Gender                 0
    STR                    75
    INT                    47
    DEX                    45
    HITS                   100
    MANA                   0
    STAM                   75
    Resisting_Spells        35
    Wrestling              60
    Tactics                60
    AttackSpeed            30
    AttackDamage           2d5+3
    AttackAttribute        Wrestling
    AttackHitSound         0x62
    AttackMissSound        0x239
    AR                     12
    tameskill              46
    herdskill              41
    food                   meat
    provoke                25
    dstart                 10
    deathsound             0x64
    damagedsound           0x63
    idlesound1             0x60
    idlesound2             0x61
    corpseitm              rawrib hide
    corpseamt              8 12
    CProp  noloot          i1
    CProp  Karma           i0
    CProp  Fame            i2
    AttackHitScript        :combat:mainHitScript
    Taxonomy				ursidae
I could use "Bears" rather than ursidae in the first gump. And likewise for the other NPC groups. Below is a list of the current classificatios for the various NPCs. Some are not strict such as rodentia and others are, such as elementum.

Code: Select all

// Taxonomy of the UO NPCs.
// This list was originally compiled by ThisIsMe.
// I added more classifications. Some of the taxonomical
// names were taken from Latin.
// Note: This list originally included 47 taxonomical
// classifications. I had to pare it down considerably
// to prevent the NPC creation command's gump from being
// too long. Consequently I had to cheat and combine
// some classifications, ie. Ophidians are now under
// the sepentes taxonomy instead of ophidia.
// The original list can be found at the
// end of this file.
// Yukiko
// anura			- Frogs and Toads
// arachnida		- Scorpions, Spiders and Terathons
// aves				- Birds and Harpys
// chiroptera		- Bat, Wombat
// beholder			- Gazers and Frigid Eyes (your eye creatures)
// bovidae			- Cows, Bulls, Goats, Sheep and bonnacon
// 					  (https://en.wikipedia.org/wiki/Bonnacon)
// camelidae		- llamas
// canidae			- Dogs, wolves
// cervidae			- Deer, Great Harts
// cretacea			- All dinosaurish species, including Raptalon, Armoured Boura, etc.
// crustacean		- Crabs and shell fish
// daemonium		- Daemons, Balron's, Ice Fiends...
// delphinidae		- Dolphins
// draco			- Dragons and Drakes
// elementum		- Elementals
// equus			- Horses, Unicorns, Dread Horns...
// felidae			- Cats, Panthers, Tigers
// fey				- faeries, pixies, dopplegangers, Wisps
// homo sapiens		- humans
// immortuos		- Undead
// limus			- slimes, mucks etc.
// movens ligno		- Ents, Reapers and other animated or moving tress
// odobenidae		- Walrus
// orcus			- Orcs, Ogres, ettins etc.
// phasianidae		- Chickens, Ostards and probably Turkeys?
// primatomorpha	- Gorillas
// reptilia			- Alligators, Rock Lizards, Fire Lizards and lizardmen
// rodentia			- Rabbits, Rats, Giant Rats and Ratmen
// scarabaeidae		- Giant Beetles, Fire Beetles, etc...
// serpentes		- Snakes, Giant Serpents, Ophidians
// suidae			- Pigs, Boards, Hildisvinis
// unknown			- Ki-rin and headless ones fall into this classification
// ursidae			- Bears
// vinae			- Corpser...any vine type of plant
I would like some opinions about which way to handle the display of NPC groups, using the taxanomical name or a short list of the NPCs in that group.

Here are examples of the two options:
Option 1 - the current method for reptiles displays:
Which includes Alligators, Rock Lizards, Fire Lizards and lizardmen

Option 2 For NPCs in the class reptillia would display:
Alligators and Lizards

I think I know which method I am going to use but I want some input on the two options before finalizing the createnpc command. Let me know which method you prefer.

Grandmaster Poster
Posts: 244
Joined: Mon Feb 06, 2006 6:12 am

Re: A new look for the createnpc command

Post by DevGIB » Sun Dec 29, 2019 4:03 am

The picture method you could have a seperate cfg file that tied mobile graphic numbers to gump art numbers.
Then you could have like a filter option to find say all npc's that have the horse graphic or all npc's that have the daemon graphic etc.

With that said i don't know if there are mini gump graphics for all the mobile types e.g. blade spirit.

Another potential alternative is to have like a filter/search system. Where you could enter in things like get me npc's with strength above x or npcs that can move on water and land etc. but once again this is just more work, but its a though.

Distro Developer
Posts: 2754
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas

Re: A new look for the createnpc command

Post by Yukiko » Sun Dec 29, 2019 11:12 am

Yeah. The options are virtually limitless. I think, at least for now, I am going to go with a brief list of the types of NPCs rather than the cryptic taxonomic classification. This is a GM command after all. The taxonomy was created for the Animal Lore skill.

Distro Developer
Posts: 92
Joined: Sun Jul 17, 2016 1:29 am

Re: A new look for the createnpc command

Post by ThisIsMe » Sun Dec 29, 2019 11:12 pm

If you're looking to use an image type system, you can use my bodies pkg I sent you which will return the frame graphic of any currently known npc graphic you send it. I originally wrote it to replace WoD's tracking system, where all that crap had to be defined in each npcdesc file at the top because I realized as a player that Pangaea staff in the past found it too troublesome, or were to lazy to add a separate entry just for these frame objtypes to have them display properly and as a staff have become annoyed with the system message we are spammed with when someone tries to track an npc that does not have one of these frame objtypes defined. Suffice it to say, like many things, I have yet to rewrite tracking, but the bodies pkg can be used in any fashion you see fit and this would if you want a graphical image of what your npcs might look like you can use it for that.

(Not sure if it made it into the Distro yet, but anyone is free to use it for whatever purpose and hopefully if anything is added to it by others they will push an update.) :bacondance:

Distro Developer
Posts: 2754
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas

Re: A new look for the createnpc command

Post by Yukiko » Mon Dec 30, 2019 8:23 am

Yep. It is in the Distro. The issue is more in assigning an image to a group of NPCs rather than pulling up an image of a particular NPC. I suppose a generic image for a group could work but in certain cases it might not give enough information to show every NPC template that the group contains. I do encourage shard developers to look at the bodies package. It can help in improving the tracking skill gump and other aspects of game play.

Post Reply