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

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Lua
. . -> [Subject]  Strange problem with Reroll Script

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: Strange problem with Reroll Script
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please).
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Pages: 1 2  

Posted by Nick Gammon   Australia  (18,798 posts)  [Biography] bio   Forum Administrator
Date Wed 14 Sep 2011 09:14 PM (UTC)  quote  ]
Message
It is almost totally dependent on the MUD and what it sends you. You need to work it out for each case.

- Nick Gammon

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

Posted by Antwon00   (1 post)  [Biography] bio
Date Tue 13 Sep 2011 11:55 PM (UTC)  quote  ]
Message
What would the finished product of this script be. I am not a savvy computer expert in any way but would like to use this script for realms. Thanks for the assistance.
[Go to top] top

Posted by Nick Gammon   Australia  (18,798 posts)  [Biography] bio   Forum Administrator
Date Fri 29 Jun 2007 10:09 PM (UTC)  quote  ]
Message
It's quite funny to think that if the MUD admins ever did a profile on their code usage it might look like this:


Players fighting and walking around: 1%
Players spending weeks rerolling for better stats: 99%


- Nick Gammon

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

Posted by Invictus84   USA  (6 posts)  [Biography] bio
Date Fri 29 Jun 2007 09:48 PM (UTC)  quote  ]
Message
As suggested, I went back and converted all the capture triggers to regular expressions. I also put in the full spacing for each return message from reroll and so far, it's been rolling on it's own for quite a while without a single stop, so I think that's got it :)

Thanks everyone for the help, it's greatly appreciated :)
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio   Moderator
Date Fri 29 Jun 2007 02:00 PM (UTC)  quote  ]
Message
All that did was get people to create charts of which letters in which positions gave you which stats. It became a game of picking the right name to get good stats while being able to pass off the name as a "natural" one.

IMHO any kind of randomness in character development is a bad idea. It either encourages this kind of repetitive stat hammering to get a good dice roll, or it creates unfairness which over time can cumulate to big differences in ability (e.g. a few points in constitution, compounded over 45 level gains, can make for a good number of hit points).

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

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

Posted by Isthiriel   (111 posts)  [Biography] bio
Date Fri 29 Jun 2007 01:51 PM (UTC)  quote  ]

Amended on Fri 29 Jun 2007 01:53 PM (UTC) by Isthiriel

Message
Realms of Despair used to have a name-munger so your choice of name predetermined the stats you'd start with. Not that that mattered very much on RoD with the number of stat boosters floating around.

... though, on reflection, since RoD is the reference implementation of Smaug that is probably something that everyone already knows. *sigh*
[Go to top] top

Posted by Nick Gammon   Australia  (18,798 posts)  [Biography] bio   Forum Administrator
Date Fri 29 Jun 2007 09:49 AM (UTC)  quote  ]
Message
Quote:

I've been known to have 4 and 5 rerolling characters going at the same time for in excess of 2 weeks at a time, waiting for just one to come out with stats I want.


Message to MUD admins: I have suggested it before, and I'll suggest it again. If you are wondering where all your network bandwidth, and CPU power is going, it is your random stats system.

I suggest you replace random stats with fixed stats (perhaps fixed per class/race) so there is no point in using stats rollers. You could give players a "pool" of extra stats to distribute as they see fit, so everyone doesn't start with exactly the same stats (although that is exactly what World of Warcraft does -simply allocates fixed stats based on the class you choose to play).

- Nick Gammon

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

Posted by Nick Gammon   Australia  (18,798 posts)  [Biography] bio   Forum Administrator
Date Fri 29 Jun 2007 09:45 AM (UTC)  quote  ]
Message
I think Shaun is right. A trigger like this:


Match: "Intelligence          * *"


... has very specific spacing. One space more or less and it won't match. I would do what he suggests and make a regexp to match an indefinite number of spaces.

- Nick Gammon

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

Posted by Shaun Biggs   USA  (644 posts)  [Biography] bio
Date Fri 29 Jun 2007 09:43 AM (UTC)  quote  ]
Message
Quote:
And yeah, the reroll system has cursed all of us players who try to actively play. I've been known to have 4 and 5 rerolling characters going at the same time for in excess of 2 weeks at a time, waiting for just one to come out with stats I want.

Doing some quick math, that's about 2000 hours put in for character creation just rolling stats. If I were the person running a mud that worked like this, I think I'd code in a way to limit rerolls to 100 per IP address per day. Or just give up and make it some sort of point based system to completely cut down on people wasting the server's processing power and bandwidth with something so inane.

It is much easier to fight for one's ideals than to live up to them.
[Go to top] top

