Jump to content

Want to make CREs leave area and then reappear later


berelinde

Recommended Posts

I'd like to make the 2 courtesans outside Feldpost's leave the area and then reappear the next day. To do this, I'm going to have to do 2 things: assign them each a unique DV and change their override scripts to something that isn't _shout.bcs.

 

That part is easy, because it's just a few lines in the tp2:

 

COPY_EXISTING ~_ROSBA_B.CRE~ ~override~
SAY NAME1 ~Courtesan~
SAY NAME2 ~Courtesan~
WRITE_ASCII 0x248 ~_ROSBA_B~ #8 // override
WRITE_ASCII 0x280 ~_ROSBA_B~ #32 //DV
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~_ROSBA_C.CRE~ ~override~
SAY NAME1 ~Courtesan~
SAY NAME2 ~Courtesan~
WRITE_ASCII 0x248 ~_ROSBA_C~ #8 // override
WRITE_ASCII 0x280 ~_ROSBA_C~ #32 //DV
BUT_ONLY_IF_IT_CHANGES

 

If I wanted, I could even go crazy and give them some portraits.

 

Making them leave is also easy, I think. Unless I am mistaken, this will work, in the dialog file:

 

== ~_PROST1~ ~words~ DO ~ActionOverride("_ROSBA_B",EscapeArea()) ActionOverride("_ROSBA_C",EscapeArea())~

 

How do I make them show up the next night, though?

 

I can't assign a different dialog file, though, because Shar-Teel interjects into it. So the 2 CREs are still going to share a dialog file, but not necessarily a script.

Link to comment

This is from BG1 NPC Project's Reputation Modification Bit, from the Lake Poet area BAF.

 

IF
Global("X#TT1Deactivate","GLOBAL",1)
THEN
 RESPONSE #100
 SetGlobal("X#TT1Deactivate","GLOBAL",2)
 SetGlobalTimer("X#TroubadorTimer1","GLOBAL",THREE_DAYS)
 Wait(4)
 Deactivate("X#LP1REP")
END

IF
Global("X#TT1Deactivate","GLOBAL",2)
GlobalTimerExpired("X#TroubadorTimer1","GLOBAL")
THEN
 RESPONSE #100
 SetGlobal("X#TT1Deactivate","GLOBAL",0)
 Wait(4)
 Activate("X#LP1REP")
END

 

If I extended the bottom of _AR3300.bcs with this, would it work?

 

IF
Global("B!HarlotDeactivate","GLOBAL",1)
THEN
 RESPONSE #100
 SetGlobal("B!HarlotDeactivate","GLOBAL",2)
 SetGlobalTimer("B!HarlotTimer","GLOBAL",TWELVE_HOURS) //they're only there at night, anyway
 Wait(4) 
 Deactivate("_ROSBA_B")
 Deactivate("_ROSBA_C")
END

IF
Global("B!HarlotDeactivate","GLOBAL",2)
GlobalTimerExpired("B!HarlotTimer","GLOBAL")
THEN
 RESPONSE #100
 SetGlobal("B!HarlotDeactivate","GLOBAL",3) //this is only ever going to happen once
 Wait(4)
 Activate("_ROSBA_B")
 Activate("_ROSBA_C")
END

Link to comment

Only if you don't have them leave the area!

 

The reason to use Activate() Deactivate is that it keeps the .cre's locals set, and doesn't actually destroy the creature. Take a look at the Dynaheir Quest's use of Drizzt, and you will see what I mean. In that case, we move Drizzt so it looks like he is leaving the area, but he just moves away from the party and then Deactivate() s. After the timer expires, the area script Activate()s him and moves him towards the party.

Link to comment

So I should use this instead of EscapeArea():

 

MoveToOffset([50.50]) Deactivate("DV")

 

Since both CREs use the same dialogue file, and need to continue to do so, how about this as the last line before they leave:

 

