Jump to content


Photo

General Discussion

mod npc djinni bg2 bg2ee

  • Please log in to reply
135 replies to this topic

#81 Argent77

Argent77
  • Administrator
  • 1397 posts

Posted 06 February 2016 - 06:28 AM

Update: Afaaq, the Djinni Companion v2.2a

Changes in v2.2a:

  • Fixed missing string references in the BG2 Light Version.

Changes in v2.2:

  • Added preliminary EET support.
  • Added a new interjection to the Genie dialog in "Unfinished Business -> Kalah and What He Was Promised".
  • Nerfed Afaaq's level progression in IWD:EE since you encounter him on much lower character levels as in BG2.
  • Revised battles in the IWD:EE version. Made second battle less difficult and increased challenge of final battle.
  • Added a proper introduction talk to IWD:EE version of Afaaq.
  • Fixed a few historical inconsistencies in the IWD:EE version.
  • Fixed an issue (again) which sometimes prevents the party to leave the current area if the djinni returned into his lamp.
  • Fixed a small issue of displaying uninitialized stats when talking to Afaaq's lamp under certain circumstances.
  • Fixed incorrect WAV references in Afaaq's lamp interior map in the IWD:EE version which caused the game to crash.
  • Worked around an installation issue on tolowered games on Linux.
  • Added a note to the Readme that djinns are immune to healing spells cast on them in IWD:EE.
  • Updated the compatibility section of the Readme.


#82 Roxanne

Roxanne

    Modder

  • Member
  • 3564 posts

Posted 16 March 2016 - 12:46 PM

Encountered problem in EET Smuggler's cave

 

I have v2.2 installed in my EET test installation. I have not met the Djinni ever....but that is another story...

 

I encountered CtDs when entering AR5504 in ToB.

After much research and after eliminating anything else as a reason I found the issue in the ar5504.bcs.

 

When I removed the code that is added by your ar5504_top.baf, the problem was resolved.

 

Edit

I assume the problem is this in the first block

 FadeToColor([1.0], 0)

 

I always use

FadeToColor([30.0],0)
;;;;;;;
FadeFromColor([30.0],0)


Edited by Roxanne, 16 March 2016 - 12:52 PM.

The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*

 


#83 Argent77

Argent77
  • Administrator
  • 1397 posts

Posted 16 March 2016 - 01:14 PM

I never had any problems with this value in FadeToColor (neither in vBG2 nor in BG2EE) and I require an instant fade to black in that situation. I have rather thought the Activate/Deactivate or MoveGlobalObject actions would have caused some trouble.

The code in the AR5504.BCS is somewhat tricky to work with, however. I tried to make it compatible with vanilla ToB and Wheels of Prophecy. It may produce unpredictable results if other mods rewrite relevant portions of the script.

Can you show me the script before it was modified by my mod?
 


Edited by Argent77, 16 March 2016 - 01:15 PM.


#84 Roxanne

Roxanne

    Modder

  • Member
  • 3564 posts

Posted 16 March 2016 - 01:29 PM

I never had any problems with this value in FadeToColor (neither in vBG2 nor in BG2EE) and I require an instant fade to black in that situation. I have rather thought the Activate/Deactivate or MoveGlobalObject actions would have caused some trouble.

The code in the AR5504.BCS is somewhat tricky to work with, however. I tried to make it compatible with vanilla ToB and Wheels of Prophecy. It may produce unpredictable results if other mods rewrite relevant portions of the script.

Can you show me the script before it was modified by my mod?

The fade was just an assumption (I could not test it, since I deleted that block) This is how the BCS looks now, no idea what it was before your mod, I just installed Afaaq in the sequence proposed for EET, so I have no idea which mod added what to this area script.

Spoiler


Edited by Roxanne, 16 March 2016 - 01:34 PM.

The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*

 


#85 Argent77

Argent77
  • Administrator
  • 1397 posts

Posted 16 March 2016 - 02:01 PM

I don't see anything that could have caused the CtD. The script portion in question sets an area-local variable and checks a bunch more variables. The only potential problem might be "!InActiveArea("A7Afaaq")" trigger in the third block. However, the game should not crash even if the creature is not available.

