Mantis Bug Tracker

View Issue Details Jump to Notes ] Wiki ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000156Mana[All Projects] Generalpublic2010-06-20 01:012013-01-29 06:02
Assigned ToAblu 
PlatformOSOS Version
Summary0000156: Add support for specials
DescriptionSupport for specials should be implemented in a way which covers the proposed TMW magic system but still allows enough flexibility for server administrators to implement their own magic system.

Specials must allow both active and passive effects.
TagsNo tags attached.
Attached Filespatch file icon 0001-Added-LUA-script-bindings-for-manipulating-the-speci.patch [^] (27,353 bytes) 2010-07-06 18:26 [Show Content]
patch file icon 0001-Moved-parsing-of-specials.xml-from-gui-specialswindo.patch [^] (20,152 bytes) 2010-07-09 13:41 [Show Content]

- Relationships
parent of 0000165resolvedAblu Mana Server Netcode for special palette 
parent of 0000166resolvedAblu Mana Server Script bindings for more comfortable special attack scripting 
parent of 0000167resolvedAblu Mana Server Implement cooldown for specials 
parent of 0000168assignedAblu Mana Server Implement SP cost for specials 
parent of 0000169resolvedAblu Mana Server Allow specials to have passive effects 
Not all the children of this issue are yet resolved or closed.

-  Notes
Bertram (manager)
2010-06-22 09:39
edited on: 2010-06-22 09:40

Hi Striker,

(I may be wrong but I hope Crush will correct me in that case.)
I've found no places where a skill can be used in the ManaServ code.
As for passive effect, could you provide use cases to get the point about how implementing it if it's relevant?

As for the specials, see here: ( [^] )
The three false magic examples given in this file are linked to the 'cast' function here: [^]

The function name is not very relevant but you should be able to execute the wanted script by upgrading that function there.

Is there anything else missing?

strikermdd (reporter)
2010-06-22 14:12

i think for skills its a good idea to make the possibility to a skill be useable or not via the mana-skills.xml, then the creators can make more use from them, because skills are not only for weapon uses like sword, axes, etc, But far more, for example, World of Warcraft have many skills and many of them are passive habilities like : [ See [^] and here [^]]

Examples :
Resist Fire/Cold
Moving Healing
Increase Strenght

In relation to specials its a good idea to add the possibility to attach a lua script in specials.xml for each 'special' and not to polute the libmana.lua with many calls for the specials use.
Philipp Sehmisch (developer)
2010-06-22 18:33

First a bit manaserv vocabulary:

Skill: Proficiency with a weapon type, magic discipline or craft.
Special: Active action the character can perform (what you mean)

In the planned Manaserv system you can not "use" a skill. You can however use specials which might only be available when a skill level has been reached.

Please be careful which terms you use to avoid confusion.

So far the whole special system is still very provisoric. There are three hardcoded "placeholder" specials with fixed recharge the character can perform. Informing the client about which specials can be used is not possible yet.

The TMW special system is planned to be highly procedural and allows the players to design their own special abilities (see [^] for details). Mapping this to an xml file will be impossible without sacrificing the flexibility other server administrators will request (there is, however, already a runes.xml and a parser for it - i propose to scrap it), so I would rather propose to go for a completely scripted solution.
Bertram (manager)
2010-06-28 10:10

So, to summarize and get what we should do about this:

In Manaserv, you can't "use" a skill. You can however use specials which might only be available when a skill level has been reached.

Then, a special should become available when you've reached a skill level, based on a script activating it, for instance.

A skill level value should be gettable from the special functions. A 'use' fonction and a 'passive' function should be called if existing, and thus definable in the specials.xml file.

The hard-coded rune system should be replaced by lua scripts based on the system explained here before being dropped in the code.

What do you think?
strikermdd (reporter)
2010-06-28 12:23

Well, its ok can't use a skill, but the skill can be the passive effect, because a passive skill don't combine with 'specials' that can be 'used'. And please, like i put in forum, don't use the rune system to be the only way to cast magic, it can be a way to make a char use more powerfull and diverse magics with runes, but to use magic please, not only using runes, implement using the mana in your bodys too, its a 'MANA World' or not ?, like the 'old' Mana Points.

I think a good way to stay is this :
Skills - Weapon proeficiences, Crafts, Magic Skills and Passive Skills
Specials - Skills that can be used and Active Magics
Runes - Potentialize the power of magic
Jaxad0127 (administrator)
2010-06-28 16:03

