Jump to content

Do charmed creatures continue to run scripts?


berelinde

Recommended Posts

If I wanted to make Gavin talk to the PC if he's charmed, would this work?

 

IF
 InParty(Myself)
 CombatCounter(0)
 !See([ENEMY])
 StateCheck(Myself,STATE_CHARMED)
THEN
 RESPONSE #100
StartDialogNoSet(Player1)
END

 

Also, I've long felt the need for drunken banters. No, I'm not going to write anything stupid. Well, not terribly stupid, anyway. But I figure, why have the ability to become intoxicated if you aren't going to do anything with it?

 

I know I can't do this, because STATE_INTOXICATED isn't on the state.ids list, but is there something else I can do to get the same effect?

IF
 InParty(Myself)
 CombatCounter(0)
 !See([ENEMY])
 StateCheck(Myself,STATE_INTOXICATED)
THEN
 RESPONSE #100
StartDialogNoSet(Player1)
END

 

Or is intoxication like fatigue, and it only kicks in at certain levels?

Link to comment
Also, I've long felt the need for drunken banters. No, I'm not going to write anything stupid. Well, not terribly stupid, anyway. But I figure, why have the ability to become intoxicated if you aren't going to do anything with it?
All I can tell you is intoxication seems to be stored in the CRE file as a stat. Presumably it is usually zero but goes up with the amount of drink, and as it does, morale goes up and luck goes down (a bit like RL I guess). So you would have to have the script check once it gets past a certain point, slightly silly banters kick in... past another point, slurring or who knows what. I read a fairly detailed thread on this a while back, complete with sample banters, maybe on PPG or SHS.

 

I played a PnP campaign once that involved a slightly evil Friar Tuck-like cleric with a fondness for ale and stupidity. He'd do things like get drunk and then try riding his horse down a cliff and when it broke its legs, try to heal it, then keep repeating this to see if he could get down the whole cliff this way. I assume Gavin isn't that kind of cleric though. :p (This was not my char btw - I was a swashbuckler who did other stupid things.)

Link to comment

You cannot speak with charmed creatures in BG2. It would only work in vanilla Baldur's Gate and Tales of the Sword Coast.

 

You can get the level of intoxication with a CheckStat() call (look in STATS.IDS for the correct stat). But there's not an easy way to determine if the character is actually drunk (I don't think; maybe you can pair it with the luck penalties that drunkness give to roughly judge the amount).

 

You can also check fatigue with CheckStat(), but it runs into the same wall as intoxication (since constitution also affects fatigue, you'd need to check the penalties, if that works, or use an obscene number of blocks to account for every possible constitution level).

Link to comment

Thanks for the help.

 

Bummer about the no-charmed-dialog thing, but them's the breaks. I'm still wondering why BG1 NPC has charmed dialog, then, but that's neither here nor there.

 

The info about intoxication is usable, though. Jastey did some research on fatigue that I might be able to borrow. Maybe it works about the same. After all, I'm not checking every creature, just one. Conveniently, he has the same constitution as the CRE Jastey researched. I saw the appropriate stat on the stat.ids list in Effects on IESDP, but wasn't sure how to use it.

 

This might seem like a lot of work for minimal payoff, but it does add a level of realism.

Link to comment
But there's not an easy way to determine if the character is actually drunk (I don't think; maybe you can pair it with the luck penalties that drunkness give to roughly judge the amount).
That would probably work, if you look at INTOXMOD.2DA. The modifiers seem to kick in when intoxication hits 50, then go up every 10 points until you get to 100 (which would equate to 'bombed' I guess). Constitution effects the intoxication rate (judging from INTOXCON.2DA) - the lower the CON, the quicker you get drunk apparently. But that shouldn't matter for drunken batner purposhes. :p

 

@BigRob: the icons seem to be applied as an effect (not sure how exactly - probably hard-coded somewhere). A stat check should suffice though (IF intoxication >= 50 then blah blah blah). Like I implied earlier, you could have varying stages of drunken banter as the stat increased.

 

Oh and here's the other thread though looks like you've already seen it:

Sarevok: "<CHARNAME>, I love you man" (he hugs his brother).

PC: "You're not getting another beer."

The warrior turns to Imoen.

Sarevok: "Imoen..."

Imoen: "Forget it Sarevok."

Link to comment

Sheesh, Miloch, this isn't supposed to be a contest who can get their NPC the drunkest. :p

 

