bamfin\bamfout

Posted by Kris on Tue 20 Mar 2001 07:37 PM — 5 posts, 19,560 views.

USA #0
Unlike ROM, SMAUG has this annoying little thing in it that automatically puts your name in front of your bamfin and bamfout messages. Even if I edit the player file directly, it still does this, without editing the player file itself tho. So, I end up with something like "Kris You blink, and suddenly the Almighty God Kris appears before you!....."
I tried editing the source code, but I ended up messing things up and had to replace them with the backup copies (I keep backups because I -know- I'm bound to damage something beyond repair amidst my tinkering).
Just to simplify things for me (and so I can get rid of that annoying little quirk), could someone tell me what I need to edit and how? It shows up that way when I type 'score' and when I actually use the goto command. Thanks :)
Australia Forum Administrator #1
In build.c, around line 950, I see this code:



    char_to_room( ch, location );

    if ( !xIS_SET(ch->act, PLR_WIZINVIS) )
	act( AT_IMMORT, "$n $T", ch, NULL,
	    (ch->pcdata && ch->pcdata->bamfin[0] != '\0')
	    ? ch->pcdata->bamfin : "appears in a swirling mist.", TO_ROOM );



The file doc\act.txt describes the meaning of the various codes, like $n, like this:


$T Result is the 'arg2' argument interpreted as a string.

$n Result is the name of 'ch'. If 'ch' is not visible to the target character, result is the string 'someone'.


It seems to me the simply way of achieving what you want is just to drop the $n, ie.



    char_to_room( ch, location );

    if ( !xIS_SET(ch->act, PLR_WIZINVIS) )
	act( AT_IMMORT, "$T", ch, NULL,
	    (ch->pcdata && ch->pcdata->bamfin[0] != '\0')
	    ? ch->pcdata->bamfin : "appears in a swirling mist.", TO_ROOM );



I haven't tried it, so let me know how you go. :)
USA #2
It didn't work. Said something about some variable in RENAME not declared. I would've copied it exactly, but I was too preoccupied with restoring the corrupted source code. For some reason I had to re-download the modified src from my website, delete the contents of src, and re-install the src to get rid of that error. SMAUG.EXE wouldn't compile when I attempted to remove $n from the portion of build.c you specified. I'm assuming it's cross-referenced somewhere, but I have no idea where to look. Could you take a look at this please? Tnx :)
Australia Forum Administrator #3
I don't understand that.

I can't see how removing part of a literal string would cause a compile error.

Can you quote the exact error message you got, and tell me when? (eg. during compile, shown to that player, on the server log).

When you say "it wouldn't compile when you removed $n" can you please send me the error message.

Saying things like "it wouldn't compile" or it said "something" isn't helpful when it comes to resolving the errors.
USA #4
I did absolutely nothing different this time, but it worked. Maybe something to do with a sharing violation I dunno. Or maybe one of the other files was somehow corrupted, and the problem was fixed when I retored the backup.... Other people mess around on this computer terminal when I'm not around, including my other admins. Someone probably started tinkering around with the files and their backups..... Thanks fer the help :)