PDA

View Full Version : lich and sbc?



Merzbow
09-06-2006, 11:38 PM
Anyone been successful getting sbc to run in lich? This is the one script I really want working since I change it so much; it would be real convenient for sharing between my characters. ;wiz sbc fails miserably.

Bobmuhthol
09-07-2006, 06:08 AM
So run it as a Wizard script.

Caede
09-07-2006, 09:52 AM
How is SBC failing? Since you've modified it, I might not be able to duplicate your failure, but we can try to fix it up to work.

I used to use SBC a lot (not with ;w), but realized that ;goto worked faster and more effectively for Illistim and Landing. Outside of those spots, I've switched to using the Universal Movement Scripts (which run from ;w <script> really well)

I really wish the automapper worked in SF -- I've added a few things to ;goto for myself (such as the bounty office in Illi and Landing) using the Wizard, but I'm too lazy to do it everywhere, and far too lazy to try and tackle getting the automap to work in SF.

Shaelun
09-07-2006, 10:56 AM
There are two scripts that Lich wouldn't run when I wrote in support for running Wizard and StormFront scripts -- SBC and QRS. There's a Wizard version of SBC though, isn't there? And since you can just run the script with your front-end (whatever one you use) instead of with Lich, I guess I'm not seeing the problem?

There really isn't much of an explanation anywhere about the way all that movement stuff works... so for anybody who wants to play with the pathfinding stuff I wrote for Lich (the way goto.lic can figure out how to get you from any room to any other room it knows about), here's the gist of it all. This probably won't make sense to anybody, but if I'm not gonna finish it myself, seems like the least I can do is give people enough information to know how to do it in my place.

