Larian Studios
I'm new to Larian editor, I try to edit skill learn that force character like ability=5 learn limit to 6 Novice Skills, 4 Adept Skills, 2 Master Skills. I read from forum that you can edit scripts but i can't find which. I want to have unlimited skill learn. Anyone can tell how or which file script that it can work with. Sorry for my bad English and knowledge. Between i use EE version.
Could anyone give the link on this script ?
It would be completely new to me that it was possible to lift this limit. To my knowledge, this limit is hardcoded inside the .exe.

There is a call CharacterAddSkill() for character scripts and an Osiris call CharacterAddSkill((CHARACTER)_Char,(STRING)_Skill) that might be able add a spell independent of this limit but I have never tested it, I only used the Osiris call to add spells of the 'None' school.

The limit itself cannot be lifted, but the limit might only affect the learning of spells from skillbooks. Scripting might be able to circumvent the limit. Try it ...

Edit: there is no Osiris call to remove a spell, only a character script call.
... That's why I had to build some event communication between Osiris and char scripts to remove the second Tornado I gave players when they learned Tornado after Tornado was unlearned in XC_Bags. And it had to be done in a 'weird' way because there's no 'Skill unlearned' event ;-)

To try script adding, you should learn Osiris and then build some code like
(I'm too lazy to look up the exact calls, maybe there is not even an event CharacterUsedItemTemplate() or it has different parameters, or there is no ItemHandleDestroy(), whatever, it's just the coding principle.)

Code
IF
  CharacterUsedItemTemplate( _Char, _Skillbook_Template, _Handle )
  AND
  DB_SKILLBOOK_TEMPLATE_SKILL_CORRELATION( _Skillbook_Template, _Skill )
THEN
  CharacterAddSkill( _Char, _Skill );
  ItemHandleDestroy( _Handle );


without actually knowing before if the engine would not reject this call as soon as the limit was reached.

You also have to modify the use action for all skillbook templates from 'Learn Skill' to a simple 'Use' because the engine will probably not even allow the action when the limit is reached and Osiris will never receive the use event.

With this, you completely replace the standard way of learning skills and do it with your own script.
As written above (symbolically), you might want to imitate the standard behaviour by removing the skillbook after the spell has been learned. The code above - if the call ItemHandleDestroy is even correct - does NOT do that, it would remove the complete stack of skillbooks of that type you might have in inventory.
You'd have to remove a single instance of the stack away to some hidden place (and possibly destroy it there).
You might also want to build a check if a spell is already known and skip the whole processing if known already.
It's also very hard to make any text output, so you have to build workarounds to provide some feedback about success or failure (e.g. if the skill is already known).

And of course, any query about the player's ability level is also required, because the simple code above does no check for the ability level or if the ability (Hydro, Pyro, etc.) is even known by the character. You need to keep a per player 'knows-skill-x-database'.

I'm sure I have still forgotten quite a lot of things that need to be considered.
IT seems to be broaken..Thnx any way
Originally Posted by Nazar
IT seems to be broaken.

What exactly?
This Idea, it needed a deep knowledge
I say it again, the spell limit is hardcoded in the .exe, there is no way to change that other than disassemble the .exe, find that code and change it.
(Which is actually not really legal I guess.)

The info I gave above is not to lift the limit - because that's impossible - but how a workaround could be built. Also said that I never tested this.

Now, you might expect to find everything you want to mod easily presented and requiring nothing but a tiny change in some configuration file. This is true for some things, but others simply do require knowledge, some a deep knowledge. If you are not willing to get that knowledge, it's your choice. The engine will not change the way it works however.

Either you learn that stuff or you do easier things. There are a lot of things to mod that are easy, building a scripted workaround for the spell limit is *not* one of them.
© Larian Studios forums