Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
Joined: Jul 2014
R
Rhidian Offline OP
addict
OP Offline
addict
R
Joined: Jul 2014
Just because I can, and because I saw a topic in General saying how cool it would be if such a skill existed...


[Linked Image]
[Linked Image]
[Linked Image]


All three of those pictures were taken in quick succession after casting my custom Rain skill.

And now for a look into what went into this skill.

The skill entry in SkillData.txt located in the mod's Stats/Generated/Data folder is almost a complete copy of the Rain_Water skill entry.
Code
new entry "Heal_Rain_Water"
type "SkillData"
data "SkillType" "Rain"
data "Ability" "Defensive"
data "Element" "Water"
data "ActionPoints" "4"
data "Cooldown" "6"
data "ChargeDuration" "0"
data "Lifetime" "5"
data "SurfaceType" "Water"
data "SurfaceLifetime" "12000"
data "SurfaceStatusChance" "100"
data "SkillProperties" "Consume,100,5,SKILLBOOST_AoE_Healing_Rain;Douse,-1,5,,70"
data "TargetRadius" "15"
data "UseCharacterStats" "No"
data "UseWeaponDamage" "No"
data "AreaRadius" "20"
data "TotalSurfaceCells" "125"
data "SurfaceGrowStep" "5"
data "SurfaceGrowInterval" "150"
data "Icon" "Skill_Water_Rain"
data "DisplayName" "Rain_Water_DisplayName"
data "DisplayNameRef" "Rain"
data "Description" "Rain_Water_Description"
data "DescriptionRef" "Create water surfaces."
data "StatsDescription" "Rain_Water_StatsDescription"
data "StatsDescriptionRef" "Radius: [1]<br>Duration: [2]<br><br>Creates water puddles on terrain, douses fires, and makes characters wet. Water surfaces can be electrified."
data "StatsDescriptionParams" "AreaRadius;Lifetime"
data "FXScale" "100"
data "PrepareAnimationInit" "skill_rain_start"
data "PrepareAnimationLoop" "skill_rain_loop"
data "PrepareEffect" "FX_Skills_Water_Rain_Prepare_A"
data "CastAnimation" "skill_rain_cast"
data "CastTextEvent" "cast"
data "CastEffect" "FX_Skills_Water_Rain_Cast_A"
data "TargetEffect" "FX_GP_Target_Water_A"
data "Magic Cost" "1"
data "RainEffect" "FX_Skills_Water_Rain_A"
data "Atmosphere" "Rain"
data "ConsequencesStartTime" "1000"
data "Skillbook" "SKILLBOOK_Heal_Rain_Water"

new entry "Heal_Rain_Water_3"
type "SkillData"
using "Heal_Rain_Water"
data "Level" "3"


The key difference with this skill compared to the normal Rain is this line-
data "SkillProperties" "Consume,100,5,SKILLBOOST_AoE_Healing_Rain;Douse,-1,5,,70"

Instead of Rain, it does the Consume status effect.

What does the Consume status effect do? Anything we want, since it applies the status effect we specify (SKILLBOOST_AoE_Healing_Rain) when initially cast.

Status effects are defined in the Potion.txt of the Stats/Generated/Data/ folder. Here's my mod's entry for SKILLBOOST_AoE_Healing_Rain-
Code
new entry "_SkillBoost"
type "Potion"

new entry "SKILLBOOST_AoE_Healing_Rain"
type "Potion"
using "_SkillBoost"
data "Vitality" "5"
data "Duration" "1"


The durations of the Skill and the Status effect are important. Basically, the Healing Rain applies its status once a round for 5 turns (the Skill Duration). The status, when it's applied, heals and lasts for the current turn only (Duration 1). This results in the heal being applied 5 times. If the duration is increased, then the effect should last a bit even after the Skill's duration is over.

Joined: Mar 2014
old hand
Offline
old hand
Joined: Mar 2014
Nice work.

Very valuable explanations on how to mod the skills too.