Posted by Shaun Biggs   USA  (644 posts)  [Biography] bio
Date Fri 29 Jun 2007 09:38 AM (UTC)  quote  ]
Message
I think I figured it out and how to solve the problem. Does it crash out when a stat is rolled that's below 10? The single digit stats look like they have different spacing, so the trigger might not pick them up. You can fix this with a regex trigger match like this:

match="^Strength/w+(/d+).+"

It is much easier to fight for one's ideals than to live up to them.
[Go to top] top

Posted by Invictus84   USA  (6 posts)  [Biography] bio
Date Fri 29 Jun 2007 08:47 AM (UTC)  quote  ]

Amended on Fri 29 Jun 2007 08:48 AM (UTC) by Invictus84

Message
I just watched it run for a few minutes and kept checking the variables, see if they were pulling the correct numbers and what have you... and here's the odd part - Some of them come back blank every so often, and at that point the script shoots back that error message. So, I think that in itself is the cause. Can't check A against B if A doesn't contain anything.

Unfortunately, still leaves me a bit lost. Something is obviously is going awry in the capture, but what? It's left me more than slightly confused :p Still unsure why it just stopped that one time, maybe it'll go away on it's own when the bigger issue gets taken care of.

And yeah, the reroll system has cursed all of us players who try to actively play. I've been known to have 4 and 5 rerolling characters going at the same time for in excess of 2 weeks at a time, waiting for just one to come out with stats I want.
[Go to top] top

Posted by Nick Gammon   Australia  (18,798 posts)  [Biography] bio   Forum Administrator
Date Fri 29 Jun 2007 08:11 AM (UTC)  quote  ]
Message
Quote:

It happened to roll 18 strength and dex, however the luck was terrible ...


I think I have worked out in the past, that to get a good score on everything you probably have to spend thousands of hours of server time. Quite apart from the load on the MUD, you will have a long wait.

- Nick Gammon

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

Posted by Nick Gammon   Australia  (18,798 posts)  [Biography] bio   Forum Administrator
Date Fri 29 Jun 2007 08:08 AM (UTC)  quote  ]
Message
Considering your trigger basically does this:


if @str >= 18 and @dex >= 18 ... and so on



... and your error message is "unexpected symbol near '>='", then I am guessing that the variables contain something unusual.

I would put in a debugging display, like:


Note ("str = @str, dex = @dex" )


(and do on), so you can see what the variable is, at the time it fails.

- Nick Gammon

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

Posted by Shaun Biggs   USA  (644 posts)  [Biography] bio
Date Fri 29 Jun 2007 08:03 AM (UTC)  quote  ]

Amended on Fri 29 Jun 2007 08:05 AM (UTC) by Shaun Biggs

Message
Can you give a list of the stats stored in the variables when the script crashes? Might give some idea of what it's trying to match that's failing. Also, if you could post the code within [code] tags, we could check for excess spaces easier, since the forums normally just eat them in display.

This is why I hate random roll generation... just begs to have people script a bot to get good stats. Not that I can really complain much, as I'd do the same thing.

It is much easier to fight for one's ideals than to live up to them.
[Go to top] top

Posted by Invictus84   USA  (6 posts)  [Biography] bio
Date Fri 29 Jun 2007 07:10 AM (UTC)  quote  ]

Amended on Fri 29 Jun 2007 08:14 AM (UTC) by Invictus84

Message
Some things I guess I should note... Yes, there is a duplicate trigger (the gold trigger) :) Sometimes, the return message from typing gold shows up on the prompt line, so I had to duplicate it with an asterisk at the beginning to account for it showing up on my prompt line.

Secondly, everything was carried out through the GUI. I'm a bit of a coding newb, so it was easier on my aching head to just input what code was needed to carry out a few functions and let MUSHclient input the rest for me :)

For anyone that may not have seen RoD's reroll output, looks like this:

Your character's base stats have been rerolled...
                     New             Previous
Strength              17                   15
Dexterity             14                   17
Intelligence          15                   15
Wisdom                14                   11
Charisma              10                    9
Constitution          14                   14
Luck                  11                   14


Sometimes the "Your character's base stats have been rerolled..." line appears on my prompt line, so I try to avoid using it as part of the triggers set.

One last thing, while I was typing this, I was letting it roll to see if it'd do anything different, and wouldn't you know it... it did. It happened to roll 18 strength and dex, however the luck was terrible (I have it set to look for 18 str/dex, 16lck) and instead of rerolling it or even trying to keep it, since two of the stats matched, it just stopped. No error message or anything, just sat there :|

Hope these bits help :)
[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.


5,359 views.

This is page 1, subject is 2 pages long: 1 2  [Next page]

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

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

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]