Author Topic: Quest mod virtue compatibility?  (Read 3703 times)

Offline TruePurple

  • Planewalker
  • *****
  • Posts: 19
Quest mod virtue compatibility?
« on: June 28, 2005, 06:23:29 PM »
Virtue values need to be written into each and every quest/npc situation right? Which, if any, quest/npc packs have virtue built in?/Which are compatible with virtue?(so that the virtue scripts don't apply to just part of the game)

A list of all story mods who have virtue values written in as a sticky topic would be nice, or such a list in virtues description text :)

Offline SimDing0™

  • Back In Black
  • Global Moderator
  • Planewalker
  • *****
  • Posts: 3496
  • Gender: Male
  • Word Enhancer
Re: Quest mod virtue compatibility?
« Reply #1 on: July 06, 2005, 01:18:42 PM »
I guess I can try to throw something together. What makes me kinda reluctant though is that a lot of quest mods simply don't need any special handling by Virtue, and I'd have to go through the modlist thinking about which ones it'll work with already as well as which ones I've coded specifically for.

Offline Avenger_teambg

  • Planewalker
  • *****
  • Posts: 399
Re: Quest mod virtue compatibility?
« Reply #2 on: July 10, 2005, 04:48:59 PM »
Instead of working yourself, you could encourage quest mod writers to employ virtue and document it too :)

Offline SimDing0™

  • Back In Black
  • Global Moderator
  • Planewalker
  • *****
  • Posts: 3496
  • Gender: Male
  • Word Enhancer
Re: Quest mod virtue compatibility?
« Reply #3 on: July 11, 2005, 06:44:29 PM »
Possibly. However, the problem then becomes that if another mod wants to check Virtue, the check requires Virtue to be installed or doesn't work properly. There's no way to reliably check Virtue if the mod's installed and reputation if it isn't. (There's an OR block that can sort of do it, but it doesn't allow for uninstalling Virtue mid-game.)

(And we'd end up getting Virtue penalties of 20 for behaving unkindly to Imoen and stuff.)

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: Quest mod virtue compatibility?
« Reply #4 on: July 11, 2005, 06:53:35 PM »
But it doesn't allow for uninstalling Virtue mid-game.
Rewrite this code a little to detect Virtue presence at game-playing time instead than at install time http://forums.pocketplane.net/index.php/topic,19762.msg259321.html#msg259321  :)
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline SimDing0™

  • Back In Black
  • Global Moderator
  • Planewalker
  • *****
  • Posts: 3496
  • Gender: Male
  • Word Enhancer
Re: Quest mod virtue compatibility?
« Reply #5 on: July 11, 2005, 07:32:20 PM »
Okay, yeh, what you're doing there's pretty clever. I can't say I can easily follow all the code, so I've attempted writing my own which probably won't work.

Code: [Select]
<<<<<<<< isthere.baf
IF
Global("D0VirtueInstalled","GLOBAL",0)
THEN
RESPONSE #100
SetGlobal("D0VirtueInstalled","GLOBAL",1)
Continue()
END
>>>>>>>>

<<<<<<<< notthere.baf
IF
Global("D0VirtueInstalled","GLOBAL",1)
THEN
RESPONSE #100
SetGlobal("D0VirtueInstalled","GLOBAL",0)
Continue()
END
>>>>>>>>

ACTION_IF NOT FILE_CONTAINS ~baldur.bcs~ ~D0VirtueInstalled~ BEGIN
EXTEND_TOP + ~baldur.bcs~ ~notthere.baf~
END
ACTION_IF NOT FILE_CONTAINS ~baldur25.bcs~ ~D0VirtueInstalled~ BEGIN
EXTEND_TOP + ~baldur25.bcs~ ~notthere.baf~
END

COPY_EXISTING ~baldur.bcs~ ~override~
REPLACE_BCS_BLOCK ~notthere.baf~ ~isthere.baf~
COPY_EXISTING ~baldur25.bcs~ ~override~
REPLACE_BCS_BLOCK ~notthere.baf~ ~isthere.baf~

I'm using the hypothetical EXTEND_TOP + that somebody, probably you, suggested on the WeiDU forum the other day. Now that I look back, a lot of your code looks to be faking this behaviour with the tempbaldur and stuff.

This method still falls down if somebody reinstalls the game completely but keeps their savegames, but I guess that's an obscure enough scenario to be forgivable.

I must say, if I implement this, I'll be pretty impressed if people actually bother adding Virtue support to their mods. :)

Offline Bex

  • black marketeer
  • Planewalker
  • *****
  • Posts: 683
Re: Quest mod virtue compatibility?
« Reply #6 on: July 11, 2005, 07:37:15 PM »
If I could actually, like, code and stuff, I, like, totally would.
Silverjon's Journal: a Baldur's Gate fanfic/semi-AAR, by yours truly

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: Quest mod virtue compatibility?
« Reply #7 on: July 11, 2005, 09:04:58 PM »
Okay, yeh, what you're doing there's pretty clever. I can't say I can easily follow all the code, so I've attempted writing my own which probably won't work.

Code: [Select]
<<<<<<<< isthere.baf
IF
Global("D0VirtueInstalled","GLOBAL",0)
THEN
RESPONSE #100
SetGlobal("D0VirtueInstalled","GLOBAL",1)
Continue()
END
>>>>>>>>

<<<<<<<< notthere.baf
IF
Global("D0VirtueInstalled","GLOBAL",1)
THEN
RESPONSE #100
SetGlobal("D0VirtueInstalled","GLOBAL",0)
Continue()
END
>>>>>>>>

ACTION_IF NOT FILE_CONTAINS ~baldur.bcs~ ~D0VirtueInstalled~ BEGIN
EXTEND_TOP + ~baldur.bcs~ ~notthere.baf~
END
ACTION_IF NOT FILE_CONTAINS ~baldur25.bcs~ ~D0VirtueInstalled~ BEGIN
EXTEND_TOP + ~baldur25.bcs~ ~notthere.baf~
END

COPY_EXISTING ~baldur.bcs~ ~override~
REPLACE_BCS_BLOCK ~notthere.baf~ ~isthere.baf~
COPY_EXISTING ~baldur25.bcs~ ~override~
REPLACE_BCS_BLOCK ~notthere.baf~ ~isthere.baf~

I'm using the hypothetical EXTEND_TOP + that somebody, probably you, suggested on the WeiDU forum the other day. Now that I look back, a lot of your code looks to be faking this behaviour with the tempbaldur and stuff.
Yeah, that code seems to be correct (although FILE_CONTAINS search for files (as in COPY) instead of gamefiles (as in COPY_EXISTING), so you need to manually extract baldur.bcs and baldur25.bcs to the override with the + option and then use FILE_CONTAINS ~override/foo~).
tempbaldur was (as you guessed) to fake the EXTEND_TOP + option.
Finally, to keep existing code correct I'd set d0virtuedisable to 1 if Virtue is not installed (add proper IF/THEN block to notthere.baf), and instead of d0virtueinstalled I'd use virtuesetup.

Quote
This method still falls down if somebody reinstalls the game completely but keeps their savegames, but I guess that's an obscure enough scenario to be forgivable.
There is a line where the user must have half a brain after all; however, setting it further is better than keeping it where it is now  ;)

Quote
I must say, if I implement this, I'll be pretty impressed if people actually bother adding Virtue support to their mods. :)
I'd certainly do this - meaning I'll patch all the code in Refinements, Mazzy the Palaidn and tb#quest, and will gently ask Quitch&Littiz to review all hundred or so of pages of RtW code. *loads gun*
« Last Edit: July 12, 2005, 07:25:57 AM by the bigg »
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: