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 ➜ Compiling the server ➜ Installing a patch to SMAUG1.8(no idea how to do it)

Installing a patch to SMAUG1.8(no idea how to do it)

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


Posted by ShadowGazer   USA  (17 posts)  Bio
Date Wed 11 Feb 2009 12:59 AM (UTC)
Message
Alright, I downloaded a patch that adds new classes, spells, etc. to the stock smaug server. Thing is, it gives no instructions on installing it. I've opened the file in windows with 7 zip (the file had a tgz extension) and there are a bunch of files in there with the .pat extension. So, how do I install it into my mud? Do I have to edit code? I really hope not because I want to be able to put these classes into my game.

I got the file from: ftp://ftpgame.org/pub/mud/snippets/smaug/patch.tgz

There is a readme contained in the file but it doesn't explain what to do with the files. I'm pretty stupid when it comes to installing things. I'm still learning how to use the commands within smaug. I put up the game so I can learn how to code, but with basically no help to go on, it's a pretty slow process.
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #1 on Wed 11 Feb 2009 03:07 AM (UTC)
Message
The basic idea is that you use the "patch" program that probably is, or should be, installed with Cygwin or Linux.

You can edit the patch files, for example magic.c.pat starts with these lines:


--- magic.c	Mon Jun  2 22:46:08 1997
+++ new/magic.c	Tue Jun  3 23:46:48 1997
@@ -1175,7 +1175,7 @@
 	 * Vampire spell casting				-Thoric
 	 */
 	blood = UMAX(1, (mana+4) / 8);      /* NPCs don't have PCDatas. -- Altrag */
-	if ( IS_VAMPIRE(ch) )
+	if ( IS_VAMPIRE(ch) || IS_DEMON(ch) )


What that is basically saying is, in the file magic.c, around line 1175, for 7 lines, remove (minus) the line:


  if ( IS_VAMPIRE(ch) )


... and replace it (plus) by this:


  if ( IS_VAMPIRE(ch) || IS_DEMON(ch) )


And so on, for the rest of that file.

The general technique is to untar (unzip if you like) the patch archive so all the files are in the "src" directory. Then from a command prompt you would run something like this:


patch < magic.c.pat


Or possibly, to do all of them:


patch < *.pat


What that does is effectively feed the file into the patch program, which does its stuff.

However you need to be pretty cautious. These files are dated 1997 as you can see from the first line. If the version of Smaug you are applying them to is not the same, or very similar, to what it was when the patch files were made, it won't find the old lines, and thus cannot replace them by the new ones.

If you are beginning, I would try running SmaugFuss (Fixed Up Smaug Source) without trying to change anything for now. Just get used to what it currently does. The patch files are really coders releasing the differences between a version without their change, and one with it. But if you don't have the version without the change in the first place things are likely to go seriously wrong.



- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by ShadowGazer   USA  (17 posts)  Bio
Date Reply #2 on Wed 11 Feb 2009 03:24 AM (UTC)
Message
Ok, I'll try messing around with SmaugFUSS. I'd like to learn how to code, so I'm going to be going to the library and get, or order online, some books on C coding. I really want to have a successful MUD using the SMAUG codebase, so I'll try using SmaugFUSS for a while until I can learn how to code better. Thanks again Nick!
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #3 on Wed 11 Feb 2009 04:54 AM (UTC)
Message
A good way of getting started is to get [b]very[/b] familiar with how SMAUG behaves from the user's perspective. Then, when you read the code, you will be able to connect things to what you have observed. Think of it kind of like learning a foreign language: if you know what a block of text is supposed to be saying, you'll have an easier time piecing apart the individual words than if you had no idea at all what the topic matter is. Another thing we suggest to everybody is to have the patience to start small, and learn to crawl, then stand, then walk, then run. It might feel like a slower process, but it's far more rapid in the end of the day than falling over all the time and breaking things irreparably. :-)

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by ShadowGazer   USA  (17 posts)  Bio
Date Reply #4 on Wed 11 Feb 2009 05:13 AM (UTC)
Message
Heh, I tried SmaugFUSS and the commands are alot different from what I was using, so I'm back to using my older codebase. Gonna get used to those commands, build from there, then maybe I'll go to SmaugFUSS in the future.