The "map database" is just a serialized data dump (in Ruby's Marshal module format) of an array of objects belonging to the "Room" class. The map stuff takes up more RAM than the rest of the program combined, so it's loaded when it's first used as opposed to loaded when the program executes. Each room object has a unique ID number (which is completely arbitrary and only used for internal recognition by the program, not the game), and a bunch of other instance variables that are used mostly for knowing how to get from one room to the next. After the data is loaded (look at how "goto.lic" handles the user entering "reload" for details of how that gets done), you can search through the array with `Room[2147]' or `Room["town square central"]' (either the array index number of a room or a partial room title will return a matching room, or `nil' if no match is found). Just type this in-game and you'll get a really good look at a room object:


;goto reload
;e echo Room['town square central'].inspect
;e echo Room[0].inspect
;e echo Room['hanging gardens'].inspect


The actual pathfinding works by internally graphing a 2D representation of every known room object. You can add and/or change rooms as need be, as long as the data is available (it's extracted from the instance variables of the room object, so those are what count) it'll properly graph and be able to plot paths to/from/through new or changed rooms. The description and title and stuff is really only so that the script can identify the room the person is currently in without them having to do something like select it from the 3,500+ rooms currently recorded.

So in a nutshell, if you want the script to be able to get through a given room, you only need to add what rooms are connected to that room and how the script should get from that room to the connecting room. If you want to be able to do things like stand in that room and have the script know where you are so it can figure out how to get wherever you're going, you need to add the room description and title and junk as well.

... God damn did that sound better in my head than it came out. Well, with any luck, somebody got something out of that. For more details and stuff, d/l the source for Lich and examine in particular "lich-libmap.rb" and "pathfind.c" -- the goto.lic script uses those two files. You don't need to have any clue how to program in C, you can ignore the actual code and just look at the comments in the pathfind.c file (unless you want to do more than know how to change/understand/add to the goto.lic script).

Caede
09-07-2006, 11:14 AM
There are two scripts that Lich wouldn't run when I wrote in support for running Wizard and StormFront scripts -- SBC and QRS. There's a Wizard version of SBC though, isn't there? And since you can just run the script with your front-end (whatever one you use) instead of with Lich, I guess I'm not seeing the problem?

From the original post, I believe he likes to use the scripts out of his scripts directory (via ;w) instead of importing them into SF for each character. I do the same thing.


... God damn did that sound better in my head than it came out. Well, with any luck, somebody got something out of that. For more details and stuff, d/l the source for Lich and examine in particular "lich-libmap.rb" and "pathfind.c" -- the goto.lic script uses those two files. You don't need to have any clue how to program in C, you can ignore the actual code and just look at the comments in the pathfind.c file (unless you want to do more than know how to change/understand/add to the goto.lic script).

Yeah, that's on my todo list for a really slow day at work. I've added a couple of rooms and paths myself, but haven't done more than skim over the source yet.

Shaelun
09-07-2006, 11:19 AM
You have to import a script on every character that you want to be able to use that script while playing? Can it possibly be that inconvenient? ... well, at least SF is pretty, I guess.

Merzbow
09-07-2006, 02:02 PM
My modifications to SBC are restricted just to adding additional paths. So you're saying it should work? It's the SF version I'm trying, perhaps Lich doesn't support the SF scripting enhancements?

What program did you use to create that map database? (EDIT: Nevermind, I see there's the automap lich script that does this). I used ZMud for a while and had 12,000 rooms mapped out; I could fucking go from anywhere in the world to anywhere else automatically. But I couldn't stand ZMud's fucked-up scripting subsystem, which Zugg is going to fuck up even more in CMud (think of a single-threaded scripting environment where you can't wait on incoming text in a script, then weep). So I'm abandoning my investment in ZMud and reluctantly moving to SF. (PSINET SPELLUP is almost worth it though, would have taken me weeks to write that in ZMud even if possible). I wish someone would develop a mapping utility like what's in ZMud that can be edited graphically but that can be integrated into any front end.

Kyra
09-07-2006, 03:29 PM
Heh, I'd be happy to make lich work at all on my pc :( I think its beyond hope tho.

Merzbow
09-07-2006, 05:30 PM
lich is an awesome architecture, by using Ruby it essentially leapfrogs into the future. Complete Wizard/SF script compatibility is a necessary first step, though; I'd like to centralize all my scripts in the lich directory but can't give up stuff like sbc, the darkstone script, and so on. Shaelun, you should consider making lich a SourceForge project; it might bring it to wider attention.

Bobmuhthol
09-07-2006, 05:34 PM
As has been pointed out both by me and Shaelun, you can just run the script as a regular script in your front end. It's not a necessity to have it work in Lich at all.

Merzbow
09-07-2006, 05:49 PM
As has been pointed out both by me and Shaelun, you can just run the script as a regular script in your front end. It's not a necessity to have it work in Lich at all.

But as I've said I don't want to have to manage multiple copies of the script between my multiple characters. I'm changing sbc all the time so I keep having to copy/paste or export/import that shiznit. I want just one copy in a text file I can immediately tweak and is seen by all my characters.

Bobmuhthol
09-07-2006, 06:05 PM
Complain to Simutronics, and then stop using StormFront.

Merzbow
09-07-2006, 06:24 PM
Fuck, I'm tempted to actually go and just write my own MUD client. Something like ZMud but with its bullcrap scripting subsystem replaced with Lich. But I'd rather be playing than programming, I program 8 hours a day as it is. I'll probably be satisfied with SF though if I can just move completely over to Lich for my scripts. Heck, it's open source, maybe I can find the problem myself.

Daniel
09-07-2006, 06:51 PM
SOo, you'd rather write your own mud client than copying a script for a new character? Makes sense...I guess...

Shaelun
09-11-2006, 12:52 AM
Well, to answer everybody's questions:

It's on SourceForge. I wrote it for fun and to help me learn (which it's certainly done), and it's certainly been gratifying to hear that people enjoy it and find it useful, but I don't really have the same interest in it as I did a little over a year ago when I started the project. It's always been something I worked on whenever the urge struck me, and the urge doesn't strike me very often anymore. Because of that I never bothered doing more than submitting the initial project announcement, but it is indeed on there.

Lich is an add-on program very similar to PsiNet or BlackLightning. This means it isn't a front-end. It only adds functionality, it does not take any existing functionality away: I don't mean to sound rude, but I'm not going to kill myself making it do everything under the sun. It runs any script I've ever tried except SBC (which I couldn't make work even in my front-end), and QRS (which is easily enough run by the front-ends). I'm satisfied with that; sorry if you aren't.

Yeah, I used an automapping script I wrote for Lich to collect most of the information, then a silly little program I wrote just to parse it all and add it to a data file that Lich can use.

Shaelun
09-11-2006, 07:28 AM
Shit, I just realized I never submitted it to SourceForge. There's some project there called Lich, and I haven't a goddamn clue who's it is or wtf it is.

I meant it's on FreshMeat.net. Since I have less time than I used to and less desire to maintain the project both, I don't see any reason to put it on SourceForge.