Jump to content

adding new Bhaalspawn abilities


Recommended Posts

Posted

How do the BG1 Bhaalspawn abilities get added? How does the game know who is Charname?

I am admittedly very inexperienced with all things scripting, but Player1, Player2, etc. refer to the order of portraits on the right side of the screen, right? So Charname is Player1 at the beginning of the game, but once you recruit Imoen you can change Charname to be Player2. Correct?

I'm making a class-based ability, which will give an innate ability to clerics of a certain kit. (Or possibly all priests, maybe.) But it is really to do with being a Bhaalspawn, so I want to limit it to the protagonist. How can I condition the ability in that way? The game does this in several instance, e.g. in BG1 when repeatedly giving you Bhaalspawn abilities. Anyone know how? Is it a technique I could use?

Thx

Posted (edited)

Player1 is the PC, always, and Player2-6 are based on join order. The character with the top portrait is Player1Fill, second is Player2Fill, etc.

 

Edited by CamDawg
clarification
Posted

As an example: you start a new SoA game. Imoen frees you, you rescue Minsc, then Jaheira, and pick up Yoshimo on level 2. Since your character is, let's say, a cleric, you order your party with Minsc and Jaheira in front, then your PC, then Yoshimo, then Imoen.

  • The PC is Player1 and Player3Fill
  • Imoen is Player2 and Player5Fill
  • Minsc is Player3 and Player1Fill.
  • Jaheira is Player4 and Player2Fill
  • Yoshimo is Player5 and Player4Fill

After you escape the dungeon and Imoen is kidnapped, Player2 is vacant, so everyone moves up a slot:

  • The PC is Player1 and Player3Fill
  • Minsc is Player2 and Player1Fill
  • Jaheira is Player3 and Player2Fill
  • Yoshimo is Player4 and Player4Fill
Posted

Good to know! Thanks. That’s helpful. If I want to avoid using scripts and invisible creatures maybe I can just tag Player1 with a proficiency or something at the beginning of the game, then I can apply anything I want later on via 326. Could be handy.

Posted

All right, BG1 Bhaalspawn powers ...

The text and which powers you get are controlled in 2DAs DRMTEXT2 through DRMTEXT7. Progress is tracked with the global variable DREAM.

Other than that, I can't find anything. No scripts and no unmodded dialogues refer to that DREAM variable at all. The process seems very hardcoded. You can change a few things around, and you can piggyback on that DREAM variable for your mod stuff, but that's about it.

Posted

RE player objects: Like Cam says, Player[1-6] is usually filled based on join-order. So, if my party was stored like this in the GAM:

  1. Charbase
  2. Jaheira
  3. Minsc
  4. Keldorn
  5. Terminsel
  6. Valygar

That is what Player[1-6] would return in-game. Now, say I kick Keldorn out of the party. The list becomes:

  1. Charbase
  2. Jaheira
  3. Minsc
  4. [Invalid]
  5. Terminsel
  6. Valygar

Keldorn is gone, yet the list does not shift to fill the gap, (until you save / reload). Player[1-3] is valid, Player4 is invalid, and Player[5-6] is valid. Dealing with potential gaps is where the Player[1-6]Fill objects come in. They return the "nth" valid character. So Player[1-6]Fill in this scenario returns:

  1. Charbase
  2. Jaheira
  3. Minsc
  4. Terminsel
  5. Valygar
  6. [Invalid]

If you actually want to target a specific portrait slot, use PartySlot[1-6].

And note that characters joining the party fill the first open Player[1-6] object. So in the situation where Keldorn was kicked out of Player4, if I had Aerie join the party she would have become Player4. The order of the party member GAM entries directly reflects Player[1-6] — on load the order of the entries determines who is Player[1-6], and whoever is Player[1-6] on save determines the order of the GAM entries.

Posted

I once briefly looked into whether it was possible to have the engine give my PC both the good and bad Bhaal powers.  Upon realizing how much of the mechanics were hardcoded, I quickly determined adding the spells myself with NI would be quicker and easier.  I'd still be interested in such a mod.

Posted

