[Skills/Abilities] How to register new abilities/new skills ?

Place for sharing your game modifications for Life is Feudal: Your Own
User avatar
Cattoaster
 
Posts: 110
Joined: 03 Nov 2014, 16:13
Location: Medieval Germany

[Skills/Abilities] How to register new abilities/new skills ?

Post by Cattoaster » 01 Apr 2016, 15:02

Hej there,

let's say I want to add a few more abilities for one skill my approach would be to add some more XML elements in skill_types.xml. But I've have to use an ability ID which is not yet used for each new added ability (otherwise all skills and abilities will be unavailable, each ID has to be unique).

So far so good, here is the problem: how do I register my recently new added abilities (or skills) ?

The server log file indicates that this step is neccessary in order to use skills and abilities.

Code: Select all
<prepareManagers> [0] ECHO Loading skills types from [data/skill_types.xml]
ERRR <prepareManagers> [0] AbilityManager::_parseXmlAbilityNode() - using of unregistered ability (id=275)
ERRR <prepareManagers> [0] CmSkillsManager::selectSkillTypes() - error alilities parsing. All skills and abilities will be unavailable!


Is there a runable script or a prepareManager::AbilityManager/CmSkillsManager function which can be used to register a ability or skill?

Your help is greatly appreciated,
thanks in advance!

User avatar
Custodian
Mod Developer
 
Posts: 655
Joined: 08 Jun 2015, 14:58
Location: Lisbon

Re: [Skills/Abilities] How to register new abilities/new skills ?

Post by Custodian » 01 Apr 2016, 15:34

Cattoaster wrote:So far so good, here is the problem: how do I register my recently new added abilities (or skills) ?

You cannot add new abilities/skills with skill_types.xml, because new skill requires action logic.
skill_types.xml describes and configures predefined abilities and skills. You can only re-configure or limit skill amount with altering skill_types.xml.

To add new skills, a client-side and server-side modification required in order to provide the logic.
Spoiler
Last edited by Custodian on 02 Apr 2016, 09:42, edited 1 time in total.

User avatar
Cattoaster
 
Posts: 110
Joined: 03 Nov 2014, 16:13
Location: Medieval Germany

Re: [Skills/Abilities] How to register new abilities/new skills ?

Post by Cattoaster » 02 Apr 2016, 08:30

Thanks for your reply Custodian.
Though the skill action logic could be the same if I copy a ability to another skill the ID has to be unique. And the ability has to be registered. eg. separating smithing into weapon smithing and armor smithing both with smelting and forging abilities.

Too bad that we don't have a MOD API or a possibility to realize our ideas in a simpler way :no: Meh, atm the only way is to extend the code - decompiling, analyzing and developing.

I am looking forward to see more of your upcoming greatful BasilMod::Pack updates and features. Maybe you'll create a MOD API


Halvdal
 
Posts: 107
Joined: 20 Jan 2016, 13:36

Re: [Skills/Abilities] How to register new abilities/new skills ?

Post by Halvdal » 05 Feb 2018, 22:59

Any news for that modification?

Return to Game mods