Post reply

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:
Subject:
Message icon:

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

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: cmorgan
« on: August 26, 2008, 08:44:37 AM »

EDIT: never mind - read too fast. You came to this conclusion already. I tyoped it, so I will leave it, but ignore it.

Plainab, the real (technical) difficulty here is twofold:

PATCH_IF (~%text_value%~ STRING_EQUAL ~This would be exact copy of text taken from desired state I want to branch from~) BEGIN

This means you would need to match .tra references to standard game, GTU updates, Baldurdash GTU, localized translations/repairs, Fixpack (either BG one you are working on or BG2, UB repairs, etc., etc. If you do it via regexp, you risk patching the wrong state completely. And if you match a mod .tra reference, then it is ebven worse, as every time they implememnt editorial stuff or correct spelling, your patch fails.

The second is pretty straightforward - in order for players to see your mod added content, you would have to be last in the install order. One huge strength of not doing this solo and instead adding to crossmod content is that the mod is designed to take all existing NPCs (in any order) and detect their installation, then pathc in added content customized to the users install, just as you are suggesting.

Given STATE_WHICH_SAYS (similar limitations) and install order problems, I think your best bet is to add this/submit this to crossmod. If the authors do not agree to your changes or are unavailable, then you can build an "adon" mod that ships alongside your mod; a mini-crossmod pack that is installed at the end along with banterpack and crossmod.

Or, be safest - add a script block or I_C_T a variable into place, and trigger a separate dialog.
Posted by: plainab
« on: August 26, 2008, 07:11:43 AM »

Why don't you just use STATE_WHICH_SAYS like in Crossmod?
Cause that's one of them new things in Weidu, that I just haven't wrapped my brain around yet. Besides, I'm waiting for the "Cliff Notes" to come out....  ;D

No seriously, I hadn't delved into Crossmod yet to see what they did. I had an inspirational thought on that last post and shared it. The safest bet (and that is what I prefer to do - be safe rather than sorry) is to after checks to see if other mod exists apply a script block that looks for the other mods triggers and have an external banter about the situation rather than include the banter in the actual discussion.  So I will stick with that for now.... 
Posted by: Kaeloree
« on: August 26, 2008, 01:26:34 AM »

Why don't you just use STATE_WHICH_SAYS like in Crossmod?
Posted by: Kulyok
« on: August 26, 2008, 12:45:57 AM »

Sure, if the author of the other mod doesn't mind you potentially screwing theirs.
Posted by: plainab
« on: August 25, 2008, 11:20:52 PM »

Back to my original topic...
Would it be possible or wise to do something like this to interject where I would like in the other mod? Provided the other mod is installed first.  I think this would get me the exact state I would need.  The only downside would be if the other mod had to update their text string due to a typo, I would then have to update my mod...  But the positive side to that would be that if they did make a change there would be no matching text string so it would fail and not create any screwed states.

Code: [Select]
BEGIN ~my mod~
/* do a bunch of stuff */
ACTION_IF (FILE_EXISTS ~override/somefile.xxx~) THEN BEGIN //where somefile.xxx is changed to look for the marker file found in 'Mod A'
 COPY_EXISTING ~actor1.dlg~ ~override~ //where actor1 is the file I wish to interject into
  READ_LONG 0x0008 ~state#~
  READ_LONG 0x000c ~stateOff~
  FOR (x=0;x<%state#%;x+=1) BEGIN
   READ_STTREF (%stateOff% + (%x% * 16) + 0) ~text_value~
   PATCH_IF (~%text_value%~ STRING_EQUAL ~This would be exact copy of text taken from desired state I want to branch from~) BEGIN
    SET dostate = %x%
    SET x = %state#% + 1
    SET doit = 1
   END
  END
 BUT_ONLY_IF_IT_CHANGES
END
ACTION_IF (%doit% = 1) THEN BEGIN
<<<<<<<< inlined/d-changes
INTERJECT_COPY_TRANS2 actor1 %dostate% ab_myvariable
 == mynpc IF ~InParty("mynpc")
!Dead("mynpc")
!StateCheck("mynpc",STATE_SLEEPING)
GlobalGT("ab_oneofmyvariables","GLOBAL",1)~ THEN ~The text I want my npc to say~
== actor1 ~Their response.~
== mynpc ~response back~
END
>>>>>>>>
COMPILE ~inlined/d-changes~
 EVALUATE_BUFFER
END ELSE BEGIN
PRINT ~Matching text not found. Skipping installation of this banter patch.~
END
Posted by: Dark Raven
« on: August 25, 2008, 08:39:08 PM »

Quote
Is UB best installed before or after npc mods?
Before. Any fixes, tweaks, alterations and restoration mods should be installed first.
Posted by: plainab
« on: August 25, 2008, 04:00:52 PM »

Crossmod banter pack has code examples for these interactions, specifically with Amber mod(both Amber authors and other mod authors agreed to it and co-wrote the material). Download it at G3, have a look.

There's a strong downside, though: if something, anything in the code for mod A(Amber) changes, mod C(Crossmod Banter Pack) is royally screwed, and I mean it.

Since I doubt that I could have cross mod content that was dependent upon the other mod's states. Then I should use a separate banter file that is fired by a script which looks for certain conditions in the other mod to be true.  So my banter would be about that mod's events but not interjected into that mod's dialog. I can live with that. Of course, whatever files I create that would be dependent upon information from the other mod would have to be put inside a check for that other mod.

Slightly, OT but since I started it's okay.  Is UB best installed before or after npc mods?
Posted by: Kulyok
« on: August 25, 2008, 11:35:14 AM »

Crossmod banter pack has code examples for these interactions, specifically with Amber mod(both Amber authors and other mod authors agreed to it and co-wrote the material). Download it at G3, have a look.

There's a strong downside, though: if something, anything in the code for mod A(Amber) changes, mod C(Crossmod Banter Pack) is royally screwed, and I mean it.
Posted by: plainab
« on: August 25, 2008, 10:47:27 AM »

How would I create an interjection or chain in relation to content from another mod?

Basically without going into detail:

Mod A adds a scenario.
Actor 1 (say Minsc) -- loses something
Actor 1 -- accuses other party members (Jan, Edwin, PC, etc...)
Actor 2 (say Jan if present) -- makes a comment and the two go on
Actor 3 (say Edwin if present) -- makes a comment and the two go on
It's here that I want to add my npc's reaction to the accusation (if she is present).

How would I do that if
1) Mod A may be installed after my NPC or not installed at all
2) Some Mod C might change states in dependent dialog file so that state numbers present in my install with Mod A would be different causing incorrect firing of banter.
3) Is this something that Mod A would have to do by looking for my NPC Mod.

Or would I just have to use a script file and trigger a new banter between the actor and my npc regarding this issue and word it according to what would have already been read with in the added scenario?