For background: this is for my sphere system mod. I added a kit for a cleric of Bhaal, even though Bhaal is dead and has no clerics, on the idea that Charname might have a class focused on gaining the divine magic of the dead god. In the current version, you get sphere access appropriate for a cleric of Bhaal - Death, War, Destruction, that sort of stuff. But then I thought, wouldn't it be nice if Charname could have some say over how the divine magic manifests. Like, maybe if you are growing into (maybe) a new god of death, and you are into interring the dead underground, you might take access to the sphere of Earth. Or if you will be a deity who teaches cremation of the dead, you might might get access to the sphere of Fire. If you are about spirits flying away to the afterlife, you might get access to the spheres of Air and Astral. Et cetera.

So I am devising a way to start with some basic sphere access for a priest of Bhaal, but periodically have a dialogue that lets you choose another sphere, so you can direct the growth of your own divinity. At the moment my plan is something like this:

  • At the beginning of the game, have BALDUR.BCS apply a spell to Player1, that sets an unused proficiency bit.
  • Put an AP_ ability a few times in the kit table of the "Scion of Bhaal" kit
  • That ability will use op171 to give you an innate ability, but it will be gated behind a condition checking for that proficiency value. (So any NPCs with the Bhaal kit will not get this benefit.)
  • The innate ability will start a dialogue letting you gain access to one spell sphere that you don't currently have.

(Once the sphere choice system is up and running I might also re-work the "Ur Priest" kit so that instead of just giving you access to a ton of spells, it starts out with just a few spheres and then lets you choose more and more as you level up. Assuming @Grammarsalad likes that idea.)

(And then maybe I'll create a new "3E-Style" sphere system that gives each deity access to only a few spheres, and lets clerics choose some more, the way you can choose domains in 3E.)

Posted

 

@Sam. Giving both powers? Doesn't seem too hard to me, if you're willing to be slightly indirect. Create new spells "Grant Bhaalspawn Powers N", and put those in the 2DAs in place of the current powers. When used, that new spell grants both powers (171) for its chapter and removes itself (172).

Posted
16 hours ago, Bubb said:

And note that characters joining the party fill the first open Player[1-6] object. So in the situation where Keldorn was kicked out of Player4, if I had Aerie join the party she would have become Player4.

Is this also true after save/reload? Does "Player4" remain empty or do the PlayerX instances get shifted to Player6 empty after reload?

Posted
3 hours ago, jastey said:

Is this also true after save/reload? Does "Player4" remain empty or do the PlayerX instances get shifted to Player6 empty after reload?

On save+reload any gaps are removed. So if Keldorn was kicked out of Player4 and I immediately save+reloaded, the list would be:

  1. Charbase
  2. Jaheira
  3. Minsc
  4. Terminsel
  5. Valygar
  6. [Invalid]

You can kind of think of it as save+reload updating Player[1-6] with Player[1-6]Fill.

Posted
On 3/31/2022 at 5:28 PM, subtledoctor said:

For background: this is for my sphere system mod. I added a kit for a cleric of Bhaal, even though Bhaal is dead and has no clerics, on the idea that Charname might have a class focused on gaining the divine magic of the dead god. In the current version, you get sphere access appropriate for a cleric of Bhaal - Death, War, Destruction, that sort of stuff. But then I thought, wouldn't it be nice if Charname could have some say over how the divine magic manifests. Like, maybe if you are growing into (maybe) a new god of death, and you are into interring the dead underground, you might take access to the sphere of Earth. Or if you will be a deity who teaches cremation of the dead, you might might get access to the sphere of Fire. If you are about spirits flying away to the afterlife, you might get access to the spheres of Air and Astral. Et cetera.

So I am devising a way to start with some basic sphere access for a priest of Bhaal, but periodically have a dialogue that lets you choose another sphere, so you can direct the growth of your own divinity. At the moment my plan is something like this:

  • At the beginning of the game, have BALDUR.BCS apply a spell to Player1, that sets an unused proficiency bit.
  • Put an AP_ ability a few times in the kit table of the "Scion of Bhaal" kit
  • That ability will use op171 to give you an innate ability, but it will be gated behind a condition checking for that proficiency value. (So any NPCs with the Bhaal kit will not get this benefit.)
  • The innate ability will start a dialogue letting you gain access to one spell sphere that you don't currently have.

(Once the sphere choice system is up and running I might also re-work the "Ur Priest" kit so that instead of just giving you access to a ton of spells, it starts out with just a few spheres and then lets you choose more and more as you level up. Assuming @Grammarsalad likes that idea.)

(And then maybe I'll create a new "3E-Style" sphere system that gives each deity access to only a few spheres, and lets clerics choose some more, the way you can choose domains in 3E.)

Yeah, I'm cool with it

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...