They're unbelievably hard for me to write (or at least they're hard to write sober), so I'm probably not going to do many of them. Nor am I going to mess with anyone else's NPC unless they ask.

 

Anyway, I'm in luck. Putting

 

CheckStat("DV",#,INTOXICATION)

and

CheckStat(Myself,#,INTOXICATION)

 

show up as valid in the BAF. I'll just play with the # a bit until I get it to the point where it kicks in at about the same time as the icon.

 

Ultimately, Jastey got the code for fatigue from Mazzy's BAF. Mazzy has a banter with Valygar when she is fatigued. Substituting INTOXICATED for FATIGUE seemed to work. Well, WeiDU didn't spit it out. I don't know if it actually works. But I'll find out during testing.

Link to comment

You'd want to use CheckStatGT(). CheckStat() will only be true if the intoxication amount is exactly what you specify (but I'm guessing you'd want it to trigger whether the NPC is only slightly drunk or is shit-faced :) ). (CheckStatGT(Myself,10,INTOXICATION) would return true if the character's intoxication amount was 11 or higher; CheckStat(Myself,10,drunk) only returns true if it's exactly 10.)

 

Since you know the NPC's constitution, it looks like it should work OK. I'm not sure how well it's going to mesh with the method of drinking (who drinks without automatically renting a room afterward?), and it would suck if it breaks out of the shop screen (like some of the romance PartyRested() banters do), but you should be able to at least get it to do something.

Link to comment

Yes, you are right. I was typing quickly and inattentively.

 

I don't actually know if it's possible to rest or talk without breaking out of the store screen. Don't recall seeing otherwise, really, but I always figured if I've got an active romance and it's been a while since the last LT, hitting rest always leads to the possibility of breaking out of the store screen.

Link to comment

I used CheckStatGT(Player1,50,INTOXICATION) in Xan, so the dialogue would kick in if PC had had quite a few drinks, but not necessarily at the point of "Ain't gonna serve you another drop..." The dialogue would trigger upon exiting the store screen. And, yes, if the player immediately hits the rest button in a store, the dialogue wouldn't trigger - I interpreted it as being able to quietly slip into a room unnoticed.

 

Obviously, I didn't use it for other NPCs, since yes, the player can make them do whatever the player wants, including getting them drunk and making them wear a certain belt, but character-wise I still didn't see any sense.

Link to comment

Hey, thanks for that!

 

Y'know, when I was trying to figure out how the whole thing worked, I was looking through the store files, and came across the intoxication levels for various drinks.

 

They were all between 25 and 50, IIRC. I imagine that would be a good starting point.

Link to comment

I toyed with this messing around with a Wild Elf npc with a penchant for trying anything once.

 

I ended up starting the banter and then getting drunk during the course of it by applying intoxication to the npc's in the banter.

 

Its something to think about rather than trying to start a banter after an intoxication that may never happen or last long enough to trigger the banter (due to resting).

Link to comment

Or you could have the party come across a treasure trove of mysterious potions. Upon identification for example, the "potion of enlightenment" grants its imbiber hidden wisdom. But in fact, it turns out to be strong liquor and simply boosts intoxication instead of wisdom. Or perhaps even both... Gavin gets the +WIS bonus but has to pay the price by also getting drunk.

I was looking through the store files, and came across the intoxication levels for various drinks. They were all between 25 and 50, IIRC. I imagine that would be a good starting point.
So 1 or 2 drinks will get you half wasted? What kind of drink was that?
Link to comment

I'll think about it, but in this case, it isn't something that's going to advance the story line or lead to any critical revelations about other NPCs, so the effort of scripting it to apply progressive levels of intoxication may not work as well here.

 

I'm writing it for something I've always tried and been disappointed with the results: getting the party drunk once and wandering around a fairly safe place for a while to see if anyone said anything clever.

 

That, and I kind of like the idea that the PC is going to have control over it, or skip it entirely. The last thing I want is for the pc is to be saddled with a drunken NPC when he/she really needs him to be sober.

 

If it winds up being an easter egg, that's ok, too.

 

@Rabain: feeling better?

 

@Miloch: keep in mind that the store intoxication levels do not take constitution into account. At a con of 16, he isn't going to be a cheap date.

Link to comment

Feeling a lot better thanks, still have a cough but at least I'm eating again!

 

You could script intoxication to happen inside any number of Inns so that it doesn't happen at a mission critical time or throw in a Rest() at the end of the banter to get rid of the effects.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...