Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Entire forum
➜ SMAUG
➜ SMAUG coding
➜ clan effects
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Jordan
(14 posts) Bio
|
Date
| Fri 09 Nov 2007 12:25 PM (UTC) |
Message
| ok so im looking to give each of the clans on the mud a seperate unique skill/spell/affect.
like say you are part of clan khaos then you should be affected by chaos
how would i go about starting this task? | Top |
|
Posted by
| Conner
USA (381 posts) Bio
|
Date
| Reply #1 on Fri 09 Nov 2007 03:27 PM (UTC) |
Message
| I'd start by looking at how they're done for deities myself.. |
-=Conner=-
--
Come test your mettle in the Land of Legends at telnet://tcdbbs.zapto.org:4000
or, for a little family oriented medieval fun, come join us at The Castle's Dungeon BBS at telnet://tcdbbs.zapto.org
or, if you just want information about either, check our web page at http://tcdbbs.zapto.org | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #2 on Fri 09 Nov 2007 09:56 PM (UTC) |
Message
| One way would just to (it's a hackish approach) add ifchecks in the is_affected function or whatever it's called. Ifcheck for clan, and return true for specific affect. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| Valcados
(15 posts) Bio
|
Date
| Reply #3 on Wed 19 Dec 2007 03:31 AM (UTC) |
Message
| If you want to add totally generic affects with the same flexibility as affects on items, you'll need to do a lot of paperwork. Look up my "Fix room affects" snippet at mudbytes.net, which deals with adding affects to rooms (broken support for this came with stock SMAUG, the snippet fixes it but in the process ends up practically rewriting all of it from scratch. I think the snippet is built into the latest SMAUGFUSS). There you'll see most of the paperwork involved. Some of the paperwork is:
1. When saving a playerfile, you must strip the affects from the player first before writing any data. Then once the data is written, you must put the affect back on. This is so that if an imm changes the clan's affects while the player is offline, the player won't be corrupted.
2. Any time an imm changes the affects, all online players should have the changes applied to them. Otherwise, they will be corrupted.
3. The affects will need to be applied when a char enters the clan, and removed when they're outcast.
4. You'll need to make some way for the imms to actually set the affects. For this, look up do_redit and search for what happens when imms set room affects with "redit affect blah blah blah". Similarly, a way to view and remove the affects.
5. You'll need to make the MUD save the affects in the clanfile, and load them when loading the clanfile.
NOTE: If you only want to modify affectedby, resistant, immune, susceptible, then things are much easier and you can just copy the deity code like someone mentioned. My version is for if you want totally generic affects like damroll, hp, etc. | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
15,042 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top