Skip to content

General mod Questions thread

1111214161770

Comments

  • [Deleted User][Deleted User] Posts: 0
    edited November 2017
    The user and all related content has been deleted.
  • semiticgoddesssemiticgoddess Member Posts: 14,903
    Is it possible to change the effects of wild surges? In Near Infinity, there is a list of spells that match wild surge rolls (they all start with SPWM), but the list is incomplete, and certain surges, like the one that opens all doors in the area, are missing entirely.
  • argent77argent77 Member Posts: 3,434
    WILDMAG.2DA lists all wild surges and their associated spells. Some of the entries are still hardcoded and listed as '*' though.
  • mummemumme Member Posts: 4
    edited November 2017
    @subtledoctor: Thanks that was EXACTLY the code I needed! :-)

    Next question: I use op-code 189 (Casting Time Modifier) with a negative amount to increase casting time. In my experiments the total time for the casting animation increases, but the time until the spell takes effect stays the same.
    More concrete, I use an innate to select a spell from a 2da (op 214) but want an increased casting time for the selected spell and set op 189 to -6 in the innate. E.g. casting luck takes still 2 seconds until the effect icon appears but casting animation time is increased, approx 6s.
    Do you observe the same?
    Another way is to set 6 as casting speed for the innate, but than the player has to wait this time until the spell selection appears ... thats inconvenient.
  • geddoegeddoe Member Posts: 27
    Not sure if this is really a modding question, but I'm trying to add all the SoD items to BG2:EE. I extracted all the .itm files with DLTCEP and just copied them into the override folder in my BG2:EE installation. While this does allow me to console in the items and the items work how they're supposed to, the item names and descriptions are instead bits of dialogue from random points in the game. If someone's already made a mod for this, point me in the right direction, but I haven't been able to find one. If someone hasn't, can anyone recommend a fix?
  • The user and all related content has been deleted.
  • AstroBryGuyAstroBryGuy Member Posts: 3,437
    geddoe said:

    Not sure if this is really a modding question, but I'm trying to add all the SoD items to BG2:EE. I extracted all the .itm files with DLTCEP and just copied them into the override folder in my BG2:EE installation. While this does allow me to console in the items and the items work how they're supposed to, the item names and descriptions are instead bits of dialogue from random points in the game. If someone's already made a mod for this, point me in the right direction, but I haven't been able to find one. If someone hasn't, can anyone recommend a fix?

    The strings for items (e.g., names, descriptions) aren't stored in the .ITM files. You need to add them to the BG2EE dialog.tlk file and then set the string references in the .ITM files to point to the correct strings. You could do this manually in DLTCEP, or create a small WeiDU mod. The latter would have the advantage of being able to easily reinstall if/when an update is applied to the base game.
  • geddoegeddoe Member Posts: 27

    geddoe said:

    Not sure if this is really a modding question, but I'm trying to add all the SoD items to BG2:EE. I extracted all the .itm files with DLTCEP and just copied them into the override folder in my BG2:EE installation. While this does allow me to console in the items and the items work how they're supposed to, the item names and descriptions are instead bits of dialogue from random points in the game. If someone's already made a mod for this, point me in the right direction, but I haven't been able to find one. If someone hasn't, can anyone recommend a fix?

    The strings for items (e.g., names, descriptions) aren't stored in the .ITM files. You need to add them to the BG2EE dialog.tlk file and then set the string references in the .ITM files to point to the correct strings. You could do this manually in DLTCEP, or create a small WeiDU mod. The latter would have the advantage of being able to easily reinstall if/when an update is applied to the base game.
    Alright, anyone feel like walking me through the process of moving one SoD item into BG2:EE using WeiDU, keeping in mind I'm a total noob at modding?
  • The user and all related content has been deleted.
  • geddoegeddoe Member Posts: 27

    Isn't there a mod that already does that?

    https://forums.beamdog.com/discussion/56567/mod-bgii-ee-unofficial-item-pack/p1

    That's the only one I can find and it only adds some of the items. Not even close to all of them.
  • argent77argent77 Member Posts: 3,434
    Is it possible to restore an object identifier for a creature that has been discarded by a save and reload operation?

    My situation: I'm currently improving the behavior of spirits summoned by Shamanic Dance. However, there is one issue I couldn't solve yet. After a save and reload the LastSummonerOf(Myself) target doesn't work anymore and causes the spirit to be unsummoned eventually. Is there some way to restore or recreate it?
  • kjeronkjeron Member Posts: 2,367
    argent77 said:

    Is it possible to restore an object identifier for a creature that has been discarded by a save and reload operation?

    My situation: I'm currently improving the behavior of spirits summoned by Shamanic Dance. However, there is one issue I couldn't solve yet. After a save and reload the LastSummonerOf(Myself) target doesn't work anymore and causes the spirit to be unsummoned eventually. Is there some way to restore or recreate it?

    I haven't tested it, but this should work:
    IF
    	Global("SUMMONER","LOCALS",0)
    	InPartySlot(LastSummonerOf(Myself),0)
    THEN
    	RESPONSE #100
    		SetGlobal("SUMMONER","LOCALS",1)
    END
    IF
    	Global("SUMMONER","LOCALS",0)
    	InPartySlot(LastSummonerOf(Myself),1)
    THEN
    	RESPONSE #100
    		SetGlobal("SUMMONER","LOCALS",2)
    END
    IF
    	Global("SUMMONER","LOCALS",1)
    	!ModalStateObject(Player1,5)
    THEN
    	RESPONSE #100
    		DestroySelf()
    END
    IF
    	Global("SUMMONER","LOCALS",2)
    	!ModalStateObject(Player2,5)
    THEN
    	RESPONSE #100
    		DestroySelf()
    END
    // Repeat For each Party Slot
    
    IF
    	Global("SUMMONER","LOCALS",0)	//	For a Non-Party Summoner, closest approximation
    	!ModalStateObject(NearestAllyOf(Myself),5)
    	!ModalStateObject(SecondNearestAllyOf(Myself),5)
    	!ModalStateObject(ThirdNearestAllyOf(Myself),5)
    	!ModalStateObject(FourthNearestAllyOf(Myself),5)
    	!ModalStateObject(FifthNearestAllyOf(Myself),5)
    	!ModalStateObject(SixthNearestAllyOf(Myself),5)
    	!ModalStateObject(SeventhNearestAllyOf(Myself),5)
    	!ModalStateObject(EighthNearestAllyOf(Myself),5)
    	!ModalStateObject(NinthNearestAllyOf(Myself),5)
    	!ModalStateObject(TenthNearestAllyOf(Myself),5)
    THEN
    	RESPONSE #100
    		DestroySelf()
    END
    
  • argent77argent77 Member Posts: 3,434
    Thank you. So it's basically only possible by using a work around. It'll be difficult to use this approach for my mod, but I'll see what I can do.
  • ArunsunArunsun Member Posts: 1,592
    Is there a simple solution to create a weapon that would apply a certain effect every fifth hit? Not a 20% chance to apply the effect on each hit, but a 100% chance to apply the effect on the fifth hit.
  • BubbBubb Member Posts: 1,000
    edited February 2018
    I seem to recall a UI.MENU patch that another user on this forum provided that reverted the spell order in both the mage book and the priest book back to the "user-ordered" arrangement, as opposed to the current sorted arrangement. I've tried my best to google-fu the thread back from the dead, but I just cannot find it. Does anyone know where such a patch is located?

    EDIT: Google-fu came through, I was remembering this thread: https://forums.beamdog.com/discussion/59694/memorized-spells-order

    Apparently I misremembered the part about a fix. After some personal testing, the memorization order is honored by the hotbar, yet simulacrums honor a hardcoded sorted order - the one that MENU.UI emulates in its GUI. It's a shame that something like this should be out of a modders reach, though I'm sure the devs have their reasons.
    Post edited by Bubb on
  • __Q____Q__ Member Posts: 29
    Hey, everyone. I've never done any Baldur's Gate modding before, but I'm interested in adding random treasure to BG1:EE. Could someone point me in the direction of beginners' resources, especially stuff that might be geared toward what I'm trying to do?
  • ArctodusArctodus Member Posts: 992
    @__Q__ I suggest that you should start by tinkering the game with Near Infinity. You'll then be able to see how each items are coded and how you can change stuff on them. That would be your best bet to start, in my opinion.
  • ArctodusArctodus Member Posts: 992
    Hey guys and gals. A new baby crawling modder trying to learn WeiDU here. I'vd been trying to rebalance the Dwarven Defender class lately and I gave this class an aura that requires a projectile to function. I created the projectile in NI, exported it and placed it in my mod folder named ~ddr/pro.

    Then, I read that, to add a projectile to the game, it has to be numbered. If I'm not wrong, that's what the ADD_PROJECTILE function in WeiDU does. I tried two methods to add the projectile from my folder to the game and then to my custom spell (folder ~ddr/spl).

    ADD_PROJECTILE ~ddr/pro/A3DDAPR.PRO~ COPY ~ddr/A3DDASP1.spl~ ~override~ LPF ALTER_SPELL_HEADER INT_VAR projectile = %A3DDAPR% END

    ADD_PROJECTILE ~ddr/pro/A3DDAPR.PRO~ COPY ~ddr/spl/A3DDASP1.spl~ ~override~ READ_LONG 0x64 "abil_off" READ_SHORT 0x68 "abil_num" SET "delta" = 0 FOR (index = 0; index < abil_num; index = index + 1) BEGIN WRITE_SHORT (%abil_off% + (0x28 * %index%) + 0x26) ~%A3DDAPR%~ END

    However I keep getting the same parsing error at the ADD_PROJECTILE line with both methods. What am I doing wrong ?

    I'm slowly understanding how to change CLAB files and adding custom spells with WeiDU, but this I'm having difficulty with. Any help would be appreciated.

    Oh, and @subtledoctor, if I'm not mistaken, I believe you're on a Mac. What tool do you use to create your .tp2 files ?
  • [Deleted User][Deleted User] Posts: 0
    edited February 2018
    The user and all related content has been deleted.
    Post edited by [Deleted User] on
  • ArctodusArctodus Member Posts: 992
    Good god, this is awesome stuff !! A toggleable aura completely fits the Dwarven Defender theme, so I'll implement that for sure. Many thanks !!
  • BubbBubb Member Posts: 1,000
    A quick noob question here. I am trying to append a newline at the end of BGEE.LUA with Weidu; using this line:
    APPEND ~BGEE.LUA~ ~%WNL%~ Though no newline is being written to the file. %TAB% and other constants (not including the other newlines) work just fine. Anyone know what I'm doing wrong?
  • The user and all related content has been deleted.
  • BubbBubb Member Posts: 1,000
    @subtledoctor
    No dice. It just does not want to append a newline; it's quite strange.
  • kjeronkjeron Member Posts: 2,367
    I think Weidu removes all empty lines when it appends and/or inserts text. I've seen similar myself, but never pursued the cause as they weren't an issue.
  • [Deleted User][Deleted User] Posts: 0
    edited February 2018
    The user and all related content has been deleted.
  • BubbBubb Member Posts: 1,000
    In the bigger picture I am apending a dynamically created LUA table to BGEE.LUA to be used in MENU.UI, I just wanted the output to be human readable. Also, simply putting a return in my WeiDU source did indeed force WeiDU to append a newline, thank you for pointing that out!
  • __Q____Q__ Member Posts: 29
    I have another question. Say I want to recreate an area from one Infinity Engine game in a different IE game (for instance, putting an area from IWD or PS:T in BG2). What file type am I looking for? To be clear, I'm just talking about the background graphics, not the creatures, scripts, etc.

    I was able to find MOS files, which depict the areas, but they're small, low-quality images (I think they're for the minimap, but I'm not sure). Does anyone know which files are used for the full-quality background images?
  • kjeronkjeron Member Posts: 2,367
    edited February 2018
    @__Q__
    Background:
    AR####.TIS
    AR####N.TIS (night)
    +
    A######.PVRZ

    Structure:
    AR####.ARE
    AR####.WED

    Minimap:
    AR####.MOS

    Height/Light/Search maps:
    AR####HT.BMP
    AR####LM.BMP
    AR####LN.BMP (night)
    AR####SR.BMP
  • ArunsunArunsun Member Posts: 1,592
    And you will also need an AR####.BCS too, though this one will probably change much based on how you adapt the map to your mod.
    Still, if there are scripting things you want to keep make sure to get the BCS file too
  • ArctodusArctodus Member Posts: 992
    edited February 2018


    That is an at-will toggleable aura effect for necromancers, which I think is basically what you want to use for your dwarven defender. You can probably just copy and rename those files to use for your thing. What they do:

    - d5nctua.spl triggers d5nctub.eff (177), and also removes itself (172) and adds d5nctux (171) to your innate abilities bar.

    - d5nctub.eff is a 232 contingency effect rigged to always return 'true' - this is a more reliable version of opcode 272. The .eff should cast d5nctuc.spl on self every 6 seconds. (Right now it casts 'b' but that's the part that you should ignore.)

    - d5nctuc.spl will use your custom projectile. It will start with a 321 effect canceling itself, and then it has whatever effects you want it to have. The AC bonuses for allies etc. have "preset target (2)" targeting (so they use the projectile), and you can also add effects targeting "self (1)," like reduced movement speed, reduced APR, display portrait icon, etc. Note: the caster will be affected by the projectile, so any extra bonuses will be cumulative. If you want -2 AC for the caster and -1 AC for allies, then you want a -1 AC effect at "preset target" and a -1 AC effect at "self." Note, the duration of all these evfects should be 7 seconds; the spell is cast every 6 seconds so every 6 seconds it will seamlessly cancel itself and reinstate the effects fot another 7 seconds, until it is canceled.

    - d5nctux.spl should probably use the same projectile, or maybe just use no projectile and have the effects target "party (3)" for good measure. (That will affect all party members are-wide.) Give it 321 effect to cancel d5nctua on self, and another 321 effect to cancel d5nctuc on your allies. And give it global effects removing itself (172) and adding d5nctua back (171).

    Voila - now you have a toggleable aura.

    Hey, @subtledoctor, I have a little question for you. Since all bonuses (for the Dwarven Defender themself and their allies) are given through the same 272 opcode in your toggleable version of the spell, how do I make a DD immune to the "aura" effect of the spell, aka the bonus that is only given to allies through the "preset target" targeting ? Can it actually be done, because I sure can't device a way to do it. I have to prevent crazy AC stacking effect in the case someone is using more than one Dwarven Defender.

    Edit : Maybe give the "self" bonuses straight into different "Spell Ability" of the D5NCTUA.SPL (which would increase through minimum level requirement), then also give opcode 206 : D5NCTUC.SPL to make the DD immune to the aura. I'm also sure that the self-referential 321 given to D5NCTUC.SPL will prevent the stacking issue for allies if multiple Dwarven Defenders are present. Would that work ?
    Post edited by Arctodus on
Sign In or Register to comment.