<feed xmlns='http://www.w3.org/2005/Atom'>
<title>manaserv.git/scripts/lua, branch abilities</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ablu/public_git/manaserv.git/'/>
<entry>
<title>Call the on_remove handler with the being as parameter</title>
<updated>2013-05-11T21:31:16+00:00</updated>
<author>
<name>Erik Schilling</name>
<email>ablu.erikschilling@googlemail.com</email>
</author>
<published>2013-05-08T12:27:06+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ablu/public_git/manaserv.git/commit/?id=d64e1c6d41362c5305a1b5f06fc34d9794f82a88'/>
<id>d64e1c6d41362c5305a1b5f06fc34d9794f82a88</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[Abilities] Added support for a global cooldown</title>
<updated>2013-05-08T12:02:51+00:00</updated>
<author>
<name>Erik Schilling</name>
<email>ablu.erikschilling@googlemail.com</email>
</author>
<published>2013-04-23T21:36:09+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ablu/public_git/manaserv.git/commit/?id=1758acc8e845524071db8996f3dd5d1935a059e1'/>
<id>1758acc8e845524071db8996f3dd5d1935a059e1</id>
<content type='text'>
Each ability can now define a cooldown that prevents the player from
using other abilities for a while. The time of this cooldown can be set
to any attribute. The modified value of the attribute is the value of
the cooldown in game ticks. The cooldown will be automatically started
if the ability has `autoconsume` set to true. Otherwise a script has to
call entity:cooldown_ability(ability).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Each ability can now define a cooldown that prevents the player from
using other abilities for a while. The time of this cooldown can be set
to any attribute. The modified value of the attribute is the value of
the cooldown in game ticks. The cooldown will be automatically started
if the ability has `autoconsume` set to true. Otherwise a script has to
call entity:cooldown_ability(ability).
</pre>
</div>
</content>
</entry>
<entry>
<title>Made member function tables available as a globals</title>
<updated>2013-05-03T10:56:29+00:00</updated>
<author>
<name>Thorbjørn Lindeijer</name>
<email>thorbjorn@lindeijer.nl</email>
</author>
<published>2013-05-03T10:56:16+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ablu/public_git/manaserv.git/commit/?id=eb9fdd6852fced4ca9125b93585b95eb319dce18'/>
<id>eb9fdd6852fced4ca9125b93585b95eb319dce18</id>
<content type='text'>
This way the scripts can add or replace existing member functions, which
can be useful. As demonstration chr_money and chr_money_change are now
added as Entity.money and Entity.change_money.

Also fixed the banker to use ask_number instead of ask_integer (I had
decided to rename this and apparently forgot the banker).

Mantis-issue: 503
Reviewed-by: Ablu
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This way the scripts can add or replace existing member functions, which
can be useful. As demonstration chr_money and chr_money_change are now
added as Entity.money and Entity.change_money.

Also fixed the banker to use ask_number instead of ask_integer (I had
decided to rename this and apparently forgot the banker).

