RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Underworld-style Rune (Runic) Magic system

Alari

Wanderer
Underworld-style Rune (Runic) Magic system

This is an Ultima Underworld style runic magic system.

It's been tested with a clean installation of RunUO 1.0 RC0 and will work without modification to any other scripts. (Ie: drag and drop in) though there are a few changes that can be made to core files to increase the difficulty in casting, or such like that. Full details are in the included readme.


To use, put the runes ([add an, [add bet, [add corp, etc) needed to cast the spell into a rune bag ([add runebag) then single-click on the bag and choose "Cast Spell"

Runes are not consumed when casting a spell from the bag, and reagents are not needed at all. There is a book ([add runemagicbook) intended to for beginners to the system, which includes details on the runes and a listing of first-circle spells but it's just a simple text book and not necessary in any way to cast spells.


There is a bag full of runes, the book, and a rune bag ([add fullrunebag) intended for GMs and such. Ideally the runes for players should be scattered hither and yon and finding them (especially the really useful ones) should be a challange and game in and of itself. Or just sell them on shopkeepers. =) I've included the necessary code in the readme.


Thanks, and enjoy!

Updated for the rune deletion snippet. This code is commented out, just remove the comment marks to enable runes being deleted on casting.
 

Attachments

  • Rune Magic.zip
    8.7 KB · Views: 333

enigma_admin

Wanderer
I had a look at the script and it looks nice.

Just one question:

How would one go about making it so that the runes ARE consumed when the spell is cast? (which would make the hole system far less powerfull and more balanced in my opinion without having to edit core files :cool: )
 

georox

Wanderer
hmmm
I smell a repost..... this was posted for beta 36/35 and I believe it still works... it was the exact same thing.. runes and a bag tht cast spells based on runes in it.......
 

Alari

Wanderer
Yes I'm the same author. ^.^; I reposted it because it wasn't available on the boards any more. (I searched)

I did a clean install of RC0 and made sure it worked before posting. I won't upload something without testing it under the current version. Fortunately there weren't any major changes to be made. The readme was updated. =)

As far as consuming runes goes, it's not how Underworld worked, but you could do something like that fairly easily. After the cast section, if the spell was successful...

Code:
			if ( spell != null )
			{
				spell.Cast();
// this should delete the runes after casting, if you want to do that.
// code snippet 'borrowed' from baseboard =D

				for ( int i = bag.Items.Count - 1; i >= 0; --i )
				{
					if ( i < bag.Items.Count )
						((Item)Items[i]).Delete();
				}
			}

or something like that, I may have mussed the syntax... =) Remove the comment marks from the code, of course. ;)

Edit1: I'll test it and update the zip (leaving the code commented out) if it works.

Edit2: Bleah, okay, big kaboom. Further testing is needed. ^.^;;

Edit3: Haha! This works, and doesn't blow up the server. Yay me.
 

Froman2686

Wanderer
This is great looking, and would work very well with a specific race I'm creating for my shard. I installed it into my server, and I loaded a runebag with all of the runes (minus the 'cold' ones). However, when I single click on the bag, the only option I receive is "CastSpell," which reports "that is not a valid spell." Any ideas?
 

Froman2686

Wanderer
I have added a full runebag, which comes with all of the runes and an -actual- rune bag. I dumped all of the runes into the bag, whereupon my only option, "CastSpell," lights up. If I'm reading the script correctly, shouldn't it list the spells I can cast, or something along those lines?
 

Alari

Wanderer
Froman2686 said:
I have added a full runebag, which comes with all of the runes and an -actual- rune bag. I dumped all of the runes into the bag, whereupon my only option, "CastSpell," lights up. If I'm reading the script correctly, shouldn't it list the spells I can cast, or something along those lines?

Sorry, it doesn't work like that. Put the runes that make up the spell you want to cast into the runebag, and *only* those runes, and then choose "cast spell" from the runebag's single click menu. For example, say you want to cast Create Food. The words, and thus the runes, for that spell are In, Mani, and Ylem. Put the In, Mani, and Ylem runes into the bag, (there should only be those three runes in the bag, and no other items, at this point) then choose "cast spell".

It's designed to work similarly to how Ultima Underworld's magic system worked. The intent behind it seemed to be so that you could cast the same spell over and over relatively quickly, but changing the spells takes a little time, making it a bit more tactical than action-based (if you get hurt and need to switch from Fireball to Heal, you have to back off a bit and move the runes around, etc) so I tried to keep it that way despite the obvious shortcomings. Of course with this script on a custom UO shard you could just have multiple runebags with a few common spells. :>
 

Froman2686

Wanderer
Aha! That worked. Thanks for clearing that up for me.

...

::begins researching way to make it work like I thought it would::
 

Alari

Wanderer
Froman2686 said:
Aha! That worked. Thanks for clearing that up for me.

...

::begins researching way to make it work like I thought it would::


Sorry it was confusing. ^.^; As for making it work the way you described, it would take a LOT of coding, basically going through every spell in the game and checking to see if the runes necessary to cast it were present, and when all's said and done you'd have a single-click menu with possibly up to 64 spells on it (or more, if you added in custom spells or the paladin/necromancer spells) Unweildy at best. Some kind of system using gumps would probably be better, but I suck at gumps to put it bluntly. :>
 

Froman2686

Wanderer
I'm thinking of an organized list, by circle, that expands; much like the start menu->programs->accessories->etc etc. Basically, I've hardly touched C# (unless you count the "magic eight ball" primer) so I'm looking for something ridiculous to sink my teeth into and learn the ropes. I'll let you know if I figure this one out.

Now that I think about it, a gump probably would be the best course...or maybe even just two options: All Available(opens gump), and Last Cast. Mhm.

::tinkers::
 

Sergeant Bob

Sorceror
I am in love with this script and amazed at how wonderfully simple and organized it is. It is absolutely perfect just as it is.
that being said however, i do have two questions;

1. Have you been able to get this to operate as a couldron instead of a bag?

-yes, I am aware that this is more of a container issue and that there has been a comment on this in a post or two, also in an inappropriate place, but I suspect that this has crossed your mind at least once while writing this script.

2. Can you think of a way to use outside items that arent defined within the script? (like a reg, ingot or gem for example)
 

Alari

Wanderer
Sergeant Bob said:
I am in love with this script and amazed at how wonderfully simple and organized it is. It is absolutely perfect just as it is.
that being said however, i do have two questions;

1. Have you been able to get this to operate as a couldron instead of a bag?

-yes, I am aware that this is more of a container issue and that there has been a comment on this in a post or two, also in an inappropriate place, but I suspect that this has crossed your mind at least once while writing this script.

2. Can you think of a way to use outside items that arent defined within the script? (like a reg, ingot or gem for example)


1: I'm not sure what you mean by that. Nobody else has mentioned having the runes in a cauldron. Do you want to just change the graphic used for the rune bag? Just change the ItemID in "public RuneBag() : base( 0xE76 )" The 0xE76 is the ItemID. You'll need to change the GumpID, DropSound, and RectangleBounds too, check the script for the container you want to use and copy those values.

If this question is being asked in another thread, I haven't seen it.


2: For identifying items, it's in the
Code:
foreach( Item I in bag.Items )
section. The lines like
Code:
if ( I is An )
foundAn = true;
identify the items in the bag. (The runes are named things like "An", "Bet", "Corp", etc, I realized a while after writing the script that I should have named them "AnRune", "BetRune", etc. It was one of my earlier scripts. =) So if you want to have it substitute, say, a diamond for a Corp rune, you could add something like
Code:
if ( I is Diamond )
foundCorp = true;
to the end of that "foreach" sequence. You can basically use any item you want. (If that's what you meant... If not, be more specific. =)
 
Top