== ~B!GAVINJ~ ~words~ DO ~SetGlobal("B!HarlotDeactivate","GLOBAL",1) ActionOverride("_ROSBA_B",MoveToOffset([50.50])) ActionOverride("_ROSBA_C",MoveToOffset([50.50])) Deactivate("_ROSBA_B") Deactivate("_ROSBA_C")~

 

*And* if I'm deactivating them as part of the dialogue file, I shouldn't deactivate them in the area script, too. So that would become:

 

IF
Global("B!HarlotDeactivate","GLOBAL",1)
THEN
 RESPONSE #100
 SetGlobal("B!HarlotDeactivate","GLOBAL",2)
 SetGlobalTimer("B!HarlotTimer","GLOBAL",TWELVE_HOURS) //they're only there at night, anyway
 END

IF
Global("B!HarlotDeactivate","GLOBAL",2)
GlobalTimerExpired("B!HarlotTimer","GLOBAL")
THEN
 RESPONSE #100
 SetGlobal("B!HarlotDeactivate","GLOBAL",3) //this is only ever going to happen once
 Wait(4)
 Activate("_ROSBA_B")
 Activate("_ROSBA_C")
END

Link to comment
I'd like to make the 2 courtesans outside Feldpost's leave the area and then reappear the next day. To do this, I'm going to have to do 2 things: assign them each a unique DV and change their override scripts to something that isn't _shout.bcs... How do I make them show up the next night, though?
This already happens via scheduling. If you drill down into the ARE file actor section, you'll see either a "Present at" (NI) or "Schedule" (DLTCEP). They show up around 9:30pm and leave around 3:30am. Or are you proposing messing with this manually?
If I wanted, I could even go crazy and give them some portraits.
Now you're talking. Courtesan portraits! How lewd do you want them? :)
Link to comment
I'd like to make the 2 courtesans outside Feldpost's leave the area and then reappear the next day. To do this, I'm going to have to do 2 things: assign them each a unique DV and change their override scripts to something that isn't _shout.bcs... How do I make them show up the next night, though?
This already happens via scheduling. If you drill down into the ARE file actor section, you'll see either a "Present at" (NI) or "Schedule" (DLTCEP). They show up around 9:30pm and leave around 3:30am. Or are you proposing messing with this manually?

 

Yep. I want them to go away after they're talked to, but only once. Got it sorted, tho.

 

If I wanted, I could even go crazy and give them some portraits.
Now you're talking. Courtesan portraits! How lewd do you want them? :)

I'd say "surprise me," but I don't think you could. I gave them a couple portraits, but if you've got something more *ahem* appropriate, please share!

Link to comment
I'd say "surprise me," but I don't think you could. I gave them a couple portraits, but if you've got something more *ahem* appropriate, please share!
Well, unfortunately there's only so much you can do in a 38x60 area. I looked at the portraits you gave them and there's nothing wrong with them (except perhaps 'lack of tartiness' if that's a fault :rant:). But if you want to use others, I have a few extras. I'm tweaking some CREs and some of those that have dialog but no portraits, I'm assigning portraits. Some of these also work well for nymphs, sirines and the like. I mined these from various sources (including some oil and watercolour paintings I like) and retouched them. If you or anyone else wants to use them, just let me know which, so I don't use them in my mods.
Link to comment

I dunno, berelinde... if it works testing with the calls in the dialogue rather than the area script, then go for it! We had some oddities with Activate/Deactivate when scripting using scripts. That is why I ended up putting the odd counting variable set in the area scripts for the Reputation Bards. Either way should work.

Link to comment

Question: does the MoveToOffset + Deactivate technique works for your courtesans?

 

Because I need to get rid of a whole gang of eleven creatures for my quest, but I'd need them to reappear after (for they have nothing to do with the quest, but I need the area they are in :rant: )

 

Thanks you

Link to comment

It worked beautifully, on my installation, but it has been giving people trouble.

 

I was using regular state format, as opposed to chain, and they left before the next block was executed, and they reappeared the next night, and every night thereafter, that I checked.

Link to comment

Archived

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

×
×
  • Create New...