Jump to content
Eternal Lands Official Forums
Entropy

New spells interface

Recommended Posts

After careful consideration, I have decided to change the way our spells work.

 

The current way is unintuitive and cumbersome, and anything but user friendly.

 

How the new system will work:

There will be a spell menu (instead of the sigil window) with a matrix of squares, something like 20x5

Each spell square will be either empty, or have an icon representing the spell. Sometimes, the icons will be greyed out, if some prerequisites are not met.

 

There will be an XML file on the lient that will store the requirements for the spells, like this:

Filename: ./spells_defs.cfg

 

File format:

The file will use XML (or EML?) and will have the following fields:

I. Header.

In the header we specify:

The VERSION of the file, in a number. This is so that we can autoupdate the spells without a client update. (more about it later)

Some text explaining what that file is and telling the morons that want to cheat not to mess with it because not only they will get banned, but they won't accomplish anything.

 

 

II. Body

The budy will contain the bulk of the info, as expected.

We will have the following tags:

<spell></spell>

 

Inside the <spell> tag, we will have the following tags:

<name></name> The name of the spell, will apear on mouse over (over the spell icon)

 

<desc></desc> The description of the spell. Will appear in a special place on the spells window, designed especially for that.

 

<target></target> This is the target of the spell. The target can be: None, Actor, Location, Inventory, Object

The target meaning is as follows:

None means there is no target for the spell. Examples include spells cast on self that can not be cast on others.

Actor means a spell that can be cast on an actor (player or animal), such as the harm spell.

Location means a map location, such as the teleport to range spell.

Inventory means the target is an inventory object.

Object means the target is a map object (3d object)

 

 

<color></color> The color, using 1 rgb pair (such as 255, 0, 150 for some purple like color) of the cursor for when we cast the spell.

This is mainly so we can have green and red cursors, to denote if a spell should be cast on friends or enemies.

 

<icon></icon> A number, from 0 to 255, which will be the ID of the icon of the spell in the spell texture file.

 

<distance></distance> The distance, in meters, relative to us we can cast the spell.

<resource></resource> There will be between 0 and 4 such tags, and the data will be like: item_image_id:, quantity:

The purpose of this tag is to see if the player has the required ingredients to cast the spell or not.

<mana></mana> The required quantity of mana (ethereal points) to cast the spell

<magic></magic> Required magic level to cast the spell

<spell_id></spell_id> The ID to be sent to the server when casting this spell. Will be 1 octet.

 

 

 

All the spells that fail the mana, magic skill or resource requirements should be grayed out.

All the spells the player can cast will be sent at log in time as an array of octets, their bits being 0 or 1 (duh) representing if the player knows that spell or not. If the bit is 0, the player doesn't know the spell, and the space in the spells window for that spell should be empty (possibly showing a no spell icon)

If the player learns a spell, that spell will be sent as an octet, which means that the index represented by that octet is a learned spell and cna be displayed.

 

How the spells will be sent to the server:

When the player clicks on a spell that can be cast, unless the spell has the "none" target, the client will change the cursor into a target, of the color mentioned in the color tag, and when placed over a valid target (such as a player if the target is actor, or a map location if the target is location) it should change it's shape to something else, to confirm that the target is valid. If the player left cliks, it means that the spell is aborted. If the player right clicks, then the spell and it's target info is sent to the server.

 

Other details such as the exact protocol name and format will be dicussed later.

 

Any questions? Suggestions?

 

Is there someone who would like starting to implement it?

Share this post


Link to post
Share on other sites

how will we learn spells? will it be similar to sigils now, purchase the info from certain mage shops (with more advanced spells costing more and coming from harder to reach places, perhaps)?

if so, will there be a chance for some mystery, like we currently have: "experiment with the sigils, you might find a new spell!"... maybe finding where/how to learn the spell will be more than just cash at a shop?

 

will we be having the same spells(with new ones added whenever, sure), or will the current ones be scrapped in favour of a new set?

 

a suggestion: is it worth defining the graphic effects of the spell in this file (like particles, or a colour change of the target or something)? granted, for stuff like colour change you need to work on other parts of code as well, but it can be re-used (like actors glowing red when you click-to-attack, similar to the green you-walk-here thingies)

edit: with both a 'success' and 'failed' option of graphics. 'failed' might mean some coloured particles spinning around you instead of your target

 

I'll volunteer to write the XML for now; I can probably also make the spell window, but I'd have to look into the reading-XML issues to know if I'd be able to do all of it in a reasonable time-frame

just the XML won't take long to do; if it's the same list of spells I'll base it on the encyclopedia/etc, if there are any changes or additional spells, I can do that, or whoever else on the team can make changes (for example, if there's new spells coming, and you don't want to give it away till they come out)

Edited by ttlanhil

Share this post


Link to post
Share on other sites

It should use XML and not EML. No need to add EML support to the client for this.

Share this post


Link to post
Share on other sites
If the player left cliks, it means that the spell is aborted. If the player right clicks, then the spell and it's target info is sent to the server.

 

I should say left-click is the 'do'-button and right-click is the 'abort'-button, since left is always 'do' :)

 

 

