Author Topic: Offering new component for UB  (Read 43670 times)

Offline plainab

  • Sasha al'Therin
  • Planewalker
  • *****
  • Posts: 491
    • Infinity Engine Modding
Re: Offering new component for UB
« Reply #125 on: March 04, 2012, 08:34:57 AM »
Quote
I pretty much already gave you permission.
If I hadn't ask the idea of a choice wouldn't have come up. :) I will give Tuu/BGT players the choice then.
touche

Quote
How do I disable the exp. for opening a specific container? *panic*
idk that's why i asked

Quote
And now i feel dumb: The journal title in your package is the EasyTutu title? Then of course I will use that one for the Tutu-install. Changing the ingame-ones would be an idea, but that would be another tweak I am not sure is in the scope of this mod.
yes it is the EasyTutu title.  and changing in game journal titles to match for both versions was just a passing thought, nothing to be acted upon unless you wished to do so.
My working mods:
an AI Party Script for BG2 game engine DOWNLOAD LINK ONLY!
Interactive Tweaks for BG series with some IWD support. DOWNLOAD LINK ONLY!
Rest For 8 Hours an IWD mod
-------------------------------------------
My contributions: BG1Fixpack, BG1Tweaks
On Hold: Solestia an NPC for SOA
-------------------------------------------
My website: http://sasha-altherin.webs.com

Offline Miloch

  • Barbarian
  • Planewalker
  • *****
  • Posts: 1032
  • Gender: Male
Re: Offering new component for UB
« Reply #126 on: March 07, 2012, 11:46:38 PM »
Either UB or jastey's BGQE (I forget which I looked at) titles all journal entries, and does not bother removing them for BG1 installs (because BG1 typically has no journal entry titles). Personally, I don't think it's worth worrying about for BG1. If anything, the tweak could go the other way (title all journal entries for BG1) - having a few entries with titles in BG1 is no big deal IMO.