Joined: Jun 2013
addict
Offline
addict
Joined: Jun 2013
Brainiac, when you sell your mod, hopefully, you will get its share to Rhidian, who just nicely and gently shared his discoveries with you, in a truly modding community spirit.
Or at least you will thank him.

Thanks for your time and sharing the stuff, Rhidian.

Last edited by Cromcrom; 24/07/14 07:27 PM.

Un chemin de 1000 lieues commence par un premier pas.

Project:
Steam workshop Frontiere
Joined: Jul 2014
journeyman
Offline
journeyman
Joined: Jul 2014
Nice work bud. Does it affect non-party members, hostiles and the likes?

Joined: Jul 2014
stranger
Offline
stranger
Joined: Jul 2014
Very nice. I was thinking of the potential of modding spells including rain modding as well. Multiple rain types could be implemented in a "New Skills Mod" so there can be an earth and fire rain type. Poison Rain, Oil Rain (warming + slowing). Maybe making all 3 new ones have a level 10 requirement?

Joined: Jul 2014
R
Rhidian Offline OP
addict
OP Offline
addict
R
Joined: Jul 2014
Originally Posted by Bucket
Nice work bud. Does it affect non-party members, hostiles and the likes?


Theoretically it should, since the part I changed (Wet status) was something that affected friend and foe alike. I haven't tested it that much though beyond those screenshots I posted.

It should be possible to make an AoE heal that only targets allies, by changing the status effect applied by a Shout to a healing Status effect.

Joined: Jul 2014
Location: The Netherlands
member
Offline
member
Joined: Jul 2014
Location: The Netherlands
Very nice. I really miss a group heal spell in this game. smile

Joined: Jul 2014
S
stranger
Offline
stranger
S
Joined: Jul 2014
Originally Posted by Brazuca
Very nice. I was thinking of the potential of modding spells including rain modding as well. Multiple rain types could be implemented in a "New Skills Mod" so there can be an earth and fire rain type. Poison Rain, Oil Rain (warming + slowing). Maybe making all 3 new ones have a level 10 requirement?


Slayer spell! Cuz it rains blood! laugh

Last edited by SlimJims; 24/07/14 10:44 PM.
Joined: Apr 2010
member
Offline
member
Joined: Apr 2010
Very cool. Can it be wrapped up into a functional mod?


"We shall not fear the coming of the shadow of death."
Joined: Jul 2014
R
Rhidian Offline OP
addict
OP Offline
addict
R
Joined: Jul 2014
I don't think it's really worth a functional mod on its own, given the mod limitations (1 mod active per playthrough).

As part of a bigger mod that does other cool things, then yes it can. I'm planning on working a version of this into my Unfair Difficulty Mod soon after I get the Summons straightened out. When I do (and when I get functional Skillbooks to attach to it) I'll share the relevant portions so that someone else could use the functional skillbook in their mod.

Joined: Jul 2014
stranger
Offline
stranger
Joined: Jul 2014
This really demonstrates the rather wide-ranging possibilities of custom spells, and bodes very well for those of us who plan on making our own campaigns.

Cheers for your continued digging into the Divinity Engine capabilities. It is really helpful!


My name is Ahnion, dammit---with a grave accent on the i!
Joined: Jul 2014
journeyman
Offline
journeyman
Joined: Jul 2014
Rhidian you the man! I love it!

I'm going to try adding it to my own game.

Now, from my reading of your post, it looks like this effect replaces the normal rain effect of the rain spell.

I like the rain spell smile so I'm wondering if I could replace the effects of one of the other spells (that I never use) and keep the rain spell as it is.

Better yet, I wonder if it's possible to add the effect to a new scroll or potion?

But brilliant work Rhidian! And bless you for sharing! As Cromcrom said, this is what a true modding community should be. Thank you!