Mantis-issue: 503
Reviewed-by: Ablu
</pre>
</div>
</content>
</entry>
<entry>
<title>Removed old monster attributes</title>
<updated>2013-04-22T18:45:33+00:00</updated>
<author>
<name>Erik Schilling</name>
<email>ablu.erikschilling@googlemail.com</email>
</author>
<published>2013-04-22T18:44:15+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ablu/public_git/manaserv.git/commit/?id=25496f7f506852d669e3c655fa922390a8e4751c'/>
<id>25496f7f506852d669e3c655fa922390a8e4751c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Moved functions to entity members where appropriate</title>
<updated>2013-04-15T19:24:55+00:00</updated>
<author>
<name>Thorbjørn Lindeijer</name>
<email>thorbjorn@lindeijer.nl</email>
</author>
<published>2013-04-15T19:24:55+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ablu/public_git/manaserv.git/commit/?id=ef4175cdfae6a6981738e15cb0009d8e47ed7c80'/>
<id>ef4175cdfae6a6981738e15cb0009d8e47ed7c80</id>
<content type='text'>
Some functions were skipped for now because they may need a new name
or change of behavior. Changes:

    chr_warp                        entity:warp
    chr_get_inventory               entity:inventory
    chr_inv_change                  entity:inv_change
    chr_inv_count                   entity:inv_count
    chr_get_equipment               entity:equipment
    chr_equip_slot                  entity:equip_slot
    chr_equip_item                  entity:equip_item
    chr_unequip_slot                entity:unequip_slot
    chr_unequip_item                entity:unequip_item
    chr_get_level                   entity:level
    chr_get_exp                     entity:xp
    chr_give_exp                    entity:give_xp
    chr_get_rights                  entity:rights
    chr_set_hair_style              entity:set_hair_style
    chr_get_hair_style              entity:hair_style
    chr_set_hair_color              entity:set_hair_color
    chr_get_hair_color              entity:hair_color
    chr_get_kill_count              entity:kill_count
    chr_give_special                entity:give_special
    chr_has_special                 entity:has_special
    chr_take_special                entity:take_special
    chr_set_special_recharge_speed  entity:set_special_recharge_speed
    chr_get_special_recharge_speed  entity:special_recharge_speed
    chr_set_special_mana            entity:set_special_mana
    chr_get_special_mana            entity:special_mana
    chr_kick                        entity:kick
    exp_for_level                   xp_for_level
    monster_get_id                  entity:monster_id
    monster_change_anger            entity:change_anger
    monster_drop_anger              entity:drop_anger
    monster_get_angerlist           entity:angerlist
    being_apply_status              entity:apply_status
    being_remove_status             entity:remove_status
    being_has_status                entity:has_status
    being_set_status_time           entity:set_status_time
    being_get_status_time           entity:status_time
    being_get_gender                entity:gender
    being_set_gender                entity:set_gender
    being_type                      entity:type
    being_walk                      entity:walk
    being_say                       entity:say
    being_damage                    entity:damage
    being_heal                      entity:heal
    being_get_name                  entity:name
    being_get_action                entity:action
    being_set_action                entity:set_action
    being_get_direction             entity:direction
    being_set_direction             entity:set_direction
    being_apply_attribute_modifier  entity:apply_attribute_modifier
    being_remove_attribute_modifier entity:remove_attribute_modifier
    being_set_base_attribute        entity:set_base_attribute
    being_get_modified_attribute    entity:modified_attribute
    being_get_base_attribute        entity:base_attribute
    being_set_walkmask              entity:set_walkmask
    being_get_walkmask              entity:walkmask
    being_get_mapid                 entity:mapid
    chat_message                    entity:message
    being_register                  entity:register
    chr_shake_screen                entity:shake_screen
    chr_create_text_particle        entity:show_text_particle
    -                               entity:position
    posX                            entity:x
    posY                            entity:y
    monster_get_name                monsterclass:name
    item_get_name                   itemclass:name
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some functions were skipped for now because they may need a new name
or change of behavior. Changes:

    chr_warp                        entity:warp
    chr_get_inventory               entity:inventory
    chr_inv_change                  entity:inv_change
    chr_inv_count                   entity:inv_count
    chr_get_equipment               entity:equipment
    chr_equip_slot                  entity:equip_slot
    chr_equip_item                  entity:equip_item
    chr_unequip_slot                entity:unequip_slot
    chr_unequip_item                entity:unequip_item
    chr_get_level                   entity:level
    chr_get_exp                     entity:xp
    chr_give_exp                    entity:give_xp
    chr_get_rights                  entity:rights
    chr_set_hair_style              entity:set_hair_style
    chr_get_hair_style              entity:hair_style
    chr_set_hair_color              entity:set_hair_color
    chr_get_hair_color              entity:hair_color
    chr_get_kill_count              entity:kill_count
    chr_give_special                entity:give_special
    chr_has_special                 entity:has_special
    chr_take_special                entity:take_special
    chr_set_special_recharge_speed  entity:set_special_recharge_speed
    chr_get_special_recharge_speed  entity:special_recharge_speed
    chr_set_special_mana            entity:set_special_mana
    chr_get_special_mana            entity:special_mana
    chr_kick                        entity:kick
    exp_for_level                   xp_for_level
    monster_get_id                  entity:monster_id
    monster_change_anger            entity:change_anger
    monster_drop_anger              entity:drop_anger
    monster_get_angerlist           entity:angerlist
    being_apply_status              entity:apply_status
    being_remove_status             entity:remove_status
    being_has_status                entity:has_status
    being_set_status_time           entity:set_status_time
    being_get_status_time           entity:status_time
    being_get_gender                entity:gender
    being_set_gender                entity:set_gender
    being_type                      entity:type
    being_walk                      entity:walk
    being_say                       entity:say
    being_damage                    entity:damage
    being_heal                      entity:heal
    being_get_name                  entity:name
    being_get_action                entity:action
    being_set_action                entity:set_action
    being_get_direction             entity:direction
    being_set_direction             entity:set_direction
    being_apply_attribute_modifier  entity:apply_attribute_modifier
    being_remove_attribute_modifier entity:remove_attribute_modifier
    being_set_base_attribute        entity:set_base_attribute
    being_get_modified_attribute    entity:modified_attribute
    being_get_base_attribute        entity:base_attribute
    being_set_walkmask              entity:set_walkmask
    being_get_walkmask              entity:walkmask
    being_get_mapid                 entity:mapid
    chat_message                    entity:message
    being_register                  entity:register
    chr_shake_screen                entity:shake_screen
    chr_create_text_particle        entity:show_text_particle
    -                               entity:position
    posX                            entity:x
    posY                            entity:y
    monster_get_name                monsterclass:name
    item_get_name                   itemclass:name
