Skip to content

General mod Questions thread

1474850525370

Comments

  • The user and all related content has been deleted.
  • kjeronkjeron Member Posts: 2,368
    For opcode 1, does param1 = -6 result in -1/2 APR? In NI it shows -6 as "error."
    Yes. The negative values match their positive counterparts.
  • AlonsoAlonso Member Posts: 806
    edited March 2019
    I'd like to know the general rules or guidelines for installing mods. I want to do my first planned mod installation, so I searched a bit for tips, but I just found lots of info spread across dozens of threads, quite confusing.

    The list of mods I want to install is relatively short:
    • SCS
    • Lighting pack
    • Jimfix
    • Tweaks Anthology (only a few components).
    • EE UI Tweaks or other mod that fixes the Journal.

    I have several doubts I couldn't solve with all my googling: What's the right install order? Should I use a mod manager? If so, which one? Is it fine to add or remove mods in the middle of a playthrough? Anything else I should consider?
    Post edited by Alonso on
  • RaduzielRaduziel Member Posts: 4,714
    There's not an official install order, but as a rule of thumb you may ask yourself: what changes what?

    Let's say you have a kit mod. A kit usually messes with weapon restriction. So if I also have a mod that install weapons I should install it before the kit.

    Tweaks Anthology and SCS comes last because they change a little bit of everything.

    My generic order is:

    - Items' mods

    - Spells tweaking

    - Quest's mods

    - Kits

    - Things that clearly alter kits (like argent's Improved Shamanic Dance).
  • GoidaGoida Member Posts: 118
    Hey, @Raduziel . The idea of a movement-stopping effect picked my interest. I went ahead and made a spell that will keep the target motionless and not trying to scamper anywhere. Use the ring to cast it. I did have a crash once when testing it, but I don't know whether that's because of some problem with my installation, I have a bunch of mods in progress in this folder, or because I'm using Delayed/Permanent at delay 0 to renew the spell. It can't be cast instantaneously, you see, otherwise an infinite loop starts and then there is always a crash. A real interval like 1 second is safe, but creatures sometimes manage to get a little walking in before they are stopped again. Test this setup and see if you have crashes or not. Watch out, though. The spell only prevents walking, so may still thump you if you come near. :)
  • GoidaGoida Member Posts: 118
    A question. I'm summoning some invisible minions in a row, and all of them have the same script trigger:

    !NumCreature([NEUTRAL.AMMO.DWARF.SORCERER],1)

    Those are their own IDS values, picked for rarity. What should happen is as soon as there is more than one of these minions, they begin to carry out commands. But they don't react. I've also tried

    NumCreatureGT([NEUTRAL.AMMO.DWARF.SORCERER],1)

    and still nothing. They don't accidentally have protection from those creature types or anything like that either, and they do See that type, see each other that is. But those triggers don't work. Why?
  • RaduzielRaduziel Member Posts: 4,714
    edited March 2019
    @Goida Thanks! I saw this post earlier and forgot to give you some feedback. I'll give it a try after I finish my pipeline with Deities of Faerûn. If everything works as intended it will be packed in version 1.9.7 (the next release).

    New questions:

    #1 What is the spell that grants Thac0 bonus for halflings when using a sling?

    #2 How can I ban all two-handed weapons from a kit? I know that there is a flag called "Two-handed", but I don't know what to do with that info.

    Edit: Maybe this?
    COPY_EXISTING_REGEXP ~.*\.itm~ override
    	READ_LONG 0x18 flags
    	PATCH_IF ((flags BAND 0b00000010) == 0b00000000) BEGIN
    		LPF ADD_ITEM_EQEFFECT (...)
    

    Thanks!
    Post edited by Raduziel on
  • kjeronkjeron Member Posts: 2,368
    Raduziel wrote: »
    #1 What is the spell that grants Thac0 bonus for halflings when using a sling?
    RACETHAC.2DA
  • RaduzielRaduziel Member Posts: 4,714
    edited March 2019
    kjeron wrote: »
    Raduziel wrote: »
    #1 What is the spell that grants Thac0 bonus for halflings when using a sling?
    RACETHAC.2DA

    Thanks! I was looking for a .spl to use as a base, but I'll just patch every sling with an opcode 177 aiming the kit and give the bonus through a .eff.

    Is the code on question #2 correct?
  • [Deleted User][Deleted User] Posts: 0
    edited March 2019
    The user and all related content has been deleted.
  • RaduzielRaduziel Member Posts: 4,714
    @subtledoctor maybe adding CASE_SENSITIVE to the code after EXACT_MATCH ?
  • RaduzielRaduziel Member Posts: 4,714
    Ok, this won't choke Weidu:
    //Restriction
    
    COPY_EXISTING_REGEXP ~.*\.itm~ override
    	READ_LONG 0x18 flags
    	PATCH_IF ((flags BAND 0b00000010) == 0b00000000) BEGIN
    		LPF ADD_ITEM_EQEFFECT
    			INT_VAR
    			  opcode = 319
    			  target = 1
    			  parameter1 = (RAXXXX + 0x4000)
    			  parameter2 = 9
    			  timing = 2
    		END
    	END
    BUT_ONLY
    

    But apparently does nothing lol.

    What am I missing?

    My goal is to ban from a kit all two-handed weapons. I could search by proficiency, but in IWD axes can be both one or two handed.

    Thanks!
  • The user and all related content has been deleted.
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    @subtledoctor

    If I am not mistaken, you were one of the first to notice that CLSWPBON.2da (GETS_PROF_APR) is not working as intended for multi-classed kits..... The problem is that for me it's not working for single-classed kits too..... Here's my code:
    LAF fl#add_kit_ee
    STR_VAR
        clswpbon = ~1 0 2~
    END
    
    What am I missing?
  • [Deleted User][Deleted User] Posts: 0
    edited March 2019
    The user and all related content has been deleted.
  • RaduzielRaduziel Member Posts: 4,714
    Yup, I had to mess with the trueclass Cleric for both APR and weapon proficiency. Then I made all the kits that shouldn't get extra APR lose it through clswpbon.

    A nuclear solution, but a solution.

    @subtledoctor At Weidu's readme I saw an example of code that used both EXACT_MATCH and CASE_SENSITIVE, IIRC. About your solution, I'll try it and will give some feedback here.

    Thanks!
  • RaduzielRaduziel Member Posts: 4,714
    COPY_EXISTING_REGEXP ~.*\.itm~ override
    	READ_LONG 0x18 flags
    	PATCH_IF ((flags BAND 0b00000010) == 0b00000010) BEGIN
    		LPF ADD_ITEM_EQEFFECT
    			INT_VAR
    			  opcode = 319
    			  target = 1
    			  parameter1 = (RAXXXX + 0x4000)
    			  parameter2 = 9
    			  timing = 2
    		END
    	END
    BUT_ONLY
    

    Ok, this works well, but it is working too well. How can I exclude longbow and shortbow from this code?

    ---

    Also, how can I read a game-generated crash report? I have a kit that is working perfectly in BG2EE but keeps crashing every time it levels up at IWDEE and I would like to understand why.

    The kit's main file can be found here:

    https://github.com/Raduziel/Deities-Of-Faerun/blob/master/DeitiesOfFaerun/Components/Yondalla-Kit.tpa

    The crashing file is attached.

    ---

    Thanks!
  • The user and all related content has been deleted.
  • RaduzielRaduziel Member Posts: 4,714
    Hello, dear modder from the future that found this thread through Google.

    @subtledoctor 's idea works like a charm and this part of the code will look like this:
    READ_BYTE 0x31 proficiency
    PATCH_IF ((flags BAND 0b00000010) == 0b00000010) && !(proficiency = 105) && !(proficiency = 104) BEGIN
    

    Thanks, doc!

    ---

    The crash is gone for good. IDK why exactly. All I did was remove an ACTION_IF from another one - what is odd as I've chained those many times before with no problems.

    All I need to do is run more tests and release the kit - preliminary results were good.
  • RaduzielRaduziel Member Posts: 4,714
    edited March 2019
    Hi, quick question.

    I want to make an altering in Resurrection so it may only be used in dead characters. I've already tried:

    p1 = STATE bit_uneq specified value

    p2 = STATE_DEAD

    ACTION_IF	FILE_CONTAINS_EVALUATED	(~SPELL.IDS~	~[ %TAB%]CLERIC_RESURRECTION[ %TAB%%WNL%%LNL%%MNL%$]~)	BEGIN
    LAF 	RES_NUM_OF_SPELL_NAME STR_VAR	spell_name = ~CLERIC_RESURRECTION~	RET	spell_res	END
    
    COPY_EXISTING ~%spell_res%.spl~ override
    SAY DESC @9999286
    LPF	ADD_SPELL_EFFECT INT_VAR opcode = 324 parameter1 = 2048 parameter2 = 139 timing = 1 STR_VAR resource = EVAL ~%spell_res%~ insert_point = 0 END
    
    END
    

    p1 = DEAD

    p2 = GENERAL != specified value
    ACTION_IF	FILE_CONTAINS_EVALUATED	(~SPELL.IDS~	~[ %TAB%]CLERIC_RESURRECTION[ %TAB%%WNL%%LNL%%MNL%$]~)	BEGIN
    LAF 	RES_NUM_OF_SPELL_NAME STR_VAR	spell_name = ~CLERIC_RESURRECTION~	RET	spell_res	END
    
    COPY_EXISTING ~%spell_res%.spl~ override
    SAY DESC @9999286
    LPF	ADD_SPELL_EFFECT INT_VAR opcode = 324 parameter1 = 3 parameter2 = 113 timing = 1 STR_VAR resource = EVAL ~%spell_res%~ insert_point = 0 END
    
    END
    

    The EVAL is being read properly (the correct spells is being displayed in NI) and this effect is being applied as the first effect of the spell as intended, but I'm able to both heal an injured character and resurrect a dead one.

    Suggestions?

    Thanks!
  • kjeronkjeron Member Posts: 2,368
    @Raduziel Your missing the "target" variable ( = 2 ).

    The first one is the better check. The second one is not reliable - GENERAL:DEAD is not actually set on dead creatures, though it is sometimes detectable (usually just the moment they die).
  • RaduzielRaduziel Member Posts: 4,714
    kjeron wrote: »
    @Raduziel Your missing the "target" variable ( = 2 ).

    The first one is the better check. The second one is not reliable - GENERAL:DEAD is not actually set on dead creatures, though it is sometimes detectable (usually just the moment they die).

    Thanks!

    I need to sleep, apparently.
  • RaduzielRaduziel Member Posts: 4,714
    I think I should share something cool I've learned yesterday.

    There are some opcodes that increases stats (like Opcode 49 that increases Wisdom).

    If you use timing = 9 the bonus/penalty will be displayed at the character screen as a magical/temporary effect (green for bonus, red for penalty).

    But if you use timing = 1 the bonus/penalty displays as a natural modifier (the number remains white).

    Well, this happened to me with Op 49, I'm just deducing that the same happens for the other stat-increasing Opcodes.
  • kjeronkjeron Member Posts: 2,368
    @Raduziel https://forums.beamdog.com/discussion/comment/856134/#Comment_856134
    It also determines (or is determined by) whether or not action "ChangeStat()" can modify a given stat.
    I do not recommend using such effects in CLAB files - as they alter the creature's base stat, there is nothing to remove, so anything that re-applies the CLAB file will cause the effects to stack (unless you are setting the value, not incrementing it).
  • The user and all related content has been deleted.
  • RaduzielRaduziel Member Posts: 4,714
    edited March 2019
    @kjeron Can you give me an example on how could this go wrong?

    I have a kit that gains +2 Wisdom (permanently). I've upped it until level 30 (IWDEE) and the effect was applied only once - both in the kit and its multiclass version. Everything behaved as expected.

    The same behave happened in BG2EE (ToB), leveling up all the way to level 40.

    Of course, the spell that applies this effect has a single header applied at CharGen with required level = 0.

    Thanks!

    Edit: I'm using Opcode 53 (Animation Change) in my Horn Guard and I can change it back normally using a second spell with Opcode 321 - IIRC the Timing of the transformation spell is set as 1. I can double-check later.

    ---

    @subtledoctor We are aiming at different goals, I suppose. My plan is to give the bonus permanently (like the tomes does), so the Opcode 321 issue isn't really a problem.
  • kjeronkjeron Member Posts: 2,368
    edited March 2019
    Raduziel wrote: »
    @kjeron Can you give me an example on how could this go wrong?
    Thanks!
    Dual-class and Export/Import.
    Kick -> Rejoin.
  • The user and all related content has been deleted.
  • RaduzielRaduziel Member Posts: 4,714
    Raduziel wrote: »
    We are aiming at different goals, I suppose. My plan is to give the bonus permanently (like the tomes does), so the Opcode 321 issue isn't really a problem.

    Try having the character leave the party and rejoin.

    In any event, what's wrong with timing mode 9? Are you really that concerned about the visual indicator of the bonus in the Record sheet?

    Of course, of you've got it to where it works well and you're satisfied (206 can help with the leave/rejoin party thing) then by all means. I'm just mentioning times I've had unexpected difficulties in the past.

    OCD makes me care a lot about the stupidest things.

    I'll add Opcode 206 as the final effect of the spell to prevent the reported issues.

    Thanks both of you guys for helping me out.

    ---

    Now, time for a question.

    I want to make a spell that gives a passive bonus (+2 to all savings) only when the character is in melee combat.

    Is it doable?
  • The user and all related content has been deleted.
Sign In or Register to comment.