Ok, I may have posted this before, but Im using the dbsc2.5 codebase (dragonball smaug) I mentioned I wanted to add in new races, and take some of the current ones out. If the current classes are hardcoded, is there anyway I can go about changing that to remove/add classes?
After doing some googling I too was surprised to find that it seems some applications are actually written in code. I then looked up the definition of source and one of the more exotic uses is "place from which something comes." I think this is just a case of us not speaking clearly and using the well defined terminology we should.
But if I had to venture a guess, I'd wager it has something to do with that "codebase" thing you were talking about in the original post. After looking up what base means it appears to have some archaic definition related to source.
Although, I may be reading way too far into this anecdotal evidence. KaVir should clarify what he means.
What they're trying to say is that you have to be initiated into the Grand Order of Computing Wizardry. Once you are deemed worthy, and have passed the trials, you will be given the code that allows access to the Source.
Everything of any importance ever done on a computer is done via the Source. If you don't have access to it, you can only use what others have created for you. The Source is a very powerful artifact, and if misused, it can cause all kinds of havoc and destruction. Anything from a simple crash, to the destruction of the modern world!
So, I hope you understand, access to the Source is strictly controlled, and the code won't be given out until you are ready.
In your case, those files in the src directory with the extensions of .c and .h.
I believe I gave a somewhat detailed step by step of how to add class/races in your codebase in the other tread, and being that there was no follow up asking for more info or asking for an explanation of anything, I assumed you had followed the directions and solved your problem.
To add to those instructions: The hard coding in the listing and validating of the races (I am going to just use the term race to refer to the class/race combo from now on) seems to be limited to filtering what races are valid to pick at create, the name does seem to come from the files. You should be able to change the name and/or any of the data in the files and be ok, but there is a hitch on the name. If you change name, make sure the filename of the files matches the new name and, that new filename is in the list files. Also, whatever you end with, there should be no skips or repeats in the race numbers used in the files, as an example, if you have the full 40 races you could, there should be exactly 40 files loaded with the race numbers 0 to 39 with no gaps or the same number used more then once. As far as the hard coded filtering, you might have to change the coded numbers if you remove some of the invalid at start races (most likely lowering the top limit). But if you are only adding races to the top and changing the valid ones, you should not have to change the code, other then the instructions I gave in the other thread.
What they're trying to say is that you have to be initiated into the Grand Order of Computing Wizardry. Once you are deemed worthy, and have passed the trials, you will be given the code that allows access to the Source.
Everything of any importance ever done on a computer is done via the Source. If you don't have access to it, you can only use what others have created for you. The Source is a very powerful artifact, and if misused, it can cause all kinds of havoc and destruction. Anything from a simple crash, to the destruction of the modern world!
So, I hope you understand, access to the Source is strictly controlled, and the code won't be given out until you are ready.
Thanks you for your patience.
Wait…isn't that the place that Neo had to go? Now I'm confused. :cry:
09 May, 2010, vidar1987 wrote in the 13th comment:
Votes: 0
Ok, gave up on the smaug one, and am sticking with my old code, which I will not stop working on no matter what until it gets up. Right now, I only have the src and area files (I think the rest are on my other comp). This is a modified Rom2.4b6 code. It compiles pretty clean, only a couple of warnings in act_info. But when I boot, it wont come up. Says it cant find guild.dat. Checked in src dir, and of course it isnt there. Any way I can just make a file in there called guild.dat? Will that work? And if yes, how do I go about doing so?
I don't think ROM has guilds, so your code must have some add on system. I would doubt the file would be in src though. In SMAUG, the guild data is in the clans directory, I would look at your directory layout and see if you have a directory like that, or something like SMAUG's system dir added to the stock system to hold such data. In the code you might look in merc.h and see if you can find a #define for something like GUILD_DIR or GUILD_FILE. That would show the path it expects and you would know where to put the file. You also could look at the bootup in the boot_db function in db.c, somewhere in there it should either directly try to load guilds (and look for that guild.dat file) or call a function maybe called load_guilds() (it is probably more likely a call is made, though this might not be the name yours uses). If there is a call to (lets call it) load_guilds() look for that function (it might be in a file called guilds.c, but it could have been put anywhere), the code there should show what it expects, if you don't understand it, post that function and we should be able to tell where your data should go, and what it will have to contain.
On a related note, is it common to have soft-coded classes? How would this work? Can you have a mud with classes that don't exist in the "source code" (whatever that is)?
SMAUG is about the only base I know with OLC/E classes (and races for that matter). There might be others that I have not seen though, I would say that it is more common in MUDs to have hard coded, or at least constant data classes though. To give an example of what I mean there, in circle the code for classes is spread all over the code and would be an extreme of being hard coded, ROM on the other hand puts a lot of the data in a table defined in const.c and though it is still hard coded, it is bridging to being data driven. SMAUG takes that a bit farther and loads those data structures from a file, and allows OLC/E with the setclass command. Stock SMAUG (1.4a anyway) still has a few things having to do with a couple classes still in code, the paladin's know alignment and some stuff with vamps as examples, but new classes can be created and existing one's data edited on line. The SMAUG code I work with (and yes, I think it is the best diku mudcode, at least IMHO) has taken it even farther, there is no hard coded reference to any class at all in the code (no CLASS_THISORTHAT even defined). The code just works off of the data loaded from the files at bootup and/or edited with setclass. I do have a few more options with setclass then in stock, though I can also set a lot more details. And yes, it is quite easy to have a MUD with classes not living in the source.
10 May, 2010, quixadhal wrote in the 20th comment:
Votes: 0
It might be worth noting here that the idea of "hard-coded" classes/races/etc is one that's pretty much limited to Dikurivatives. Most of the LpMUD/MUSH families implement their entire game logic in soft-code (IE: code that can be modified and created at run-time, without needing any kind of recompilation or reboot).
The main difficulty for Diku is how integrated your class/race stuff is with respect to your combat/spell systems. For example, if you have a bit meaning "ANTI_CLERIC" that your objects use to zap clerics that attempt to wield or use an item, removing the cleric class becomes somewhat difficult, as you have to either remove all those references, or live with that bit being unused and make sure all your data doesn't refer to it either.