</pre>
</div>
</content>
</entry>
<entry>
<title>Made the scripts being able to install</title>
<updated>2013-02-24T19:38:57+00:00</updated>
<author>
<name>Erik Schilling</name>
<email>ablu.erikschilling@googlemail.com</email>
</author>
<published>2013-01-15T09:24:22+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ablu/public_git/manaserv.git/commit/?id=9860dacbb6526138ae8edf57adc42ddc3e6073fa'/>
<id>9860dacbb6526138ae8edf57adc42ddc3e6073fa</id>
<content type='text'>
The game server will now look for the scripts in this order:
 - serverPath - config value
 - current working directory
 - the PKG_DATADIR #define
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The game server will now look for the scripts in this order:
 - serverPath - config value
 - current working directory
 - the PKG_DATADIR #define
</pre>
</div>
</content>
</entry>
<entry>
<title>Documented all lua binds directly in the source</title>
<updated>2013-02-24T19:31:20+00:00</updated>
<author>
<name>Erik Schilling</name>
<email>ablu.erikschilling@googlemail.com</email>
</author>
<published>2013-02-20T16:21:18+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ablu/public_git/manaserv.git/commit/?id=30a62acef45fb1652d0992dcbf30e473cea6bf74'/>
<id>30a62acef45fb1652d0992dcbf30e473cea6bf74</id>
<content type='text'>
This change adds a comment to each lua binding. In the future a script should
parse those and generate the docs from them.

This should prevent outdated docs and duplicate effort to keep code and docs
synced.

In C++ categories can be defined in this way:
/** LUA_CATEGORY long description of the category (shortname)
 * further text
 * goes into
 * the next lines
 */

The shortname is only used to bind other comments to the category.

In lua the category would look like this:
--- LUA_CATEGORY long description of the category (shortname)
-- further text
-- goes into
-- the next lines

A comment that describes a bind then can look like this:
/** LUA some_function (shortnameofcategory)
 * some_function(string name)
 * some_function(int id)
 **
 * Description
 */

Or in Lua:
--- LUA some_function (shortnameofcategory)
-- some_function(string name)
-- some_function(int id)
---
-- Description

Autoupdates script follows soon
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change adds a comment to each lua binding. In the future a script should
parse those and generate the docs from them.

This should prevent outdated docs and duplicate effort to keep code and docs
synced.

In C++ categories can be defined in this way:
/** LUA_CATEGORY long description of the category (shortname)
 * further text
 * goes into
 * the next lines
 */

The shortname is only used to bind other comments to the category.

In lua the category would look like this:
--- LUA_CATEGORY long description of the category (shortname)
-- further text
-- goes into
-- the next lines

A comment that describes a bind then can look like this:
/** LUA some_function (shortnameofcategory)
 * some_function(string name)
 * some_function(int id)
 **
 * Description
 */