Joined: Jul 2014
R
Rhidian Offline OP
addict
OP Offline
addict
R
Joined: Jul 2014
It's very possible to add a custom spell to a Skillbook or anything else, such that it doesn't conflict with other stuff. Details on how to do so should be found on my Boss Summons thread, where I introduced several custom Summon skills into the game.

Essentially, a custom spell requires the following to be truly complete (if I can recall correctly)-
1) SkillData like that described in this post with a unique SKILLBOOK line at the end
2) A RootTemplate for the new Skillbook (or scroll, or potion, or anything else)
3) An entry in the Object.txt of the Generated/Data/ folder for your mod whose name is the SKILLBOOK line above
4) An entry in the Object.txt of the Generated/Links folder that combines the SKILLBOOK name with your RootTemplate GUID. Make sure the object category at the end is something like "SkillbookWater" so that merchants can stock it
5) Entries in the Mods/Modname/Localization folder that has stuff like the spells name and description. Otherwise your spell will have no name ingame. The Keys for this are based off of what you had in the SkillData

Edit: The spell I have in the first post doesn't replace the normal Rain spell, since it has a unique name and Skillbook. The same DisplayNames and such just meant that my spell would look like a Rain spell in the skillbar, it doesn't overwrite what Rain does in any way.

On the contrary, I don't think its possible to change the existing skills. At least, not without several issues popping up. Changing the Skillbooks and such so that they don't point to the normal skill is easier to do, which is what I would do if I really wanted to replace Rain ingame.

Last edited by Rhidian; 25/07/14 12:04 PM.
Joined: Mar 2014
old hand
Offline
old hand
Joined: Mar 2014
Since cromcrom decided to badmouth me behind my back, with his idiotic invented accusations and nonsense, while he pretends to be on a high moral ground, as usual - i have to say that any similar smaller fixes or hacks i ever come up will be shared freely.

I do have my own idea for a specific, different custom rain spell, which is why this explanation is valuable to me.

A question Rhidian, do you think it will be possible to connect a spell like this with levels of related skill? So its stats change as you invest more points into the skill.

So, for example, having one level in water magic would effect this spell to heal minimal amounts, while any subsequent raise in skill level would raise the amount of healing?

Or is that connected with general player level since it seems that some spells increase some of their stats as you gain levels and there is other such functionality in the game already?


Joined: Jul 2014
R
Rhidian Offline OP
addict
OP Offline
addict
R
Joined: Jul 2014
I don't think it's possible for a skill's effect to change based off of a specific skill level. Instead, it appears that skills/spells somehow scale with the Player level. Take Minor Heal for example; its heal amount and stats and such are fixed, yet as the player gains levels the amount that is actually healed increases.

The only thing that scales with a specific skill level are the chances to apply status effects and/or AP cost due to insufficient skills, which I think is hardcoded into the game. Cooldown reduction via Intelligence is definitely hardcoded, since it only applies to the specific magic schools. Skills with "None" as their category (Staff of Magus) never have their cooldown reduced; I witnessed this when I was testing out custom Summons, when I moved my Boreas summon from None to Water, his cooldown decreased.

That being said, I could very well be wrong and there is a way to scale stuff. I didn't know about the Consume effect until I connected the dots between its presence in the SkillData and my exploration through the Potion effects.

Joined: Mar 2014
old hand
Offline
old hand
Joined: Mar 2014
Originally Posted by Rhidian
I don't think it's possible for a skill's effect to change based off of a specific skill level. Instead, it appears that skills/spells somehow scale with the Player level. Take Minor Heal for example; its heal amount and stats and such are fixed, yet as the player gains levels the amount that is actually healed increases.

The only thing that scales with a specific skill level are the chances to apply status effects and/or AP cost due to insufficient skills, which I think is hardcoded into the game. Cooldown reduction via Intelligence is definitely hardcoded, since it only applies to the specific magic schools. Skills with "None" as their category (Staff of Magus) never have their cooldown reduced; I witnessed this when I was testing out custom Summons, when I moved my Boreas summon from None to Water, his cooldown decreased.