I'm also going to take the suggestion and get used to the player's perspective before I decide on programming things that I know I'll probably break.

I'm going to be taking a look at code, try to understand how it works, and get some books to help me figure out what everything means, and go from there.

Thanks for all the help you two. It is much appreciated, and I hope I can come back here and post some success stories!
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #5 on Wed 11 Feb 2009 08:10 PM (UTC)
Message
Different how? 1.8 shouldn't be that different compared to FUSS.

If you haven't applied any FUSS fixes to your Smaug MUD, you are open for a number of exploits and the such.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by ShadowGazer   USA  (17 posts)  Bio
Date Reply #6 on Wed 11 Feb 2009 09:17 PM (UTC)
Message
Well, alot of the commands I was used to using were not in SmaugFUSS, like rassign. There was a help file for it but the command itself was not present. In fact, all the commands I was used to using in 1.8 were not in smaugfuss, so I could not figure out how to do anything. I don't know, maybe I was using a wrong version or something but I couldn't find most if not all the commands I was used to using. All I would get was "Huh?". And like I said, the help files were in there, but the commands themselves were not. I had full imm powers as well, so it wasn't that
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #7 on Wed 11 Feb 2009 09:28 PM (UTC)
Message
Are you running with Cygwin? There are some things you need to do to get the dynamic loading working -- there are instructions in the makefile or readme, and many references to the problem on the forums.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by ShadowGazer   USA  (17 posts)  Bio
Date Reply #8 on Wed 11 Feb 2009 11:59 PM (UTC)

Amended on Thu 12 Feb 2009 12:04 AM (UTC) by ShadowGazer

Message
No I'm running linux I believe. Red Hat to be exact. I'm going through thirdhosting.com with their advanced mud package. Do I need to do anything in linux to get all the commands I'm used to? Let me know and I'll consider moving to SmaugFUSS
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #9 on Thu 12 Feb 2009 12:09 AM (UTC)
Message
Well, I'm just surprised that there would be help files, but no commands. Do you get any warnings whatsoever when you compile? In particular, anything about "ldl", "dlsym", "libdl" are things to look out for.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by ShadowGazer   USA  (17 posts)  Bio
Date Reply #10 on Thu 12 Feb 2009 12:20 AM (UTC)
Message
Nope, no errors whatsoever, everything compiles clean. I just compiled smaugfuss1.9.tgz

There are help topics for the commands but the commands themselves return a "Huh?" when I try to use them.

For instance, here's a paste directly from the game:

help rassign
Help level: 58
Syntax: rassign
oassign
massign

> Steps for creating a new area from scratch;
> 1. checkvnum rooms low_vnum hi_vnum
> checkvnum objects low_vnum hi_vnum
> checkvnum mobs low_vnum hi_vnum
> (make sure the vnums don't overlap another area)
> 2. rassign (person) low_vnum hi_vnum
> massign (person) low_vnum hi_vnum
> oassign (person) low_vnum hi_vnum
> 3. mset (person) aloaded yes
> 4. goto low_vnum
> goto hi_vnum
> 5. savea
> 6. save
>
> This should create a new area listed as '{PROTO} (Person)'s area in
> progress', with the file name '(person).are' and it should load up after
> rebooting the MUD with 'loadarea' or 'loadarea (person).are' if it's not
> your area.
(C)ontinue, (N)on-stop, (R)efresh, (B)ack, (Q)uit: [C]

NEVER do this to someone who has an area assigned to them. This would
change the range for the area they have assigned and wipe out the area.

<24hp 145m 110mv> <#1200>
rassign
Huh?


See? The help topic is there but the command gives a "Huh?" when I use it.
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #11 on Thu 12 Feb 2009 02:16 AM (UTC)
Message
See: http://www.gammon.com.au/forum/?id=8789

There is no rassign command. ;-)

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by ShadowGazer   USA  (17 posts)  Bio
Date Reply #12 on Thu 12 Feb 2009 02:27 AM (UTC)
Message
I knew it had to be something obvious that I was missing. Thank you very much!
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.


35,724 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.