Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Development
Nov 28, 2018, 10:10 am
By Keirath
First Immortal
Oct 12, 2018, 12:02 pm
By GatewaySysop
Bug in do_climb( )
Jun 5, 2018, 5:31 pm
By joeyfogas
question on overland code
May 31, 2018, 10:03 am
By joeyfogas
KaVir's Protocol Snip
May 15, 2018, 7:57 pm
By joeyfogas
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, Bing, DotBot

Members: 0
Guests: 16
Stats
Files
Topics
Posts
Members
Newest Member
481
3,740
19,397
633
Rhyader
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SWFOTE FUSS » adding dynamic variables to p...
Forum Rules | Mark all | Recent Posts

adding dynamic variables to players, npcs, rooms, etc
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Aug 7, 2010, 12:34 am
Go to the top of the page
Go to the bottom of the page

sorressean
Fledgling
GroupMembers
Posts8
JoinedAug 2, 2010

Hello all,
I was curious how you guys went about this; I want to add like dynamic variables to mobs and players and stuff.
So rather than have like a new field for every value, maybe a sort of hashtable for keys and values for strings and ints. I haven't managed to make cool looking setups like I could pull off with a c++ setup, but maybe like a variant or something similar?
That would allow me to keep track of the number of houses a player has for example. Has something like this been done? Is there an easy clean way of extending players and other objects without having to edit the files?
Thanks,
~Sorressean~
       
Post is unread #2 Aug 8, 2010, 3:18 pm
Go to the top of the page
Go to the bottom of the page

olive
Fledgling
GroupMembers
Posts8
JoinedMay 13, 2008

Hello,

For my MUD that is a derivative of SWFOTE FUSS 1.x, I borrowed the variables handling code that is used in Smaug since version 1.9. Have a look at variables.c and variables.h in the smaug 1.9 sources to get an idea of how it works. You will then probably need to define some commandes such as "vstat" (to show the list of variables for a mobile or player), mptag (to add a variable to a mobile or player) etc.

If you have any question, don't hesitate to ask.

Regards,
       
Post is unread #3 Aug 9, 2010, 11:07 am
Go to the top of the page
Go to the bottom of the page

sorressean
Fledgling
GroupMembers
Posts8
JoinedAug 2, 2010

Wow, thanks; that looks like pretty much what I need. :)
       
Pages:<< prev 1 next >>