That being said, I could very well be wrong and there is a way to scale stuff. I didn't know about the Consume effect until I connected the dots between its presence in the SkillData and my exploration through the Potion effects.


Hmm, thanks. Yes, ive noticed that some spells scale with levels, just wasnt sure was it completely locked to general player levels or could it be connected with relevant skill level.

I guess even if the feature is hardcoded to general player level i could use that to alter some specific stats of a spell, instead of relying on specific skill level.

Though that would be more elegant and ... natural.
Also more fitting for what i would want to do.

It would be great of it was possible. Lots of great options there.



Joined: Jul 2014
H
stranger
Offline
stranger
H
Joined: Jul 2014
Very nice. This shows the potential for a lot of nice custom spells. Bring out the D&D books!

Joined: Jul 2014
R
Rhidian Offline OP
addict
OP Offline
addict
R
Joined: Jul 2014
So here are the parts necessary for the 5 Rain skills in my mod Unfair Difficulty-
http://www.mediafire.com/download/42e86dpsf5roeco/Rain_Skills_Folder.zip

They're not in a mod of their own per se. The parts included in that zip can be dropped into the appropriate folders of a different mod and have their effect.

Something that might not be obvious is the structure of the lines within the Links folder of the Stats.

Like for example, I have this for my Rain skills-
Code
object itemstat "SKILLBOOK_UNFAIR_Rain_Blood","2c7da171-f6c1-4df7-bd3f-7136931ce04a","",0,0,"SkillbookWitchcraft",1,1,8,0,8,20
object itemstat "SKILLBOOK_UNFAIR_Rain_Fire","ea880242-8ee0-4719-b969-325b252049d3","",0,0,"SkillbookFire",1,1,8,0,8,20
object itemstat "SKILLBOOK_UNFAIR_Rain_Earth","5f972dff-9798-4474-bc47-4cc01d4859e8","",0,0,"SkillbookEarth",1,1,8,0,8,20
object itemstat "SKILLBOOK_UNFAIR_Rain_Water","ebb9d4dd-ca82-437d-b9a2-f16cb1bd9f1e","",0,0,"SkillbookWater",1,1,8,0,8,20
object itemstat "SKILLBOOK_UNFAIR_Rain_Air","361d6ffc-6099-47a9-b666-1917cf25967c","",0,0,"SkillbookAir",1,1,8,0,8,20


Now I don't know all of the variables that go into those lines, but I know the key ones.

Code
object itemstat "SKILLBOOK_UNFAIR_Rain_Air"

This line says that the object is 1) an item, and 2) what it's name within the Stats/Data folder is (SKILLBOOK_UNFAIR_Rain_Air was mine)

Code
"361d6ffc-6099-47a9-b666-1917cf25967c"

This is the Item RootTemplate that the in-game item will use. The purpose of the Links folder is to link the Stats entry to the RootTemplate.

Code
,"",0,0,

I honestly don't know what these are for.

Code
"SkillbookAir"

This one is important for getting your item to appear in-game. This is it's "object category", and can technically be whatever you want. The important thing is that this is what is looked for by TreasureTable.txt when it's looking to fill inventories.

For example, because of the "SkillbookAir" category, anything within the game that wants "SkillbookAir" within its inventory (like the Air skillbook sellers) will randomly choose items with this category. Because of this line, my book can be sold at the Air book vendors, and can be found anywhere Air skillbooks can be found.

Code
1,1,8,0,8,20


MinAmount | Max Amount | Priority | ??? | Min Level | Max Level |

The first two state how many can be stacked in your inventory I believe. I'm not sure about Priority (its 8 or 10 for skillbooks apparently). The Min Level and Max Level describe at what levels your item can be found. In my case, you can find the book starting at level 8. If you set this to 1, you would be able to purchase it from a vendor at the beginning of the game.


Joined: Mar 2014
old hand
Offline
old hand
Joined: Mar 2014
Super useful stuff. Thanks a bunch.


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