Other suggestion: if you have cast a spell in this new settings, will the last casted spell still be active, so you can easy click the target again? or will you click the right-spell-button time and time again if you want to do it repeatetly

 

 

Other thing to think about: the 2-second-interval, will it be changed? because, if magicians will get their long awaited for new spells and interface (Yea :P power to the mages :P ) the 2-second-interval still makes them 'vulnerable' -don't know if that's correct english- for counterattacks. If magicians can cast spells faster (maybe faster casting when you have done that spell more or faster casting when your magic lvl increases or something like that) than they can become a true opponent against the strong warriors and strong summoners.

 

 

Yippie, can't wait :D -I was planning to search through the forums today to collect all the different spell suggestions and other possible implements into magic, and combine them all in 1 post, for suggestions section, shall I still do that? since this post might make it obsolete-

 

 

Greetz the Clown

Edited by GarfieldClowntje

Share this post


Link to post
Share on other sites

No, there won't be a 2 seconds delay anymore. There will be a REAL delay like in other game,s of at least 5 seconds, and up to maybe 100 seconds or so.

Which reminds me that we need another field for the cooldown too...

Share this post


Link to post
Share on other sites
No, there won't be a 2 seconds delay anymore. There will be a REAL delay like in other game,s of at least 5 seconds, and up to maybe 100 seconds or so.

Which reminds me that we need another field for the cooldown too...

212179[/snapback]

Could you push spell effects under this too? Would be really cool to see some particles when harming someone or healing yourself :whistle:

Share this post


Link to post
Share on other sites

One step closer to making the game better for combat. :whistle:

I like it alot. Now you just need more combat spells.

 

I also like the right click to cast. I dont know how many times I've misclicked remote heal.

Edited by Atreyu

Share this post


Link to post
Share on other sites
<color></color> The color, using 1 rgb pair (such as 255, 0, 150 for some purple like color) of the cursor for when we cast the spell.

This is mainly so we can have green and red cursors, to denote if a spell should be cast on friends or enemies.

211966[/snapback]

AFAIK, the SDL cursor (which we are currently using) can only have the colors black and white.

http://manuals.thexdershome.com/SDL-1.2.5/...eatecursor.html

Share this post


Link to post
Share on other sites

It is easy to implement the add_highlight function to casting spells. I have a patch (not submitted yet) that places blue triangles under a cast magic target and red ones under an attack target, similar to the green triangles during a force-walk. Works pretty well on test server. Only problem is that the triangles sometimes (usually) do not draw exactly under the target.

Share this post


Link to post
Share on other sites
how will we learn spells? will it be similar to sigils now, purchase the info from certain mage shops (with more advanced spells costing more and coming from harder to reach places, perhaps)?

if so, will there be a chance for some mystery, like we currently have: "experiment with the sigils, you might find a new spell!"... maybe finding where/how to learn the spell will be more than just cash at a shop?

 

will we be having the same spells(with new ones added whenever, sure), or will the current ones be scrapped in favour of a new set?

 

a suggestion: is it worth defining the graphic effects of the spell in this file (like particles, or a colour change of the target or something)? granted, for stuff like colour change you need to work on other parts of code as well, but it can be re-used (like actors glowing red when you click-to-attack, similar to the green you-walk-here thingies)

edit: with both a 'success' and 'failed' option of graphics. 'failed' might mean some coloured particles spinning around you instead of your target

 

I'll volunteer to write the XML for now; I can probably also make the spell window, but I'd have to look into the reading-XML issues to know if I'd be able to do all of it in a reasonable time-frame

just the XML won't take long to do; if it's the same list of spells I'll base it on the encyclopedia/etc, if there are any changes or additional spells, I can do that, or whoever else on the team can make changes (for example, if there's new spells coming, and you don't want to give it away till they come out)

211969[/snapback]

 

 

bump. I'll write the XML file once I have the spell list

Share this post


Link to post
Share on other sites

Here is a screen shot of the attack functionality:

elmod_highlight1.jpg

It looks the same for the targeted spell, just blue. Want me to send the relevant patch? If so, I'll need to look up how to make a patch diff again...

Share this post


Link to post
Share on other sites

<name> and <desc> should not go into that file. They are already in a file under languages/. The icon ID might be used as an identifier to find the correct strings for translation.

Share this post


Link to post
Share on other sites
<name> and <desc> should not go into that file. They are already in a file under languages/. The icon ID might be used as an identifier to find the correct strings for translation.

213166[/snapback]

No, the name and description SHOULD go into that file, otherwise it would make the update (for that file) unresonably difficult.

Share this post


Link to post
Share on other sites

Could just put it in languages/ - if it's not found in the $LANG it will just use the english...

Share this post


Link to post
Share on other sites

You should keep it separate as only a small part of the information is language dependant. Updating two (or multiple) files is no more complex than updating one file.

Share this post


Link to post
Share on other sites

I believe he wants it in one file so that you can actually look at the spell and know what it is instantly, instead of looking up numbers or whatever else to be able to read the file...iow, make it more clear and organized(so you don't waste a lot of time and frustration)

Share this post


Link to post
Share on other sites

Actually we can do both... Just have the ID in the spell file and we can easily put up an array with replacable strings and still have it written in the spell file (but as a note to what it is rather than the exact name as it will be seen ingame)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×