Or in Lua:
--- LUA some_function (shortnameofcategory)
-- some_function(string name)
-- some_function(int id)
---
-- Description

Autoupdates script follows soon
</pre>
</div>
</content>
</entry>
<entry>
<title>Moved attribute (re)calculation to the scripts</title>
<updated>2013-02-04T16:43:24+00:00</updated>
<author>
<name>Erik Schilling</name>
<email>ablu.erikschilling@googlemail.com</email>
</author>
<published>2013-02-04T15:19:21+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ablu/public_git/manaserv.git/commit/?id=f7d71e54c0b5fdaa9e8aa1e69e615b9f80d124e4'/>
<id>f7d71e54c0b5fdaa9e8aa1e69e615b9f80d124e4</id>
<content type='text'>
This introduces two callbacks:
 - on_update_derived_attribute   -&gt; Called to recalculate other derived
                                    attributes.
 - on_recalculate_base_attribute -&gt; Called to recalculate a base attribute
                                    (only called for characters. However the
                                    function passed as callback can be useful
                                    for recalculating the derived attributes
                                    as well)

Monsters no longer block recalculation of attributes except HP and Speed.
I saw no sense to keep this.

Fixed constant value in libmana-constants.lua

Dropped bool type of the recalculation functions. It would be difficult to
keep it while pushing all to the script engine and it was unused anyway.

All in all this adds a LOT more flexibillity to projects since they can now
adapt all attributes in the way they want.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This introduces two callbacks:
 - on_update_derived_attribute   -&gt; Called to recalculate other derived
                                    attributes.
 - on_recalculate_base_attribute -&gt; Called to recalculate a base attribute
                                    (only called for characters. However the
                                    function passed as callback can be useful
                                    for recalculating the derived attributes
                                    as well)

Monsters no longer block recalculation of attributes except HP and Speed.
I saw no sense to keep this.

Fixed constant value in libmana-constants.lua

Dropped bool type of the recalculation functions. It would be difficult to
keep it while pushing all to the script engine and it was unused anyway.

All in all this adds a LOT more flexibillity to projects since they can now
adapt all attributes in the way they want.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed the atinit function</title>
<updated>2012-08-05T21:18:57+00:00</updated>
<author>
<name>Erik Schilling</name>
<email>ablu.erikschilling@googlemail.com</email>
</author>
<published>2012-07-13T14:20:26+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ablu/public_git/manaserv.git/commit/?id=05f3249e17121dc79e447b878cbd54e4d51dcdef'/>
<id>05f3249e17121dc79e447b878cbd54e4d51dcdef</id>
<content type='text'>
Previously each map had its own scope. They got merged now but the atinit
function was forgotten to adapt.

Reviewed-by: bjorn.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously each map had its own scope. They got merged now but the atinit
function was forgotten to adapt.

Reviewed-by: bjorn.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed Lua error reporting for NPC scripts</title>
<updated>2012-03-30T19:36:41+00:00</updated>
<author>
<name>Thorbjørn Lindeijer</name>
<email>thorbjorn@lindeijer.nl</email>
</author>
<published>2012-03-29T21:29:54+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ablu/public_git/manaserv.git/commit/?id=e4baa92aae537921dd17873328a95ab17afcfdfc'/>
<id>e4baa92aae537921dd17873328a95ab17afcfdfc</id>
<content type='text'>
This was due to a naming conflict between the 'debug' function I had recently
introduced and the 'debug' library provided by Lua. This caused problems when
trying to use debug.traceback for printing a backtrace of the error.

There's multiple ways to avoid the naming conflict. I opted for writing the
related helper functions in all-caps.

Also added an ERROR log function now. As Erik pointed out, there is no conflict
anymore with Lua's 'error' function with the new naming style.

Reviewed-by: Erik Schilling
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was due to a naming conflict between the 'debug' function I had recently
introduced and the 'debug' library provided by Lua. This caused problems when
trying to use debug.traceback for printing a backtrace of the error.

There's multiple ways to avoid the naming conflict. I opted for writing the
related helper functions in all-caps.

Also added an ERROR log function now. As Erik pointed out, there is no conflict
anymore with Lua's 'error' function with the new naming style.

Reviewed-by: Erik Schilling
</pre>
</div>
</content>
</entry>
</feed>
