Skip to content

[MOD] EEex (v0.10.2-alpha)

17810121348

Comments

  • GalactygonGalactygon Member, Developer Posts: 412
    kjeron wrote: »
    What values do new stats occupy in SPLPROT.2da for opcodes 318/324/326?
    Values 256 - 278 are reserved for various non-stat checks (source/not, circle size, multirow/not, areatype, daytime, evasion, source-target alignment match, EA, GENERAL, RACE, CLASS, SPECIFIC, GENDER, ALIGNMENT, STATE, SPLSTATE, Allies, Enemies, # Summons, Chapter)

    This reply might come a bit late, but it's good practice imho to start at a much larger number than 278 just in case SPLPROT.2da functionality is expanded in the future.
  • BubbBubb Member Posts: 1,000
    I've been working on some small worker functions before I attempt to tackle some serious unhardcoding. Not enough for a release, but I've pushed them to master. I think they can prove quite useful, so I'll outline them here:

    Variable Fetching:
    • EEex_GetGlobal(globalName) -> Fetches globalName from the "GLOBAL" scope

    • EEex_GetAreaGlobal(areaResref, globalName) -> Fetches globalName from the "<areaResref>" scope.

    • EEex_GetActorLocal(actorID, localName) -> Fetches localName from the actor's "LOCALS" scope.

    2DA Fetching:
    • EEex_2DALoad(_2DAResref) -> Loads the given 2DA resref and returns a pointer to the internal data.

    • EEex_2DAGetAtStrings(C2DArray, columnString, rowString) -> Will read a string from the 2DA data, columnString being the X coord to match and rowString being the Y.
  • MyragMyrag Member Posts: 328
    Hey @Bubb. I tried to run 0.4.1 (same with 0.4.0) but Im getting injecting error.

    x2RygCw.png

    And dump info
    Dump Summary
    Dump File: dump.2.5.16.6.0004.dmp : D:\OneDrive\Dokumenty\Infinity Engine - Enhanced Edition\crash\dump.2.5.16.6.0004.dmp
    Last Write Time: 2019-02-24 22:03:44
    Process Name: Baldur.exe : C:\Games\Gog Games\baldurs gate ii - enhanced edition\Baldur.exe
    Process Architecture: x86
    Exception Code: 0xC0000005
    Exception Information: The thread tried to read from or write to a virtual address for which it does not have the appropriate access.
    Heap Information: Not Present

    System Information
    OS Version: 10.0.17134
    CLR Version(s):

    Modules
    Module Name Module Path Module Version


    Baldur.exe C:\Games\Gog Games\baldurs gate ii - enhanced edition\Baldur.exe 0.1.0.0
    ntdll.dll C:\Windows\System32\ntdll.dll 6.2.17134.556
    kernel32.dll C:\Windows\System32\kernel32.dll 6.2.17134.556
    KERNELBASE.dll C:\Windows\System32\KERNELBASE.dll 6.2.17134.556
    apphelp.dll C:\Windows\System32\apphelp.dll 6.2.17134.1
    user32.dll C:\Windows\System32\user32.dll 6.2.17134.376
    win32u.dll C:\Windows\System32\win32u.dll 6.2.17134.1
    gdi32.dll C:\Windows\System32\gdi32.dll 6.2.17134.285
    gdi32full.dll C:\Windows\System32\gdi32full.dll 6.2.17134.590
    msvcp_win.dll C:\Windows\System32\msvcp_win.dll 6.2.17134.1
    ucrtbase.dll C:\Windows\System32\ucrtbase.dll 6.2.17134.319
    shell32.dll C:\Windows\System32\shell32.dll 6.2.17134.441
    msvcrt.dll C:\Windows\System32\msvcrt.dll 7.0.17134.1
    cfgmgr32.dll C:\Windows\System32\cfgmgr32.dll 6.2.17134.1
    SHCore.dll C:\Windows\System32\SHCore.dll 6.2.17134.112
    rpcrt4.dll C:\Windows\System32\rpcrt4.dll 6.2.17134.471
    sspicli.dll C:\Windows\System32\sspicli.dll 6.2.17134.376
    CRYPTBASE.dll C:\Windows\System32\CRYPTBASE.dll 6.2.17134.1
    bcryptPrimitives.dll C:\Windows\System32\bcryptPrimitives.dll 6.2.17134.471
    sechost.dll C:\Windows\System32\sechost.dll 6.2.17134.319
    combase.dll C:\Windows\System32\combase.dll 6.2.17134.523
    windows.storage.dll C:\Windows\System32\windows.storage.dll 6.2.17134.556
    advapi32.dll C:\Windows\System32\advapi32.dll 6.2.17134.471
    shlwapi.dll C:\Windows\System32\shlwapi.dll 6.2.17134.1
    kernel.appcore.dll C:\Windows\System32\kernel.appcore.dll 6.2.17134.112
    profapi.dll C:\Windows\System32\profapi.dll 6.2.17134.1
    powrprof.dll C:\Windows\System32\powrprof.dll 6.2.17134.1
    fltLib.dll C:\Windows\System32\fltLib.dll 6.2.17134.1
    ws2_32.dll C:\Windows\System32\ws2_32.dll 6.2.17134.1
    imm32.dll C:\Windows\System32\imm32.dll 6.2.17134.1
    ole32.dll C:\Windows\System32\ole32.dll 6.2.17134.407
    oleaut32.dll C:\Windows\System32\oleaut32.dll 6.2.17134.556
    OpenAL32.dll C:\Windows\System32\OpenAL32.dll 6.14.357.24
    opengl32.dll C:\Windows\System32\opengl32.dll 6.2.17134.1
    winmm.dll C:\Windows\System32\winmm.dll 6.2.17134.1
    version.dll C:\Windows\System32\version.dll 6.2.17134.1
    IPHLPAPI.DLL C:\Windows\System32\IPHLPAPI.DLL 6.2.17134.1
    secur32.dll C:\Windows\System32\secur32.dll 6.2.17134.1
    glu32.dll C:\Windows\System32\glu32.dll 6.2.17134.1
    winmmbase.dll C:\Windows\System32\winmmbase.dll 6.2.17134.1
    dsound.dll C:\Windows\System32\dsound.dll 6.2.17134.1
    MMDevAPI.dll C:\Windows\System32\MMDevAPI.dll 6.2.17134.1
    devobj.dll C:\Windows\System32\devobj.dll 6.2.17134.1
    propsys.dll C:\Windows\System32\propsys.dll 7.0.17134.112
    wdmaud.drv C:\Windows\System32\wdmaud.drv 6.2.17134.1
    ksuser.dll C:\Windows\System32\ksuser.dll 6.2.17134.1
    avrt.dll C:\Windows\System32\avrt.dll 6.2.17134.1
    AudioSes.dll C:\Windows\System32\AudioSes.dll 6.2.17134.471
    WinTypes.dll C:\Windows\System32\WinTypes.dll 6.2.17134.523
    msacm32.drv C:\Windows\System32\msacm32.drv 6.2.17134.1
    msacm32.dll C:\Windows\System32\msacm32.dll 6.2.17134.1
    midimap.dll C:\Windows\System32\midimap.dll 6.2.17134.1
    clbcatq.dll C:\Windows\System32\clbcatq.dll 2001.12.10941.16384
    uxtheme.dll C:\Windows\System32\uxtheme.dll 6.2.17134.1
    msctf.dll C:\Windows\System32\msctf.dll 6.2.17134.376
    dwmapi.dll C:\Windows\System32\dwmapi.dll 6.2.17134.1
    TextInputFramework.dll C:\Windows\System32\TextInputFramework.dll 6.2.17134.376
    CoreUIComponents.dll C:\Windows\System32\CoreUIComponents.dll 6.2.17134.376
    CoreMessaging.dll C:\Windows\System32\CoreMessaging.dll 6.2.17134.471
    ntmarta.dll C:\Windows\System32\ntmarta.dll 6.2.17134.1
    oleacc.dll C:\Windows\System32\oleacc.dll 7.2.17134.1
    dbgcore.dll C:\Windows\System32\dbgcore.dll 6.2.17134.1
  • BubbBubb Member Posts: 1,000
    edited February 2019
    Hi @Myrag:

    Weird that the error message is cut off, it should end in "Please start the game using EEex.exe".

    But anyways: that error occurs when you start Baldur.exe directly, instead of running it through EEex.exe, (which should be in the game's base folder after you install). Starting with version v0.4.0, EEex switched to altering the game executable in memory, in order to gain compatibility with other IE games and versions.
  • kjeronkjeron Member Posts: 2,367
    Bubb wrote: »
    [*] EEex_GetGlobal(globalName) -> Fetches globalName from the "GLOBAL" scope
    Not to disparage, but is this not the same as:
    Infinity_GetScriptVarInt(globalName)
    
  • BubbBubb Member Posts: 1,000
    @kjeron: Ehhhh, yeah, it is. I started EEex before it was introduced, so I forgot it existed. The other two functions should include new functionality though :|
  • kjeronkjeron Member Posts: 2,367
    Yes, the rest of those aren't available and most welcome.
  • MyragMyrag Member Posts: 328
    @Bubb cheers. Sorry I missed this when reading changelog.
  • RaduzielRaduziel Member Posts: 4,714
    edited March 2019
    Somewhere in this thread, I read about "new opcodes".

    Here are my suggestions:

    1) Let Opcode 108 drop Reputation below 10.

    2) Opcode to reproduce a specialist wizard penalty to saving throw applied to targets.

    3) Opcode that changes the Turn Undead effects from Turn to Command (and the other way around).

    4) This one (opcode for Ability Drain)

    5) Let Opcode 144 block the Spellbook screen (like it happens with an Inquisitor).

    ---

    Not an Opcode, but: restrict kit to gender (Male/Female).

    ---

    Also, did you have any success with displaying the Saving Throw calculation? Last time I checked you said that it was eluding you.

    And for the Fatigue/Luck display I've mentioned earlier, my idea was that appearing in the character sheet (like Turn Undead level does).

    ---

    Thanks! Keep fighting the good fight!

    Edit: Sorry if any of this is absurd or stupid propositions, I honestly have no idea of what kind of alien tech you're developing here; I'm just a modder with dreams.
    Post edited by Raduziel on
  • GrammarsaladGrammarsalad Member Posts: 2,582
    Raduziel wrote: »
    Somewhere in this thread, I read about "new opcodes".

    Here are my suggestions:

    1) Let Opcode 108 drop Reputation below 10.

    2) Opcode to reproduce a specialist wizard penalty to saving throw applied to targets.

    3) Opcode that changes the Turn Undead effects from Turn to Command (and the other way around).

    4) This one (opcode for Ability Drain)

    5) Let Opcode 144 block the Spellbook screen (like it happens with an Inquisitor).

    ---

    Not an Opcode, but: restrict kit to gender (Male/Female).

    ---

    Also, did you had any success with displaying the Saving Throw calculation? Last time I checked you said that it was eluding you.

    And for the Fatigue/Luck display I've mentioned earlier, my idea was that appearing in the character sheet (like Turn Undead level does).

    ---

    Thanks! Keep fighting the good fight!

    Edit: Sorry if any of this is absurd or stupid propositions, I honestly have no idea of what kind of alien tech you're developing here; I'm just a modder with dreams.

    Oh, @Raduziel we can display luck, fatigue, etc on the character sheet now. I'm happy to show you how. Send me a pm if you're interested
  • RaduzielRaduziel Member Posts: 4,714
    Another idea:

    IDK if it is even possible, but we are all playing Icarus here, right?

    So

    Opcode: Ignore AC bonus from armors

    Utility: touch attacks. Will make lots of spells from wizards way more viable.
  • UlbUlb Member Posts: 295
    @Bubb
    A minor thing I've noticed with the detect invisible creatures portion:
    If you set it to render invisible creatures as semi-transparent (via ini option) invisible party members will no longer be rendered transparent while invisible (instead they are rendered normally at 100% occupancy).
    Having it just show the feet circles works perfectly though.
    Thanks for all the work you've put into this.
  • RaduzielRaduziel Member Posts: 4,714
    @Bubb And the kit restriction by gender? Doable?
  • OlvynChuruOlvynChuru Member Posts: 3,075
    edited March 2019
    Bubb wrote: »
    All opcode ideas look good, except for this one:

    Opcode: Ignore AC bonus from armors

    I'm not sure how this would work. The AC bonus basically works like an opcode which alters a stat - it takes the final computed value as the result of a sum of all the present opcodes. In order to ignore certain applications of this opcode, I believe I would have to change how the engine fundamentally calculates AC, splitting it up into two different fields.

    Would it be possible to check if the creature being attacked has any effects that set its base AC (and not effects that give an AC bonus) and proceed as if it didn't have those effects and as if the creature's base AC was 10? Check the difference between the 10 and the creature's base AC and give the creature an AC penalty equal to that difference.
  • kjeronkjeron Member Posts: 2,367
    edited March 2019
    Bubb wrote: »
    Unless there is somewhere in the vanilla game in which the engine ignores certain AC bonuses; @kjeron, do you know of any?
    Only related to the various specific AC modifiers (slash/crush/pierce/missile).
    Specifying a damage type of "none" on a weapon ignores all of them. It is however not useful unless you have it dealing zero damage, as it functions as "Set current HP" = 'damage', not "Decrement current HP" by 'damage', if you use dice num/count.

    Actually this reminds me of something I wanted to request - expanding the damage types and flags for base weapon attacks. Specifically, adding elemental damage types as options, the "Bypass Mirror Image" flag, saving throws, and any of the flags located in the "Special" field of opcode 12. I don't know where the latter two could go in the item header though.
  • BubbBubb Member Posts: 1,000
    edited March 2019
    Raduziel wrote: »

    And the kit restriction by gender? Doable?

    @Raduziel: Yeah, should be doable.

    A daily reminder: I often get a handle on what I'm working on by typing it out. So, if I start to ramble here that's why. Now, let's talk about ignoring AC bonuses:

    There are many, many different factors that go into a creature's effective AC. Certain factors are only polled at the time of a swing, and others are used to calculate the AC sum, such as Opcode #0.

    It all depends on what you want to block. If you just want to block armor AC bonuses, I would have to somehow differentiate between "magical" sources of Opcode #0, such as blur, as opposed to equipment.

    In any case, I'd have to iterate through all present effects on the creature and subtract out all of the relevant Opcode #0 effects from the hardcoded AC calculation. I could use the creature's base AC, but that leaves out every-single bonus from every-single source, so I don't believe it would work.

    Fun fact: While I was searching through the AC check algorithm, I found that if a creature is invisible and they have a backstab bonus, the attack that brings them out of invisibility completely ignores the target's dexterity bonus to AC.

    And since the dexerity bonus is baked into the AC stat, the engine looks up the dex bonus again and subtracts it out. Seems that is how I must do this if I don't want to fundamentally change how the engine does its calculation.
  • switswit Member, Translator (NDA) Posts: 495
    edited March 2019
    Fun fact: While I was searching through the AC check algorithm, I found that if a creature is invisible and they have a backstab bonus, the attack that brings them out of invisibility completely ignores the target's dexterity bonus to AC.
    looks like this feature is also present in IWD2, but in that engine iteration the feature can be canceled via optional feat:
    BLIND-FIGHT:

    You know how to fight in melee without being able to see your foes.

    Benefit: In melee, every time you miss because of concealment, you can reroll your miss chance percentile roll one time to see if you actually hit. An invisible attacker gets no bonus to hit you in melee. That is, you don't lose your positive Dexterity bonus to Armor Class, and the attacker doesn't get the usual +2 bonus. The invisible attacker's bonuses do still apply for ranged attacks, however.

    not sure if this helps with anything but if you're working on AC/to hit formulas then this bonus likely also exists in EE engine:
    PRECISE SHOT:

    You are skilled at timing and aiming ranged attacks.

    Benefit: Reduces the to hit penalty for firing in close quarters from -8 to -4.
    Post edited by swit on
  • kjeronkjeron Member Posts: 2,367
    Bubb wrote: »
    Fun fact: While I was searching through the AC check algorithm, I found that if a creature is invisible and they have a backstab bonus, the attack that brings them out of invisibility completely ignores the target's dexterity bonus to AC.
    Unfortunately a non-zero backstab multiplier isn't enough, it requires a backstab of 2x or greater, the Shadowdancer doesn't get this bonus until level 5.
  • MyragMyrag Member Posts: 328
    Following this project brings me joy.

    With that in mind. Would it be possible to get auto pause on spell ready to cast with this extensibility? Not sure how the game is coded and if there is event like that.
  • BubbBubb Member Posts: 1,000
    @Myrag: Sure, I can make a new event. Do you want the autopause to happen when you are outside of combat, or just when you're in combat? I suppose I could make that an option as well...

    Also note that the way I'd do this is by hooking into the casting timer, which also controls item usage - so they'd also trigger / be relevant to this autopause event.
  • MyragMyrag Member Posts: 328
    edited March 2019
    @Bubb yeah this would be lovely. In essence I play a lot with casters and fighter mages. Being able to pause and cast between attacks would make things much smoother. I think in combat is where it's at as I wanted to maximize combat potential between. I wonder how this will work with vecna/AoP and IA though.

    Also as I'm not a modder I must say I'm not sure how casting timer works. Since if you cast spell of casting time 2 (1 seconds cast time) you still need to wait 8 more (5 seconds) to be able to cast again. Unless under IA of course.

    Post edited by Myrag on
  • AndreaColomboAndreaColombo Member Posts: 5,525
    If IA (and Daer'Ragh's Aura Cleansing) bring the interval between castings down to zero, it might be desirable for the autopause option to ignore them.
  • BubbBubb Member Posts: 1,000
    I've got a working version of the autopause - just have to figure out how to make it work correctly with Aura Cleansing.

    The good news is that Aura Cleansing only resets the casting timer on demand, when you attempt to cast a spell. So, there won't be any infinite loop type scenarios - though this also means that there is no "tell" that you can cast a spell except for Aura Cleaning's stat being set

    I think how I'll implement it is every time you transition from casting a spell to not casting a spell, the engine will check if you have Aura Cleansing; if you do, It'll autopause for you. Should allow for the player to chain-cast a lot of spells during IA and still have control over everything.

    I'll release it tomorrow when I get it finished and tested :)
  • The user and all related content has been deleted.
  • OlvynChuruOlvynChuru Member Posts: 3,075
    (Frankly I say just give all touch attacks +20 to the hit roll and call it a day...)

    Or set the THAC0 bonus of the item to 32767, which makes it automatically hit.
  • MyragMyrag Member Posts: 328
    @Bubb This is amazing news.

    Also I just installed SCS rc10 and realized I lost my keybindings file, no biggie really but made me wonder. Is it possible to make EEEx_ini accept path to hotkey file? This way I could stick my file on onedrive with rest of game settings without being afraid of losing them. I think this would require splitting keybinding scripts from keybinding table (B3Hotkey_Hotkeys).

    Of course I can make symbolic link but would be nice to have that as a feature. Think about it :smile:
  • AndreaColomboAndreaColombo Member Posts: 5,525
    @Bubb would it be possible to modify WSPECIAL.2da so that it includes a crit range modifier (akin to the one found in STYLBONU.2da) and a weapon die size modifer?

    The latter could accept values ranging from, say, -4 to +4 (that's completely arbitrary). Say you set it to +1 for Grand Mastery: A character with Grand Mastery in long sword would roll 1d10 instead of 1d8 for damage when wielding a long sword (the long sword die size would increase by a factor of 1, from 1d8 to 1d10.)

    Likewise, setting the modifer to -1 would decrease the die size by one factor (e.g. a long sword would roll 1d6.)
  • MyragMyrag Member Posts: 328
    @Bubb I've experienced a lot of crashes with v4 and v5 so I reverted to v3 (before new exe and everything is fine now). 100% crash that I can reproduce is shapeshifting with Jaheira, others seem to be random.
Sign In or Register to comment.