subtledoctor Posted March 31, 2022 Posted March 31, 2022 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 Quote
CamDawg Posted March 31, 2022 Posted March 31, 2022 (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 March 31, 2022 by CamDawg clarification Quote
CamDawg Posted March 31, 2022 Posted March 31, 2022 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 Quote
subtledoctor Posted March 31, 2022 Author Posted March 31, 2022 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. Quote
jmerry Posted March 31, 2022 Posted March 31, 2022 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. Quote
Bubb Posted March 31, 2022 Posted March 31, 2022 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: Charbase Jaheira Minsc Keldorn Terminsel Valygar That is what Player[1-6] would return in-game. Now, say I kick Keldorn out of the party. The list becomes: Charbase Jaheira Minsc [Invalid] Terminsel 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: Charbase Jaheira Minsc Terminsel Valygar [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. Quote
Sam. Posted March 31, 2022 Posted March 31, 2022 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. Quote
subtledoctor Posted March 31, 2022 Author Posted March 31, 2022 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.) Quote
jmerry Posted April 1, 2022 Posted April 1, 2022 @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). Quote
jastey Posted April 1, 2022 Posted April 1, 2022 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? Quote
Bubb Posted April 1, 2022 Posted April 1, 2022 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: Charbase Jaheira Minsc Terminsel Valygar [Invalid] You can kind of think of it as save+reload updating Player[1-6] with Player[1-6]Fill. Quote
Grammarsalad Posted April 8, 2022 Posted April 8, 2022 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 Quote
Recommended Posts
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.