[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  VBscript
. . -> [Subject]  i need the know how... to script a stat roller

i need the know how... to script a stat roller

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Silence   (7 posts)  [Biography] bio
Date Tue 03 Apr 2007 08:49 PM (UTC)
Message
i cant grasp the concept of scripting yet and i need a stat roller to roll decent stats... heres the approach i took

Your roll: 9, 16, 17, 13, 18, 8

is what you get when you roll, 18 being max 1 being min
i need to write something to where i dont except anything under 17 because sitting and typin reroll for hours aint my thing...

so i grabbed that expression and put it into a trigger like so

Your roll: %1, %2, %3, %4, %5, %6

with the output as

if %1 < 17 and
if %2 < 17 and
so on and so forth
then
reroll
else if
PUT IN YOUR STATS NOW

and obviously this doesnt work... so can i get some help?
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #1 on Tue 03 Apr 2007 09:13 PM (UTC)
Message
There has been post after post about stat rollers; I'd suggest searching the forum for more information. You're very likely to find exactly what you want.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Silence   (7 posts)  [Biography] bio
Date Reply #2 on Tue 03 Apr 2007 09:24 PM (UTC)
Message
i found something and now my trigger looks like this....

trigger> Your roll: *, *, *, *, *, *

output> if (%1 + %2 + %3 + %4 + %5 + %6) > 105 then
Send "Y"
else
Send "reroll"
end if

i think it worked once and nvr again so can i get some help?
[Go to top] top

Posted by Silence   (7 posts)  [Biography] bio
Date Reply #3 on Tue 03 Apr 2007 09:31 PM (UTC)
Message
ok i changed it again now the output looks like this...

if (%1 + %2 + %3 + %4 + %5 + %6) < 105 then
Send "reroll"
else
Send "assign stats"
end if


and i still have to type reroll randomly some times the trigger will work once sometimes it will work like its supposed to and sometimes it doesnt work at all... what am i missin?
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #4 on Tue 03 Apr 2007 10:41 PM (UTC)
Message
Quote:

... sitting and typin reroll for hours aint my thing


Perhaps you should lower the threshold a bit? You don't mind the computer sitting and rerolling for hours, I take it? What about lag on the game as your client tries 10 million times to get those fantastic stats?

Anyway, to find why it doesn't work you would need to post your exact trigger, and the exact output you got from the MUD, which did not cause it to fire.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Silence   (7 posts)  [Biography] bio
Date Reply #5 on Tue 03 Apr 2007 10:47 PM (UTC)
Message
Everyone else in the mud has these stats and they all use rollers...

<triggers>
<trigger
custom_colour="2"
enabled="y"
keep_evaluating="y"
match="Your roll: *, *, *, *, *, *"
send_to="12"
sequence="100"
>
<send>if (%1 + %2 + %3 + %4 + %5 + %6) &lt; 105 then
Send "reroll"
else
Send "assign"
end if</send>
</trigger>
</triggers>

theres the trigger the assign part is just to let me know that its hit the right dice. and as far as output from the mud its just random sets of numbers that as far as i can tell r lower than 105 but only certain ones set off the trigger heres a few that set it off

Your roll: 9, 15, 13, 16, 11, 13
Your roll: 9, 13, 12, 14, 8, 8
Your roll: 8, 12, 15, 18, 13, 15

now heres a few that didnt

Your roll: 12, 8, 14, 8, 15, 9
Your roll: 11, 13, 9, 10, 15, 16
Your roll: 18, 18, 10, 17, 14, 12

and now lookin at the numbers it seems to only be triggerd when the first number is lower than 10 but that could be coincidence.
[Go to top] top

Posted by Silence   (7 posts)  [Biography] bio
Date Reply #6 on Tue 03 Apr 2007 10:50 PM (UTC)

Amended on Tue 03 Apr 2007 11:00 PM (UTC) by Silence

Message
after a few more tests i see that it does only go off when the first variable is under 10 but i dont know why or how to change this. so can i get a bit more help?

===========================================================

I also tried this trigger

<triggers>
<trigger
custom_colour="2"
enabled="y"
match="Your roll: *, *, *, *, *, *"
send_to="12"
sequence="100"
>
<send>if %1 &lt; 17 and
%2 &lt; 17 and
%3 &lt; 17 and
%4 &lt; 17 and
%5 &lt; 17 and
%6 &lt; 17 then
Send "reroll"
else
Send "assign"
end if</send>
</trigger>
</triggers>

which does nothing at all =/
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #7 on Tue 03 Apr 2007 11:00 PM (UTC)
Message
You are on the track. Looking at your actual post, you have 2 spaces here:


"Your roll:  *, *, *, *, *, *"


Note 2 spaces after the colon?

Thus, only low rolls will match (eg. (space)9).

You need to make it:


"Your roll: *, *, *, *, *, *"

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Silence   (7 posts)  [Biography] bio
Date Reply #8 on Tue 03 Apr 2007 11:02 PM (UTC)
Message
IT WORKED!! haha thanks a lot man. im sure ill have a lot more questions in the future. but for now ta-ta =D
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #9 on Tue 03 Apr 2007 11:05 PM (UTC)

Amended on Tue 03 Apr 2007 11:06 PM (UTC) by Nick Gammon

Message
Message to MUD admins - random stats are a bad idea

Quote:

Everyone else in the mud has these stats and they all use rollers ...


To everyone that operates a MUD with random initial stats - do you see why this isn't really working? If what Silence says is true, your players don't end up with random stats at all, they end up with 17, 17, 17, 17, 17, 17.

Now that's not random is it? What is worse, in order to get these "perfect" scores, they are wasting hours of CPU time, and pushing your network bandwith usage through the roof.

What I suggest you do is pre-allocate reasonable stats for new players, probably based on class. The whole idea, really, is to get "good" stats for your class, so that a mage might want lots of int, and a warrior lots of str.

So, simply have pre-defined tables, one per class. So if they choose a warrior you give them maybe +2 (from the base stat) on str, but -2 on int. Altogether, the total should add up to the same so no particular class is at a disadvantage.

The random system is basically unfair - it means casual players - those that don't use stat rollers - either get a low roll, through no fault of their own, or a high roll, although they have done nothing to deserve it.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Silence   (7 posts)  [Biography] bio
Date Reply #10 on Tue 03 Apr 2007 11:09 PM (UTC)
Message
its the truth... i dont know if you have heard of Legends of Warcraft mud but Necrolyte the head admin and main coder there had the right idea for random stats... it was coded so that you can only have 3 email address's per ip and u only get 5 rerolls per acct... it seems harsh when tryin to create a new character but it gives everyone the same chance
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #11 on Tue 03 Apr 2007 11:24 PM (UTC)
Message
What I plan on in my MUD is not a stat roller, but you get a certain amount of points on creation that you can allocate to stats. And in the game, you are able to increase stats further.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #12 on Wed 04 Apr 2007 12:36 AM (UTC)
Message
Random rollers are ok too, if they're based on a total number of points allocated randomly. Essentially you have the program randomly allocate the points. You still have the roller issue but it's less of a problem; still, the best thing is to do what Zeno suggested and to give everybody the same number of points and let them figure it out. It's what's fairest.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Shaun Biggs   USA  (644 posts)  [Biography] bio
Date Reply #13 on Wed 04 Apr 2007 02:26 AM (UTC)
Message
Personally, one of the few stat rollers I've ever liked has been for ZAngband. I'm not sure if Angband uses anything similar, since I've never played around with that. Pretty much it asks you to give a weight from 1-100 to each stat, and then it rolls x number of times, picking the one that comes closest to that spread. The weighting is important, since if you put 100 in each stat, it will try to make them even. This way, you'll at least get stats you're ok with, and no one winds up at the absolute maximum for every stat.

It is much easier to fight for one's ideals than to live up to them.
[Go to top] 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.


24,270 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]