Jump to content

gamemaster76

Members
  • Posts

    99
  • Joined

  • Last visited

Posts posted by gamemaster76

  1. 3 hours ago, jastey said:

    The check for EET is ~eet~. You'd need to include it into your game checks. As for the content, I'd assume the BGII:EE content should work with EET as well, but you best check whether the kit uses the same string in EET.

    It looks like you have a reference in your mod to that tra file somewhere. If it's not intentional you need to replace it with an own tra file / text.

    That did it! thanks! I was trying to put BGEET and it didn't work but EET only worked.

    That's the thing, no where in my code it references a .tra file

     

    3 hours ago, DavidW said:

    You need to read the string out of the clastext file, then set it. Something like this:

    COPY_EXISTING - "clastext.2da" nowhere // we're read-only, no need to write the file
    	COUNT_2DA_COLS colcount
    	READ_2DA_ENTRIES_NOW clastext_data colcount
    	FOR (row=0;row<clastext_data;++row) BEGIN
    		READ_2DA_ENTRY_FORMER clastext_data row 0 kitname
    		PATCH_IF "%kitname%" STR_EQ "DRAGON_DISCIPLE" BEGIN
    			READ_2DA_ENTRY_FORMER clastext_data row 3 lower
    			READ_2DA_ENTRY_FORMER clastext_data row 5 mixed
    			row=clastext_data // done now, no point keeping going
    		END
    	END
    
    	
    STRING_SET lower ~dragon disciple (fire)~ 
    STRING_SET mixed ~Dragon Disciple (Fire)~

     

    there we go. Thanks!

  2. 25 minutes ago, DavidW said:

    Read in the strings from clastext.2da

    Ok?  Do you mean rewrite the name in the clastext.2da file?

    I'm not sure if that would be different then the other files. Would it be something like this?:

     

    COPY_EXISTING ~clastext.2da~ ~override~ 

                SET_2DA_ENTRY 58 ~ Dragon Disciple (Fire)~

     

    Would this change it both places were the name is referenced?

  3. I have a mod that adds more Dragon Disciple kits for each element. I have everything working except for renaming the original kit. Right now I'm just rewriting the string. Sloppy but I can't figure out how else to do it.

    Except now I decided to install the Enhanced Edition Trilogy mod to merge both Baldur's Gate games into one. And now the mod doesn't recognize it has either BG2EE or BG1EE ( the mod is in the BG2EE directory).

    The code is:

     

    "REQUIRE_PREDICATE GAME_IS ~BGEE BG2EE IWDEE~ ~This component can only be installed on BGEE, BG2EE, and IWDEE games.~

    /....\

     

    ACTION_IF GAME_IS ~BGEE~ THEN BEGIN // For BG1EE        
            STRING_SET 31976 ~dragon disciple (fire)~ // Changes original kits name in character creator
            STRING_SET 31977 ~Dragon Disciple (Fire)~
    END


    ELSE ACTION_IF GAME_IS ~BG2EE~ THEN BEGIN // For BG2EE        
            STRING_SET 74302 ~dragon disciple (fire)~ // Changes original kits name in character creator
            STRING_SET 74303 ~Dragon Disciple (Fire)~
    END


    ELSE ACTION_IF GAME_IS ~IWDEE~ THEN BEGIN // For IWDEE         
            STRING_SET 37252 ~dragon disciple (fire)~ // Changes original kits name in character creator
            STRING_SET 37254 ~Dragon Disciple (Fire)~
    END "

     

    So either how do I skip the need to check what game and just have it look for the kit name an rewrite it;

    Or how do made this code work with EET?

     

     

    Edit: 

    the error message I get is:

    This component can only be installed on BGEE, BG2EE, and IWDEE games.

    weidu_external/lang/english/ubsetup.tra file not found. Skipping...

  4. 12 minutes ago, subtledoctor said:

    There is an ADD_SPELL_HEADER function floating around... you need it if you use the CREATE function to create new spells, since CREATE makes a spell with no ability headers. (Which is weird and annoying.) If you really want to operate 100% by Weidu, you can get comfortable with that. I think Aquadrizzt, for example, likes to operate entirely by code, and create files on the fly.

    There is also Camdawg's EXTEND-O-MATIC thing, which I think makes new ability headers with progressing min levels. Not what was asked for, but maybe worth looking at the code.

    But in general I don't like to mess with ability headers, other than to ALTER_SPELL_HEADER them. I don't use CREATE for spells - I pack a blank .SPL file with a single ability header, and I add effects to the header with code.  In my new 5E casting conversion, I manually made a .SPL with 40 blank ability headers, and I clone the file and add effects to each header to simulate with might normally be in a CLAB table.  If I need a spell with between 2 and 39 headers, I'll just make the spell manually in NI and simply copy it with Weidu, just like SR.  Using code to patch stuff is convenient and make adjusting things a LOT easier, but I'm not religious about it.

    (Sidebar: there's a reason SR sets so many spell durations to 1/2/5/10 turns. Do I really care whether my Mirror Image lasts 84 seconds or 90 seconds? Making that stuff level-dependent is a TON of extra work, for very little gain.)

    ouf good to know...then this might be a case were its better to just make it manually and pack it in with the mod. Thanks!

  5. On 3/2/2021 at 6:56 PM, temnix said:

    To the OP: try this. I'm not sure if it will work, but it has in the past, only I don't remember the settings. If you can't find out the right combination, tag kjeron. He'll know for sure. What you do is this: put opcode 326, Apply effects list, on top of your main spell's effects list. This targets Self, filters through your kit and applies a secondary spell. The secondary spell has no projectile and is either Dead actor or Living actor - try both if one doesn't work - and its only effect is "Save vs. spell bonus," target Preset target. Put the penalty you want on top and make the duration very short, like 2 ticks. With the right settings this will deliver the penalty before the rest of the main spell comes in.

    Ill keep this one in mind, I already have most of the code I need to make it work otherwise, but if the last part is too complicated ill try this.

  6. On 3/2/2021 at 3:48 PM, Bartimaeus said:

    Poke around with Mirror Image (SPWI212.spl).

    https://dl.dropboxusercontent.com/s/1y4kcoku0iejaqw/eZ4Zj4hq0g.mp4

    Every header is essentially a new spell, and which one you actually cast is tied to what level the casting character is. The first header (required level 1) does its four opcodes, creating 3 images; the second header (required level 6) also has its opcodes, but they do not necessarily have to be the same opcodes - in this case, they are, except the Mirror Image opcode (#159) is changed to instead create 4 images. You can probably start to get a grasp of how exhausting spell-making can be doing it manually this way when you start to consider that a number of spells have durations of like "1 round/level": every single new level will have its own header with its own effects, and every opcode for the specific header will need to have its duration set individually. So if you have a spell with a duration that changes every experience level, and you have 30 opcodes that are used at each level, and you want it to scale up to level 20, then if it were a first level spell, there'd be 20 headers with 30 opcodes each for a total of 600 opcodes that you have to set the duration for. If this were an offensive spell with a saving throw that scales up with level, you'd also have to change the saving throw for each opcode.

    Depending on the spell, it can be utterly insane: that's why I often makes changes via hex editing instead of DLTCEP or NI, since I can automate and make pattern-based changes very quickly. But that's an entirely different subject and one that I'm not about to get into.

    ouf.. ok so I'm trying to do all this in Weidu, I figured out how to add the penalty, but I cant figure out how to clone the entire spell effect. The closest I can find is the CLONE_EFFECT function... but I don't think that actually for ability effects, only the specific opcodes within them.

     

     

  7. 27 minutes ago, subtledoctor said:

    For stuff like that it's simpler, and probably just as effective, to use

    
    COPY_EXISTING ~clabrn04.2da~ ~override~
      REPLACE_TEXTUALLY ~GA_SPCL311~ ~GA_SPCLCBM~
    IF_EXISTS BUT_ONLY

    But as an answer to your original question, since it could be useful in other places, you need to iterate over both rows and columns in order to read every entry.

    
    COUNT_2DA_COLS cols
    READ_2DA_ENTRIES_NOW rows cols
    FOR (row = 0; row < rows; ++row) BEGIN
      FOR (col = 1; col < cols; ++col) BEGIN
        READ_2DA_ENTRY_FORMER rows row col ~spell~
        PATCH_IF ~%spell%~ STRING_EQUAL_CASE ~GA_SPCL311~ BEGIN
          do stuff
        END
      END
    END

    Also you use the same variable "cols" for both the total number of columns, and your iterating column number in the FOR clause. That's gonna screw things up. As you see I use the singular "col" for the latter variable.

    Finally: not that this is a bit fragile.  If you try to iterate through 40 columns but some modder has added a row with only 39 entries, then the operation will fail. CLAB tables, in particular, tend to get pretty disorderly in games with a bunch of mods installed.  There's things  you can do to firm up the operation, which is why READ_2DA_* functions have that "required column count" field... but that can still fail because an entry you want to read and modify might be in a row that doesn't get handled.

    Most 2da tables make nice rectangles and don't get screwed up. But CLAB tables are quite prone to becoming disorganized, and so I avoid using READ_2DA_ENTRY on them when I can.

    It worked! Thanks!

  8. 21 minutes ago, Jarno Mikkola said:

    You could just make your own .2da file and COPY ~modfolder/filefolder~ ~override~ and be done with this.

    Yeah but then I don't learn how to code the more basic stuff. And in cases were there's a lot of files that I could otherwise just make my own,  if I need to update something I just update some lines of code instead of having to open every file and edit. 
    So I made sure to get in the habit of only using code when possible.  

  9. I'm making a mod of the Beast Master kit and one of the changes I want to do is replace the rangers Charm Animal ability with one that has a penalty to the target. 

    After this I need to change the Beast Masters 2DA file to give it this new spell. But since Rangers get Charm Animal 15 times, I don't want to put 15 lines of almost the exact same code, so I want to use a For loop to make things simpler... except I'm having trouble figuring it out.

    The file is CLABRN04.2DA. Charm Animal is GA_SPCL311 and its set from level 1 and every 2 levels after that:
                                      1             2                3              4 
    ABILITY1    GA_SPCL311  ****   GA_SPCL311  ****     etc.

    The copied ability I named spclcbm.SPL.  So I need GA_SPCL311 replaced with GA_spclcbm.

    I tried reverse engineering For loops from other posts but I need direct help:

            COUNT_2DA_COLS cols
            READ_2DA_ENTRIES_NOW rows cols
                FOR (cols = 1; cols < 40; ++cols) BEGIN
                    READ_2DA_ENTRY_FORMER 1 cols cols ~spell~
                    PATCH_IF ~%spell%~ STRING_EQUAL_CASE ~GA_SPCL311~ BEGIN
                        SET_2DA_ENTRY 1 cols 40 ~GA_spclcbm~
                    END
                END

  10. 9 minutes ago, subtledoctor said:

    Like I say, all of the above will still work if you are willing to cannibalize one of the existing familiars.

    As for leveling up, there's ways to do it. It  can be something in the familiar's script... there are several way to skin that mephit.

    And as to permanent companions... I have no idea how that is done.

    Problem is that is messes up find familiar for other classes. Unless there's a way so that if its a beast master, it will THEN alter an existing familiar but wont if its anything else. Or you uninstall the mod before a different playthrough to get the regular familiar. I just wanted it to be more useful aside from just granting an HP buff and then being in the bag forever.

    Besides, aside from the familiar I'm also moving the summon animal spells the kit gets to lower levels and it will get access to the IWD version of Conjure Animals. So there will be plenty of beasts around.

    Also the Charm Animal will give enemies a penalty, so those beasts in the wild are more likely to fail. Also weapon proficiencies will be restored. 

  11. 8 hours ago, kjeron said:

    It's not hardcoded, but it is locked in (based on FAMILIAR.2DA) as soon as a new game begins.

    However, BG2EE and IWDEE already have familiar data stored in the BALDUR.GAM file by default, so you would have to either delete or modify that structure from the GAM file before starting a new game.

    well poop...

    3 hours ago, subtledoctor said:

    Well that’s unfortunate and weird. More Beamdog sloppiness...

    yep... I guess that idea is out, maybe go the permanent companion route? Add a polymorph to the companion to turn it into something else?  Then the companion needs to become stronger as you level up so I need to make a bunch of scaled up versions....
    But there are mods that do that already.

    So I might have to scrap this idea then...

  12. 2 minutes ago, subtledoctor said:

    Seeing that you're talking about Beastmasters, I can guess where you are probably going with this. If you want to get really clever, you could have your Beastmaster-only NG familiar be some kind of spirit-looking thing, with an override script that triggers a dialogue with the caster and asks "what kind of animal companion do you summon?" And the answers could be bear, wolf, lion, moose, etc. And depending on the answer, it could trigger a spell that does a permanent polymorph to the familiar to change it into that creature. This is one (slightly hacky) way to overcome the 9-familiar limit; it's what I was planning to do to allow wizards to summon a mephit and then choose which elemental variety it is. Could be cool for Beastmasters. In fact that would be an interesting thing to add for Beastmasters in my mod; my familiars give passive bonuses to their summoner, so with a Beastmaster you could set it to have a bonus to STR, or HP, or AC or temperature resistance, etc. depending on which animal companion they choose.  That would be cool.

    Shoot, now you've got me wanting to add mephits and Beastmaster companions to my familiar mod...

    😂 

    I was thinking of adding a permanent companion but I had no idea how to do it.

    My plan was just to make it a ferret with 75% in thief skills that doesn't lower you constitution score if it dies.

    Although I just ran into another wall, the opcode for find familiar uses FAMILIAR.2DA to see what to give you, but it only exists in BGEE, IWDEE and BG2EE don't seem to have it, and I cant find equivalents in them. I'm assuming theres 2 of them in BG2 since the familiars have higher stats in ToB.

  13. 7 hours ago, subtledoctor said:

    Just adding an opcode 57 effect with timing = 0, duration = 0. The result will change your alignment instantaneously, for the purpose of that spell's effects only; but will have no lasting effect in-game. (It won't cause a ranger to fall, for example.) This is tested and works reliably - it's how I do my familiar choice mod. You choose from the various familiars, and the resulting spell  changes your alignment for 0 seconds and then casts the normal Find Familiar spell within the window of that zeroth of a second that your alignment is different.

    Ah! That's perfect!.... but how do I make it so that Find Familiar checks both your alignment and your kit before casting?

    So far I have this but no idea how to implement the check:

        COPY_EXISTING ~spcl342.SPL~ ~override/spcl342.SPL~ 


            LAUNCH_PATCH_FUNCTION ~ADD_SPELL_EFFECT~ // Find Familiar changes alignment to NG if a beast master.
                INT_VAR
                    opcode = 57                                                                  
                    target = 1                                                                     
                    timing = 0
                    duration = 0                                                              
                    parameter2 = 33                                                               
                    probability1 = 100                                                             
                    insert_point = 0      
            END
            
            LAUNCH_PATCH_FUNCTION ~ADD_SPELL_EFFECT~ // Find Familiar changes alignment to LG if you are a NG non-beast master.
                INT_VAR
                    opcode = 57                                                                  
                    target = 1                                                                     
                    timing = 0
                    duration = 0                                                              
                    parameter2 = 17                                                               
                    probability1 = 100                                                             
                    insert_point = 0      
            END

  14. 26 minutes ago, subtledoctor said:

    EDIT - now I think about it, I suppose you could exploit the fact that the vanilla game only has eight familiars. Add conditional effects to the spell: if your alignment is NG and you kit is not the custom kit, do a zero-second alignment change to LG. If your kit IS the custom kit, do a zero-second change to NG. Then make a new familiar and assign it to NG. Your kit should get that new familiar, and everyone else who is LG or NG should get the pseudodragon as usual. 

    That could only be done once though (NG is the only available slot), and of course would be incompatible with any other mods that alter familiars. 

    Ooooh that's interesting. Is this doable in Weidu?

    If so how would a zero second change work?

     

  15. 18 minutes ago, Bartimaeus said:

    Let's say you did that - you add a -2 saving throw to *just* opcode 5 (charm). So you cast the spell on an eligible creature, and they fail their saving throw for the charm effect - but NOT the others, because the saving throw/bonus for them was different and the creature successfully saved against them. So now the creature is charmed, but the other opcodes, #142 (Display Special Effect Icon) and #215 (Play 3D Effect), do not fire. For this particular spell, this just means some graphical effects will not play so ultimately it will be visually inconsistent but relatively harmless. For other spells where multiple effects are necessary for the spell to completely function, you can start to imagine where you might start running into issues. Even for simple spells like this, if your intended effect has other associated opcodes (such as display portrait icon, play 3D effect, play sound, display string, apply lighting effect, to name just a few of the most frequently occurring), you should make the saving throw consistent across all effects unless you truly do not care if the effects will be inconsistently applied. I personally would not want a spell that only sometimes plays the intended graphical effect that shows it was successfully applied instead of all the time, but if you're doing spells and abilities just for yourself, you can make your own decisions on what's worth your time to edit.

    oh! ok now I get it, thanks!

     

    So how would I make it that the bonus increases at certain levels if I did it like that?

  16. 24 minutes ago, Bartimaeus said:

    Change the saving throw and bonus values on each opcode to match instead

     

    24 minutes ago, Bartimaeus said:

    Note that the saving throw type should match if you want the same throwing throw roll to be used for the same spell.

    What do you mean?

    cant I just change the bonus for opcode 5 since thats the one with the charm effect?

  17. I want to make a mod for the Beastmaster kit. One of the changes I want to make is that the Charm Animal ability that all rangers get is better for Beastmasters.

    When one uses it I want the target to have a -2 penalty to the save at level 1 and the penalty should increase at levels 6, 12 and 18.

    I found the file for Charm Animal: spcl311.spl. 

     

    So to make sure I know what I'm doing:

    I could make a copy of the spell, assign it to the kit instead of the original. 

    Add opcode #37 to it to add a -2 penalty. Do I put Cumulative Modifier so that something like greater malison can stack? Or would Flat Modifier still allow this?

    And it should be possible to add a level override right? Adding it again with a higher minimum level?

  18. I was thinking of making a mod for the Beastmaster kit and one of the things I'm considering is changing the Find Familiar spell it gets. For example, lets say I want to make it so that the Beastmaster always gets a ferret companion, how would I do that?

    I know FAMILIAR.2DA is what the game checks to see what familiar to give but changing it affects anyone who uses the spell. Is it possible to make a different list and have it check that one instead?

    I know that find familiar is its own opcode, but I can find other Find Familiar mods. How extensive is it change? And is it possible to to do only for a single kit?

    Or else is it possible to just do a standard summoning ability but it gives the creature the same effects a familiar can do (hiding in your pack, etc)? 

  19. 5 minutes ago, Jarno Mikkola said:

    Then you rename the specific string to another. With a read command and equation that if not 1, renames the string to wanted the value.

    That I know how to do, but everywhere I looked said that was a bit of a dirty way to do it, only if there's no other option. I was hoping there was a macro or a series of commands for something like this.

  20. 8 hours ago, Sam. said:

    Your BAM has an appropriate transparent color, and the palette doesn't have any transparency.  The shadow color isn't black, but that should be OK considering what type of animation it is.  When playing it in-game via the CLUAConsole via

    it looks like this:

    Baldr024.thumb.png.54b58818b0b8b4fbf61ba137cf9e2fef.png

    If that's what you're seeing, then it eliminates options 1 and 2.

     

    thats what I want it to look like when I use the breath weapon.

    I added a picture to the drive showing what im getting. Its a shitty phone pic because apparently every program and function on my computer, even Steam themselves, refuse to take a screenshot of baldurs gate 😂

    https://drive.google.com/drive/folders/1EXe5tEuLNxdXhPIJPH3Ee66IKdlQHM7u?usp=sharing

  21. 3 hours ago, Sam. said:

    One of four things must be happening:

    1. Your BAM was malformed when it was created (e.g. the transparent or shadow colors got messed up).
    2. Your BAM is good but the palette contains semi-transparent colors, thus your BAM renders differently in-game than it does in legacy editors which do not support the alpha channel.
    3. Your PRO has been incorrectly configured to display the BAM the way you intend.  The flags mentioned above are the most likely culprits.
    4. You aren't actually testing the files you think you are (e.g. you're testing on SoD but haven't installed a version of Modmerge, you aren't closing and restarting the game between testing changes to the files, you aren't running the same game you're saving the edited files to, etc.)

    If you upload your BAM and PRO, we can help you narrow down the list of possible issues.

     

    Heres a link to a drive with them, they surpass the limit im allowed to put
    https://drive.google.com/drive/folders/1EXe5tEuLNxdXhPIJPH3Ee66IKdlQHM7u?usp=sharing

     

×
×
  • Create New...