Register forum user name Search FAQ

Gammon Forum

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.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ SMAUG coding ➜ Question..

Question..

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


Posted by Ember   (6 posts)  Bio
Date Sat 09 Nov 2002 07:57 PM (UTC)
Message
I was wondering how I would go about changing the character limit that is set on says and emotes and such..?
Top

Posted by Meerclar   USA  (733 posts)  Bio
Date Reply #1 on Sun 10 Nov 2002 03:28 AM (UTC)
Message
You'd have to redefine maximum_string_length, or maybe smaug has it as maximum_input_length. I'd recommend against going above 256 chars as a practical limit, if they need more input than that at once they can figure out multiline on their own.

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
Top

Posted by Ember   (6 posts)  Bio
Date Reply #2 on Sun 10 Nov 2002 01:51 PM (UTC)

Amended on Sun 10 Nov 2002 10:33 PM (UTC) by Ember

Message
'You'd have to redefine maximum_string_length, or maybe smaug has it as maximum_input_length.'

Where do I do that at?
Top

Posted by Meerclar   USA  (733 posts)  Bio
Date Reply #3 on Mon 11 Nov 2002 03:15 AM (UTC)
Message
At this point, I'm guessing you aren't an experienced coder. I don't remember the file these are defined in off the top of my head and quite honestly I'm too lazy right now to go find it, but if you use grep or find to search for the variable name it should be very easy to find them. I would also repeat the much given advise of starting on something fairly simple to add, like a new spell, before moving into changing what can be rather fickle variables that can easily make a mud terminally unstable. Failing that, find an experienced coder and a good CVS setup for the sake of your own sanity and that of your players.

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
Top

Posted by Typhon   USA  (112 posts)  Bio
Date Reply #4 on Mon 11 Nov 2002 12:56 PM (UTC)
Message
i just happened to change this in LOD. in comm.c there is
a function call read_from_buffer.. about 10 lines in there is a line that says if (k >= 256)... change that 256 to like 512 or 1024.. not much larger then that unless you change the size of MAX_STRING_LENGTH or the other maxes in mud.h
Top

Posted by Meerclar   USA  (733 posts)  Bio
Date Reply #5 on Tue 12 Nov 2002 04:20 AM (UTC)
Message
Even doing this you run the fairly high risk of setting the read value greater than MSL and still losing part of the text anyway. If there is a specific application you want 'unlimited' input length for, notes and helpfiles are where most ppl run into these issues, I'd suggest looking into a mudftp setup instead of jacking with the input limitations.

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
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.


19,786 views.

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

Go to topic:           Search the forum


[Go to top] top

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