The rune system is what TMW wants. Other servers can do other things.

For passive, scripts to be called every X ticks, on login, respawn, etc, should be doable.
Philipp Sehmisch (developer)
2010-06-29 10:46
edited on: 2010-06-29 10:47

I will look into implementing specials in a way which is flexible enough to allow a plain old MP-oriented system and passive effects.

Also clarified issue summary and description.

Philipp Sehmisch (developer)
2010-06-29 11:47

My current plan for:

Client GUI:
The special window can take any number of specials. Specials can be added or removed at any time. Specials can but don't have to have a use button and a progress bar indicating recharge status.

The server sends the client which specials are available (int32), if they are usable and rechargeable (8 bit bitmask). Name(string) and icon(string) of the special are optional to allow both procedurally designed and predesigned specials.
The server sends the client the recharge status of specials which are usable and have a recharge (this part is already mostly implemented).

Manaserv C++ part:
Support for three different special use restrictions:
-Points-based (plain old MP system)
-Individual recharge (independent cooldown timer for the special)
-Shared recharge (TMW System)
Support for attribute modifiers when the special is available (passive specials)

Manaserv LUA part:
Scripted events give and remove specials from player characters. The use restriction parameters are set here.
Script is triggered when a special is used. (already implemented)
All effects of specials are script-based. (already implemented)
The script may signal to the C++ engine that use of the special was denied for some reason. In this case no charge/special points are detracted by the engine.
strikermdd (reporter)
2010-06-29 13:41

for me its almost ok, but why not extend this flexibility to skills to ? I think almost 90% its done for this, its only add the possibility to the skills have a script attached and if the skills its usable or not ...

Other thing its add lua functions to handle with Mana Points ( add, remove, etc )
Jaxad0127 (administrator)
2010-06-29 13:46

Skills aren't usable. Specials are.

Skills = passive
Specials = active (that is, usable)
Philipp Sehmisch (developer)
2010-06-29 13:48

Strikermdd, I think you are still confusing skills and special actions.

Maybe you could describe a bit more accurately what kind of system you want to design?
strikermdd (reporter)
2010-06-29 14:08

In really, for me, the skills and specials are the same, its have only some categories like active, passive, crafts, etc ... but, its ok for me its skills are only passive, but at least the skills need the possibility to have a script attach for them, if not, how i for example can create a passive skill that increase the strenght of my character ( a passive hability like every mmorpg have ... ), and this bonus its increase each time its skill level its increased ? Now this impossible, because skills are only one text and a icon in a window. And for example, some skills, even the passive, need to apply effect in the char, see auras examples in Diablo. To show when a skill its enabled in the char.
Jaxad0127 (administrator)
2010-06-29 14:15

Those can and should be done in a different way, like a central script function that manages such effects.
Philipp Sehmisch (developer)
2010-06-29 16:10

strikermdd, this can be done by giving the character a special with a name like "increased strength level 5" which has no active effect but a passive effect.
Philipp Sehmisch (developer)
2010-06-29 16:12

Uploaded a client patch for review which restores the progress bars in the specials dialog, only lists the specials the server informed the client about and allows to en- and disable use button and progress bar in specials.xml.

Additional client- and server patches will follow.
Bertram (manager)
2010-06-29 22:15

