MudBytes
» MUDBytes Community » Codebase Specific » DikuMUD » SMAUG » new item type
Pages: << prev 1 next >>
new item type
Igabod
Wizard






Group: Members
Posts: 1,080
Joined: Jul 23, 2008

Go to the bottom of the page Go to the top of the page
#1 id:43797 Posted Mar 14, 2010, 9:48 pm

I want to add a few new item types to my smaugfuss code and I vaguely remember seeing a how-to on the subject somewhere. I was wondering if anybody else remembers seeing this how-to and can point me to it. I am sure I can figure it out for myself with a little effort but I'd still like to have a copy of the how-to handy for the future so I don't have to stumble through it again. My memory isn't likely to serve me well in the future since it's not serving me well at the moment.
.........................
Every man has his follies, and often they are the most interesting thing he has got - Josh Billings
Two things are infinite: the universe and human stupidity; and I'm not sure about the universe. - Albert Einstein
I have a love interest in every one of my films... a gun. - Arnold Schwarzenegger
Recession is when a neighbor loses his job. Depression is when you lose yours. - Ronald Reagan
I like long walks, especially when they are taken by people who annoy me. - Fred Allen

Kayle
Wizard






Group: Members
Posts: 1,165
Joined: Nov 27, 2006

Go to the bottom of the page Go to the top of the page
#2 id:43799 Posted Mar 14, 2010, 10:35 pm

I've never seen an FAQ or a guide, but adding item types is trivial. The easiest way to learn to do it is to search for all occurrences of an existing item type that does similar things to what you're trying to add, and do something similar for your new item type. The very core of adding an item type is two changes. It needs added to the list of item types in mud.h, and then to the flag arrays in build.c. After that the item type is added, it just doesn't do anything. I know there's a couple places in handler.c that you'll need to modify, and I think maybe the auction and identify codes need modded as well. But again, the easiest way to do it is to search for a similar item type.
.........................
Owner/Coder                                                            Coder
Malevolent Whispers                                                  Star Wars: The Sith Wars
{Development Phase - Not accepting players}            Open Alpha - Players Welcome - Full System Re-writes Imminent.                                     

FUSS Project Team Lead
SmaugMuds.Org - The Smaug MUDs Community Center

Igabod
Wizard






Group: Members
Posts: 1,080
Joined: Jul 23, 2008

Go to the bottom of the page Go to the top of the page
#3 id:43800 Posted Mar 14, 2010, 10:42 pm

yeah I went ahead and did it while I was waiting for a response and figured out that I was thinking about something else that was difficult. Not sure what it was exactly that I was thinking of, but it wasn't this. Maybe adding a new wear-loc or something.
.........................
Every man has his follies, and often they are the most interesting thing he has got - Josh Billings
Two things are infinite: the universe and human stupidity; and I'm not sure about the universe. - Albert Einstein
I have a love interest in every one of my films... a gun. - Arnold Schwarzenegger
Recession is when a neighbor loses his job. Depression is when you lose yours. - Ronald Reagan
I like long walks, especially when they are taken by people who annoy me. - Fred Allen

Kayle
Wizard






Group: Members
Posts: 1,165
Joined: Nov 27, 2006

Go to the bottom of the page Go to the top of the page
#4 id:43802 Posted Mar 15, 2010, 12:09 am

Well, an explanation of adding wear locations is on the SmaugMuds site as someone over there asked about that recently.
.........................
Owner/Coder                                                            Coder
Malevolent Whispers                                                  Star Wars: The Sith Wars
{Development Phase - Not accepting players}            Open Alpha - Players Welcome - Full System Re-writes Imminent.                                     

FUSS Project Team Lead
SmaugMuds.Org - The Smaug MUDs Community Center

Igabod
Wizard






Group: Members
Posts: 1,080
Joined: Jul 23, 2008

Go to the bottom of the page Go to the top of the page
#5 id:43934 Posted Mar 15, 2010, 11:58 pm

thank you, I most likely won't be needing that for this mud though.
.........................
Every man has his follies, and often they are the most interesting thing he has got - Josh Billings
Two things are infinite: the universe and human stupidity; and I'm not sure about the universe. - Albert Einstein
I have a love interest in every one of my films... a gun. - Arnold Schwarzenegger
Recession is when a neighbor loses his job. Depression is when you lose yours. - Ronald Reagan
I like long walks, especially when they are taken by people who annoy me. - Fred Allen

Pages:<< prev 1 next >>
Tags
[+]

Valid XHTML 1.1! Valid CSS!