Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, 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
➜ Random object loads
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Hanaisse
Canada (114 posts) Bio
|
Date
| Mon 18 Jun 2007 01:10 AM (UTC) |
Message
| Hi everyone,
I’ve been browsing this and other SMAUG related forums for awhile now and have gathered a lot of information, ideas and some snippets, although I haven’t seen any topic related to the question I have on the code’s capabilities. I’m hoping the collective intelligence here can help me.
I understand the code to be very linear – equip object A on mob B in room C and every reset it will always be there. Is there any way to randomize the load of an object on various mobs at various times?
For example, this is what I’d like to have: Randomly load an object - a healing potion - on any mob throughout an area during random resets. So that players are not always killing the same mob for the same object every reset. Sometimes it’s there, sometimes it’s not.
Really hoping this could be accomplished with some kind of prog and not messing too much with code (I'm using SMAUG1.4a). Any thoughts would be appreciated.
|
aka: Hana
Owner in Training of: Fury of the Gods
alm-dev.org:4000 | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #1 on Mon 18 Jun 2007 01:18 AM (UTC) |
Message
| What I did for something similar was to add a new mudprog trigger, spawn, that was called after a mob was created during the reset process. Then I could do whatever I wanted post-creation, such as random object loading. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #2 on Mon 18 Jun 2007 02:35 AM (UTC) |
Message
| What is simple to do is just add a death prog. Set it to the amount you want the obj to spawn, and have it invoke the item. The item will appear in the corpse. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #3 on Mon 18 Jun 2007 02:47 AM (UTC) |
Message
| Oh, yes, that's a good way too. The reason I did the other thing was because I wanted the item to be visible when you looked at the mob. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Samson
USA (683 posts) Bio
|
Date
| Reply #4 on Mon 18 Jun 2007 03:09 PM (UTC) |
Message
| Spawn progs are a perfect compliment to the death progs. Not sure why nobody ever thought of it before.
One other alternative is to attach a percentage argument to the reset itself so that you can then have a random chance of the mob itself showing up or not. That might be doable with a room based spawn prog but I'm not sure it would be a good idea to fill up the mud with a bunch of those. Prog processing is brutally inefficient.
Percentage based resets also allow you to have doors which are sometimes closed, sometimes not. Traps that don't always show up, and anything else resets are already capable of doing. Done well it can add a lot of variety to the game. | Top |
|
Posted by
| Nick Gammon
Australia (23,120 posts) Bio
Forum Administrator |
Date
| Reply #5 on Mon 18 Jun 2007 10:56 PM (UTC) |
Message
|
Quote:
Prog processing is brutally inefficient.
Must be time to convert them to Lua. ;) |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #6 on Mon 18 Jun 2007 10:59 PM (UTC) |
Message
| I've been arguing that for some time now. I just need to find a good way of doing it. :-) (And I need to find the time to find a good way etc.)
One temporary fix, though, would be to preparse the mudprog files into a byte-code of sorts to avoid having to interpret them from scratch every single time. But I think if you're going to go to that trouble you may as well just use Lua... |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Hanaisse
Canada (114 posts) Bio
|
Date
| Reply #7 on Tue 19 Jun 2007 02:19 AM (UTC) |
Message
| Thank you all for the responses. I don't think I've heard of a spawn prog before but a death prog I can probably handle.
I probably should have mentioned I'm not a coder, but I will have my coder take a look at all the suggestions.
Thanks again.
|
aka: Hana
Owner in Training of: Fury of the Gods
alm-dev.org:4000 | 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.
22,556 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top