Is this relevant to the subject "Adding Commands to SWR"? If not can you please start a new subject? Tacking questions onto the end of a different thread - in this case started in June 2003 - is just confusing.
Amended on Tue 17 Jun 2003 05:01 AM (UTC) by Celestine
Message
Yet another question regarding commands. For withdraw/deposit/donate, it says that I need to have a bank. I stripped down most of the areas which I deemed unnecessary (they weren't needed to compile properly). I was wondering how to make a bank? makebank doesn't seem to work...Any help?
EDIT: Nevermind, I found out that bank is nothing more than a roomflag.
You would also need to remove the appropriate lines from db.c that assigns the skills a GSN. I don't think the Smaug authors ever intended to make it easy to remove skills/spells. It may be best to just disable the skills instead of removing them. Setting the skills code to 'skill_null' and removing any affects it may have, would do the trick.
In addition to the skills.dat file entries you would need to remove the spells/skills from every class. Needless to say, this is an insanely time consuming ordeal.
Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
Thanks, the setclan worked, but I'm still not understanding some of the components of setstarsystem. Can someone explain the x/y to me a little bit?
Also, I want to remove a majority of the spells/skills. Is there any way to do this? I realized (the hard way), that simply deleting the spells from skills.dat doesn't work.
First, it would be easier to create and set both clans and starsystems online, using the commands 'setclan' and 'setstarsystem' respectively. They're pretty easy to figure out, so I I won't go into detail.
Secondly, how did you go about setting the player in the clan? Simply setting the player as the leader won't cut it. You also have to make sure the player is set to the clan. Sounds redundant (which it is), but that's the way it works. do a 'mset (player) clan phoenix' and you should be good. If not, I'd point fingers at do_who. I personally snipped out the clan part of the code long ago :-\
Amended on Thu 12 Jun 2003 04:03 PM (UTC) by Celestine
Message
A little question not exactly related to the coding part. More like building. How do the new starsystems work? Is it easier to manually code the new "space" in, and if so, how would I go about doing this?
Edit: Once again, another question. On the who list, I want it to be something like:
[Name] [Title] [Clan if possible]
Right now, I'm having a hard time just understanding what's going on. Actually, I can't even put someone in a clan properly. I put someone into a clan I manually coded called "Phoenix," and they show up as the leader (which I set) for the clan when I type 'clan.' However, if I type 'who phoenix,' it says 0 players are online even though that character is in the clan file. I used setclan phoenix leader [player name] to put them in the clan. Am I doing something wrong here?
Unfortunately, there is no handy dandy trick-of-the-trade to format the output of strings created by the editor. It relys on the user to format it the way they want it.
As for the wanted flag, a quick fix would be to search the destroy_ship function for refrences to raw_kill and change any refrence that looks like this:
raw_kill(ch, rch);
to this:
raw_kill(rch, rch);
This causes the function raw_kill to think the player killed themselves, and hence won't give anyone a 'wanted' flag.
This of course assumes you have stock SWR and haven't downloaded one of a variety of other compilations of SWR that may or may not have changed the destroy_ship functionality.
Amended on Thu 12 Jun 2003 01:58 AM (UTC) by Celestine
Message
The line formatting from Greyson worked for the Name, Gender, Age, and Align. However, it did not work for the history, which is a text buffer thing (I copied it from the code for description). Any suggestions for the formatting there?
Edit: Also, I want to remove the wanted for murder flag when someone is killed in a battle with the spaceships. Only the spaceships. Normal killing still has murder flag, any tips here?
Now I'm pretty new at coding (March of this year) but I do know that the -x in between the % and the s forces it out 20 spaces. I think if you do a normal number inside, something like %20s it'll line up the word(s) to the left instead of the right hand side of the column. And negative numbers produce the opposite. But I've never used em as a positive so without testing I can't really be sure. Hope this helps somewhat...
Greyson
Legacy of the Sith
lots.wolfpaw.net 3000
http://www.swreality.org
The deleting/remaking of the files seemed to dispose of the crash. However, I'm still faced with the problem of the formatting. Basically, It'd work if I could find out how many lines there were in the history (which is created the same way a desc is. Any help?
Amended on Wed 04 Jun 2003 04:26 AM (UTC) by Celestine
Message
Thanks Boborak, your addition made the command work. I have another question for this command regarding formatting, however. If you notice, the print has something like:
|Name: %s [a certain number of spaces] |
However, the location of the last | varies depending on how long the name (or whatever variable) is. Is there a way to fix this? And while I'm on that topic, I have the history data which is basically like a description. It's entered in the same way too. Is there a way to make a box which expands according to the length of that data (like the number of lines and such)?
Another question. I finished adding the history by itself, and that worked. Now I added yet another char field called 'personality'. I uncommented/commented each addition in and out, and I found that the problem was located at clear_char function in db.c
I basically took the history char field (which works if I take out the personality field), and copied each line and put it in the correct spot. On save.c, I did make sure to put it under the case 'P': as well. If I include this, the compilation is clean, but upon booting up the server, I receive another dumping stack trace like the access violation error posted above.
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.