Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
Joined: Sep 2017
Z
Zhob Offline OP
stranger
OP Offline
stranger
Z
Joined: Sep 2017
Hi modders,

First of all, let me say that I'm really (really) new to modding but I have a webdev background so I'm not totally lost around here. Also, please excuse any potential language mistake, I'm not english native.

I've been thinking about creating my own class but to make it look "clean", I would probably have to add a new abilities and from what I understand, there's currently no easy way to do that, so I thought about a probable workaround. If you guys can answer the few following questions by "Yes, you can do that", then adding "fake" new abilities (probably talents too) should be possible.

However, if there are plans that I'm not aware of in a somewhat near future to allow modders to add those in a more "vanilla" way, let me know and don't bother reading what comes next.

As I said, I'm new to the Divinity Engine et and I'm not really aware about everything you can and can't do. So, here are my questions :

1) Can you add UI elements in the "Ability" section? Could you for instance add "Unarmed" to the list of combat abilities after "Dual-Wielding", "Single-Handed", ... ?

2) Can this new ability have a unique ID and a value (a simple integer)?

3) Can you get and set the value of this new UI element through a script?

4) Can you check how many "Ability Points" are not yet assigned and can you set it? (If you can't get the value, it doesn't really matter since we can get this value by doing some boring calculations, the important part is that it has to be settable)

I guess that will be all for now. To make it clearer (hopefully), here what I intend to do :

I want to create a custom Martial Artist class. The character would fight with his fits and kick things. My first thought was to make the class skills scale with Strength or Wits but I needed a way to scale unarmed damage too. A simple solution would have been to give the player a special skill (given through a quest or by an item) behaving like a toggled stance and would increase the player's unarmed attacks passively. This is probably what I'll try to do if the questions above are not answered by "Yes" or "Might be possible".

To go further, I thought about my very own "Unarmed" combat ability. The idea is to add this new Ability by extending the UI and make a script that would control the value of said ability to make it behave like an actual and legit one.

I guess that's it, thanks in advance to anyone helping me answer these questions.

Joined: Sep 2017
Z
Zhob Offline OP
stranger
OP Offline
stranger
Z
Joined: Sep 2017
Side question :

Are the charScript/itemScript functions found at the bottom of [url=http://larian.com/forums/ubbthreads.php?ubb=showflat&Number=605357#Post605357]this page [/url] up to date?

Joined: Mar 2016
Location: Belgium
T
addict
Offline
addict
T
Joined: Mar 2016
Location: Belgium
It is not possible to add custom abilities, unfortunately.

That list of APIs is mostly up-to-date. Very few APIs have been modified (gotten an extra parameter) and a couple have been added, but in general that list is still quite comprehensive.

Joined: Sep 2017
Z
Zhob Offline OP
stranger
OP Offline
stranger
Z
Joined: Sep 2017
Ok, thanks. I think this list of functions should be somewhere on the wiki though.

Since the workaround I suggested doesn't seem to be possible, I thought about another :

Still with my Martial Artist and my unarmed ability example, what if I added a new item that would be given to the player through a custom quest or bought from a "Martial Artist Master"?

As long as the player keeps this item in his inventory, his unarmed damaged would be boosted. This item could stack and boost his damage even more (depending on the number of stacked items) and behave kind of like a combat ability (+5% unarmed damage per item stacked for instance).

Would something like that be doable?

Side questions :

5) Is there a way to know when a character levels up?

6) Is there a way to know when a player assigns a unused points to a combat ability?

Joined: Mar 2016
Location: Belgium
T
addict
Offline
addict
T
Joined: Mar 2016
Location: Belgium
Originally Posted by Zhob
Ok, thanks. I think this list of functions should be somewhere on the wiki though.

There's a lot of stuff that still should be added to the wiki...

Quote

Still with my Martial Artist and my unarmed ability example, what if I added a new item that would be given to the player through a custom quest or bought from a "Martial Artist Master"?

As long as the player keeps this item in his inventory, his unarmed damaged would be boosted. This item could stack and boost his damage even more (depending on the number of stacked items) and behave kind of like a combat ability (+5% unarmed damage per item stacked for instance).

Would something like that be doable?

I think that should be possible, yes, but I'm not an expert in this kind of things.

Quote

5) Is there a way to know when a character levels up?

Yes, there's a CharacterLeveledUp Osiris event.

Quote

6) Is there a way to know when a player assigns a unused points to a combat ability?

No. You can get and set the number of unassigned ability points, but there is no event that tells you when it changes. You could check it on a timer, but that's not really nice.

Joined: Sep 2017
Z
Zhob Offline OP
stranger
OP Offline
stranger
Z
Joined: Sep 2017
Thank you again for these answers.

Quote
No. You can get and set the number of unassigned ability points, but there is no event that tells you when it changes. You could check it on a timer, but that's not really nice.


Well, I guess I could do something like that :

- Get and store in a tmp variable the value of unassigned ability points
- Then build some kind of loop comparing that tmp variable with the actual value of unassigned ability points
- If my tmp variable is greater than the value of unassigned ability points, it would mean an ability point has been assigned

The idea is to watch when a character levels up and gets a new combat ability point. When he does, he'd get a special item (like a "Combat Ability Book"). If he wants to use his point into a vanilla abilities, he'd assign it like he normaly would but that book would be consumed (to make it disappear without consequence).

However, if he wants to use that point to buff his unarmed damage, he would have to combine that book with another custom item (such as a "Martial Artist Mastery" unique item given through a quest).

The "Martial Artist Mastery" item wouldn't be consumed.
The "Combat Ability Book" item would be consumed and the value of unassigned combat abilities would be decremented.
The combination of these 2 item would grant an "Unarmed" item.
The number of "Unarmed" items stacked would represent the level of the ability.

Thoughts?

Last edited by Zhob; 23/09/17 12:21 PM.
Joined: Oct 2015
T
stranger
Offline
stranger
T
Joined: Oct 2015
You could simply let them keep the book. When they attempt to use the book (which would have infinite uses), it would check the number of unassigned skill points, as long as they have one unassigned it would reduce them by 1, then give the item. If they don't have any unassigned, nothing would happen.

Joined: Aug 2014
old hand
Offline
old hand
Joined: Aug 2014
Originally Posted by Tinkerer

No. You can get and set the number of unassigned ability points, but there is no event that tells you when it changes. You could check it on a timer, but that's not really nice.


Wait, there is a unassigned ability point check? What is it, and are there ones also for talent points and attributes? I know these existed for D:OS1, but I thought they were removed. If these exist, then adding new abilities, attributes, and talents is possible in a hacky way.

Joined: Dec 2016
Location: United States
member
Offline
member
Joined: Dec 2016
Location: United States
Even if there isn't a check for those points, it should be possible to keep a running total by tracking expenditure against gain.

Joined: Sep 2017
Z
Zhob Offline OP
stranger
OP Offline
stranger
Z
Joined: Sep 2017
Quote
You could simply let them keep the book. When they attempt to use the book (which would have infinite uses), it would check the number of unassigned skill points, as long as they have one unassigned it would reduce them by 1, then give the item. If they don't have any unassigned, nothing would happen.


It sounds simpler indeed but maybe harder for a novice like me.

Quote
No. You can get and set the number of unassigned ability points, but there is no event that tells you when it changes.


Any official word on this? Function name?


Moderated by  Larian_KVN 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5