Description
ToME:Runecraft is a modification to standard ToME 2.3.x with changes to the Runecraft skill and rune magic.
Module Version
0.0.3a
Changes since 0.0.3:
Added missing save/ directory to the zip file.
Changes since 0.0.2:
Really fix [Self] runespells this time. This includes special handling of Gravity/Self spells.
T-Engine version
2.3.x
Author
Last update
2005-10-02
Download
You can download this modules as a zip file (size 381KB).
Description
Runecraft skill
Unlike in standard ToME, the Runecraft skill actually has an effect: it reduces the fail rate of a runespell, and it additionally reduces the impact on fail rate of using "difficult" runes like Armageddon and Power Surge.
Future directions: Should the skill do more? Possibly increase runespell damage?
Runespells
In standard ToME, the 'defining' property of a runespell is its mana, from which most other properties like damage and ball radius are computed. ToME:Runecraft replaces this with the concept of a runespell level, from which mana cost and everything else is computed. So for instance, a ToME runespell using 13 mana does 4d14 damage and has a radius of 2; in ToME:Runecraft, this is equivalent to a level-3 runespell… which costs 13 mana, does 4d14 damage and has a radius of 2. When selecting a runespell, you will be given a range of runespell levels to select from based on your current mana level, with full damage/mana/etc. descriptions for each.
Runes
ToME:Runecraft introduces two new secondary runes:
- Rune [Cloud], with effects similar to the Vapor spell (or Noxious Cloud if combined with Arrow)
- Rune [Curtain], with effects similar to the Firewall spell
and three primary runes:
- Rune [Charm]
- Rune [Prison] (create walls)
- Rune [Tunnel] (destroy walls)
Future directions: More secondary runes is an obvious possibility, such as Chain (as described by Fubar Obfusco in the ToME Forum). Another possibility is additional primary runes exploiting some of the more exotic damage types.
Runestones
In addition to their 25-percent mana reduction effect from standard ToME, Runestones also reduce the casting time of runespells incribed on them by a percentage equal to your Runecraft skill. This is cumulative with the 20-percent reduction from wielding a Mage Staff, so that, for instance, if your Runecraft skill level is 50 and you're wielding a Mage Staff, a runespell cast from a Runestone will take only 40 percent of normal time.
Runestones with a spell inscribed on them can be examined via the "Examine Runestone" command, which lists the inscribed spell with full damage/mana/etc. details.
Future directions: Ideally, I'd like to have the inscribed spell included in the Runestone's full name in, for instance, an inventory listing. This would require giving Runestones their own tval, which causes stacking problems; if I can get that sorted out, though, it would open up the possibility of having different kinds of Runestones with different effects—maybe an Igneous Runestone, for instance, that does double damage for runespells using the Fire rune?
Interface
The "Use Runecraft magic" entry under the 'm' menu pops up its own menu of Runecraft commands. Most should be familiar from standard ToME Runecraft, except for "List memorized runespells", which is described below, and "Examine Runestone", which is described above.
One change I'm particularly proud of is the handling of memorized runespells. Unlike the clumsy standard ToME interface, with ten subgroups of ten runespells each with minimal control over grouping and ordering, ToME:Runecraft assigns to each memorized runespell an identifying two-character 'code' specified by the user. Any letter or digit can be used in this code (and possibly even punctuation; I haven't experimented extensively with this); notable disallowed characters are '?' (which pops up a list of memorized runespells that match what you've typed so far), space and '-' (which are used to scroll through said list), and backspace (which can be use to erase a partly entered code). The List memorized runespells command lists memorized runespells sorted by their ID code. There is no a priori limit on the number of memorized runespells, beyond the number of distinct ID codes and available memory.
Caveats
The storage of memorized runespells in the savefile is an Amazingly Dodgy Hack™, and I'm not entirely sure I've got all the wrinkles worked out.
Known bugs
ZizzoTheInfinite: Please report bugs here.
IanJac: It may be my ineptitude, but simple [Self] runespells, like [Gravity][Self] and [Life][Self] don't seem to work. At least not like they do in ToME 2.3.2
ZizzoTheInfinite: Yeah, I was afraid that might happen. There's a special internal variable unsafe that's used by the C runecraft routines to tell the spell-damage-handling routines that it's okay for a spell cast by the player to affect the player; unfortunately, that variable isn't accessible from Lua. I'll probably have to either replicate the damage logic in Lua or find some way to sneak past that "don't-hurt-yourself" check.
ZizzoTheInfinite: [sound F/X: power tools and heavy machinery] Okay, I think I've found a workaround. Try this new version and let me know if it fixes the bug.
IanJac: Uhh, nope. The [Self] rune is still not working. I tried with both my save file from the previous version (0.0.1) and a new character in this version (0.0.2).
ZizzoTheInfinite: @#$%. Okay, I've temporarily put up a modified runecrft.lua file; copy this over your existing scpt/runecrft.lua and try casting some [Self] runespells (and try the extra test option on the Runecraft menu).
IanJac: Still some problems. Using a [Self] rune gets a "checkpoint 3 -- 'self' project()" message. I assume this puts you in the right point in the script. But the game crashes immediately, before mana is deducted and the spell effect takes place. The new test option just returns a message saying how many hp an effect would damage the player, but I am not sure how the script is choosing the effect to be applied. You obviously have this working... could my setup be the problem? I have 2.3.2 with only the Runecraft module installed.
ZizzoTheInfinite: It crashed?!
I gather the test option didn't crash, just didn't do what it said it was doing.
This is weird. I just put up another modified runecrft.lua at the above link; let's see what that does. And I don't know about setup; I've tested this one on a pristine 2.3.2 build, so I don't know what else could be affecting it…
IanJac. I downloaded the new script. I cast a memorised level 1 [Gravity][Self] runespell, obtain the following output, "[r=0 tyx=36, 90 pyx=36, 90 dam=8 gf=35 eff=1 flg=76]" and game immediately crashes, that is, the teleport effect does not take place. When I use the test option, there is no output or effect (either 5hp damage or self knowledge) and the game immediately crashes. Sorry.
TheFalcon: Don't ask me why, but I suspect it's something to do with the fact that your using a gravity rune. I had some trouble with trying to do gravity damage to the player from the wilderness. I think I solved it by putting -2 in the "who" part of the project() function, which the source says is used for traps with the PROJECT_JUMP flag. This could be wrong though...
ZizzoTheInfinite: Yeah, but that test option is doing the equivalent of [Element][Self] and [Knowledge][Self], and apparently they're crashing too. I hadn't thought of trying project(-2), though. I've made the appropriate changes to the modified runecrft.lua; hopefully that will fix things. What's got me worried, though, is the possibility that the Lua-to-C interface is accidentally converting that negative number to a very large positive number, which would neatly explain the crashing; I don't think there's any way to test for that from the Lua side.
IanJac: Looks like you nailed it. I'm getting my [Self] rune effects nicely, and both effects in the test option are working as well. Excellent. I just wasn't expecting a lv1 [Gravity][Self] runespell to damage and slow me and destroy some potions in the bargain. Having not played runecrafters before, I don't know whether this is intentional behaviour. Still, nicely done.
ZizzoTheInfinite: [sound F/X: source diving] Ah, that's another special case keyed off the unsafe flag I mentioned above; if unsafe is true (which only happens during [Self] runespells), then GF_GRAVITY damage applied to the player bypasses the normal gravity effects and damage and just teleports the player. To mimic this, I'm now using a self-defined damage type GF_SAFEGRAVITY that does normal gravity damage to monsters and teleports the player.
IanJac: Nice work! Thanks.
IanJac: More unexpected behaviour: if you have reflection then [Self] runespells bounce, having no effect.
ZizzoTheInfinite: [checks] Yes, original Runecraft behaves the same way. There doesn't appear to be an easy way around it.
IanJac: Really? The description of reflection says that it deflects bolts and arrows. Gravity hounds and the like have no trouble with reflection. Now that I know about it, I can live with it, especially given the fun I have been having with the new [Prison] rune, however, I still think it is counterintuitive.
Someone: Sorry don't know how this wiki works but this module seems to destroy my savefile everytime I die. All the saved options etc. are gone and it is really frustrating. Am I doing something wrong or is it just the module? I hope I didn't ruin everything by editing this page...
NeilStevens: Your edit was fine. As for your problem, I'll have to defer to the author of the module.
ZizzoTheInfinite: You mean when restarting a character with quick-start? I can't reproduce it. Is your memorized runespell list recreated the same in the new character?
Someone: Found the problem. For some reason I can't save with this module. Have to check whether I installed this module right. My first module after all...
Someone: How come it always fail to save the game? I would really like to try this module.
ZizzoTheInfinite: No idea. Does it print a message of any kind when it fails? Can you save with other modules? What system are you running on, and how do you have the module installed?
JackLohman: I also had trouble saving games, I would get a 'Save Failed' message. Then I found the problem. In the module.lua file it tells the system to use a save directory in the Runecraft directory, but said directory is not created by the zipfile. The workaround is to manually create the lib\mods\Runecraft\save folder. Note that I'm on a MS Windows™ machine, but it should hold true on other platforms.
ZizzoTheInfinite: Ah, interesting. On my machine, save files go to .tome/2.3/save/Runecraft/, as with all my other modules. I see, though, that all my other modules do include a save/ directory in the zip file, so I've added one to this one too. We Apologize for the Omission™…
IanJac: Perhaps another bug: does your automatiser work in this module? Mine, which is working fine in 2.3.1, doesn't seem to.
ZizzoTheInfinite: I think by default the game only uses automatizer rules with the standard ToME module unless you explicitly tell it otherwise. Check your automat.atm file; if none of the <rule> start tags have a module attribute, or if they all have module="ToME", that's your problem. Assuming you want all your automatizer rules to be used in all modules, what you need to do is change every line of the form <rule name=...> or <rule module="ToME" name=...> to <rule module="all" name=...>.
Chatter
TheFury: Looks Great!, if you have no problems, I am going to add this to FuryMod
ZizzoTheInfinite: You're welcome to it. Just bear in mind that it is a work in progress—and keep an eye on the savefile juggling; I'm still a bit nervous about it…
TheFury: I currently using my testing version of Furymod, and there haven't been any problems. It works similar to your acanorum with the savefiles, right?
ZizzoTheInfinite: Not really, no; the standard add_loadsave() mechanism turned out to be unsuitable for the memorized runespell table, so I had to write my own custom load/save hooks.
IanJac: Currently, the level of the spell, which is proportional to the amount of mana put into the spell, solely governs the magnitude of a runespell effect. I think the runecraft skill should limit the amount of runespell effect levels that a caster can access. For example, with a skill of 20 in runecraft, a caster has access to spell effect level 15 (or whatever).
I think it is unreasonable that a mage can put a point in runecraft and get an 800-mana effect. I have no problem with them having access to the full range of level 1 effects, many of which, like [Chaos][Ray], are really very useful for a 1 mana spell. By limiting the spell effect obtainable, runecrafters are rewarded with big effects for their investment in skill points. An analogous situation exists with spell power.
I am not sure what relationship between runecraft skill and effect level would be appropriate. My current runecrafter is level 33, with a 37 in runecraft and at most, can access a level 24 effect, so a one to one relationship seems inappropriate. Then again, once I get my act together and start collecting mana enhancing items, I expect that I would want to access spell effects in excess of level 50 at runecraft skill 50. What do you think?
ZizzoTheInfinite: (shrug) I had originally anticipated that runespell difficulty would more or less take care of that; that 800-mana runespell you mention, for instance, is likely to have a prohibitively high fail rate at Runecraft skill level 1. I confess I hadn't given it a great deal of thought, though; I'm certainly open to suggestions. Oh, and bear in mind that I'm using the same mana formula as in original Runecraft, which works out to (L+1)2-3, so you're gonna need a lot of mana-multiplying equipment if you want to be slinging level-50 runespells…
IanJac: [Does sums] I had neglected to take spell fail rates into account when I wrote the above. Now that I know the formula, I agree that it is reasonable to leave it as it is. The comment was born of not seeing any dramatic effect of putting points into runecraft, but as I was putting in one point per level, I failed to see the gradual change.
ToME Wiki