Skip to content

[MOD] EEex (v0.10.2-alpha)

1293032343549

Comments

  • BubbBubb Member Posts: 1,005
    @Ludwig_II: You should never be content with crashes! Send your WeiDU.log and any of the generated .dmp files my way and I'll look into it.
  • Ludwig_IILudwig_II Member Posts: 379
    Thank you Bubb. I'm sending through the BG1 versions of the crash and weidu.log then, because that has much fewer mods. I can attach BG2 versions too if it helps.
  • Ludwig_IILudwig_II Member Posts: 379
    Wow, that surely was fast. Thank you so much Bubb, I will try it with this new version tonight. I'll let you know if there any other crashes. Cheers
  • Ludwig_IILudwig_II Member Posts: 379
    Sorry to bother you again Bubb, but now I'm at BG2 part and I'm having a crash every time I follow the tanner on bridge district down to his basement. I tried to investigate the crash dump file myself but it doesn't make any sense to me. I would appreciate if you could please have a look when you have some time. Thanks.
  • BubbBubb Member Posts: 1,005
    edited May 2020
    @Ludwig_II: Don't think it's my fault this time. The crash .dmp says the game crashed while trying to load in one of the creatures from that area. In particular, the creature file didn't exist, and the engine doesn't know how to handle that.

    One of your other mods most likely added an invalid actor to that area. You might be able to tell what mod is doing it by looking at AR0502 and AR0503's actors in Near Infinity, and finding the actor(s) that try to define an invalid creature:
    Double click the actors listed here, (for both areas):
    9lqjgkvhnwvc.png

    If this line is greyed-out, then the creature is probably causing the crash:
    ccr2dpj81dwn.png
  • ALIENALIEN Member Posts: 1,271
    @Ludwig_II Use https://github.com/InfinityMods/WeiDU-FileChangelog in order to know which mod modified AR0502 and AR0503
  • Ludwig_IILudwig_II Member Posts: 379
    edited May 2020
    Thank you so much to you both, Bubb and ALIEN. I now know a bit better about how to investigate these kinds of issues, and that tool helped a lot with understanding which mod might be causing the issue.

    I have tried removing the mods effecting those areas, and every time I removed a mod, the weidu process for some reason put additional unrelated actors and more areas started becoming corrupted. Like some areas had actors from Durlag's tower, even though I'm in Athkathla in BG2. And my installation became unusable.

    There were a couple of mods that effected those areas, but I unfortunately can't pinpoint one mod as the root-cause. I had some mods that were changing the same things in some areas, and I'm suspecting those to have some kind of conflicts. I think it was a combination of Jimfix show all hidden areas, no traps/locks and hidden doors fix from g3 forum for cdtweaks, and also SCS Remove unrealistically convenient ammunition from the game component. I think all 3 of those work fine on their own, but their combination somehow caused it, but I'm not sure. Because it might not be related to this combination either, and it could just be because I removed a mod from the middle of my installation and weidu process just started corrupting areas I haven't visited before.

    In conclusion, I had to do another installation to fix it, and I only kept no traps/locks component from cdtweaks this time. Now those areas don't have unrelated actors, and I can access them properly.

    What is surprising to me is that I thought the Weidu installation process was reliable, in the sense that I could remove a mod from an existing installation even if it's installed in the early stages. Apparently, not always. I'll try not to touch my installation too much from now on unless it's necessary.
  • EndarireEndarire Member Posts: 1,519
    @Bubb
    Part of me wants to use EEex on our group's next EET run, but presently we'll wait for a more stable release. I'm also unsure how using EEex without mods built for it would improve our experience.
  • DavidWDavidW Member Posts: 823
    This may just display my ignorance of how EEEx works, but: can I use it to mess with how cutscenes display?

    At the moment, BG2EE cutscenes force the resolution to the maximum zoom-out (it's forced when you do StartCutSceneMode() or StartCutScene() ). The SetZoomViewPort() command is likewise ignored during cutscene mode.

    As has been widely reported, this is a problem at least for the more cinematic cutscenes, which often don't work so well at such a small scale. (I notice that PSTEE handles cutscenes differently, presumably for this reason, but the functionality has not been backported to BG2EE.)

    I don't see any way to get at this via EEEx at present (notably, the CInfinity objects related to Zoom aren't currently available through EEEx_label). But my understanding of what's going on in EEEx is rudimentary so I might just be missing something. Thoughts very welcome.
  • fearlessfearless Member Posts: 40
    edited June 2020
    DavidW wrote: »
    the CInfinity objects related to Zoom aren't currently available through EEEx_label)

    Thats currently correct, but it is possible to add in patterns in EEex.db for hooks for CInfinity::SetZoom, CInfinity::SetZoomEnabled, CInfinity::StoreZoom, CInfinity::RestoreZoom, and CInfinity::ReleaseZoom etc to add in that functionality for EEEx_label function to use.

    (Ref EEex Docs CInfinity for others wondering about the class methods for CInfinity that are mentioned)
  • OlvynChuruOlvynChuru Member Posts: 3,079
    EEex has been updated! @Bubb merged my pull requests not so long ago.

    New function: EXSPLATK! This function lets you make an attack roll with a spell. If it hits, you apply the spell (if it's a critical hit, you apply the spell twice).

    vypipx7cmy4c.png
    4h402jutlklq.png

    The effect menu (which lets you see what spell effects are on creatures) now has a new option. You can set it so it only functions when a party member's Stat 659 > 0. This way, the effect menu can be enabled by a spell or an item.

    m70shmo1i3mw.png

    New stats:

    Stat 610: Modifies your THAC0 with spell attacks
    Stat 611: Modifies your AC against spell attacks
    Stat 655: Modifies your level when you cast Dispel Magic, making it easier for you to dispel effects on other creatures
    Stat 656: Modifies your level when you get hit by Dispel Magic, making it harder for someone to dispel your effects
    Stat 659: Enables the effect menu if this stat is set to a number > 0. Only works if the B3_EfMen module is enabled and the variable B3EffectMenu_Stat_Required inside B3_EfMen.lua is set to true.
  • FlashburnFlashburn Member Posts: 1,847
    @OlvynChuru
    Sweet! Is it possible to make the spell attack rolls differentiate between using your STR and DEX bonuses to-hit? If so, then 3.0/3.5 melee and ranged touch attacks will be possible!
  • OlvynChuruOlvynChuru Member Posts: 3,079
    @Bubb Here's something related to my wild surge request.

    I've noticed that if I modify the damage of Fireball (increasing it by 100) while a character is casting Fireball, it does deal increased damage.
    dt8whumb67na.png

    But if I increase the damage of Fireball after the fireball is released but before it explodes, the damage isn't increased.
    v5odat967ba3.png

    (I quit the game and started it again between these, resetting the SPL file data)

    It seems like right when a character finishes casting the spell, the data for the spell gets copied to somewhere else. Could you make hook that gives us the offset where the spell's data got copied to so that we could modify it?
  • DavidWDavidW Member Posts: 823
    fearless wrote: »
    DavidW wrote: »
    the CInfinity objects related to Zoom aren't currently available through EEEx_label)

    Thats currently correct, but it is possible to add in patterns in EEex.db for hooks for CInfinity::SetZoom, CInfinity::SetZoomEnabled, CInfinity::StoreZoom, CInfinity::RestoreZoom, and CInfinity::ReleaseZoom etc to add in that functionality for EEEx_label function to use.

    Thanks. (Alas, adding those patterns is well above my pay grade!)

  • OlvynChuruOlvynChuru Member Posts: 3,079
    edited June 2020
    @Flashburn
    Flashburn wrote: »
    Sweet! Is it possible to make the spell attack rolls differentiate between using your STR and DEX bonuses to-hit? If so, then 3.0/3.5 melee and ranged touch attacks will be possible!

    Yes, I implemented this! Parameter2 of the effect calling EXSPLATK determines which stat gives bonuses to hit.

    36: The roll gets THAC0 bonuses from the caster's strength (and exceptional strength if they have 18 strength) based on STRMOD.2da and STRMODEX.2da.
    38: The roll gets THAC0 bonuses from the caster's intelligence based on DEXMOD.2da (e.g. if they have 19 Intelligence they get a +3 THAC0 bonus).
    39: The roll gets THAC0 bonuses from the caster's wisdom based on DEXMOD.2da.
    40: The roll gets THAC0 bonuses from the caster's dexterity based on DEXMOD.2da.
    41: The roll gets THAC0 bonuses from the caster's constitution based on DEXMOD.2da.
    42: The roll gets THAC0 bonuses from the caster's charisma based on DEXMOD.2da.
  • BubbBubb Member Posts: 1,005
    OlvynChuru wrote: »
    It seems like right when a character finishes casting the spell, the data for the spell gets copied to somewhere else. Could you make hook that gives us the offset where the spell's data got copied to so that we could modify it?

    It has to do with the method of effect delivery. Spells that use projectiles first copy and shuffle along their effects to a projectile instance, then that projectile "delivers" the effect copies to anything it hits. The problem arises with non-projectile delivery, where the engine directly adds the effects to targeted actors. I'm looking into how to capture all these circumstances under one hook mechanism.
  • FlashburnFlashburn Member Posts: 1,847
    OlvynChuru wrote: »
    Flashburn wrote: »
    Sweet! Is it possible to make the spell attack rolls differentiate between using your STR and DEX bonuses to-hit? If so, then 3.0/3.5 melee and ranged touch attacks will be possible!

    Yes, I implemented this! Parameter2 of the effect calling EXSPLATK determines which stat gives bonuses to hit.

    36: The roll gets THAC0 bonuses from the caster's strength (and exceptional strength if they have 18 strength) based on STRMOD.2da and STRMODEX.2da.
    38: The roll gets THAC0 bonuses from the caster's intelligence based on DEXMOD.2da (e.g. if they have 19 Intelligence they get a +3 THAC0 bonus).
    39: The roll gets THAC0 bonuses from the caster's wisdom based on DEXMOD.2da.
    40: The roll gets THAC0 bonuses from the caster's dexterity based on DEXMOD.2da.
    41: The roll gets THAC0 bonuses from the caster's constitution based on DEXMOD.2da.
    42: The roll gets THAC0 bonuses from the caster's charisma based on DEXMOD.2da.
    @AionZ
    Take a look at this for your Warlock mod! Now eldritch blasts can critically hit!
  • BubbBubb Member Posts: 1,005
    DavidW wrote: »
    At the moment, BG2EE cutscenes force the resolution to the maximum zoom-out (it's forced when you do StartCutSceneMode() or StartCutScene() ). The SetZoomViewPort() command is likewise ignored during cutscene mode.

    @DavidW: I think executing ZoomLock(FALSE) will unlock the viewport if you run it after StartCutScene(), as it uses the same internal function that the cutscenes use. If that doesn't work I can investigate getting control over it with EEex.
  • GreenerGreener Member Posts: 430
    OlvynChuru wrote: »
    Yes, I implemented this! Parameter2 of the effect calling EXSPLATK determines which stat gives bonuses to hit.

    36: The roll gets THAC0 bonuses from the caster's strength (and exceptional strength if they have 18 strength) based on STRMOD.2da and STRMODEX.2da.
    38: The roll gets THAC0 bonuses from the caster's intelligence based on DEXMOD.2da (e.g. if they have 19 Intelligence they get a +3 THAC0 bonus).
    39: The roll gets THAC0 bonuses from the caster's wisdom based on DEXMOD.2da.
    40: The roll gets THAC0 bonuses from the caster's dexterity based on DEXMOD.2da.
    41: The roll gets THAC0 bonuses from the caster's constitution based on DEXMOD.2da.
    42: The roll gets THAC0 bonuses from the caster's charisma based on DEXMOD.2da.

    Brilliant work, would it be possible to give an AC bonus based on wisdom or bonus starting proficiency slots based on intelligence?
  • OlvynChuruOlvynChuru Member Posts: 3,079
    @Greener Giving an AC bonus based on wisdom is totally doable even without EEex. Giving bonus starting proficiency slots based on intelligence could be tricky, though.
  • DavidWDavidW Member Posts: 823
    Bubb wrote: »
    DavidW wrote: »
    At the moment, BG2EE cutscenes force the resolution to the maximum zoom-out (it's forced when you do StartCutSceneMode() or StartCutScene() ). The SetZoomViewPort() command is likewise ignored during cutscene mode.

    @DavidW: I think executing ZoomLock(FALSE) will unlock the viewport if you run it after StartCutScene(), as it uses the same internal function that the cutscenes use. If that doesn't work I can investigate getting control over it with EEex.

    Interesting! Will investigate. Thanks.
  • DavidWDavidW Member Posts: 823
    That does work. Many thanks.

    There is one residual annoyance: DisplayStringHead() is fixed to display the string at the right location for max resolution, and on more zoomed-in resolutions the text is increasingly mislocated (way out at the top left). But I assume that's not readily adjustable even in EEEx?
  • DavidWDavidW Member Posts: 823
    edited June 2020
    Way better! It's amazing how much control you've acquired over the engine.

    And you're right - as soon as you know to look for it, it's infuriating.
  • BubbBubb Member Posts: 1,005
    Random, but while I was screwing around in the engine, I found a way to effectively create fake resref resources on the fly. A Lua script could take an existing resource, (or make a new one from scratch), alter its contents in memory, and then tell the engine it's a new resource - usable in all instances where the engine accepts a resref.

    Note that this fake resource lives in memory and doesn't actually get written out to the file system... does this sound useful to anyone? If it does I can implement it quite easily.
  • GalactygonGalactygon Member, Developer Posts: 412
    DavidW wrote: »
    That does work. Many thanks.

    There is one residual annoyance: DisplayStringHead() is fixed to display the string at the right location for max resolution, and on more zoomed-in resolutions the text is increasingly mislocated (way out at the top left). But I assume that's not readily adjustable even in EEEx?

    Sounds like a bug. Will report.
  • BubbBubb Member Posts: 1,005
    edited June 2020
    Galactygon wrote: »
    Sounds like a bug. Will report.

    @Galactygon: If it helps the devs track it down any, my fix is as follows: In CGameText::Render(), I've replaced the CVidFont::RenderTextWrap() call's x and y args with the following formulas:
    local newX = (left - nCurrentX + x) / m_fZoom - (stringLength / 2)
    local newY = (top - nCurrentY + y - z) / m_fZoom - (stringHeight / 2)
    
    • x, y, and z are the CGameText instance's m_pos.x, m_pos.y, and m_posZ.
    • left and top are the fields of the same name in the CInfinity's rViewPort.
      nCurrentX, nCurrentY, and m_fZoom are CInfinity fields.

    ...then adjust the rClip arg to describe the adjusted area, and it renders consistently.
  • CaedwyrCaedwyr Member Posts: 176
    I've been wondering if EEex is capable of allowing new classes to be added to the game via extending class.ids and allowing them to be flagged in such a way that they show up on the class selection list at character creation?

    Races and the possibility of adding subraces (mirroring the kit process) is another long-time item on the wishlist.

    Kits that poll their CLAB__ 2da tables at level-up are limited to 255 kits total, any more and the game crashes. Note that modders have found a work-around, since it seems that multi-class kits use the trueclass CLAB__01.2da tables and there's ways to get the same effect.

    Another question, is if it is possible via EEex to remove or effectively remove the cap on the number of spells that can be added via ADD_SPELL (linked to .ids entries)? Currently only 50 spells can be added for each of sppr, spwi, spin, and spcl prefixes. There are workarounds to this of course, but it'd be nice if they weren't needed.

    I also seem to recall the number of animation slots being limited by the animation .ids file, but it seems like many mods import animations and I haven't seen many recent reports of people running out of animation slots. I remember this being a problem that @Galactygon was running up against in the mid-late 2000s.
  • GalactygonGalactygon Member, Developer Posts: 412
    edited June 2020
    Oh wow nice seeing you @Caedwyr ! It's been at least a decade! Hope you enjoy the expanded modding possibilities EE and EEex give you!

    Yes, ADD_SPELL is a useful function in WeiDU that will either add a new SPCL/IN/PR/WI spell or overwrite an existing one with the same IDS_SYMBOL. The main use is to allow spell adding mods to coordinate the IDS_SYMBOLs so that you do not end up with duplicate spells of the same type and level.

    @Bubb thanks, I'll make sure to provide a link to your post.
Sign In or Register to comment.