Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Users Online
CommonCrawl, Yandex, Bing

Members: 0
Guests: 4
Stats
Files
Topics
Posts
Members
Newest Member
477
3,706
19,240
608
LAntorcha
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 >>