Did an addition recently, to add in a new config in which I has to alter to get_eq_char bit, and I think it works, now I have a more serious issue: Meditate and Knee.
I had a problem to start with that Knee has messed up and incorporated the following Meditate code into itself (don't ask how). I deleted both from the skills.dat and went into the MUD to make them again. I rebuilt knee, and it works as well as I could hope, but the problem now falls under meditate. It now adds in mistform, the following code. I have no clue why it would do this, and would appreciate some help.
I beleive what your saying is that when you sset a skill into the game that it gets set to the wrong code. So that knee now has Code do_meditate as its code entry in skills.dat rather than having spell_smaug or do_knee if there is such a beast.
Now the only place i can think of what you might need to look is in tables.c and check what you return values are, somewhere along the way its returning the wrong code for the skill in question.
I have had this happen to me then i have been rushing and cut and paste but only changed the first do_blaa and not the return.
Another thing tht might be hellpfull is to add the enteries into skills.dat by hand rather than sseting them in, i find this its quicker, it wont fix sloppy tables.c enteries or my bad spelling but one cannot ask for everything.
Not exactly what I'm having issues with. The code bit works, but with like meditate and mistwalk, it gets the mistwalk effects mixed with the meditate, and in skills.dat, I don't see the problem. Everything looks to be the right everywhere, but I'll look into tables.c to see if there is an issue there
Sounds like somehow your affects got jumbled up. Have you changed any of the relevant code that might throw these out of order, so that when it tries to apply one affect to a character, it might actually be applying the wrong one? That's one thing I can think of.
Beyond that, what else have you changed? What you talked about recently changing should have had no impact on this what so ever. Maybe you changed something else though and only noticed the problem now? It could be right?
Besides adding a new config, I don't know. I think what is happening is that they are just being read wrong somehow, because some of the hitvic and missvic messages are getting crossed without me touching them. I think it might just be a bug that fixed itself, but I don't know really
IMHO a bug that fixes itself is not really fixed and you should really figure it out if you can. You may find out that more is corrupted / not working properly than you thought and this may not be the only "bug" you have now.
#SKILL
Name meditate~
Type Skill
Info 0
Flags 0
Target 3
Minpos 108
Rounds 32
Code spell_smaug
Dammsg ~
Hitvict You meditate peacefully, gathering mana from the space about you
Missvict You attempt to meditate peacefully, but fail to gather much more then a stiff neck
Affect '' 12 'l*2' -1
Minlevel 1
End
#SKILL
Name mistform~
Type Skill
Info 0
Flags 0
Target 3
Minpos 106
Mana 40
Rounds 6
Code spell_smaug
Dammsg ~
Wearoff Your form becomes once again solid.~
Hitvict You assume a lucent form...~
Hitroom $N's form grows lucent...~
Affect 'l*5' 26 'pass_door' 20
Minlevel 18
End
I don't see a problem, but they seem to be mixing names. I hope that can help someone tell me what the problem might be. I still don't know the codebase that well, and the only change I've made was adding a variable (E and e) to allow a skill to take player weight into account on skills.
Looked through tables.c, and the returns are good, its just not reading the file right from what I can figure. Meditate doesn't have its own code, as it is spell_smaug. Mistform doesn't have its own code, either, so I'm pretty much stumped on what is going on...
Looks to me that you're coming up with an invalid SN for one of the reasons checked here. You might check to ensure that you've not goofed something with these, or mucked with MAX_SKILL perhaps.
Looking in skills.dat, I cann't see an issue with that, nor with tables.c or mud.h. Is someone could give me a little more info on what might be happening, I'd appreciate it, as of this time I cann't tell what could be causing what.
case 'S':
if( !str_cmp( word, "Skill" ) )
{
int sn, lev, adp;
word = fread_word( fp );
lev = fread_number( fp );
adp = fread_number( fp );
sn = skill_lookup( word );
if( cl < 0 || cl >= MAX_CLASS )
{
sprintf( buf, "load_class_file: Skill %s -- class bad/not found (%d)", word, cl );
bug( buf, 0 );
}
else if( !IS_VALID_SN( sn ) )
{
sprintf( buf, "load_class_file: Skill %s unknown", word );
bug( buf, 0 );
}
else
{
skill_table[sn]->skill_level[cl] = lev;
skill_table[sn]->skill_adept[cl] = adp;
}
fMatch = TRUE;
break;
#SKILL
Name meditate~
Type Skill
Info 0
Flags 0
Target 3
Minpos 108
Rounds 32
Code spell_smaug
Dammsg ~
Hitvict You meditate peacefully, gathering mana from the space about you
Missvict You attempt to meditate peacefully, but fail to gather much more then a stiff neck
Affect '' 12 'l*2' -1
Minlevel 1
End
#SKILL
Name mistform~
Type Skill
Info 0
Flags 0
Target 3
Minpos 106
Mana 40
Rounds 6
Code spell_smaug
Dammsg ~
Wearoff Your form becomes once again solid.~
Hitvict You assume a lucent form...~
Hitroom $N's form grows lucent...~
Affect 'l*5' 26 'pass_door' 20
Minlevel 1
End
Well there's probably something wrong with your skills.dat, perhaps corrupted somehow. Notice the mention of you having an "Endy" instead of "end" in there somewhere. That's one thing you should take another look at. It could be that you're not reading things in wrong but writing them wrong to the file instead. Hard to say without more information.
Have you tried replacing with a stock skills.dat maybe and seeing if your problems go away? That'd be a good indication of whether or not it was just some kind of corruption.
I'm about to check the stock skills.dat, and as for the endy, the Y has some marks over it (don't remember the term for them), and used find, and didn't find and endy in anything, so that might just be something in Cygwin, but I'm not sure.
The "Endy" issue is actually fairly simple and usually ignorable. Usually just an indication that the "End" line in a file didn't get a \n behind it.
The other issue might be because you're missing tildes at the end of the Hitvict and Missvict lines in that mediate skill. without them, fread_string will keep reading until it hits another one, which in this case shows up after the word "mistform" in the next skill below it. This could be why you have values being jumbled up.
It looks to me like you saved once and for some reason the tildes didn't get written on that skill. I would guess if you had any further damage to the file that it would simply have been unreadable and the code would probably have stopped the bootup.