Jump to content

marchitek

Members
  • Posts

    152
  • Joined

  • Last visited

Posts posted by marchitek

  1. Version 0.7 is released. Changelog:

    • Party Revive After Combat (Beta) for BG1 EE v2.6 (no SoD support).
    • More Proficiency Points for BG1 EE v2.6 (no SoD support).
    • Character Respawn (Beta): made failure protection in Ducal Palace escort mission more subtle.
    • Town Portal (Beta): fixed bug that made portal marker creature health status visible when highlighting details.

    See first post for more details.

     

    On 4/27/2022 at 3:24 AM, Endarire said:

    May we also get an option to get the respawn only if the entire party wipes?

    This is actually implemented now with "Party Revive After Combat" component. In general, this is how it works:

    • only "party revive" installed -> all characters dead = game over
    • only "character respawn" installed -> protagonist dead = respawn
    • "party revive" + "character respawn" installed -> all characters dead = respawn
  2. Ok, I think I found the reason (I hope). It seems problem was that my global creature had effect with op100 protection from creature type EA = ANYONE. After changing it to ENEMY it seems to work correctly every time (by now).

    I think op100 EA = ANYONE was problem because cutscene id where I am using MoveGlobalObject is Player1. Strange thing is that it was working correctly after starting new game, but loading game was messing it up (at least it seems loading game was the step necessary to reproduce it). Running "C:Eval('MoveGlobalObject("DBRPMRK",Player1)')" was moving it correctly every time, I was checking GAM files (since creature is invisible too) and probably I messed up files.

  3. 11 minutes ago, jastey said:

    What exactly does not work for you?

    What I noticed it that not always, but sometimes, the moved NPC stands inside the "object" character it was moved to. When it first happened to me I thought it didn't work until I noticed the NPC actually being there, just right inside the PC.

    Basically it sometimes not work at all, object is not moved to target. So I'm not 100% sure if this is problem with action itself or maybe action call is sometimes skipped because of my code. But after all I think this is something with action or with global object state, because after this happen I tried to do it with console:

    C:Eval('MoveGlobalObject("DBRPMRK",Player1)') // DBRPMRK is dv of my global object

    and it is also not moved. When I do it once more, DBRPMRK is moved, but Player1 cannot move then (like it was stuck in place). Then after third time it is finally unblocked and everything seems to be back to normal.

     

    Initial call that sometimes not works is made from cutscene. I'm wondering, maybe engine sometimes not finish move properly before cutscene ends and global object remains in some broken state. But I haven't seen anything suspicious in GAM file. This seems to happen only if global object is in different area then Player1.

  4. Does anyone have any problems with MoveGlobalObject? It seems to not working for me randomly. I mean, I'm pretty sure it is not random, but I still haven't figured out minimal steps to reproduce this. I'm wondering, maybe someone knows something off the top of the head, that could help me.

  5. On 7/17/2023 at 11:35 AM, testlum said:

    Aw, I kinda got that impression from digging through older topics but wanted to confirm. It might be possible to add a -4 damage penalty vs. the selected racial enemy type but that's pretty ugly.

    Does the hardcoded part also mean I can't add the "select racial enemy" screen on level-up even if I don't touch the ability itself?

    I think in stats.ids there is "HATEDRACE" entry which could be racial enemy. If that's correct, maybe it is possible to detect it in scripts with "CheckStat" trigger or with op318. And if this is also correct you could maybe do what you want in scripts. I'm thinking about something like that:

    • For effect change: for every player check if class is ranger and if you haven't adjusted it yet, then apply some spell that will add effects you want. I'm not sure which exactly opcode it would be, but you could maybe grant -4 damage vs race to negate hardcoded +4? To apply different spell depending on race you can use one of those techniques: 
      • In every spell use op318 to protect agains itself if HATEDRACE stat is not the one that this spell is intended for. The you can just apply them all and one that is correct would work, the rest will be blocked.
      • Create long list of blocks for every race "if CheckStat(HATEDRACE, %race%) then apply spell for this race". You can hide this long list of blocks in cutscene and execute it without starting cutscene mode.
         
    • For change on level up: I think you will need to do that by innate ability that would do it via dialogue and only if ChangeStat script action works correctly with it.The you could track character level in variable and give this innate ability on level up, if there is no simpler way to detect level up.

    Anyway, this is quite complex for someone new to modding, unless you have some other coding experience. But I just wanted to mention that maybe there is some possibility to do that.

  6. 18 hours ago, deratiseur said:

    It would be necessary to add to 177 and 272 "the effect does not take into account eventual saving throws, it is applied all the time".

    I tested that for op177 on BG:EE 2.6 and it seems to be blocked when saving throw succeeded.

  7. 18 hours ago, jmerry said:

    It's a 2DA file, of course.

    As an example, I'll use Tiax and his line "Ha ha ha ha! Smart guy dies, and Tiax goes on to RULE!"

    The key file here is DEATH.2DA. Find the row for the character, and check the nonzero entries in that row against whoever died. Both rows and columns use script names as a key. In this example, that's exactly one entry - Quayle. If Quayle dies, Tiax pipes up with that line. Anyone else, and he doesn't care.

    Some characters may have multiple nonzero entries in their rows. Ajantis will say his line "It is unfortunate our companion died before he could recant his ways" for Eldoth, Xzar, Montaron, Tiax, Kagain, or Edwin.

    Ah, indeed I could check 2DAs.  Thank you!

  8. On 5/31/2023 at 5:35 PM, kjeron said:

    It prevents the related visual effects from occurring if the spell fails to kill them.

    Ah, I see. I was confused because there is also protection from whole resource when HP > 60. But I guess this is additional protection when target HP is lower then 60, but have additional protection against kill opcode itself. Thanks.

     

    After all I think I would try to change general to DEAD and restore it later. I found why my code was not working, seems General(.., 0) trigger return true for every general value. Here is how I made it if someone need to do similar thing. This solution is possible because I need to track only few target that I know beforehand (Player1..6):

    • I store general value of creature in local variable:
      • I read general.ids and for every entry I make eff file that sets local variable to ids value (omitting 0 and 3 [DEAD])
      • In my fake death spell I apply every eff with proper general check (so I apply eff 1 only if general = 1 etc)
      • At the end I change  general to DEAD with op72
    • Revert is a bit more complicated because I haven't found way to apply eff based on local variable so restore needs to be in global script:
      • I create cutscene bcs with blocks "if local variable is x change general to x" for every general.ids entry. One file for every player.
      • Then for every player extend global script with block "if general is DEAD and {it is time to revert} and local variable is not 3 (to prevent eventual looping) then start proper cutscene (without entering cutscene mode)".  
  9. 21 hours ago, jmerry said:

    Doesn't look like it. It's not built for temporary action; you can change and then change back, but that's it.

    For example, if you wanted to give duergar an "Enlarge Person" spell that turned them into Giant Humanoids for the duration, you'd have to do the type change twice - once immediately to the GIANTHUMANOID type and once with a delay to the HUMANOID type.

    I was afraid so. Thank you. I'm working on fake death spell that could be applied on party members and I wanted to also set general to DEAD when it is working. But code that I have now is quite ugly and on the top of that not working (I'm storing general value in local variable and restore it based on that).

    I want to make raise dead spell to work on characters under my fake death spell. So I could patch raise dead related spells to allow cast also on not dead. I guess reason for adding this general = DEAD requirement is to not apply #rdremov on alive characters. But anyway it is applied with opcode 326 so I could move DEAD check to #rdremov application and remove it from other places (raise dead opcode itself seems to not have problem when casting on alive).

    There is also DEAD check in power word kill and similar spells, I don;t get what it is doing.

  10. 10 hours ago, Bubb said:

    Timing mode 1 sets STATE_SLEEPING and STATE_HELPLESS in the cre file and immediately terminates, so the states aren't maintained by the effect, but are truly permanent. You are correct that op2 removes STATE_SLEEPING from the cre, but not STATE_HELPLESS, so there's no way to remove STATE_HELPLESS once it has been applied by op39 with timing mode 1.

    Every other timing mode maintains STATE_SLEEPING and STATE_HELPLESS as part of the effect, and the states can be cleared by removing the effect. I'm not sure why you say timing mode 9 doesn't set the states.

    I was not aware about difference between setting state in cre file and setting state as part of the effect. Let me rephrase myself:

    • Timing mode 1 (and probably 4 and 7) sets STATE_SLEEPING and STATE_HELPLESS in cre file.
    • Timing mode 9 seems to set STATE_SLEEPING and STATE_HELPLESS only as part of the effect, what makes it different from other "permanent" timing modes.

     

    I think I misunderstood:

    On 5/8/2022 at 3:43 AM, Bubb said:

    And a minor nitpick: Always maintains STATE_SLEEPING and STATE_HELPLESS, (this is noted at the bottom for certain timing modes, though it does this for all timing modes and all parameter configurations).

    I was thinking that you refer to note in IESDP: "In case of Timing Modes 1/4/7 the bits cannot be removed in-game".

  11. On 5/8/2022 at 3:43 AM, Bubb said:

    And a minor nitpick: Always maintains STATE_SLEEPING and STATE_HELPLESS, (this is noted at the bottom for certain timing modes, though it does this for all timing modes and all parameter configurations).

    IESDP seems to be right about timing modes. I tested that on BGEE 2.6 with timing mode 1 and it indeed left STATE_HELPLESS even after applying cure sleep opcode. However with timing mode 9 it worked normally, STATE_HELPLESS was removed and character become again selectable.

    EDIT: It seems that op39 with timing mode 9 doesn't set STATE_SLEEPING and STATE_HELPLESS at all.

  12. I'm looking fot the best way to make AI ignore party member. Something like effect or spl state that can be put on character to make enemies to switch target (or do nothing if no other targets). For now I got best results with Sanctuary opcode, although creatures that are effected by opcode 193 seems to still target such characters.

    For my particular case it's ok if solution would make party member unselectable with disabled inventory etc. For example I tested opcode 39 with special = 0, but this blacklist side effect doesn't seems to reliable for this use case.

    Are there any other good options that I am missing?

  13. 2 hours ago, Purudaya said:

    I'm trying to create a "bleeding" effect using opcodes 12 and 25, but the feedback in the combat log seems to be restricted to "poison" or one of the other damage types. Is there any way to change the damage feedback to a custom string for either opcode?

    If I get it right, what you really asking for is new damage type. This could be impossible without some serious hacking. That's my gut feeling.

    You could pick one of existing damage types, let's say slashing, and change all strrefs that refers to it to "slashing/bleeding". You need to be careful because resistance and other damage type related things would be shared across those two.

    Otherwise maybe it would be possible together with some major damage type overhaul. You could join all physical damage types as one, let's say under 0x0. Then you would have 3 free slots. This would ofc require patching all effects in items/spell, damage actions in scripts/dialogues, item/spell descriptions, changing feedback massages and who knows what else. With great power comes great responsibility, that's what they say.

  14. 13 hours ago, lynx said:

    Probably in the same vein as this finding from Bubb:

    When cut scene is activated with CutSceneMode() opcode #126 Stat: Movement Modifier,
     #176 Stat: Movement Modifier (II) does nothing, affected creature moves with normal
     speed instead until EndCutSceneMode() is called.
     
    There is several opcodes that work differently in cut scenes eg. creatures inside
     MAZE #213 are visible, Stun effect are ignored etc.. 
     
    Haste #16, Haste2 #317 opcodes seem to work inside cut scenes also. 

     

    Depending on how this is practically implemented, it can mean a prematurely expired effect.

    So this is probably some normalization of character state before cutscene, to make sure it will be displayed properly. I guess this makes sense. Probably all effects that alter movement are revoked. This was handy for my before for maze effect, so I cannot complain. Thanks for pointing this out.

     

    13 hours ago, argent77 said:

    If this is a controlled or scripted status effect then you could simulate unconsciousness via SetSequence(SEQ_SLEEP) or SetSequence(SEQ_TWITCH) in the cutscene.

    Yes, those are not removed. I had some other issues with that, but I guess with right combination of make unselectable and clear actions I can make it work reliably. Thank you.

    BTW do you maybe know if there is something similar for paralyze effect? Something that would freeze character animation but only in visual way (I guess all opcodes that do actual freeze will be removed on cutscene start).

  15. I came across strange thing (at least for my understanding). When I apply opcode 39 (sleep) on player character he drops unconscious and everything is fine. But after StartCutSceneMode() triggers opcode is removed (character is standing up, after cutscene end opcode is gone). I apply it with "no wake on damage" and timing "instant permanent". I'm quite sure that I also saw it before for one of paralyze opcodes, but I didn't investigated further back then. I think also maze opcode is cleared this way.

    Does anyone know what is exactly mechanics behind that? I would like character to stay unconscious during cutscene, but I want to apply it before cutscene.

    I'm testing on BGEE.

  16. Version 0.6 is released. Changelog:

    • Town Portal (Beta) for BG1 EE v2.6 (no SoD support).
    • Identification For All for BG1 EE v2.6 (no SoD support).
    • Character Respawn (Beta):
      • added possibility of quick travel back to the place of death after respawn,
      • improved compatibility with awkward formatted spell and item files.
    • More HP on Level One:
      • fixed bug that could cause wrong calculation of companion HP when using kit with different HP progression table than base class,
      • added class/kit descriptions adjustments to properly reflect new HP progression.
    • Camera Lock (Beta): extended help hints with camera lock behavior.

    See first post for more details.

  17. 1 hour ago, kjeron said:

    CLASTEXT.2da runs off it's own KITID/CLASSID columns. Most other 2da's run off the kit's "ROWNAME" from KITLIST.2DA, excepting case.

    The "BEAST_MASTER" entry in HPCLASS.2da is ignored, it needs to be "BEASTMASTER", matching KITLIST.2DA.

    That makes sense. Thank you! I can only add that BLACKGUARD entry in hpclass is working, so matching is case insensitive, at least with this table.

  18. I'm trying to connect class/kit description to hptable and I'm having hard time.

     

    hpclass.2da file "externalizes which HP table to use for each class/kit". We have there entries like:

    FIGHTER             HPWAR
    BERSERKER           HPWAR
    WIZARD_SLAYER       HPWAR
    BEAST_MASTER        HPWAR
    BLACKGUARD          HPWAR
    CLERIC              HPPRS
    TALOS               HPPRS
    BARBARIAN           HPBARB

    I learned somewhere else that kit entry can be missing and then probably class entry is used. So far so good.

     

    Then we have clastext.2da that "defines class/kit related descriptions". We have there entries like:

                         CLASSID              KITID                LOWER                DESCSTR              MIXED                BIOGRAPHY            FALLEN               BRIEFDESC
    FIGHTER              2                    16384                7201                 9556                 1076                 15881                0                    31252
    BERSERKER            2                    1                    24239                24284                24261                15881                0                    31252
    WIZARD_SLAYER        2                    2                    24240                24285                24262                15881                0                    31252
    BEAST_MASTER         12                   9                    24247                24300                24269                15888                0                    31257
    BLACKGUARD           6                    32                   28604                28606                28605                31492                0                    31256
    CLERIC               3                    16384                7204                 24230                1079                 15884                0                    31255
    GODTALOS             3                    19                   24254                24307                24276                15884                0                    31255
    BARBARIAN            2                    1073741824           24226                24235                24229                31493                0                    31268
    

    We can see that this is almost working, but only almost. In hpclass we have TALOS, but here GODTALOS.

     

    So, I was thinking that I would use HELP column form kitlist.2da thet also contains description strref. KITID columns in clastext.2da seems to be total mess, sometimes it is kit.ids value and sometimes is row number in kitlist.2da. But I could try to check kitlist.2da agains classes from hpclass.2da. We have there entries like:

                     ROWNAME          LOWER            MIXED            HELP             ABILITIES        PROFICIENCY      UNUSABLE         CLASS            KITIDS
    1                BERSERKER        25298            25329            24284            CLABFI02         29               0x00000001       2                0x00004001
    2                WIZARD_SLAYER    25299            25330            24285            CLABFI03         30               0x00000002       2                0x00004002
    9                BEASTMASTER      25306            25337            24300            CLABRN04         37               0x00020000       12               0x00004009
    19               TALOS            24254            25347            24307            CLABPR02         47               0x01000000       3                0x00004013
    30               WILDMAGE         25327            24282            24283            CLABMA01         52               0x80000000       1                0x80000000
    31               BARBARIAN        25328            24229            24235            CLABFI05         51               0x40000000       2                0x40000000
    32               Blackguard       28604            28605            28606            CLABPA06         53               0x00000021       6                0x00004020
    

    And this is also not matching because we have BEASTMASTER while in hpclass.2da we have BEAST_MASTER (putting aside Blackguard which can be easily converted to uppercase).

     

    Then I noticed in kitlist.2da there is KITIDS column so I could have map of kit.ids values to description strrefs. In kit.ids we have:

    0x4001 BERSERKER                    
    0x4002 WIZARDSLAYER                 
    0x4009 BEASTMASTER                  
    0x4013 GODTALOS                     
    0x40000000 BARBARIAN                    
    0x4020 Blackguard
    

    This doesn't match neither hpclass.2da (WIZARDSLAYER, BEASTMASTER, GODTALOS) nor kitlist.2da (WIZARDSLAYER, GODTALOS). This is pretty much when my brain exploded.

     

    I guess game code uses numeric ids instead of those string values. But in hpclass.2da there is no numeric ids of class/kit. So how to translate classes from hpclass.2da to some numeric values I could match agains KITID column of clastext.2da or KITIDS column of kitlist.2da? One of my supposition is that many values in hpclass.2da are in fact invalid, but since only barbarian and dragon disciple use different hp table then base class, this not results with bug during game, because those kits has consistent naming.

     

×
×
  • Create New...