I'm really sorry, Crush but I wasn't able to merge your patch file, even with converting the line endings to unix (in the case the weren't) and using the patch command.

Could you use the commands:
git pull --rebase
git commit -a
git format-patch -1
and return the file created, starting with 0001-?

Thanks in advance.
Philipp Sehmisch (developer)
2010-07-06 18:27

added first server patch.

What it does:
-Implement LUA bindings for giving/taking/checking the specials a character can perform
-Implement a LUA script call for making the script engine calculate the specials use cost
-Save the specials of a character in the database

What it doesn't:
-Directly inform the client about the available specials. It does however do it indirectly by recharge status updates, but this is flawed because it doesn't inform the client when it loses a special.
-It doesn't calculate any other script attribute in LUA
-It doesn't implement any new restriction like cooldown or special cost. Cooldown should not be an issue but before I implement SP cost we first have to answer some questions regarding if and how we want to offer the option to have multiple different SP pools.
Bertram (manager)
2010-07-06 23:09

That's excellent for a start Crush!

As for now, only some client part are missing before this being fully ready.

I've also seen a small typo here:
+ * Removes a special from a character
+ * mana.chr_give_special (character, special, cost, cost_type)
+ */
+static int chr_take_special(lua_State *s)
The description says give and the function says take. I'd also rather use the words 'add' and 'remove' than give and especially 'take' but it's only personal.
strikermdd (reporter)
2010-07-07 02:51

humm, its good, we are moving now. Like i said here, we need the MP points because we don´t want to use only runes to use magics. Mana Points its a good way to tell te players that magics have a price to their use. The cooldown its important too, because we don´t want a player can cast many magics all time, even if he have plenty of mp.
Jaxad0127 (administrator)
2010-07-07 04:27

SP, not MP. Special Points, which can be used for all classes' specials, not just magic.
strikermdd (reporter)
2010-07-08 02:03

please don´t use the specials file to add the content of a special itself, even if we use a call to another lua script, the includes will be huge. Think more than 100 'specials' in this file and calling 100 other lua files using includes and direct function calls. Why not simple add a <script></script> atributte in the specials.xml that call the lua file for the special ?

And yes, the SP bar, cooldown and the script bindings for this its necessary to handle better with the specials.
Jaxad0127 (administrator)
2010-07-08 02:16

So, instead of referencing the lua script to run the special (allowing multiple specials can use the same script), require the script to be put in the specials file?
strikermdd (reporter)
2010-07-08 13:28

i don't know why you cannot simple repeat the same script call in another special ...

ex. :
 <special id="1" name="Test Magic 1" script="script1.lua"/>
 <special id="2" name="Test Magic 2" script="script2.lua"/>
 <special id="3" name="Test Magic 3" script="script3.lua"/>
 <special id="4" name="Test Magic 4" script="script1.lua"/>
 <special id="5" name="Test Magic 5" script="script2.lua"/>
Bertram (manager)
2010-07-08 13:34

You both agree about the script parameter as it seems:
Jaxad0127 asked to put the script parameter in the specials.xml file and you asked if you could put the same file multiple times (yes, you'll be able to).
As for myself, adding the script parameter is a good thing IMHO.
The provided scripts, if I understood correctly, should provide bothe a use and passive functions or equivalent.
strikermdd (reporter)
2010-07-08 13:44

yes, and i think that its need to add a new atribute to tell the server that script its a passive special, like that :

 <special id="1" name="Test Magic 1" script="script1.lua" type="passive"/>

then the server will aways load that special in every x game ticks.

The second its the normal way, that script will only be called on the 'Use' button its pressed.

 <special id="1" name="Test Magic 1" script="script1.lua" type="active"/>
Philipp Sehmisch (developer)
2010-07-08 15:05
edited on: 2010-07-08 15:34

The specials.xml is only client-sided. There is no server-sided specials.xml planned.

All server-sided special handling will be done in special_actions.lua including active and passive effect and determining cost, target mode and if it is active or passive. From this file you can include other lua files to organize your special system in individual files any way you like. When you still want to manage your specials server-sided in XML you can just program an XML parser in LUA.

Regarding the argument about special_actions.lua becoming huge: how will the lua code to map special IDs to script files and functions be any larger than doing the assignment in XML instead? This doesn't make any sense. When you organize your IDs well you can even do it with much less code than with XML. And this is needed for projects like TMW with procedural special systems where the magic system alone has 2^24 (16.777.216) different specials.

Jaxad0127 (administrator)
2010-07-08 15:36

Bertram: I thought you were wanting this:
<special blah><script>lua code for the special goes here</script></special>

Crush: Works for me.
strikermdd (reporter)
2010-07-08 16:01

well, unfortunately i'm not a programmer, i'm creating a game using the ManaSource Engine, and post here in the hope i can make the things to transform this engine in a game that everyone can play and like. Here i'm only a reporter, i'm making suggestions to make my game better, and in the process the ManaSource itself and TMW too ... If the developers think the way this engine its going will be fine. Well, i can't do anything about this. Its only suggestions to make the game better, not only in a developer vision, but a gamer vision too ... I know the things its not easy to do, but its better to do now, and not when all game its done and its need a great changes in its architecture.

Look for this :
If the only specials.xml its used :

<special id="1" name="Test Magic 1" script="script1.lua" type="passive"/>

The way its trying to do ... :
include "specials/fireball.lua"
include "specials/fireball2.lua"
include "specials/fireball3.lua"
include "specials/fireball4.lua"
-- imagine 2500 new specials includes here ...

if id == 1 then
-- CALL the function of the fireball special
if id == 2 then
mana.being_say(ch, "HAA-DOKEN!")
if id == 3 then
mana.being_say(ch, "Sonic BOOM")
if id == 2500 then
Philipp Sehmisch (developer)
2010-07-08 17:05

there are much better ways to do this in LUA than creating an individual sourcecode file for every single special (although they very likely have the exact mechanics except for some numbers which change) and having a huge if/then section.

We will make sure to include some examples with the manaserv release which can be easily extended by people who don't know much about programming.
strikermdd (reporter)
2010-07-08 17:26

well i will not extend this anymore, i say everything i think about this in the last comment, at least for me, some specials, even the more complex ones, will have more than 100 lines, it have to be calculations, check things, add effects, sound effects, etc. If the developers think that its not a good feature to have, well, i can't do anything about this.
Bertram (manager)
2010-07-09 10:41
edited on: 2010-07-09 10:44

I'd say the best way to handle script should be the easier way for maintainers, as you would find it obvious.

Striker is right when saying that a unique file with X includes is not fine:
"There are much better ways to do this in LUA than creating an individual sourcecode file for every single special"
--> Sorry, but filling one file with all special isn't better, no offences intended.
Plus, we're already using separate files for items scripts and it's working great, so let's stick to the same logic, please.
Make use of specials.xml to map the id, file, and special type (passive/active) as striker said is very sensitive way to make things clear for the maintainer.
A special lua script would then looks like:
include "specials/libspecials.lua"
-- Including the identified common parts used in specials.

function run() -- <-- whatever the name.
The given function could be ran every X ticks is passive or on use if active.

But anyway:
Crush, as you're the one in it, I trust you about giving the final word on it. Once the provided solution will be included in mainline by your effort, we'll have a clearer view in possible file-related improvements.

I'm then proposing to let Crush finish his patches, review them, and once included, if not perfect feature-wise, improvements could come later on it.
As Rotonen said: Small steps; Don't choke yourself while trying to swallow it all at once.

Philipp Sehmisch (developer)
2010-07-09 13:37

The above patch was pushed. Please also note the child tickets I opened.
strikermdd (reporter)
2010-07-18 19:02
edited on: 2010-07-18 19:03

well, i don´t know if its only with me, but now ( with the latests patchs in the git ) everything about special/skills are now broken ! I can´t teach a skill anymore ( at least i don´t see any in the skill window when i teach a skill to my char ), and specials are only useless texts with a line above.
And i post some suggestions about this system in the forum too.

strikermdd (reporter)
2010-08-01 16:28

i attach a screenshot to show my skill and specials windows, for the skills i can´t see any skill, and i think its not 'teaching' or at least not showing my actual skills, and for the specials, the window its bad formated and any of the specials can be used.
Bertram (manager)
2010-08-02 08:20

I'm on the skill problem.

I let Crush finish his POC about specials. Or do you need help Crush?
Philipp Sehmisch (developer)
2011-11-15 19:52

unassigning all issues assigning to me, because I won't get around doing them.
Ablu (developer)
2012-04-04 14:35

Reminder sent to: Bertram, bjorn

Are all points of this issue and the child ones covered by this patch? [^]

Well i guess it would be nice to send partly special updates instead of sending complete special set when a single special got changed/added/removed.
Ablu (developer)
2013-01-29 06:02

Closing since nobody brought up new points.

- Issue History
Date Modified Username Field Change
2010-06-20 01:01 strikermdd New Issue
2010-06-22 09:39 Bertram Note Added: 0000536
2010-06-22 09:40 Bertram Note Edited: 0000536 View Revisions
2010-06-22 14:12 strikermdd Note Added: 0000537
2010-06-22 18:33 Philipp Sehmisch Note Added: 0000543
2010-06-28 10:10 Bertram Note Added: 0000551
2010-06-28 12:23 strikermdd Note Added: 0000552
2010-06-28 16:03 Jaxad0127 Note Added: 0000553
2010-06-29 10:46 Philipp Sehmisch Note Added: 0000555
2010-06-29 10:47 Philipp Sehmisch Note Edited: 0000555 View Revisions
2010-06-29 10:49 Philipp Sehmisch Summary Add support to attach a lua script in a skill and specials => Add support for specials
2010-06-29 10:49 Philipp Sehmisch Description Updated View Revisions
2010-06-29 11:47 Philipp Sehmisch Status new => assigned
2010-06-29 11:47 Philipp Sehmisch Assigned To => Philipp Sehmisch
2010-06-29 11:47 Philipp Sehmisch Note Added: 0000556
2010-06-29 13:41 strikermdd Note Added: 0000557
2010-06-29 13:46 Jaxad0127 Note Added: 0000558
2010-06-29 13:48 Philipp Sehmisch Note Added: 0000559
2010-06-29 14:08 strikermdd Note Added: 0000560
2010-06-29 14:15 Jaxad0127 Note Added: 0000562
2010-06-29 16:08 Philipp Sehmisch File Added: issue156_client_patch_1.patch
2010-06-29 16:10 Philipp Sehmisch Note Added: 0000565
2010-06-29 16:12 Philipp Sehmisch Note Added: 0000566
2010-06-29 22:15 Bertram Note Added: 0000571
2010-07-06 18:26 Philipp Sehmisch File Added: 0001-Added-LUA-script-bindings-for-manipulating-the-speci.patch
2010-07-06 18:27 Philipp Sehmisch Note Added: 0000589
2010-07-06 23:09 Bertram Note Added: 0000593
2010-07-07 02:51 strikermdd Note Added: 0000601
2010-07-07 04:27 Jaxad0127 Note Added: 0000602
2010-07-08 02:03 strikermdd Note Added: 0000614
2010-07-08 02:16 Jaxad0127 Note Added: 0000615
2010-07-08 13:28 strikermdd Note Added: 0000618
2010-07-08 13:34 Bertram Note Added: 0000619
2010-07-08 13:44 strikermdd Note Added: 0000620
2010-07-08 15:05 Philipp Sehmisch Note Added: 0000622
2010-07-08 15:07 Philipp Sehmisch Note Edited: 0000622 View Revisions
2010-07-08 15:08 Philipp Sehmisch Note Edited: 0000622 View Revisions
2010-07-08 15:09 Philipp Sehmisch Note Edited: 0000622 View Revisions
2010-07-08 15:25 Philipp Sehmisch Note Edited: 0000622 View Revisions
2010-07-08 15:34 Philipp Sehmisch Note Edited: 0000622 View Revisions
2010-07-08 15:36 Jaxad0127 Note Added: 0000624
2010-07-08 16:01 strikermdd Note Added: 0000625
2010-07-08 17:05 Philipp Sehmisch Note Added: 0000626
2010-07-08 17:26 strikermdd Note Added: 0000627
2010-07-09 10:41 Bertram Note Added: 0000631
2010-07-09 10:44 Bertram Note Edited: 0000631 View Revisions
2010-07-09 13:27 Philipp Sehmisch Relationship added parent of 0000165
2010-07-09 13:30 Philipp Sehmisch Relationship added parent of 0000166
2010-07-09 13:32 Philipp Sehmisch Relationship added parent of 0000167
2010-07-09 13:36 Philipp Sehmisch Relationship added parent of 0000168
2010-07-09 13:37 Philipp Sehmisch Note Added: 0000635
2010-07-09 13:40 Philipp Sehmisch Relationship added parent of 0000169
2010-07-09 13:41 Philipp Sehmisch File Deleted: issue156_client_patch_1.patch
2010-07-09 13:41 Philipp Sehmisch File Added: 0001-Moved-parsing-of-specials.xml-from-gui-specialswindo.patch
2010-07-18 19:02 strikermdd Note Added: 0000656
2010-07-18 19:03 strikermdd Note Edited: 0000656 View Revisions
2010-08-01 16:28 strikermdd Note Added: 0000697
2010-08-02 08:20 Bertram Note Added: 0000699
2011-11-15 19:52 Philipp Sehmisch Note Added: 0001538
2011-11-15 19:52 Philipp Sehmisch Assigned To Philipp Sehmisch =>
2011-11-15 19:52 Philipp Sehmisch Status assigned => new
2012-04-01 09:22 Ablu Assigned To => Ablu
2012-04-01 09:22 Ablu Status new => assigned
2012-04-04 14:35 Ablu Note Added: 0001743
2013-01-29 06:02 Ablu Note Added: 0001781
2013-01-29 06:02 Ablu Status assigned => resolved
2013-01-29 06:02 Ablu Resolution open => fixed

Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker