Skip to content

[MOD] EEex (v0.10.2-alpha)

1679111248

Comments

  • The user and all related content has been deleted.
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    What about a new opcode that can set STATEs from STATE.ids? In other words, something similar to opcode #328 but with STATEs.............
  • kjeronkjeron Member Posts: 2,368
    Luke93 wrote: »
    What about a new opcode that can set STATEs from STATE.ids? In other words, something similar to opcode #328 but with STATEs.............
    You mean like:
    Berserk(3)
    Kill(13)
    Haste(16)
    Invisibility(20)
    Panic(24)
    Poison(25)
    Silence(38)
    Sleep(39)
    Slow(40)
    Stun(45)
    Infravision(63)
    Blur(65)
    Non-detection(69)
    Blindness(74)
    Feeblemindedness(76)
    Confusion(128)
    The only ones you cannot set directly have a zero-effect by themselves (they need a value, which their existing opcodes provide): AID, BLESS, CHANT, LUCK, DUHM, BADCHANT, CHARMED, MIRRORIMAGE
  • switswit Member, Translator (NDA) Posts: 495
    edited February 2019
    I've been thinking about ways of making AREA script slot (SCRLEV.IDS) fully usable by creatures. Currently script can be assigned to this slot via ChangeAIScript action and opcode #82, but the assignment is gone after loading the game since (unlike IWD2) the game can't store the string with AREA script name.

    I'm wondering if one of the below implementation ideas would be viable for EEex:
    - new condition for opcode #232 (Cast Spell on Condition) that triggers only on the same circumstances that makes OnCreation() action return true (spawning, loading the game). Having it done via spell condition would also open a workaround for other stuff that are not remembered between game sessions.
    - alternatively new opcode, timing mode or whatever would be the easier to implement
    - or maybe using 8 bytes from 128 unused bytes in ARE Actor structure and forcing engine to use it the way it uses SPECIFICS slot
    Post edited by swit on
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    edited February 2019
    swit wrote: »
    Having it done via spell condition would also open a workaround for other stuff that are not remembered between game sessions.

    Is the object LastSummonerOf() one of those things that are not remembered between game sessions (e.g., after a save & reload)?
  • switswit Member, Translator (NDA) Posts: 495
    edited February 2019
    Wow, I didn't had high hopes when asking about it. I'm looking forward seeing if the idea will indeed turn out to be feasible effort wise at some point.

    As for the actual implementation I'm not sure which option would be optimal here. From what I remember SPECIFICS script slot (existing in ARE Actor structure, but not directly on CRE) is not permanent if the CRE has been spawned via INI file (script_specifics INI assignment only, no such problems if CRE is spawned via ARE or CreateCreature), so having additional script slot on CRE file instead may have benefits.
    Is the object LastSummonerOf() one of those things that are not remembered between game sessions (e.g., after a save & reload)?
    Unless I missed something in my tests LastSummonerOf(Myself) is indeed lost after re-load, so you need to spawn new CRE each session, if you want to maintain the link.
    Post edited by swit on
  • OlvynChuruOlvynChuru Member Posts: 3,079
    swit wrote: »
    I've been thinking about ways of making AREA script slot (SCRLEV.IDS) fully usable by creatures. Currently script can be assigned to this slot via ChangeAIScript action and opcode #82, but the assignment is gone after loading the game since (unlike IWD2) the game can't store the string with AREA script name.

    I'm wondering if one of the below implementation ideas would be viable for EEex:
    - new condition for opcode #232 (Cast Spell on Condition) that triggers only on the same circumstances that makes OnCreation() action return true (spawning, loading the game). Having it done via spell condition would also open a workaround for other stuff that are not remembered between game sessions.

    While I'm not sure if it will fulfill your request, While Equipped effects from equipped items trigger when the creature is spawned or the game is loaded. Perhaps you could give a creature an undroppable ring or something that has a While Equipped effect that gives the creature an area script.
  • switswit Member, Translator (NDA) Posts: 495
    edited February 2019
    @OlvynChuru, interesting, I've finished testing it and your idea indeed works when it's done via ITM with Instant/While equipped timing mode. Not directly, since for some reason setting opcode 82 on item itself doesn't work with SPECIFICS and AREA script slots (no problem with OVERRIDE), but it works as you described if opcode 82 is called via additional spell called from item via Cast spell (146) opcode. This way the Area script slot still works after game re-load.

    I've also tried to make it work without item, by attaching opcode 82 and 146 directly to the CRE file with different timing modes, but none of those attempts were successful with maintaining the script after reload.

    While not a perfect solution for the purpose I need it for (porting IWD2 into EE engine) due to tons of dummy items, dummy spells, and duplicated CRE files needed to make it work (since the same CRE can't have AREA script slot assigned via ARE file, so each case that requires different script in that slot would require another version of the creature) and potential for bugs (due to ChangeCurrentScript() and ChangeAIScript() action usage in scripts, which may be problematic if the wrong AREA script will be restored after reload - this will require finding all such cases and rewritting those scripts) but a solution nevertheless :)

    @Bubb, should I continue with the idea proposed by OlvynChuru or maybe you're still interested in trying to expand ARE/CRE format with the missing slot in future?
    Post edited by swit on
  • [Deleted User][Deleted User] Posts: 0
    edited February 2019
    The user and all related content has been deleted.
    Post edited by [Deleted User] on
  • [Deleted User][Deleted User] Posts: 0
    edited February 2019
    The user and all related content has been deleted.
  • switswit Member, Translator (NDA) Posts: 495
    edited February 2019
    @subtledoctor, it has been already communicated in this post from October. I will post a link to my previous post in that topic to clarify it.

    As for the IWD1 content hanging up it's due to story related reasons (conflict between IWD1 story and SoD villain, as well as some characters and references showing up in both IWD1 and IWD2 story). Together with @AWizardDidIt we've managed to bring the story together without need of rewriting IWD2, but this approach favors distributing whole IWD1 and IWD2 content together. Also since IWD2 won't import resources on the fly and it's dependent on some IWD:EE resources (which are imported on the fly in similar way as EET) distributing both parts in the same package makes sense, imo.

    Once the mod is ready I'm also considering making it work with just IWD:EE (without need of EET), but it has lower priority. Also keep in mind that IWD-in-EET is meant to also allow to play just IWD2 content without bhaalspawn story via "Select Campaign" functionality.

    But let’s not high jack this topic any further - there is a dedicated forum for this mod.
    Post edited by swit on
  • ThelsThels Member Posts: 1,422
    :open_mouth:

    Does this mean that at some point, we will be able to play IWD2 in the EE engine? I assume it would use 2e rules, though?
  • The user and all related content has been deleted.
  • BubbBubb Member Posts: 1,005
    @kjeron: Do you still experience crashes when attempting to use EEex? If so, please try the latest version. The loader fundamentally changes EEex startup and how it writes patches - it very well could have fixed an incompatibility caused by what I believe was an OS specific difference.
  • kjeronkjeron Member Posts: 2,368
    edited February 2019
    Bubb wrote: »
    @kjeron: Do you still experience crashes when attempting to use EEex? If so, please try the latest version. The loader fundamentally changes EEex startup and how it writes patches - it very well could have fixed an incompatibility caused by what I believe was an OS specific difference.
    On BG2EE - The newest build (v.0.4.0) crashes as soon as I load any game, without having made any modifications other than installing EEex.
    On BGSOD - The newest build loads games just fine, but the actionbar still will not change. Haven't tested other things yet. So far - the HookBard Thieving function does work in BGSoD.

    Is there a way to run EEex.exe through the command window to see feedback while the game is running, as can be done with baldur.exe?
  • ALIENALIEN Member Posts: 1,271
    edited February 2019
    v0.4.0-alpha", Beamdog Client

    BG1EE - launching game ok
    SoD - launching game ok
    BG2EE - launching game ok
    IWD1EE - launching game ok

    :smile:
  • BubbBubb Member Posts: 1,005
    edited February 2019
    @kjeron: I am really grasping at straws here - we already exhausted most avenues before...

    It might be some sort of hardware configuration difference. I know that assembly has adjust for the user's CPU in some cases to decide which FPU instructions to use, so maybe your processor is old enough to not support the new vectorized variants?

    Can you list your CPU please? I'm running out of ideas on how to debug other than teleporting to you and stealing your computer for a while. :(

    Also, the launcher doesn't pass its environment to the game - I'll message fearless and see if that would be possible.
    So far - the HookBard Thieving function does work in BGSoD.

    Well... uhh... that is strange. Just to make sure, could you upload the EEex.ini and EEex.log of each game, noting the game versions?

    Edit: Also, try flipping EEex_MinimalStartup from false to true in M__EEex.lua. If it still crashes after that, god help us.
  • Ludwig_IILudwig_II Member Posts: 379
    Just wanted to pop in and say that even though I don't understand half the stuff talked here and I'm not a modder, the stuff talked and implemented here gets me excited. Great work guys. Now I'll let myself out.
  • kjeronkjeron Member Posts: 2,368
    edited February 2019
    Bubb wrote: »
    It might be some sort of hardware configuration difference. I know that assembly has adjust for the user's CPU in some cases to decide which FPU instructions to use, so maybe your processor is old enough to not support the new vectorized variants?
    Intel Core i7-2630QM CPU @ 2.00GHz 2.00 GHz
    Bubb wrote: »
    Edit: Also, try flipping EEex_MinimalStartup from false to true in M__EEex.lua. If it still crashes after that, god help us.
    BG2EE was at least able to load a game with this change.

    In SoD (so far):
    Changing action bar buttons does not work.
    HookBard Thieving works
    Lua action/triggers work, as did B3SpellToPoint function
    Opcode changes work

    Edit - ini/log files sent in PM - forum still is not allowing uploading archive (*.zip) files.
  • GrammarsaladGrammarsalad Member Posts: 2,582
    edited February 2019
    kjeron wrote: »
    Bubb wrote: »
    It might be some sort of hardware configuration difference. I know that assembly has adjust for the user's CPU in some cases to decide which FPU instructions to use, so maybe your processor is old enough to not support the new vectorized variants?
    Intel Core i7-2630QM CPU @ 2.00GHz 2.00 GHz
    Bubb wrote: »
    Edit: Also, try flipping EEex_MinimalStartup from false to true in M__EEex.lua. If it still crashes after that, god help us.
    BG2EE was at least able to load a game with this change.

    In SoD (so far):
    Changing action bar buttons does not work.
    HookBard Thieving works
    Lua action/triggers work, as did B3SpellToPoint function
    Opcode changes work

    Edit - ini/log files sent in PM - forum still is not allowing uploading archive (*.zip) files.

    Maybe some anti virus s software is returning a false positive and is deleting or otherwise disabling a vital file?

    Edit: I know that my work computer will outright delete weidu exe, so that's what made me think of it
  • ThelsThels Member Posts: 1,422
    @Thels you can read about it and discuss it here:
    https://www.gibberlings3.net/forums/forum/197-iwd-in-eet/

    Thanks, though I can't find all that much over there.
  • GrammarsaladGrammarsalad Member Posts: 2,582
    edited February 2019
    The action bar button changes don't work for me. This is the code in my M_ file (named M_B_BRD) as an ex to give find traps to bards:

    EEex_AddResetListener(function()
        Infinity_DoFile("M_B_BRD")
    end)
    
    --------------------------------------------------
    --                  bard                        --
    --------------------------------------------------
    outerConfig = 0
    
    function EEex_ActionbarListener(config)
    	outerConfig = config
            local actorID = EEex_GetActorIDSelected()
        if
           config == 0x4
        then
            EEex_SetActionbarButton(0x5, EEex_ACTIONBAR_TYPE.FIND_TRAPS)
        end
    end
    EEex_AddActionbarListener(EEex_ActionbarListener)
    
  • BubbBubb Member Posts: 1,005
    @Grammarsalad: A small mistake that slipped through during the process of updating all the patches to use the loader. v0.4.1-alpha released to fix: here

    There are undoubtedly more minor bugs introduced by the last patch, please report any you encounter!
  • GrammarsaladGrammarsalad Member Posts: 2,582
    Bubb wrote: »
    @Grammarsalad: A small mistake that slipped through during the process of updating all the patches to use the loader. v0.4.1-alpha released to fix: here

    There are undoubtedly more minor bugs introduced by the last patch, please report any you encounter!

    Works beautifully again!
Sign In or Register to comment.