Does the game crash as soon as you enter the cave or after a certain delay? Can you try again with the code in place and replace the trigger "!InActiveArea("A7Afaaq")" by "False()"?



#86 Roxanne

Roxanne

    Modder

  • Member
  • 3564 posts

Posted 16 March 2016 - 02:10 PM

I don't see anything that could have caused the CtD. The script portion in question sets an area-local variable and checks a bunch more variables. The only potential problem might be "!InActiveArea("A7Afaaq")" trigger in the third block. However, the game should not crash even if the creature is not available.

Does the game crash as soon as you enter the cave or after a certain delay? Can you try again with the code in place and replace the trigger "!InActiveArea("A7Afaaq")" by "False()"?

Do I need to reset any globals? I have no save from before I entered the cave anymore - on my second attempt to enter, the CtD even prevented creation of an autosave.


The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*

 


#87 Argent77

Argent77
  • Administrator
  • 1397 posts

Posted 16 March 2016 - 02:19 PM

Yes, you have to set:
SetGlobal("A7Quest5", "GLOBAL", 0)
SetGlobal("A7FirstTime", "AR5504", 0)
SetGlobal("A7Q5Intro","AR5504",0)

The latter two can probably only be set in a resource editor since they are updated as soon as you enter the cave.

You could also try to start the game from the command line to see a number of debug messages. Maybe there is a hint to why the game crashes.
 



#88 Roxanne

Roxanne

    Modder

  • Member
  • 3564 posts

Posted 16 March 2016 - 02:51 PM

Yes, you have to set:
SetGlobal("A7Quest5", "GLOBAL", 0)
SetGlobal("A7FirstTime", "AR5504", 0)
SetGlobal("A7Q5Intro","AR5504",0)

The latter two can probably only be set in a resource editor since they are updated as soon as you enter the cave.

You could also try to start the game from the command line to see a number of debug messages. Maybe there is a hint to why the game crashes.
 

It looks like I cannot reproduce the situation after I re-introduced the code again.

So - most likely there was a compile error of some sort.

 

After I had the CtDs, I deleted your code and all was well. At that time I did not check each single line of those blocks,

 

Now I copied it out of the baf and recompiled it (all was done using NI) and now both variations "!InActiveArea("A7Afaaq")" or "False()" work without CtD.

Ergo, what was in the bcs before this *repair* had caused the issue.

 

 

PS - I meanwhile found out why I missed your NPC. I did not recognise that portal animation to be a portal, I took it for the animation of a transport/dryad teleport_spell from one of those spellcasters you fight in the hut


Edited by Roxanne, 16 March 2016 - 02:56 PM.

The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*

 


#89 Argent77

Argent77
  • Administrator
  • 1397 posts

Posted 06 July 2016 - 07:28 AM

Update: Afaaq, the Djinni Companion v2.3

Note: The latest Enhanced Edition patch v2.x adds quest entries into the "Journal" section instead of the "Quest" section of the Journal. This is caused by a new method how quest entries are stored internally by the game which is not yet supported by WeiDU.

Changes in v2.3:

  • Added new side quest: Put Adratha's spirit to rest.
  • Rebalanced Afaaq's "Transfer Knowledge" ability.
  • Made script to keep Afaaq hasted more user-friendly.
  • Fixed incompatibilities with Enhanced Edition patch v2.0.
  • Various internal fixes and optimizations.


#90 Isewein

Isewein
  • Member
  • 98 posts

Posted 30 July 2016 - 04:00 AM

Hello hello,

 

thanks for a great mod! Afaaq was perfectly timed to replace that increasingly useless dragon familiar that died on my charname, both mechanically and storywise! Really fitting for a sorcerer in BG2s pseudo oriental setting to have their very own djinn tagalong.

 

Just wanted to report a little, non-critical bug - for some reason, Afaaq refuses to return to his lamp now. I understand this isn't much of a bug report, since I can't pinpoint when this behaviour started. I did finish his quest when you get teleported to the Rakshasa jungle temple (awesome setting and challenging but well-balanced fights there; great fun!) some time ago. Now when I use PID he obliges in dialogue, but never actually vanishes into the lamp anymore...



#91 Argent77

Argent77
  • Administrator
  • 1397 posts

Posted 30 July 2016 - 07:20 AM