Nevermind - didn't read the history for that comment :P. As for disabling Xp for a single container, I don't know if you can, aside from maybe trapping that with a negative XP malus (if even that's possible in BG1). But that's another thing I probably wouldn't worry about.
« Last Edit: March 07, 2012, 11:49:33 PM by Miloch »

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Re: Offering new component for UB
« Reply #127 on: March 11, 2012, 07:44:32 AM »
Quote
I will give Tuu/BGT players the choice then.
Argh, I just realized I'd need: two Tutu versions (one with enabling the containers, one using the BG1 version), two BGT versions (as it is slighty different especially regarding oublek.dlg), and the BG1 version..

Sorry for making false promises but I will just stick to the disable/enable case for Tutu/BGT, as it makes implementing and testing a lot easier.  :-[

The XP for opening the eyes for BGT/Tutu we have to live with, I guess. It's the price for having lock difficulties.
« Last Edit: March 11, 2012, 07:46:07 AM by jastey »

Offline plainab

  • Sasha al'Therin
  • Planewalker
  • *****
  • Posts: 491
    • Infinity Engine Modding
Re: Offering new component for UB
« Reply #128 on: March 11, 2012, 09:45:54 AM »
Quote
I will give Tuu/BGT players the choice then.
Argh, I just realized I'd need: two Tutu versions (one with enabling the containers, one using the BG1 version), two BGT versions (as it is slighty different especially regarding oublek.dlg), and the BG1 version..

Sorry for making false promises but I will just stick to the disable/enable case for Tutu/BGT, as it makes implementing and testing a lot easier.  :-[

The XP for opening the eyes for BGT/Tutu we have to live with, I guess. It's the price for having lock difficulties.
not so hard as you may think...

You already have the BG method & Tutu version of the BG method (I linked them to you in an earlier post). You yourself are converting it into the container/enable method.  So as long as you don't overwrite the Tutu files with the BG2 changes you will already have the two methods available for Tutu.   For BGT, just copy those two Tutu setups and change file names & journal titles as needed.
My working mods:
an AI Party Script for BG2 game engine DOWNLOAD LINK ONLY!
Interactive Tweaks for BG series with some IWD support. DOWNLOAD LINK ONLY!
Rest For 8 Hours an IWD mod
-------------------------------------------
My contributions: BG1Fixpack, BG1Tweaks
On Hold: Solestia an NPC for SOA
-------------------------------------------
My website: http://sasha-altherin.webs.com

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Re: Offering new component for UB
« Reply #129 on: March 11, 2012, 10:21:10 AM »
I know, but this is a maintaining catastrophy - I know from experience that my willingness to fix reported bugs is inversely proportional to the number of mostly-similar files I have to keep track of.

Offline plainab

  • Sasha al'Therin
  • Planewalker
  • *****
  • Posts: 491
    • Infinity Engine Modding
Re: Offering new component for UB
« Reply #130 on: March 11, 2012, 02:49:34 PM »
I know, but this is a maintaining catastrophy - I know from experience that my willingness to fix reported bugs is inversely proportional to the number of mostly-similar files I have to keep track of.
oh I see...

well given my familiarity with the project you could always shoot me a PM if you needed help squashing any bugs should something arise...  tho i'd need exact details as to the reporting players setup and what they did so that I could try replicating the problem.

let me ponder some possibilities that I think may help reduce the # of 'mostly-similar files'
My working mods:
an AI Party Script for BG2 game engine DOWNLOAD LINK ONLY!
Interactive Tweaks for BG series with some IWD support. DOWNLOAD LINK ONLY!
Rest For 8 Hours an IWD mod
-------------------------------------------
My contributions: BG1Fixpack, BG1Tweaks
On Hold: Solestia an NPC for SOA
-------------------------------------------
My website: http://sasha-altherin.webs.com

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Re: Offering new component for UB
« Reply #131 on: March 11, 2012, 03:14:17 PM »
Thanks! I didn't mean to imply I am expecting bug reports, though. It is more of a principle thought. And if I wouldn't be so excited about the enabling/disabling feature in the BGII engine, I wouldn't try to have it by all means and just use your version..

Offline plainab

  • Sasha al'Therin
  • Planewalker
  • *****
  • Posts: 491
    • Infinity Engine Modding
Re: Offering new component for UB
« Reply #132 on: March 11, 2012, 04:55:51 PM »
do you have a library already in place for variable substitution for between the 3 platforms?

something like you have for journal entry stuff as you pointed out to Miloch here

If so could you please share?  thanks

EDIT: realized that may not be clear enough...   I'm referring to changes between file names...
My working mods:
an AI Party Script for BG2 game engine DOWNLOAD LINK ONLY!
Interactive Tweaks for BG series with some IWD support. DOWNLOAD LINK ONLY!
Rest For 8 Hours an IWD mod
-------------------------------------------
My contributions: BG1Fixpack, BG1Tweaks
On Hold: Solestia an NPC for SOA
-------------------------------------------
My website: http://sasha-altherin.webs.com

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Re: Offering new component for UB
« Reply #133 on: March 11, 2012, 05:59:51 PM »
You mean the crossmod %tutu_var% stuff?  Cannot attach right now (wrong computer). In the current download there is a lib with OUTER_SPRINT for area file names etcpp., I think.

Offline plainab

  • Sasha al'Therin
  • Planewalker
  • *****
  • Posts: 491
    • Infinity Engine Modding
Re: Offering new component for UB
« Reply #134 on: March 11, 2012, 06:18:46 PM »
yeah I'd read up in the thread (first page) where Miloch had mentioned it was there.  pulled it out and took a look at.  it's been helpful.  I  just hope my little idea works  :P

won't know till I actually get to test the install...
My working mods:
an AI Party Script for BG2 game engine DOWNLOAD LINK ONLY!
Interactive Tweaks for BG series with some IWD support. DOWNLOAD LINK ONLY!
Rest For 8 Hours an IWD mod
-------------------------------------------
My contributions: BG1Fixpack, BG1Tweaks
On Hold: Solestia an NPC for SOA
-------------------------------------------
My website: http://sasha-altherin.webs.com

Offline plainab

  • Sasha al'Therin
  • Planewalker
  • *****
  • Posts: 491
    • Infinity Engine Modding
Re: Offering new component for UB
« Reply #135 on: March 11, 2012, 09:49:45 PM »
I think I've got something that works for all platforms, does both methods and has only 1 copy of each file to be maintained.

course there are 4 library files containing variables specific to each platform.  I used the same names as the ones you'd shared (in the G3 thread) cause they were based off of that but they can easily be renamed to prevent confusion.  And there are method specific variables listed under the appropriate subcomponent options.

Also do note that the EraseJournalEntry() substitution thing did not work for me.  I still had to copy & decompile the file and do a replace to get the strings to show up.  However the solved & unsolved journal variable substitution did work fine.

Please put it thru it's paces. I only tested installation and examination of files.  I did not test in game behavior.

Should work for BG, BG-ToTSC, BGT, & all variants Tutu

http://sasha-altherin.webs.com/mods/abPrismEmeraldsv2.7z

EDIT:  if you can get the journal entries to behave properly, that would be cool.  perhaps there was something I missed but it just wasn't working for me.
Also corrected the add journal entries, didn't realize that the QUEST & QUEST_DONE variables were meant for that...  so if you already got it before I edited the post, you need to get it again sorry.
« Last Edit: March 11, 2012, 10:05:27 PM by plainab »
My working mods:
an AI Party Script for BG2 game engine DOWNLOAD LINK ONLY!
Interactive Tweaks for BG series with some IWD support. DOWNLOAD LINK ONLY!
Rest For 8 Hours an IWD mod
-------------------------------------------
My contributions: BG1Fixpack, BG1Tweaks
On Hold: Solestia an NPC for SOA
-------------------------------------------
My website: http://sasha-altherin.webs.com

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Re: Offering new component for UB
« Reply #136 on: March 12, 2012, 03:08:55 AM »
Very cool. I will have a look at it.

Offline plainab

  • Sasha al'Therin
  • Planewalker
  • *****
  • Posts: 491
    • Infinity Engine Modding
Re: Offering new component for UB
« Reply #137 on: April 03, 2012, 09:46:39 PM »
so was playing BGT with a bunch of mods and I included this Prism component to get a feel as to how it fit in etc...

ran into a scenario that needs to be addressed.  tho testing in BG1 indicated it was ok.

first to be on even footing, I installed the BG1 style option.

situation was this:
Montaron went in to pickpocket and got a gem, he bluffed his way out and left.
He then went in to pickpocket the other gem, he failed.  Prism turned hostile and the party killed him.
The container's were not unlocked and the gems stayed inside.

Perhaps in my testing I gave more time for him to process his scripts etc...  Or BG1 handles variables differently than BG2.

One of these script blocks should have been triggered.
Code: [Select]
IF
Allegiance(Myself,ENEMY)
Global("abgf_GemInEye","GLOBAL",0)
THEN
RESPONSE #100
Unlock("A6StatueRightEye")
Unlock("A6StatueLeftEye")
ActionOverride("A6StatueRightEye",DestroyItem("abgfEyeR")) // Emerald
ActionOverride("A6StatueLeftEye",DestroyItem("abgfEyeL")) // Emerald
Attack(NearestEnemyOf(Myself))
END

IF
Die()
Global("abgf_GemInEye","GLOBAL",0)
THEN
RESPONSE #100
Unlock("A6StatueRightEye")
Unlock("A6StatueLeftEye")
ActionOverride("A6StatueRightEye",DestroyItem("abgfEyeR")) // Emerald
ActionOverride("A6StatueLeftEye",DestroyItem("abgfEyeL")) // Emerald
END
Could it be the fact that these two blocks are at the bottom of the script be an issue?  Should they be at the top instead?

Is this something you can test prior to releasing? 
It shouldn't hurt to move them both to the top of the script.
Also might be a good idea to change the global check to a negative.  Its set to 3 in the dialog file if they're supposed to stay inside the containers.
Who knows maybe BG2 engine doesn't see it as 0 if it hasn't been set yet, tho that would be fishy as there are many scripts that use a 0 value for those which aren't yet set
My working mods:
an AI Party Script for BG2 game engine DOWNLOAD LINK ONLY!
Interactive Tweaks for BG series with some IWD support. DOWNLOAD LINK ONLY!
Rest For 8 Hours an IWD mod
-------------------------------------------
My contributions: BG1Fixpack, BG1Tweaks
On Hold: Solestia an NPC for SOA
-------------------------------------------
My website: http://sasha-altherin.webs.com

jastey_guest

  • Guest
Re: Offering new component for UB
« Reply #138 on: April 04, 2012, 02:36:32 AM »
I once learned that the "Die()" commant can fail if the creature dies too fast, i.e. if the script block doesn't run in exact that moment. So, putting them on top of the file would be good, I think. Later someone said it isn't quite as that so I am confused. Did you test it several times in a row?

To be sure and safe, the two checks could be added to the area script, instead, with Dead() check (instead of Die(), obviously).

The variable handling is the same in BGII, variable =0 works if the variable wasn't set yet.

Also: I notice in the posted script blocks, that the checking variable doesn't get set? The blocks loop that way. If Prism is hostile, the Die() block never gets executed (intheory, it doesn't have to, but looping script blocks are never good). If the "abgf_GemInEye" variable is needed elsewhere, a variable should be added to the block(s), especially if putting them on top of the file.
The looping shouldn't have prevented the emptying of the eyes, though.

Another question: If one gem is pick-pocketed, shouldn't also one gem of the eyes be destroyed instantly? Can't recall whether this is covered, just a thought because you wrote that the gems in the eyes are still there after one was stolen from Prism?

Offline plainab

  • Sasha al'Therin
  • Planewalker
  • *****
  • Posts: 491
    • Infinity Engine Modding
Re: Offering new component for UB
« Reply #139 on: April 04, 2012, 08:21:28 AM »
Quote
Another question: If one gem is pick-pocketed, shouldn't also one gem of the eyes be destroyed instantly? Can't recall whether this is covered, just a thought because you wrote that the gems in the eyes are still there after one was stolen from Prism?
its done via dialog, but the option to 'bluff' your way out doesn't do anything about the gems.  because as long as player has one and prism has one there is still the option for the player to give it back and go through the scenario with greywolf.  so the gems still need to be there in the container.

this is only the case on the BG1 style.  The BG2 style keeps the containers disabled until needed.

Quote
Also: I notice in the posted script blocks, that the checking variable doesn't get set? The blocks loop that way. If Prism is hostile, the Die() block never gets executed (intheory, it doesn't have to, but looping script blocks are never good). If the "abgf_GemInEye" variable is needed elsewhere, a variable should be added to the block(s), especially if putting them on top of the file.
The looping shouldn't have prevented the emptying of the eyes, though.
It gets set to 3 in dialog so that these blocks don't trigger else it's possible that when he kills himself in the scenario with greywolf that the Die() block will trigger.  I suppose they could be set to 1 if either one happens... Could using the SPRITE_IS_DEAD variable check be of use here instead of Die()?

Quote
I once learned that the "Die()" commant can fail if the creature dies too fast, i.e. if the script block doesn't run in exact that moment. So, putting them on top of the file would be good, I think. Later someone said it isn't quite as that so I am confused. Did you test it several times in a row?
No.  I didn't have saves setup for testing of Prism.  didn't even think about it.  I was just passing by and thought, hmm  Monty has decent pickpocket skills, lets try.  Then as an after thought, I checked the containers.  At least the variables were properly set to not do a rep loss in that case. 

Fixpack testing of container traps indicate that container scripts parse just as often as all other scripts in game.  Could it be useful to add a Dead() check there as a back up?  I want to avoid making as many changes to existing files as possible, only adjust what I need to tie into.  The more you tamper with game files the more you risk incompatibilities.
My working mods:
an AI Party Script for BG2 game engine DOWNLOAD LINK ONLY!
Interactive Tweaks for BG series with some IWD support. DOWNLOAD LINK ONLY!
Rest For 8 Hours an IWD mod
-------------------------------------------
My contributions: BG1Fixpack, BG1Tweaks
On Hold: Solestia an NPC for SOA
-------------------------------------------
My website: http://sasha-altherin.webs.com

Offline plainab

  • Sasha al'Therin
  • Planewalker
  • *****
  • Posts: 491
    • Infinity Engine Modding
Re: Offering new component for UB
« Reply #140 on: April 04, 2012, 11:56:45 AM »
There are more issues with the BGT version than I thought.

My fault for assuming that both would be using the same actions

the change where both gems are taken at once (in either path) doesn't get applied to Oublek because BGT changes GivePartyGold into GiveGoldForce.  So as it is now, the party still gets the gold but the gems aren't taken at all  :(

gonna have to redevelop the platform specific code.  good thing I made a clean BGT install.  i can clua and test things there

edit: didn't take long to work out the vars.  just need time to test, then repack & re-upload

edit2... and i jump the gun.  a clean bgt install uses GivePartyGold.  there must be another mod that changes it -.-

Quote
Mods affecting OUBLEK.DLG:
00000: /* from game biffs */ ~SETUP-BGT.TP2~ 0 0 // Baldur's Gate Trilogy - Core: 1.14 (28 Jan 12)
00001: /* acted upon in an indetectable manner */~SETUP-BGT.TP2~ 0 0 // Baldur's Gate Trilogy - Core: 1.14 (28 Jan 12)
00002: /* acted upon in an indetectable manner */~SETUP-BGT.TP2~ 0 0 // Baldur's Gate Trilogy - Core: 1.14 (28 Jan 12)
00003: /* from game biffs */ ~BG1NPC.TP2~ 0 1 // The BG1 NPC Project: Banters, Quests, and Interjections: v20
00004: ~GAVIN/GAVIN.TP2~ 0 0 // Gavin NPC for Tutu and BGT, 14April2008: v8
00005: ~AURORA/SETUP-AURORA.TP2~ 0 257 // Change quest gold rewards -> Fixes only: v5
00006: ~ABPRISMEMERALDS/ABPRISMEMERALDS.TP2~ 0 0 // Prism and the Emeralds Tweak -> BG Style
and the culprit is Aurora.  easiest is to insist on Aurora being installed after UB, but i suppose a check can be put in.  tho Aurora would want to "fix" what I add I'm sure....

guess Miloch needs to chip in here now
« Last Edit: April 04, 2012, 12:27:39 PM by plainab »
My working mods:
an AI Party Script for BG2 game engine DOWNLOAD LINK ONLY!
Interactive Tweaks for BG series with some IWD support. DOWNLOAD LINK ONLY!
Rest For 8 Hours an IWD mod
-------------------------------------------
My contributions: BG1Fixpack, BG1Tweaks
On Hold: Solestia an NPC for SOA
-------------------------------------------
My website: http://sasha-altherin.webs.com

Offline Miloch

  • Barbarian
  • Planewalker
  • *****
  • Posts: 1032
  • Gender: Male
Re: Offering new component for UB
« Reply #141 on: April 04, 2012, 01:16:11 PM »
Aurora's quest rewards fix component addresses issues where a certain reward is promised but the .cre hasn't the funds to deliver the reward, thus we change GivePartyGold to GiveGoldForce. Ordinarily, UB would be installed before Aurora (if you follow the Tutu/BWP install guides, Aurora readme etc.). But if you're aiming for maximum compatibility, you should account for whatever mods may have changed the dialogue, which should be fairly easy to do in this case anyway.

Die() checks need to be Continue()d if there are multiple such checks, which you can never be sure of due to mods etc. Otherwise only the first Die() will execute (and should be the first or at least an early block in the script blocks). StateCheck("cre",4032) is a more reliable check, but is usually triggered from scripts other than the creature running the script. Dead() does not always capture some death states, hence the StateCheck(..,4032) checks all of them.

I think these blocks make more sense in the area script as far as unlocking containers etc. The Attack behaviour is probably already in his default script, or belongs there anyway. If Enemy() then attack nearest enemy is pretty standard... Not sure who that's supposed to refer to though. Greywolf has a standard wtasight attack script, whereas Prism has a standard wtrunsgt runaway script, both of which I think are appropriate (I don't see Prism going on the offensive like Greywolf would if provoked.)

Offline plainab

  • Sasha al'Therin
  • Planewalker
  • *****
  • Posts: 491
    • Infinity Engine Modding
Re: Offering new component for UB
« Reply #142 on: April 04, 2012, 02:12:25 PM »
Quote
Aurora's quest rewards fix component addresses issues where a certain reward is promised but the .cre hasn't the funds to deliver the reward, thus we change GivePartyGold to GiveGoldForce. Ordinarily, UB would be installed before Aurora (if you follow the Tutu/BWP install guides, Aurora readme etc.). But if you're aiming for maximum compatibility, you should account for whatever mods may have changed the dialogue, which should be fairly easy to do in this case anyway.

But Prism isn't part of UB yet.  UB (both of them) were installed before Aurora.  I forgot about Prism till after Aurora.

And yes there should be a check, just in case someone does something stupid like I did.  I've never put in checks for a specific mod's component before.  I've already got a variable for it, just need to know what the check would be in this case...


******
I am confused tho.  How does Oublek qualify for such a change by Aurora?  He starts with 3000 gold in the fixpacked only BGT and even if you include the 1k forced gold & all the GivePartyGold actions despite that not all of them will be possible he has 950 gold left over.  Unless you are compensating for pickpocketing him there is no reason to make the adjustment.... 
My working mods:
an AI Party Script for BG2 game engine DOWNLOAD LINK ONLY!
Interactive Tweaks for BG series with some IWD support. DOWNLOAD LINK ONLY!
Rest For 8 Hours an IWD mod
-------------------------------------------
My contributions: BG1Fixpack, BG1Tweaks
On Hold: Solestia an NPC for SOA
-------------------------------------------
My website: http://sasha-altherin.webs.com

Offline Miloch

  • Barbarian
  • Planewalker
  • *****
  • Posts: 1032
  • Gender: Male
Re: Offering new component for UB
« Reply #143 on: April 04, 2012, 02:43:53 PM »
Dunno what exactly you're doing via code (I can only see one page up while posting and the only code I see is the aforementioned script block) but I don't know that you need to check for a specific mod. If you're doing some sort of REPLACE_* on GivePartyGold then just duplicate it for GiveGoldForce under the same terms. If it's there, it will be replaced too, if not, it will do nothing.

I don't want to digress too much on Aurora here since it has little to do with UB (apart from the mirror restoration etc. mentioned in another thread), but you may want to read the Components section in the readme and also the ag_quest*.tpa files in the mod's lib folder. In short, we nerf a handful of CREs who have over-the-top gold amounts (to prevent uberlooting exploits, yes, Oublek being one); in any case, we would have to account for the "Change creature gold carried" component which could potentially reduce a quest-giver's gold below what they're promising despite other changes in the quest gold component. (In retrospect, now that I look at the code, we should've used REPLACE_ACTION_TEXT or the like instead of DECOMPILE/REPLACE_TEXTUALLY on .dlg files, but that is even more irrelevant here. I suspect we weren't fully aware of those commands at the time and/or they can be somewhat counterintuitive to use since they require compiling .d pseudofiles... by "we" I mean GeN1e/Ardanis and I, since I can't take sole credit for these components.)

Edit: if you really do need to detect the component, it's probably best to use BUFFER_INDEX or the like to look for GiveGoldForce in the .dlg file. You could also use ACTION/PATCH_IF MOD_IS_INSTALLED setup-aurora.tp2 241 ... 257, but that is more cumbersome in this case, due to the number of alternative subcomponents that do similar things. I vaguely recall asking the bigg for a MOD_IS_INSTALLED subcomponent catchall but don't know if it was ever implemented.
« Last Edit: April 04, 2012, 02:48:01 PM by Miloch »

Offline plainab

  • Sasha al'Therin
  • Planewalker
  • *****
  • Posts: 491
    • Infinity Engine Modding
Re: Offering new component for UB
« Reply #144 on: April 04, 2012, 03:36:05 PM »
so this then will be okay to do without any sort of checks against other mods?
Code: [Select]
REPLACE_TRANS_ACTION ~%tutu_var%oublek~ BEGIN %BGT_DiffState% END BEGIN 0 END ~GivePartyGold(150)~ ~GivePartyGold(150) TakePartyItem("abgfEyeL") TakePartyItem("abgfEyeR") %ERASEJOURNALENTRY_0% %ERASEJOURNALENTRY_1% %ERASEJOURNALENTRY_2% %ERASEJOURNALENTRY_3% %ERASEJOURNALENTRY_4% %ERASEJOURNALENTRY_5%~
REPLACE_TRANS_ACTION ~%tutu_var%oublek~ BEGIN %BGT_DiffState% END BEGIN 0 END ~GiveGoldForce(150)~ ~GiveGoldForce(150) TakePartyItem("abgfEyeL") TakePartyItem("abgfEyeR") %ERASEJOURNALENTRY_0% %ERASEJOURNALENTRY_1% %ERASEJOURNALENTRY_2% %ERASEJOURNALENTRY_3% %ERASEJOURNALENTRY_4% %ERASEJOURNALENTRY_5%~
and in another spot
Code: [Select]
REPLACE_TRANS_ACTION ~%tutu_var%oublek~ BEGIN 4 END BEGIN 0 END ~GivePartyGold(300)~ ~GivePartyGold(300) TakePartyItem("abgfEyeL") TakePartyItem("abgfEyeR") %ERASEJOURNALENTRY_0% %ERASEJOURNALENTRY_1% %ERASEJOURNALENTRY_2% %ERASEJOURNALENTRY_3% %ERASEJOURNALENTRY_4% %ERASEJOURNALENTRY_5%~
REPLACE_TRANS_ACTION ~%tutu_var%oublek~ BEGIN 4 END BEGIN 0 END ~GiveGoldForce(300)~ ~GiveGoldForce(300) TakePartyItem("abgfEyeL") TakePartyItem("abgfEyeR") %ERASEJOURNALENTRY_0% %ERASEJOURNALENTRY_1% %ERASEJOURNALENTRY_2% %ERASEJOURNALENTRY_3% %ERASEJOURNALENTRY_4% %ERASEJOURNALENTRY_5%~
My working mods:
an AI Party Script for BG2 game engine DOWNLOAD LINK ONLY!
Interactive Tweaks for BG series with some IWD support. DOWNLOAD LINK ONLY!
Rest For 8 Hours an IWD mod
-------------------------------------------
My contributions: BG1Fixpack, BG1Tweaks
On Hold: Solestia an NPC for SOA
-------------------------------------------
My website: http://sasha-altherin.webs.com

Offline plainab

  • Sasha al'Therin
  • Planewalker
  • *****
  • Posts: 491
    • Infinity Engine Modding
Re: Offering new component for UB
« Reply #145 on: April 04, 2012, 06:44:26 PM »
Tested on BGT with only BG2 Fixpack prior to BGT conversion.
Used that bit I quoted above for the Gold awards and it seems to work so far. 
Moved the two script blocks to the top & put the Die() block as very first.
Scoured the code and determined that I should actually set the global on those blocks to 3 after they've been activated.
Put a backup block on the container script which checks for Prism to be Dead().

With a level 8 imported thief from the BG2 SoA characters, I tried to pickpocket him, failed, he turned hostile and I killed him.  gems gone from the container.  did this a few more times and had the same result.  Then reloaded and tried to kill him while his circle was still blue.  was successful a couple times and the gems were gone from the container.

Finally took the gems to oublek and turned them in together and he took 'em both as he should.

So unless it's something insane like script bog down from an insane amount of mods, I think this should be working now.

http://sasha-altherin.webs.com/mods/abPrismEmeraldsv3.7z
« Last Edit: April 22, 2012, 07:38:13 AM by plainab »
My working mods:
an AI Party Script for BG2 game engine DOWNLOAD LINK ONLY!
Interactive Tweaks for BG series with some IWD support. DOWNLOAD LINK ONLY!
Rest For 8 Hours an IWD mod
-------------------------------------------
My contributions: BG1Fixpack, BG1Tweaks
On Hold: Solestia an NPC for SOA
-------------------------------------------
My website: http://sasha-altherin.webs.com

Offline Miloch

  • Barbarian
  • Planewalker
  • *****
  • Posts: 1032
  • Gender: Male
Re: Offering new component for UB
« Reply #146 on: April 04, 2012, 09:52:53 PM »
Scoured the code and determined that I should actually set the global on those blocks to 3 after they've been activated.
Isn't that sort of what jastey said? Or are you just saying you had to verify what the value should be...

Since you're not actually changing the gold amount, is it necessary to use that as the text you're replacing or is that all there is? Should be able to use regexp on it anyway, just in case some other mod's changed the gold amount.

Offline plainab

  • Sasha al'Therin
  • Planewalker
  • *****
  • Posts: 491
    • Infinity Engine Modding
Re: Offering new component for UB
« Reply #147 on: April 05, 2012, 12:13:25 AM »
Scoured the code and determined that I should actually set the global on those blocks to 3 after they've been activated.
Isn't that sort of what jastey said? Or are you just saying you had to verify what the value should be...
I needed to verify cause on the surface it was only set to 3 in the dialog.  There is a variable that's replaced depending upon the method chosen at install time and inside the definition of said variable was where it got set to 1.  Gotta remember it's been a few weeks since I'd last looked at any of this.  :P

Quote
Since you're not actually changing the gold amount, is it necessary to use that as the text you're replacing or is that all there is? Should be able to use regexp on it anyway, just in case some other mod's changed the gold amount.
I would have simply replaced the TakePartyItem action BUT there are two of them and it would cause unneeded duplication.  So I remove the existing TakePartyItem actions first from those two states and then what's left is the give gold action and some erase journal entries.  Since journal strrefs can be different across platforms, it is safer to use the give gold action to tie in the new actions.

REGEXP in a .d file?  how?
do note any .d file regexp in the BG1 fixpack is copied from something else.  I don't know what it means, just that it works.
My working mods:
an AI Party Script for BG2 game engine DOWNLOAD LINK ONLY!
Interactive Tweaks for BG series with some IWD support. DOWNLOAD LINK ONLY!
Rest For 8 Hours an IWD mod
-------------------------------------------
My contributions: BG1Fixpack, BG1Tweaks
On Hold: Solestia an NPC for SOA
-------------------------------------------
My website: http://sasha-altherin.webs.com

Offline Miloch

  • Barbarian
  • Planewalker
  • *****
  • Posts: 1032
  • Gender: Male
Re: Offering new component for UB
« Reply #148 on: April 05, 2012, 08:39:23 AM »
REGEXP in a .d file?  how?
do note any .d file regexp in the BG1 fixpack is copied from something else.  I don't know what it means, just that it works.
There is a regexp section in the WeiDU documentation and also a REPLACE_ACTION_TEXT example that uses regexp (sort of). Something like this should work:

REPLACE_TRANS_ACTION ~%tutu_var%oublek~ BEGIN %BGT_DiffState% END BEGIN 0 END ~GivePartyGold(\([0-9]+\))~ ~GivePartyGold(\1) TakePartyItem... etc.~

Offline plainab

  • Sasha al'Therin
  • Planewalker
  • *****
  • Posts: 491
    • Infinity Engine Modding
Re: Offering new component for UB
« Reply #149 on: April 05, 2012, 09:00:50 AM »
REGEXP in a .d file?  how?
do note any .d file regexp in the BG1 fixpack is copied from something else.  I don't know what it means, just that it works.
There is a regexp section in the WeiDU documentation and also a REPLACE_ACTION_TEXT example that uses regexp (sort of). Something like this should work:

REPLACE_TRANS_ACTION ~%tutu_var%oublek~ BEGIN %BGT_DiffState% END BEGIN 0 END ~GivePartyGold(\([0-9]+\))~ ~GivePartyGold(\1) TakePartyItem... etc.~
yeah i know about the regexp section in weidu readme.  it doesn't make sense to me.  All I know is from my old dos days where * meant anything and I could narrow down by placing it among characters I knew were in what I wanted.  Looking at what you have here I don't see how it does it.  I'm not doubting that it works, I just don't understand it.
My working mods:
an AI Party Script for BG2 game engine DOWNLOAD LINK ONLY!
Interactive Tweaks for BG series with some IWD support. DOWNLOAD LINK ONLY!
Rest For 8 Hours an IWD mod
-------------------------------------------
My contributions: BG1Fixpack, BG1Tweaks
On Hold: Solestia an NPC for SOA
-------------------------------------------
My website: http://sasha-altherin.webs.com

 

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)?: