Jump to content

gamemaster76

Members
  • Posts

    99
  • Joined

  • Last visited

Posts posted by gamemaster76

  1. On 2/9/2021 at 5:58 PM, Sam. said:

    I'm thinking you need to adjust the flags in your PRO file.  For starters, turn off "Translucent (7)".  It has this effect.  You may need to play around with the other flags as well.  My second guess is if you created the BAM yourself with DLTCEP, I think it might interpret pure black as the transparent color (which is a bit odd IMO).  That could be throwing you off too.

    On 2/9/2021 at 6:00 PM, temnix said:

    The answer: if blending is enabled, black will always be transparent and dark colors to the degree they approach black. Don't use blending. If the animation has areas that are overly dark and not looking pretty, you have to edit the BAM by hand and eliminate those parts or extract the frames and redraw them. If this question were about a visual effect, it would be possible to use the "Transparent" option instead of blending, and there are a couple of boxes to increase the intensity of colors in a VVC, but for a PRO, no blending is the only way.

     

    Unfortunately I've tried every combination of Translucent and Blending they do literally nothing and make no difference.

     

    On 2/9/2021 at 5:31 PM, Jarno Mikkola said:

    The simple asnwer is that you copy the .bam file, and recolor it's palette(s)...

    Probably by converting it's frames into .bmp's, and then opening those in a picture editing tool, armed with the knowledge that the palette color 2 is probably the black aka the transparent one, utilize a different palette and you get a very different picture.

     

    On 2/9/2021 at 5:30 PM, Sir-Kill said:

    DLTCEP can modify the pallet of the entire bam, unfortunately is does not come with sliders or anything user friendliness.

    I figured this was what I had to do... was hoping there would be a simpler solution.

  2. 18 minutes ago, Sam. said:

    Are you using a PRO (projectile)?

    Im using the Dragon Disciples ddbreat.PRO

     

    1 hour ago, Sir-Kill said:

    what bam files are you working on?

    at the moment im using cloudka.BAM with ddbreat.PRO. 

     

    its an acid breath do i wanted to go with something dark and sickening but every BAM looking like a mist instead of globs of acid.

  3. I'm working to get an acid breath animation for a Dragon Disciple mod and I wanted a dark color to appear..... unfortunately it seems black = 100%transparent in-game since no matter how dark the BAM is, it ignores that part of the animation and is completely bright. If I make it completely black, its invisible in-game.

    Is there a way for dark colors to work?

  4. 15 hours ago, Mike1072 said:

    Feel free to ignore Jarno in this case.

    Firstly, if you want to do an "else if" (like in C-style languages), that's totally valid and common:

    
    
    ACTION_IF (x) BEGIN
      // do something
    END
    ELSE ACTION_IF (y) BEGIN
      // do something else
    END

    For what you're doing, it's easiest to extract the stuff that will be different into the game-specific checks and then proceed with the shared code.  For example, you could set a variable to a specific value and then reference the variable in the shared code.

    I wasn't sure I understood what you were attempting, but it looked like you were first modifying some source files, then cloning those source files and making further changes to the clones.  You could do that like so:

    
    
    ACTION_IF GAME_IS ~BGEE~ BEGIN
      OUTER_TEXT_SPRINT source_paw ~brbrp~
      OUTER_TEXT_SPRINT destination_paw ~brbrp2~
    END
    ELSE ACTION_IF GAME_IS ~BG2EE~ BEGIN
      OUTER_TEXT_SPRINT source_paw ~cdbrbrp~
      OUTER_TEXT_SPRINT destination_paw ~cdbrbrp3~
    END
    ELSE ACTION_IF GAME_IS ~IWDEE~ BEGIN
      OUTER_TEXT_SPRINT source_paw ~werewlf1~
      OUTER_TEXT_SPRINT destination_paw ~werewlf3~
    END
    
    ACTION_IF FILE_EXISTS_IN_GAME ~%source_paw%.itm~ BEGIN
      COPY_EXISTING ~%source_paw%.itm~ ~override~
        LAUNCH_PATCH_FUNCTION ~ALTER_SPELL_EFFECT~ // LINKS TRANSFORMATION WITH CORRECT PAW ATTACK
          INT_VAR
            check_globals = 1
            check_headers = 1
            header = 1
            header_type = 1
            match_opcode = 111
            timing = 2
          STR_VAR 
            resource = EVAL ~%destination_paw%~
        END
        BUT_ONLY
      
      COPY_EXISTING ~%source_paw%.itm~ ~override/%destination_paw%.itm~
        LAUNCH_PATCH_FUNCTION ~ALTER_ITEM_HEADER~ // dice size and dice thrown
          INT_VAR
            check_globals = 1
            check_headers = 1
            header = 1
            header_type = 1
            dicesize  = 12
            dicenumber = 1
            damage_bonus = 0
        END
    END

    You may also want to add a condition to the component to prevent users from installing it on games other than the ones you support.  You can do so by adding a REQUIRE_PREDICATE right after the start of your component.  When the condition isn't met, the user will be prevented from installing the component and they will instead see the associated message.

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

     

    Thanks! Thats exactly what I needed! And yeah ITM doesnt have opcode 111, that part was from a different part of the code.

    Although it seems to be ignoring the code now...

    Basically the point of the mod is that when your using the Shapeshifter Druid kit, it adds a weaker werewolf form for lower levels ( among other changes to the kit that dont matter here). Now everytime I transform into the lesser form and try to go to inventory, stats, spellbook, etc. the game crashes. I boldened the part that causes the issue:

     

    // For BG1EE
    ACTION_IF GAME_IS ~BGEE~ BEGIN
      OUTER_TEXT_SPRINT source_paw ~brbrp~
      OUTER_TEXT_SPRINT destination_paw ~brbrp2~
    END

     // For BG2EE
    ELSE ACTION_IF GAME_IS ~BG2EE~ BEGIN
      OUTER_TEXT_SPRINT source_paw ~cdbrbrp~
      OUTER_TEXT_SPRINT destination_paw ~cdbrbrp3~
    END

    // For IWDEE
    ELSE ACTION_IF GAME_IS ~IWDEE~ BEGIN
      OUTER_TEXT_SPRINT source_paw ~werewlf1~
      OUTER_TEXT_SPRINT destination_paw ~werewlf3~
    END

        
            COPY_EXISTING ~%source_paw%.itm~ ~override/%destination_paw%.itm~

                LAUNCH_PATCH_FUNCTION ~ALTER_ITEM_EFFECT~ // LINKS TRANSFORMATION WITH CORRECT PAW ATTACK
                  INT_VAR
                  
                  STR_VAR 
                    resource = ~WERELEDR~
                END 
                

                LAUNCH_PATCH_FUNCTION ~ALTER_ITEM_HEADER~ // dice size and dice thrown
                  INT_VAR
                  check_globals = 1
                  check_headers = 1
                    header = 1
                    header_type = 1
                    dicesize  = 6
                    dicenumber = 1
                    damage_bonus = 0
                END
    [......] ( similar opcode changes)

     


        
    COPY_EXISTING ~spcl643.spl~ ~override/spcl645.spl~  // adds the Shapeshift: Lesser Werewolf transformation
                SAY NAME1 ~Shapeshift: Lesser Werewolf~
                SAY NAME2 ~Shapeshift: Lesser Werewolf~
                SAY 0x50 ~Shapeshift: Lesser Werewolf

                        Strength: 18 
                        Dexterity: 15
                        Constitution: 15
                        
                        Base Armor Class: 4
                        Number of Attacks: 1
                        Attack Damage: 1d6 (slashing), strikes as +1 weapon

                        Special Abilities:
                        – Magic Resistance: 10% ~
                

            LAUNCH_PATCH_FUNCTION ~ALTER_SPELL_EFFECT~ // LINKS TRANSFORMATION WITH CORRECT PAW ATTACK
                  INT_VAR
                    check_globals = 1
                    check_headers = 1
                    header = 1
                    header_type = 1
                    match_opcode = 111
                    timing = 2
                  
                  STR_VAR 
                    resource = ~%destination_paw%//heres the problem. For some reason, it doesn't put destination_paw. When I designate brbrp2 (the file it would need for BG1) it works. 
                END     

                        
            LAUNCH_PATCH_FUNCTION ~ALTER_SPELL_EFFECT~ // Makes polymorph cosmetic only
              INT_VAR
                match_opcode = 135                         
                timing = 0   
                target = 1          
                resistance = 2
                parameter1 = 0                                                                 
                parameter2 = 0   // 1 = Appearance only, 0 = normal morphing
                probability1 = 100                                                             
                insert_point = 0    
                
              STR_VAR 
                resource = ~WERELEDR~
        
            END
        

     

  5. 37 minutes ago, Jarno Mikkola said:

    ACTION_IF F... plah plah plah is totally unnessasary, while you could do this by adding the COPY_EXISTING to the previous ACTION_IF GAME_IS functions insides...

    I'm not quite sure I understand.

    43 minutes ago, Jarno Mikkola said:

    Aka, if you aren't taking input from the player, or customizing multiple files at the same time, then there is only 1 ACTION_IF clause for the main functionality of the modification action.

    ok then how do I make it so that it alters the file corresponding to the specific game without copying the same code 3 times for each instance?
     

  6. Also 

    PACTHACTION_IF GAME_IS ~BGEE~ THEN BEGIN // For BG1EE
        LAUNCH_PATCH_FUNCTION ~ALTER_SPELL_EFFECT~ // LINKS TRANSFORMATION WITH CORRECT PAW ATTACK
              INT_VAR
                check_globals = 1
                check_headers = 1
                header = 1
                header_type = 1
                match_opcode = 111
                timing = 2
              
              STR_VAR 
                resource = ~BRBRP2~
            END     
    END

    causes a parse error:

     

    Parse error (state 232) at LAUNCH_PATCH_FUNCTION

    [SETUP-BALANCED_SHAPESHIFTER_KIT.TP2] PARSE ERROR at line 70 column 8-28
    Near Text: LAUNCH_PATCH_FUNCTION
            GLR parse error

    [SETUP-BALANCED_SHAPESHIFTER_KIT.TP2]  ERROR at line 70 column 8-28
    Near Text: LAUNCH_PATCH_FUNCTION
            Parsing.Parse_error
    ERROR: parsing [SETUP-BALANCED_SHAPESHIFTER_KIT.TP2]: Parsing.Parse_error
    ERROR: problem parsing TP file [SETUP-BALANCED_SHAPESHIFTER_KIT.TP2]: Parsing.Parse_error

    FATAL ERROR: Parsing.Parse_error

     

     

     

     

    Nevermind this one, found PATCH_IF was a thing that existed 

  7. 3 hours ago, Jarno Mikkola said:

    You don't need one ! As you can use multiple ACTION_IF's...

    As in, you don't need to declare what you would like to happen if the game is Robocop 2073:

    
    
    ACTION_IF GAME_IS ~BGEE~ THEN BEGIN
    ...
    END
    
    ACTION_IF GAME_IS ~BG2EE~ THEN BEGIN
    ...
    END
    
    ACTION_IF GAME_IS ~IWDEE~ THEN BEGIN
    ...
    END

    And probably have multiple folders for the games each that store their own .itm's etc files that they need, so you can just COPY the entirety of the folder in one action(in case the files don't need any further modification, like names).

     

     

    Wait, if I understood correctly, then where the [...] is I have to copy the same code over and over again? Thats exactly what I'm trying to avoid with ELSE_IF:

    Right now I have this in one part of my code, each one needs a different resource:

    ACTION_IF GAME_IS ~BGEE~ THEN BEGIN // For BG1EE
        LAUNCH_PATCH_FUNCTION ~ALTER_SPELL_EFFECT~ // LINKS TRANSFORMATION WITH CORRECT PAW ATTACK
              INT_VAR
                check_globals = 1
                check_headers = 1
                header = 1
                header_type = 1
                match_opcode = 111
                timing = 2
              
              STR_VAR 
                resource = ~BRBRP2~
            END     
    END
            
    ACTION_IF GAME_IS ~BG2EE~ THEN BEGIN    // For BG2EE
        LAUNCH_PATCH_FUNCTION ~ALTER_SPELL_EFFECT~ // LINKS TRANSFORMATION WITH CORRECT PAW ATTACK
              INT_VAR
                check_globals = 1
                check_headers = 1
                header = 1
                header_type = 1
                match_opcode = 111
                timing = 2
              
              STR_VAR 
                resource = ~CDBRBRP3~
            END 
    END        
            
    ACTION_IF GAME_IS ~IWDEE~ THEN BEGIN // For IWDEE
        ACTION_IF FILE_EXISTS_IN_GAME ~werewlf1.itm~ BEGIN
            COPY_EXISTING ~werewlf1.itm~ ~override~
            
            LAUNCH_PATCH_FUNCTION ~ALTER_SPELL_EFFECT~ // LINKS TRANSFORMATION WITH CORRECT PAW ATTACK
              INT_VAR
                check_globals = 1
                check_headers = 1
                header = 1
                header_type = 1
                match_opcode = 111
                timing = 2
              
              STR_VAR 
                resource = ~werewlf3~
            END 
    END        

     

    This is fine because its just one LPF, but for the rest what I need is:

                // adds paw attack for Lesser Werewolf form

    ACTION_IF FILE_EXISTS_IN_GAME ~brbrp.itm~ BEGIN        // For BG1EE
                        COPY_EXISTING ~BRBRP.ITM~ ~override/brbrp2.ITM~ 


    ACTION_IF FILE_EXISTS_IN_GAME ~cdbrbrp.itm~ BEGIN   // For BG2EE
                        COPY_EXISTING ~cdbrbrp.itm~ ~override/cdbrbrp3.itm~
                        
                        
    ACTION_IF FILE_EXISTS_IN_GAME ~werewlf1.itm~ BEGIN // For IWDEE
                        COPY_EXISTING ~werewlf1.itm~ ~override/werewlf3~

     

    LAUNCH_PATCH_FUNCTION ~ALTER_ITEM_HEADER~ // dice size and dice thrown
                  INT_VAR
                  check_globals = 1
                  check_headers = 1
                    header = 1
                    header_type = 1
                    dicesize  = 12
                    dicenumber = 1
                    damage_bonus = 0
                END

    [.....] (a LOT of LPF code like the above one. of which is exactly the same in all 3 versions)

     

    I don't want to paste the same sections of code 3 times for each difference, it will be too long.

  8. 18 minutes ago, Jarno Mikkola said:

    You don't need one ! As you can use multiple ACTION_IF's...

    As in, you don't need to declare what you would like to happen if the game is Robocop 2073:

    
    
    ACTION_IF GAME_IS ~BGEE~ THEN BEGIN
    ...
    END
    
    ACTION_IF GAME_IS ~BG2EE~ THEN BEGIN
    ...
    END
    
    ACTION_IF GAME_IS ~IWDEE~ THEN BEGIN
    ...
    END

    And probably have multiple folders for the games each that store their own .itm's etc files that they need, so you can just COPY the entirety of the folder in one action(in case the files don't need any further modification, like names).

    Huh.. yeah that makes sense actually. I'm more used to C language where you NEED else_if or else the program has a heart attack... according to my old teachers anyway 😂

    So the need for else_if was kinda drilled into me.

  9. 20 minutes ago, Artemius I said:

    It's easier if you post the mod content so the specific code can be provided, but you can designate specific files for games by doing something like this:

    
    ACTION_IF GAME_IS ~BGEE BG2EE IWDEE~ THEN BEGIN
    
    COPY ~%MOD_FOLDER%/items/filename.itm~ OVERRIDE
    
    END

     

    For example, I have a mod for the Shapeshifter kit:

     

        ACTION_IF FILE_EXISTS_IN_GAME ~brbrp.itm~ BEGIN
            COPY_EXISTING ~brbrp.itm~ ~override~

    This is for the werewolf forms paw attack in BG1, in each game the file is named differently. So with that code I would start with:

    ACTION_IF GAME_IS ~BGEE BG2EE IWDEE~ THEN BEGIN
        ACTION_IF FILE_EXISTS_IN_GAME ~brbrp.itm~ BEGIN
            COPY_EXISTING ~brbrp.itm~ ~override~

    END

    now I would need an ELSE IF statement. According to Weidu, I can do ELSE but I cant find anything for ELSE IF:
     

    ACTION_IF GAME_IS ~BGEE BG2EE IWDEE~ THEN BEGIN
        ACTION_IF FILE_EXISTS_IN_GAME ~brbrp.itm~ BEGIN
            COPY_EXISTING ~brbrp.itm~ ~override~

    END ELSE

    ACTION_IF FILE_EXISTS_IN_GAME ~cdbrbrp.itm~ BEGIN  // PAW ATTACK FOR bg2
        COPY_EXISTING ~cdbrbrp.itm~ ~override~

     

    Now I need to able to put the one for IWD. Does ELSE_IF work in weidu?

     

     

     

  10. For the mods I've made, I have had to make three versions: BG1EE, BG2EE and IWDEE. It would be easier if I could just fit all three in one file, especially since most of the code is the same, its just that there's one or two files unique to each.

    I want to put IF statements to check what game is being installed but I'm not sure how I would do that.

  11. On 2/1/2021 at 11:30 AM, Artemius I said:

    Here's a premade macro (not by me, but I can't quite remember who did it) that will do the work for you.

    Make sure you actually have a lib folder (library, or make it whatever you want, just make sure the paths match) with the kit_strref.tpa in it or it won't work.

    
    
      INCLUDE ~%MOD_FOLDER%/lib/kit_strref.tpa~
    LAF ~GET_KIT_STRREF~ STR_VAR kit_name = ~SHAPESHIFTER~ RET kit_strref END
    STRING_SET_EVALUATE kit_strref ~SHAPESHIFTER: This Druid is not called Shapeshifter because has access to a great variety of forms, but rather because of complete dedication to a single alternate form. This Druid has willingly allowed self to become infected with lycanthropy, but due to intense study and training has the ability to control affliction. The creature becomes is that of the werewolf, the most famous of the lycanthrope shape changers.
    
    Advantages:
    – 7th level: May Shapeshift into a normal werewolf once per day.
    – 13th level: May Shapeshift into a greater werewolf once per day.
    
    Disadvantages:
    – May not wear any armor.
    – No other Shapeshifting abilities due to the effort required in maintaining balance in primary forms.~

     

    kit_strref.tpa 1.96 kB · 3 downloads

    How do I use this to change the name of a kit? It would be useful for another mod I'm making... and unfortunately I can't understand the kit_strref file 😂

  12. 59 minutes ago, temnix said:

    If you are going to delve into projectiles, you need to find out how they work. For this you should take some existing animations that aren't hard-coded, i.e. have a PRO file, then try using them and editing them and testing them again. Only when you have a clear idea of the mechanics, the frequency of firing, how "Number of repetitions 1" is different from "Number of repetitions 0," secondary and multiple projectiles, will you be able to make the visual element impressive - and audial, too, because new visuals should come with new sounds for a complete effect. The existing sounds are generic and for the most part cheap and dull, though on occasion you can find a use for one or two. It then becomes a question of where to get new sounds, but to stay on your topic: begin experimenting by making an item with a number of special abilities that you will be using for testing.

    I use a ring, copied from the ring of invisibility originally and named +RING.ITM. This way it shows on top of the override files in Near Infinity. I type it in from the console in the game and have it always available. The ring has a bunch of abilities, some targeting Living actor and some Any point within range or Caster, and different projectiles are selected. You can begin by editing, say, INAREANP (Instant area enemies-only), changing it how you like and switching the visual representation for the AoE to "Custom." Then you can try ring and spread animations, with and without glow/blending, or only ring, or only spread. Random speed, yes or no? I would say yes, for damage cones. Try it with 0 repetitions. There are lots of little knacks to learn, but if you like the process, it won't be a chore. And you'll probably invent many more things along the way. ;) 

    As to where you can get actual graphics to belch, I suggest, first, looking into fire and changing the existing Dragon Disciple breath weapon to use a cone projectile instead of Agannazar's Scorcher. Try BURNHAND.BAM for the source, but look carefully into the frame centering there. You'll see that the frames aren't centered perfectly within the cycles. The plus (center point) wobbles. You need to adjust its position by a pixel in a couple of frames so that every cycle burns evenly on the Preview screen. I remember this because I've looked into that file myself once. After you have fixed the centering, add more frames to every cycle, beyond 5. This is important for all cone graphics, because cones begin to be drawn incorrectly a short distance away from the source. The standard Cone of cold, for example, will often break chaotically a few feet out and turn sideways. That looks ugly, and the reason it happens is that the engine fails to orient cycles after the first loop. Thus, you need to beef up any cycles which you expect to play for some distance away, especially if you use Repetitions 0 + Random Speed. Here is an example of what that would look like. On this screenshot the caster turns into a flock of birds that spread out in every direction and will fly until they reach the ends of the area. I used the small bird animation, ABIRD.BAM, edited to have 16 directions, but the birds at first turned on their sides, nearly flew backwards. This went on until I realized I needed to add many more frames to every cycle. Cycle 0 had to run like this: 0,1,2,3,4,5,0,1,2,3,4,5,0... A few dozen frames. Repeat this for every direction for your cone - and you need to rotate and mirror that fire cone, importing-exporting-importing until you have a 16 directions PRO.

    1544592435_.jpg.fd02c3fc52ef5a77108314dcb17b6bba.jpg

    When the fire cone is ready, try it with a cone-shaped projectile. "Ignore center." "Face target." "Not mirrored (full)." Speed controls the rate of spread. As for the other elements you want... You might be able to recolor SPFIRET or the nearby flame bolts for acid and find a substitute for electricty, but if you want real class, look for graphics outside of the standard set. Two games I know where the graphics are good and extractable are Arcanum and Diablo 2. Another source is the Internet: do a search for the sort of animation you want. There are lots of abstract animated gifs out there. You may not get exactly the right pick, you may have to edit the frames, crop them, turn them around... I suggest ezgif.com for manipulations. But if you find something cool and edit it smartly, your acid, shock and the rest will come out truly original. As for the dragon breath animations that you are unhappy about, they are supposed to represent breath snorted from up high, by a dragon, diagonally (check out the graphics used in Red dragon breath and the cycles there). But Bioware never managed to get those exhalations to play correctly, or rather, make them drawn at the right distance from the dragon and centered where the damage originated. In the end they settled for a fireball for reds, a sort of glow for silvers. Real cones such as I've been talking about here would not do for dragons, because the height would be wrong. You have no such problems with your man-sized dragon disciples, however.  

    Oh boy that's a lot to take in 😂

    Thank you! I'll see what can do!

  13. I'm working on a mod that takes the dragon disciple kit and copies it into 5 total kit each focused on a different elemental damage type: fire, cold, electricity, acid and poison.

    The mod is finished... except for the breath weapon animations. for cold, I used the animation for Cone of Cold, which works. It doesn't fit the area of the breath weapon completely but its close enough.

    the problem is the other 3 elements. There are no suitable animations. The closest I got for acid and maybe poison was with the animation for the Acid Stream ability from the item The Visage... but instead of just playing an animation and doing the damage in a cone like its suppose to, if fires a projectile and damages everything around it, including the caster. Electricity there's nothing. I tried call lightning but it had the same issue as the Acid Stream...

    Spells like stinking cloud and storm of vengeance could work, but the clouds stay and continue to damage those in it.

    Are there any other animations I can use? Or a way to get the ones I have to just appear and not affect the breath weapon itself then disappear?

    In my code I change the source of the "projectile" spell header:

    LPF ALTER_SPELL_HEADER // Changes breath weapon animation
        INT_VAR
            projectile = 25
    END

     

    I know there are animations for dragon breath weapons.. but they are terrible. a few colored lines appear form the caster and for some reason they do no damage to anything.

  14. 13 hours ago, subtledoctor said:

    I think opcode 12 combines both damage type and modifier type in parameter2, so it’s difficult to work with. Try:

    
    
    
    
    
    
    
    
    
    LPF ALTER_EFFECT INT_VAR match_opcode = 12 parameter2 = (0 + (4 << 16)) END

    The ‘0’ is for modifier type (increment) and the ‘4’ is damage type (electric) but you are applying the ‘4’ two bytes over within the field, so to speak (i.e. 16 bits over, thus ‘<< 16’). Adding the two values together gives you the whole value for parameter2. If you expressed it as an integer it would indeed be 262144. But that seems even more inscrutable than (0 + (4 << 16))... to me at least.

    
    
    
    
    
    
    
    
    
     

    It worked! thanks!

    yeah thats extremely confusing. 

    My bit fields are VERY rusty, so if I wanted to do Acid damage it would be: 

    LPF ALTER_EFFECT 
        INT_VAR 
        match_opcode = 12 
        parameter2 = (0 + (1 << 4))  (0 + (1 << 16)) 
    END

    1 is the damage type and 4 is two bytes over?

    Edit: Nevermind, I misunderstood something. 16 stays there and only the middle number changes! I have ll the breath weapons to what they should be!

     

     

    Also, which command would work to just rename the original kit to Dragon Disciple (Fire)? ADD_KIT_EX and overwrite the original? Or is there an Alter command that would be simpler?

  15. 5 hours ago, argent77 said:

    There are actually kit_example.tph, kit_example2.tph, kit_example3.tph and kit_example4.tph to demonstrate how to add a regular singleclass kit, copy an existing kit, retrieving attributes from an existing kit and adding a true multiclass kit in addition to the readme. The parameters are largely the same as for the old ADD_KIT/fl#add_kit_ee combo, so there shouldn't really be a need for another tutorial.

    Those are great! Thanks! they were in the download but I didnt know I could open .tph files 😂

  16. 36 minutes ago, subtledoctor said:

    Actually ADD_KIT_EX is good for that as well, probably better than ADD_KIT, and no need for the extra fl#_ function. If I was starting making kits now I would be using the new function, rather than the old one. 

    yeah add_kit_ex worked great! now im just altering the effects. Although im stuck at changing the breath weapon damage type.

    https://gibberlings3.github.io/iesdp/opcodes/bgee.htm#op12 opcode 12 has a bunch of possible values.. except in-game according to near infinity:

    image.png.dd39c9e7b004bcec4ec850e199183dc3.png

     

    So now im assuming I need to do it according to what near infinity says. so my code is:

     

    COPY_EXISTING ~spdd03.spl~ ~override/spdd08.spl~  // creates file for electric breath weapon

    LAUNCH_PATCH_FUNCTION ~ALTER_SPELL_EFFECT~ // Changes breath weapon to electric damage
              INT_VAR
                match_opcode = 12
                check_globals = 1
                check_headers = 1
                header = 1
                header_type = 1
                parameter2 = 4

            END

     

    .... but its not doing anything, and ive tried parameter2 = 262144 like in the documentation but that didn't work either. 

     

    Also there's four of these for each time the breath weapon gets stronger:

    image.png.0142d516f572c004774b861350e6c707.png

     

    So would that ALTER_SPELL_EFFECT affect all of them or just one?

  17. 1 hour ago, subtledoctor said:

    You put the .tpa file somewhere in your mod... like /my_mod/lib/ or something. Then in your .tp2 file you make sure the function is available to the mod by including it:

     

    
    INCLUDE ~my_mod/lib/a7#add_kit_ex.tpa~


    (That can be in your AKWAYS block, if you have one.)

    Then, after the function is INCLUDE’d, you can use it according to the documentation. 

    Ah ok! 

    Also I still need to figure out what files it uses. Something like this  https://gibberlings3.github.io/iesdp/appendices/bg2kitabilities.htm  but up to date for the Enhanced Edition.

  18. 4 hours ago, subtledoctor said:

    I believe there is a COPY_KIT macro that is part of Weidu, works similar to ADD_KIT. But I vaguely recall Camdawg saying it is imperfect... maybe because it does not handle EE kit attributes, and fl#add_kit_ee doesn't work with it?

    In any event, @argent77's ADD_KIT_EX function is perfect for this sort of thing. As an extreme example, my mod uses it to systematically clone every single cleric and druid kit into several multiclass versions. Adds ~150 or more kits to the game in one fell swoop.  That particular application is quite complicated, but for something like copying the DD kit into a variant version, ADD_KIT_EX could serve your purpose well.

    That's awesome! Just to make sure, how do I use the files in the zip file? .gitattributes, a7#add_kit_ex.tpa, etc.

  19. I just finished a mod for the shapeshifter kit and now im thinking about making one for the Dragon Disciple, I want to make copies that each focus on one of the other dragon elemental types ( cold, electricity, poison and acid) and I want to see how easy\viable that would be.

    So two questions:

    1. Where do I find out what files the Dragon Disciple uses? For the Shapeshifter I used this:  https://gibberlings3.github.io/iesdp/appendices/bg2kitabilities.htm but it seems its for the original release and not the EE versions, so no Sorcerer.

    2. How do I copy a kit? I know there's the ADD_KIT command but I don't want to recreate form scratch. Just copy the kit and make changes.

  20. 14 minutes ago, Artemius I said:

    Here's a premade macro (not by me, but I can't quite remember who did it) that will do the work for you.

    Make sure you actually have a lib folder (library, or make it whatever you want, just make sure the paths match) with the kit_strref.tpa in it or it won't work.

    
    
      INCLUDE ~%MOD_FOLDER%/lib/kit_strref.tpa~
    LAF ~GET_KIT_STRREF~ STR_VAR kit_name = ~SHAPESHIFTER~ RET kit_strref END
    STRING_SET_EVALUATE kit_strref ~SHAPESHIFTER: This Druid is not called Shapeshifter because has access to a great variety of forms, but rather because of complete dedication to a single alternate form. This Druid has willingly allowed self to become infected with lycanthropy, but due to intense study and training has the ability to control affliction. The creature becomes is that of the werewolf, the most famous of the lycanthrope shape changers.
    
    Advantages:
    – 7th level: May Shapeshift into a normal werewolf once per day.
    – 13th level: May Shapeshift into a greater werewolf once per day.
    
    Disadvantages:
    – May not wear any armor.
    – No other Shapeshifting abilities due to the effort required in maintaining balance in primary forms.~

     

    kit_strref.tpa 1.96 kB · 3 downloads

    Awesome! it worked for BG1. But when I tried it for BG2 and IWD it doesnt work. says it cant find kit_strref.tpa even though the lib folder is there 

    Nevermind! found the problem! 

  21. 10 hours ago, subtledoctor said:

    Thanks! Although I think I'm still doing something wrong. According to the post this should work, I changed only what they said to change. It gives a parse error:


    ACTION_IF (FILE_EXISTS_IN_GAME ~clastext.2da~) BEGIN
        COPY_EXISTING ~clastext.2da~ ~override~
            COUNT_2DA_COLS cols
            READ_2DA_ENTRIES_NOW rows cols
            FOR (row = 1; row < rows; ++row) BEGIN
                READ_2DA_ENTRY_FORMER rows row 0 ~kit_name~
                PATCH_IF ~SHAPESHIFTER~ STRING_EQUAL_CASE ~SHAPESHIFTER~ BEGIN
                    SET patch_row = %row%
                END
            END
            SET_2DA_ENTRY %patch_row% 5 cols RESOLVE_STR_REF ~SHAPESHIFTER: This Druid is not called Shapeshifter because has access to a great variety of forms, but rather because of complete dedication to a single alternate form. This Druid has willingly allowed self to become infected with lycanthropy, but due to intense study and training has the ability to control affliction. The creature becomes is that of the werewolf, the most famous of the lycanthrope shape changers.

    Advantages:
    – 7th level: May Shapeshift into a normal werewolf once per day.
    – 13th level: May Shapeshift into a greater werewolf once per day.

    Disadvantages:
    – May not wear any armor.
    – No other Shapeshifting abilities due to the effort required in maintaining balance in primary forms.~    
        BUT_ONLY
    END

     

     


    ACTION_IF (FILE_EXISTS_IN_GAME ~sodcltxt.2da~) BEGIN
        COPY_EXISTING ~sodcltxt.2da~ ~override~
            COUNT_2DA_COLS cols
            READ_2DA_ENTRIES_NOW rows cols
            FOR (row = 1; row < rows; ++row) BEGIN
                READ_2DA_ENTRY_FORMER rows row 0 ~kit_name~
                PATCH_IF ~SHAPESHIFTER~ STRING_EQUAL_CASE ~SHAPESHIFTER~ BEGIN
                    SET patch_row = %row%
                END
            END
            SET_2DA_ENTRY %patch_row% 5 cols RESOLVE_STR_REF ~SHAPESHIFTER: This Druid is not called Shapeshifter because has access to a great variety of forms, but rather because of complete dedication to a single alternate form. This Druid has willingly allowed self to become infected with lycanthropy, but due to intense study and training has the ability to control affliction. The creature becomes is that of the werewolf, the most famous of the lycanthrope shape changers.

    Advantages:
    – 7th level: May Shapeshift into a normal werewolf once per day.
    – 13th level: May Shapeshift into a greater werewolf once per day.

    Disadvantages:
    – May not wear any armor.
    – No other Shapeshifting abilities due to the effort required in maintaining balance in primary forms.~    
        BUT_ONLY
    END

     

     

     

    ACTION_IF (FILE_EXISTS_IN_GAME ~kitlist.2da~) BEGIN
        COPY_EXISTING ~kitlist.2da~ ~override~
            COUNT_2DA_COLS cols
            READ_2DA_ENTRIES_NOW rows cols
            FOR (row = 1; row < rows; ++row) BEGIN
                READ_2DA_ENTRY_FORMER rows row 1 ~kit_name~
                PATCH_IF ~SHAPESHIFTER~ STRING_EQUAL_CASE ~SHAPESHIFTER~ BEGIN
                    SET patch_row = %row%
                END
            END
            SET_2DA_ENTRY %patch_row% 4 cols RESOLVE_STR_REF ~SHAPESHIFTER: This Druid is not called Shapeshifter because has access to a great variety of forms, but rather because of complete dedication to a single alternate form. This Druid has willingly allowed self to become infected with lycanthropy, but due to intense study and training has the ability to control affliction. The creature becomes is that of the werewolf, the most famous of the lycanthrope shape changers.

    Advantages:
    – 7th level: May Shapeshift into a normal werewolf once per day.
    – 13th level: May Shapeshift into a greater werewolf once per day.

    Disadvantages:
    – May not wear any armor.
    – No other Shapeshifting abilities due to the effort required in maintaining balance in primary forms.~    
        BUT_ONLY
    END

  22. I just finished a mod for the Shapeshifter kit and I realized that the kit description in the character creator needs to be updated. Where would I find the file?

    I found that its on StringRef: 25225 for baldurs gate 2 and  icewind dale, 24311 for Baldurs gate 1

     

    Also what code would I use to change only the description? What I have so far is:

     

    COPY_EXISTING ~#####~ ~override/#####~

            // updates kit description at character creation
        SAY 0x50: ~SHAPESHIFTER: This Druid is not called Shapeshifter because  has access to a great variety of forms, but rather because of complete dedication to a single alternate form. This Druid has willingly allowed self to become infected with lycanthropy, but due to intense study and training has the ability to control affliction. The creature becomes is that of the werewolf, the most famous of the lycanthrope shape changers.

                        Advantages:
                        – May Shapeshift into the form of a lesser werewolf once per day every 2 levels (starts at 1st level with one use).
                        – 7th level: May Shapeshift into a normal werewolf once per day.
                        – 13th level: May Shapeshift into a greater werewolf once per day.

                        Disadvantages:
                        – May not wear any armor.
                        – No other Shapeshifting abilities due to the effort required in maintaining balance in primary forms.~

×
×
  • Create New...