Jump to content

argent77

Modders
  • Posts

    1,587
  • Joined

Everything posted by argent77

  1. Update: NPC Generator 1.3 Full changelog: - Added scripted NPC/follower removal at the end of the SoD campaign - Added code to improve handling followers during the SoA Spellhold dream sequence - Fixed an installation issue in IWD:EE
  2. I've noticed a couple of issues in version 5 beta 3 (EET game, SoD campaign): At the Coalition Camp after the attack of Caelar's troups, Ophyllis arrives with news about your money. At the end of the conversation Imoen interjects, and right after that Imoen dies in place of Ophyllis. Line @5530 (~I said I'd follow you anywhere, <CHARNAME>! Do you need any more proof? We are in *hell*!~) is endlessly repeated by Imoen when you reach hell. Looks like an incorrectly set script variable. Moreover, the way how this script block is coded it blocks the chapter screen from showing up and interferes with scripting of the crusaders fighting the devils. I solved it locally by moving the block from the top to the bottom of the script. I'm not sure if this is also caused by this mod: At the end of SoD when you flee Baldur's Gate, you meet Imoen again. However, her dialog was very generic ("Heya, how are things going?") with the option to have her join you, and then nothing else. To trigger the expected dialog, I had to manually initiate a PID with Imoen which led to the expected plot sequence. I don't think this is the expected behavior. (I came up with the PID idea only later. Without it, all you can do is triggering generic talk with the canon NPCs, and when you try to leave the area the worldmap shows up without a single valid destination.) There is a typo in game.tra, line @5540: "Such a huge dragon skelleton! ..." -> "Such a huge dragon skeleton! ..." I can post the WeiDU.logs if you need them.
  3. Yes, no entries at all. All you can do is go back and select another kit that works. As I said, in theory your idea should work since it only permutes existing rows. But you don't know if mods installed afterwards might get confused because of the mismatching row number / kitids values. There could also be other side effects that we haven't yet noticed.
  4. After more testing it looks like KITIDS values don't have to correspond to the kitlist row number as long as a valid kit entry with the row number equal to the lowest order byte value of KITIDS exists. Otherwise character creation fails to list available alignment entries for the selected kit. So in theory sorting the kitlist table works without unwanted side effects, but it would be a rather fragile solution.
  5. I think the KITIDS column in kitlist.2da must correspond to the row number, but I have to do some more tests to be certain. A quick test showed that character creation can't be completed if row number and the lowest order byte of the KITIDS value are different. Exceptions are specialist mages and the barbarian kit. If KITIDS is indeed linked to the kitlist row number then you'd have to update a lot of game resources.
  6. If you rearrange kit entries in kitlist.2da you might also have to update kit references in game scripts and effect opcodes, maybe even references in saved games (if you're thorough).
  7. You can fake it by using the non-breaking space (U+00A0). It doesn't count as column separator in 2da files. Typing a non-breaking space can be tricky. On Windows the keyboard shortcut Alt+255 (digits entered on the numeric keypad) might work.
  8. This definition doesn't work as intended: ACTION_DEFINE_ASSOCIATIVE_ARRAY response_strrefs BEGIN %63960% => 1 %65051% => 1 %70436% => 1 END The percent sign is, along with tilde (~) and quotation mark ("), one of several options to enclose strings. The percent sign is special as it has a double meaning depending on context. It can be used to enclose strings as well as evaluate variables inside strings. So in this example you're just using the literal number 63960 as the array index since the percent signs aren't placed inside a string. This code should work as intended: ACTION_DEFINE_ASSOCIATIVE_ARRAY response_strrefs BEGIN ~%63960%~ => 1 ~%65051%~ => 1 ~%70436%~ => 1 END I would generally advise against using the percent sign for enclosing strings. Both tilde and quotation mark are much more readable and less ambiguous.
  9. There is no need to call ADD_TRANS_TRIGGER multiple times for the same state. All responses that should be updated are listed in the variable following the DO keyword. For example, this code ADD_TRANS_TRIGGER ARAN 39 ~Global("C#IM_ImoenStays","GLOBAL",0)~ DO %responses_39% will be resolved as ADD_TRANS_TRIGGER ARAN 39 ~Global("C#IM_ImoenStays","GLOBAL",0)~ DO 1 3 if the code structure from your earlier comment found matching strrefs in response entries 1 and 3. This .d command will then add the trigger "Global("C#IM_ImoenStays","GLOBAL",0)" to both response entries in one go.
  10. That example code (together with the function GET_RESPONSE_STRREFS I posted in an earlier comment) should work fine with multiple responses in individual states. Have you encountered any problems?
  11. What exactly fails? Should only one of the two responses be patched? I think that could be solved with an UNLESS or IF condition.
  12. Near Infinity (or short: NI) is an open source cross-platform browser and editor, based on Java, for resources of Infinity Engine games. This version provides a couple of nifty features such as filtered list items, launching games directly from NI or improved loading times. You can grab the latest release from the download link below. Links: Discussion: SHS, Beamdog Download Documentation
  13. It should be supported by all EE games since patch 2.0. There are several instances in Beamdog NPC-specific maps in BG2:EE as well.
  14. Add PRETTY_PRINT_2DA after you're done modifying the 2DA file.
  15. Congratulations from me too! Looks like GemRB is even (slightly) older than Near Infinity.
  16. In case there are no matching response indices found the variable will be empty and the whole expression evaluates to ADD_TRANS_TRIGGER ARAN 39 ~Global("C#IM_ImoenStays","GLOBAL",0)~ DO This is a valid expression, but results in the script trigger added to all available responses found in state 39 (according to WeiDU docs). One way to solve it is by adding an IF condition to the ADD_TRANS_TRIGGER that never evaluates to "true". For example: ADD_TRANS_TRIGGER ARAN 39 ~Global("C#IM_ImoenStays","GLOBAL",0)~ DO IF ~a_nonexisting_trigger()~ That can be realized by adding this code right before the line "TEXT_SPRINT EVAL ~responses_%state%~ ~%indices%~" in the example code from my previous comment. // prevent adding a trigger if index list is empty PATCH_IF (~%indices%~ STR_EQ ~~) BEGIN TEXT_SPRINT indices "IF ~a_nonexisting_trigger()~" END
  17. This is an example how the whole dialog could be processed in one go. Current implementation requires that all variables contain at least one index or WeiDU will update all available responses of a state. That could be solved by adding a dActionWhen condition that is guaranteed to fail.
  18. You could do all the variable initializations before compiling the respective .d files. That way the .d may contain as many commands as you want (provided each command references a unique variable name). Btw, a variable doesn't only have to include a single response index. It can just as well be a string containing multiple indices created by multiple calls of TEXT_SPRINT variable ~%variable% %idx%~.
  19. In that case, change the .d command to this: ADD_TRANS_TRIGGER ARAN 39 ~Global("C#IM_ImoenStays","GLOBAL",0)~ DO %idx% And use this example .tp2 code: COPY_EXISTING ~aran.dlg~ ~override~ LPF GET_RESPONSE_STRREFS INT_VAR state = 39 RET strrefs RET_ARRAY strrefs END BUT_ONLY OUTER_FOR (idx = 0; idx < strrefs; ++idx) BEGIN ACTION_IF ($strrefs(~%idx%~) = 43058) BEGIN // patching response trigger COMPILE EVAL ~%MOD_FOLDER%/dialogs/aran.d~ END END I'd recommend to use a more unique variable name in place of "idx" though.
  20. This will only return the state index. I don't think there is a WeiDU command that returns the response index. Try this: // Returns all response strrefs for a given state as an array. DEFINE_PATCH_FUNCTION GET_RESPONSE_STRREFS INT_VAR state = 0 RET strrefs // returns number of array elements RET_ARRAY strrefs // indexed array with response strrefs BEGIN SET strrefs = 0 SET $strrefs(~0~) = "-1" // workaround for WeiDU bug READ_ASCII 0 sig (8) PATCH_IF (~%sig%~ STR_EQ ~DLG V1.0~) BEGIN READ_LONG 0x08 num_states READ_LONG 0x0c ofs_states READ_LONG 0x14 ofs_responses PATCH_IF (state >= 0 && state < num_states) BEGIN SET ofs = ofs_states + (state * 16) READ_LONG (ofs + 4) idx_response READ_LONG (ofs + 8) num_response FOR (idx = 0; idx < num_response; ++idx) BEGIN SET ofs = ofs_responses + (idx_response + idx) * 32 PATCH_IF ((BYTE_AT ofs) & BIT0) BEGIN // has text? SET $strrefs(~%strrefs%~) = LONG_AT (ofs + 4) END ELSE BEGIN SET $strrefs(~%strrefs%~) = "-1" END SET strrefs += 1 END END END END // Example usage COPY_EXISTING ~aran.dlg~ ~override~ LPF GET_RESPONSE_STRREFS INT_VAR state = 39 RET strrefs RET_ARRAY strrefs END FOR (idx = 0; idx < strrefs; ++idx) BEGIN PATCH_IF ($strrefs(~%idx%~) = 43058) BEGIN // patch response trigger %idx% END END BUT_ONLY
  21. dActionWhen refers to the string the command is about to alter. In the case of ADD_TRANS_TRIGGER it checks the content of an existing trigger block (if available). For example, this check would add the trigger only if it doesn't exist yet: ADD_TRANS_TRIGGER ARAN 39 ~Global("C#IM_ImoenStays","GLOBAL",0)~ DO 0 UNLESS ~"C#IM_ImoenStays"~ I guess you'll have to code your own function if you want to search specific responses for keywords. To simplify the code you could instead check for predefined strrefs, since you want to check vanilla game dialog lines. The strref for the above-mentioned line would be 43058 in BG2/BG2EE.
  22. I noticed something weird (not sure if added by the recent update). The forum editor automatically replaces "x" by a multiplication sign when placed between two digits (whitespace is ignored), e.g. when used by hexadecimal notation for numbers. Can this kind of "autocorrection" be turned off somewhere? Examples: 0x123, 0xx123, 0 x 123, 0 xx 123
  23. Another info about ARE animation appearance flags (offset 0x34) bit 14. Formerly called "Underground?" this can be used to stencil animations using the water overlay mask of the tileset (e.g. to give water surface a more natural look). It's called "Draw stenciled" in NI. An example to illustrate this feature:
  24. There are no EE-specific additions listed for the GAME file format yet, so here they are: GAME V2.0 Header: Offset Size Description 0x001c 2 (word) Use active area from party member (0=Player1, 1=Player2, ... 5=Player6, -1=Not in party). This overrides current area at offset 0x0058. ^^ This applies to original BG2 as well. 0x0080 4 (dword) Zoom level (in percent), 0 or 100: default zoom level, >100: zoomed out, <100: zoomed in 0x0084 8 (resref) Random encounter area set by script action ForceRandomEncounter() or ForceRandomEncounterEntry(). 0x008c 8 (resref) Current worldmap 0x0094 8 (char array) Current campaign (e.g. "SOD" for Siege of Dragonspear) 0x009c 4 (dword) Familiar owner (0=Player1, 1=Player2, ..., 5=Player6) <- used by IWD:EE 0x00a0 20 (char array) Random encounter entry set by script action ForceRandomEncounterEntry().
×
×
  • Create New...