His refusal to retreat into the lamp is most likely caused by an incorrectly set variable. Talk to the djinni and select the option "You are behaving oddly. Care to fix it?". It should fix many states automatically.

If that doesn't work then enter the following line into the debug console while the mouse cursor is placed over the djinni:

CLUAConsole:SetGlobal("BanterActive","LOCALS",0)

Replace "CLUAConsole:" with "C:" on BG2:EE.

If this line doesn't work either then attach a save to your post, so that I can try to fix Afaaq myself.


Edited by Argent77, 30 July 2016 - 07:21 AM.


#92 Isewein

Isewein
  • Member
  • 98 posts

Posted 02 August 2016 - 03:39 AM

just to let you know - I've tried the string fixer before, but cluaing the local did it! thanks:)



#93 Argent77

Argent77
  • Administrator
  • 1397 posts

Posted 02 August 2016 - 06:26 AM

Good to know. I'll incorporate the local fix into the string fixer with the next release.



#94 Roxanne

Roxanne

    Modder

  • Member
  • 3564 posts

Posted 15 September 2016 - 01:32 PM

In EET I have this in A7AfQTLK.bcs

 

:::::

GlobalGT("Chapter","GLOBAL",4)
    Global("BanterPCHeritage","LOCALS",6)
THEN
    RESPONSE #100
        SetInterrupt(FALSE)
        SetGlobal("BanterPCHeritage","LOCALS",7)

 

Should probably be chapter GT 16 in EET, i.e after Irenicus stole your soul in Spellhold.


The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*

 


#95 Argent77

Argent77
  • Administrator
  • 1397 posts

Posted 15 September 2016 - 01:44 PM

Yes, the current version (v2.3) doesn't provide full EET compatibility yet. The chapter numbers and more EET-specific stuff has already been fixed in the development branch. I plan to release a new stable version as soon as WeiDU v240 comes out (which is needed for a couple of features).



#96 Argent77

Argent77
  • Administrator
  • 1397 posts

Posted 29 September 2016 - 11:29 AM

Update: Afaaq, the Djinni Companion v2.4

Changes in v2.4:

  • Added full EET support.
  • Improved Afaaq's correction dialog.
  • Added pieces of advice about BG1 and SoD areas to Afaaq's PID (EET only).
  • Removed a duplicate line in skull purification dialog.
  • Fixed an incorrect condition in Afaaq's introduction talk.
  • Adapted previously hardcoded strings regarding familiars not allowed to execute specific actions (EEs only).
  • Textual fixes in Adratha side quest.


#97 Roxanne

Roxanne

    Modder

  • Member
  • 3564 posts

Posted 29 September 2016 - 12:19 PM

I had the following issue with the version 2.3 when in EET transiting from BG2 to ToB with the djinni. It has probably not been changed in the new version?

Spoiler


The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*

 


#98 Argent77

Argent77
  • Administrator
  • 1397 posts

Posted 29 September 2016 - 12:31 PM

In version 2.3 Afaaq's conversations were triggered incorrectly because of incorrect chapter checks in EET. It should be fixed in v2.4. I'll test it again to make sure.

The cutscene simply summons the djinni if he in his lamp, and is supposed to trigger a specific conversation. If he's already outside of his lamp the same conversation should be automatically triggered from his character script.
 



#99 Argent77

Argent77
  • Administrator
  • 1397 posts

Posted 29 September 2016 - 12:59 PM

Update: I've tried to trigger the conversation that should take place at the beginning of ToB without success in EET. The cause is the variable Global("InToB","GLOBAL") which is automatically set in vanilla BG2:EE when you start ToB, but not set in EET. I'll report it over in the EET forums.


Edited by Argent77, 29 September 2016 - 01:07 PM.


#100 Roxanne

Roxanne

    Modder

  • Member
  • 3564 posts

Posted 29 September 2016 - 01:33 PM

Update: I've tried to trigger the conversation that should take place at the beginning of ToB without success in EET. The cause is the variable Global("InToB","GLOBAL") which is automatically set in vanilla BG2:EE when you start ToB, but not set in EET. I'll report it over in the EET forums.

At least I understand now why my search for wrong chapter on this case did not find the issue.


The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*

 






Also tagged with one or more of these keywords: mod, npc, djinni, bg2, bg2ee