@Myrag: Oh, wow, yeah that is crashing. Looks like something to do with my extended stats system is failing when shape shifting a creature. Probably just at wrong register reference or something...
Have you experienced any crashes that don't involve shape shifting?
I messed around with the new wild surge opcode, and it works great! There is one bug, though it's probably not your fault: choosing a wild surge that makes you roll additional time(s) on the wild surge table crashes the game, even if the character is a wild mage. But that's not a huge deal, since there are plenty of other cool wild surge options to choose from (cast spell twice, cast spell as an area of effect, cast spell with no save).
I do have one more request regarding the wild surge opcode. Would it be possible to make another feature of that opcode (or a new opcode) that disables the graphic effects of the wild surges?
By "graphic effects," I mean:
* the random visual effects created when there's a wild surge
* the string saying "Wild Surge: whatever"
* and the sound effects that play when there's a wild surge
The gameplay effects of the wild surge should stay unchanged.
This would allow me use the wild surge opcode in contexts that have nothing to do with wild surges (e.g. a spell you cast on enemies to make their spells target the wrong creature, or an overpowered Enoll Eva's Duplication-type spell that lets you cast your spells twice).
@Bubb
I think there are still other crashes going on.
I've had a crash at Dragonspear right when the bomb at the second gate exploded (that was still with 5.0 but no shapeshifting involved) and I had one just now with 5.1 down in the catacombs @Korgan's quest right when I triggered the chain lightning trap.
@Ulb: I can't reproduce either of the crashes. Do you have any save games where you can reliably cause them to occur? In any case, please send the .dmp files my way.
(New) Opcode 402: InvokeLua. Calls a Lua function that matches the effect's Resref/Resource field. Maximum function name length is 8, and function names must be completely upper-case.
Opcode 280: If Special parameter is non-zero, all hardcoded graphical effects are suppressed. NOTE: This mechanism uses (new) stat 301; this stat should not be set manually and should not be used by modders. ( @OlvynChuru )
@Bubb Cheers. I will test soon enough and will let you know.
I'm not sure if other crashes were related to shapeshifting or not since it was mid fight. It took me a while to connect the dots and after reverting to v3 everything stopped. I thought it was SCS v32 RC10 which I installed lately.
I will install v5.X soon and will pay attention to any suspicious effects.
@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.)
@AndreaColombo: Just wanted to post here to say that I hear you, and have been working on it. I didn't initially respond because I thought I could whip it out fast; that didn't happen. (Not so much that it's a hard thing to do, just my time has been required elsewhere...)
- Top bar (red) represents modal actions that are cyclic, (detect traps / illusions and turn undead, etc.).
- Middle bar (yellow) represents spells that occur on intervals, such as contingencies and globe of blades.
- Bottom bar (blue) represents the spell cooldown timer; the bar being full when a spell can be cast.
- Top bar (red) represents modal actions that are cyclic, (detect traps / illusions and turn undead, etc.).
- Middle bar (yellow) represents spells that occur on intervals, such as contingencies and globe of blades.
- Bottom bar (blue) represents the spell cooldown timer; the bar being full when a spell can be cast.
Does the yellow bar work with Static Charge? It would be great to know when the next 32d8 damage bolt is going to strike.
I don't think it would.
Static Charge utilizes a timer more similar to poison/disease, than to contingencies. It default is just once/round instead of once/second.
* Could we make a way for creature scripts to get the nearest creature that satisfies all the conditions in a block, without having to do SecondNearestEnemyOf(Myself), ThirdNearestEnemyOf(Myself), etc. for every action? Optimally, it would look something like this:
IF
HaveSpell(CLERIC_HOLD_PERSON)
See(NearestEnemyMeetingConditions(6))
General(ConditionObject,HUMANOID)
!EEex_IsImmuneToOpcode(ConditionObject,175)
!ImmuneToSpellLevel(ConditionObject,2)
!CheckStat(ConditionObject,4,WIZARD_SPELL_IMMUNITY)
CheckStatLT(ConditionObject,75,RESISTMAGIC)
!StateCheck(ConditionObject,STATE_IMPROVEDINVISIBILITY)
THEN
RESPONSE #100
Spell(LastSeenBy(Myself),CLERIC_HOLD_PERSON)
END
This would DRASTICALLY shorten spellcasting AI, which normally has to have ten times as much code to do the same thing (checking from NearestEnemyOf(Myself) to TenthNearestEnemyOf(Myself)).
Another idea: could we make a new opcode that instantly resets a creature's timer that determines when it makes an attack, so that it immediately makes another attack? With this opcode we could make a creature attack more than 10 times per round by having it apply the opcode to itself with each hit. Icewind Dale 2 already has an opcode sort of like this. When a creature in Icewind Dale 2 gets a Cleave opcode effect, it immediately attacks an enemy in melee range.
Just got back from being away all weekend, sorry for not replying sooner . Since you guys like the timer bars so much I'll make them into an INI option in the next release.
Does the yellow bar work with Static Charge? It would be great to know when the next 32d8 damage bolt is going to strike.
The yellow bar doesn't include the more complex interval spells, (the one's whose interval can be changed via opcode parameters and other effects), because there would be no standard way of displaying what time they execute. The only way I can think of would be to overlay a vertical bar on the yellow progression to signify that some effect will execute at that time, but that doesn't take into account effects that take place over long intervals.
Regarding the scripting idea: This is the kind of thing I've wanted to do ever since I had an inkling of EEex, I just didn't know enough to know what would help.
I've found the main trigger evaluation loop in the exe, and have looked at the OR trigger to see how a trigger that modifies subsequent evaluation works...
Instead of invoking the behavior by an object, I think a trigger would be nicer, that then stores the first matched cre; maybe like this:
IF
EEex_MatchTarget(6)
General(ConditionObject,HUMANOID)
!EEex_IsImmuneToOpcode(ConditionObject,175)
!ImmuneToSpellLevel(ConditionObject,2)
!CheckStat(ConditionObject,4,WIZARD_SPELL_IMMUNITY)
CheckStatLT(ConditionObject,75,RESISTMAGIC)
!StateCheck(ConditionObject,STATE_IMPROVEDINVISIBILITY)
THEN
RESPONSE #100
Spell(EEex_MatchedTarget,CLERIC_HOLD_PERSON)
END
- EEex_MatchTarget would only return true if it found a valid target
- EEex_MatchedTarget is an object that is set on a per-creature basis by EEex_MatchTarget
Hows that look? It will be tricky to hijack the trigger evaluation, so it could take me a while.
Regarding the instant attack idea, I haven't looked, but I suspect it will be very hard to implement. Attack timing is one of the most arcane systems in the engine, and if I can't simply call an already-defined "attack now" function, it might not be possible without breaking something else.
@Ulb: I can't reproduce either of the crashes. Do you have any save games where you can reliably cause them to occur? In any case, please send the .dmp files my way.
@Bubb I think I've found a reproducible crash, though with a heavy modded game, there is of course no saying whether EEx is really responsible or not..
The crash consistently occures when triggering the cloud kill trap in the little circular room with the iron lever/wheel in the middle, right before Gaal's room down in the sewers. I can pause and ctrl-y the mist creatures but the second the could kill projectile hits, the game crashes.
I did not find any .dmp files in my BG directory, so I'm not sure what I'm supposed to send you exactly.
These coloured bars are very cool.
Reading though this thread a bit, installing the MOD and checking out what I have so far (im a bit new to mod technicalities) am I right in saying they are not something I can use yet? Like this is just the Modder experimenting but its not actually 'in' the eeex. alpha released so far?
Any illuminated advance would be appreciated, otherwise I will keep reading!
Thanks
@Bubb You are really changing stuff that remained impossible for so many years. This stuff opens up so many possibilities.
What is your vision regarding those cooldown bars? Next to portraits for each character? One for selected charater? Above head for party like HP bars on TAB?
I was thinking of experimenting with the new InvokeLua opcode. But I'm wondering, what data is passed to the parameters of the function called by the opcode? Is it the actorID of the target of the opcode? Or is there something else? It would also be cool for Parameter1 and Parameter2 of the opcode to be passed to the function as well.
@Ulb: Can't reproduce that one either. I think one of your other mods might be acting up, unless it's some weird event that EEex + another mod that is responsible. And btw, if the crash dumps aren't appearing in your game folder, they are probably in:
@David77: Correct; the colored timer bars are not yet in EEex, I was just showcasing the concept here. I'll have them included in the next release though, whenever that may be
@Myrag: I honestly don't know the best place to put them. I think having a bar for every player portrait would clutter the screen; above the sprite's heads might be good, but that would require some extra work to get right. Any suggestions on where exactly to implement them would be appreciated.
@OlvynChuru: Two memory addresses are passed to the function: The first is the effectData, aka the opcode structure that was run. The second is the creatureData, aka the creature structure of the target... this will always be a sprite; if a door or such is targeted the opcode won't function.
function B3_OPTES(effectData, creatureData)
local targetID = EEex_ReadDword(creatureData + 0x34)
local param1 = EEex_ReadDword(effectData + 0x18)
local param2 = EEex_ReadDword(effectData + 0x1C)
local special = EEex_ReadDword(effectData + 0x44)
end
In later EEex versions I'll probably standardize all these random memory addresses into userdata types, which include built-in functions / fields that allow safe access to structure contents, instead of requiring the use of arbitrary memory read operations.
Also note that timing modes are a little wacky with this opcode - or I should say, this opcode really shines a light on the wacky way opcodes are applied. If you do an Infinity_DisplayString in the body, you will notice that the opcode can be applied several times, and sometimes seemingly randomly. For consistent results, I would recommend using Instant / Limited with a duration of 0.
For the modals - a bottom-top color unfill over the modal buttons on the actionbar.
For the spell/item timer - similar over the actionbar buttons (cast spell, use item).
For the contingency timer - rotary/clock around/behind the Quickloot button.
Also note that timing modes are a little wacky with this opcode - or I should say, this opcode really shines a light on the wacky way opcodes are applied. If you do an Infinity_DisplayString in the body, you will notice that the opcode can be applied several times, and sometimes seemingly randomly. For consistent results, I would recommend using Instant / Limited with a duration of 0.
I know opcode 215 can do something similar, when using a non-looping animation. The animation will repeat whenever you start casting a spell or get hit, but won't won't repeat if it's currently playing.
@Bubb That's weird because switching between 0.5.1 and 0.3.0 turns the crashes on/off for me. Maybe it is not just EEx but something else plays a role (like a characxter having detect invisibility).
I found the .dmp files, will upload tonight or tomorrow..
For bar positions, I assume maximum utility is when they’re shown for individual characters as opposed to the whole party or a subset of it.
Why not make them appear where your GIF shows them, but only when a single party member is selected? Each party member will have their own timings anyway, so a combined line wouldn’t work.
An exception could be made for the red line; it might make sense to display it for the rogue even when other party members are selected (provided that he was using an ability,) although that would pose a challenge in the case of multiple rogues in the party at the same time.
Comments
Have you experienced any crashes that don't involve shape shifting?
I do have one more request regarding the wild surge opcode. Would it be possible to make another feature of that opcode (or a new opcode) that disables the graphic effects of the wild surges?
By "graphic effects," I mean:
* the random visual effects created when there's a wild surge
* the string saying "Wild Surge: whatever"
* and the sound effects that play when there's a wild surge
The gameplay effects of the wild surge should stay unchanged.
This would allow me use the wild surge opcode in contexts that have nothing to do with wild surges (e.g. a spell you cast on enemies to make their spells target the wrong creature, or an overpowered Enoll Eva's Duplication-type spell that lets you cast your spells twice).
As always, thank you for all you've done!
I think there are still other crashes going on.
I've had a crash at Dragonspear right when the bomb at the second gate exploded (that was still with 5.0 but no shapeshifting involved) and I had one just now with 5.1 down in the catacombs @Korgan's quest right when I triggered the chain lightning trap.
v0.5.2-alpha has been released.
New Opcode Features:
I'm not sure if other crashes were related to shapeshifting or not since it was mid fight. It took me a while to connect the dots and after reverting to v3 everything stopped. I thought it was SCS v32 RC10 which I installed lately.
I will install v5.X soon and will pay attention to any suspicious effects.
@AndreaColombo: Just wanted to post here to say that I hear you, and have been working on it. I didn't initially respond because I thought I could whip it out fast; that didn't happen. (Not so much that it's a hard thing to do, just my time has been required elsewhere...)
- Top bar (red) represents modal actions that are cyclic, (detect traps / illusions and turn undead, etc.).
- Middle bar (yellow) represents spells that occur on intervals, such as contingencies and globe of blades.
- Bottom bar (blue) represents the spell cooldown timer; the bar being full when a spell can be cast.
I get the blue bar is kind of your aura cleansing measurement (when the bar is full, your aura is cleansed and you can cast again.)
But how does the yellow bar work, exactly?
(I agree it’s a kickass feature, by the way.)
Och man, I was dreaming about this for years!
Does the yellow bar work with Static Charge? It would be great to know when the next 32d8 damage bolt is going to strike.
Static Charge utilizes a timer more similar to poison/disease, than to contingencies. It default is just once/round instead of once/second.
Great job, @Bubb !
More ideas:
* Could we make a way for creature scripts to get the nearest creature that satisfies all the conditions in a block, without having to do SecondNearestEnemyOf(Myself), ThirdNearestEnemyOf(Myself), etc. for every action? Optimally, it would look something like this:
This would DRASTICALLY shorten spellcasting AI, which normally has to have ten times as much code to do the same thing (checking from NearestEnemyOf(Myself) to TenthNearestEnemyOf(Myself)).
Another idea: could we make a new opcode that instantly resets a creature's timer that determines when it makes an attack, so that it immediately makes another attack? With this opcode we could make a creature attack more than 10 times per round by having it apply the opcode to itself with each hit. Icewind Dale 2 already has an opcode sort of like this. When a creature in Icewind Dale 2 gets a Cleave opcode effect, it immediately attacks an enemy in melee range.
When the yellow bar resets from 100% to 0% contingencies and simple-interval spells like Globe of Blades will fire.
The yellow bar doesn't include the more complex interval spells, (the one's whose interval can be changed via opcode parameters and other effects), because there would be no standard way of displaying what time they execute. The only way I can think of would be to overlay a vertical bar on the yellow progression to signify that some effect will execute at that time, but that doesn't take into account effects that take place over long intervals.
Regarding the scripting idea: This is the kind of thing I've wanted to do ever since I had an inkling of EEex, I just didn't know enough to know what would help.
I've found the main trigger evaluation loop in the exe, and have looked at the OR trigger to see how a trigger that modifies subsequent evaluation works...
Instead of invoking the behavior by an object, I think a trigger would be nicer, that then stores the first matched cre; maybe like this:
- EEex_MatchTarget would only return true if it found a valid target
- EEex_MatchedTarget is an object that is set on a per-creature basis by EEex_MatchTarget
Hows that look? It will be tricky to hijack the trigger evaluation, so it could take me a while.
Regarding the instant attack idea, I haven't looked, but I suspect it will be very hard to implement. Attack timing is one of the most arcane systems in the engine, and if I can't simply call an already-defined "attack now" function, it might not be possible without breaking something else.
@Bubb I think I've found a reproducible crash, though with a heavy modded game, there is of course no saying whether EEx is really responsible or not..
The crash consistently occures when triggering the cloud kill trap in the little circular room with the iron lever/wheel in the middle, right before Gaal's room down in the sewers. I can pause and ctrl-y the mist creatures but the second the could kill projectile hits, the game crashes.
I did not find any .dmp files in my BG directory, so I'm not sure what I'm supposed to send you exactly.
Reading though this thread a bit, installing the MOD and checking out what I have so far (im a bit new to mod technicalities) am I right in saying they are not something I can use yet? Like this is just the Modder experimenting but its not actually 'in' the eeex. alpha released so far?
Any illuminated advance would be appreciated, otherwise I will keep reading!
Thanks
What is your vision regarding those cooldown bars? Next to portraits for each character? One for selected charater? Above head for party like HP bars on TAB?
@David77: Correct; the colored timer bars are not yet in EEex, I was just showcasing the concept here. I'll have them included in the next release though, whenever that may be
@Myrag: I honestly don't know the best place to put them. I think having a bar for every player portrait would clutter the screen; above the sprite's heads might be good, but that would require some extra work to get right. Any suggestions on where exactly to implement them would be appreciated.
@OlvynChuru: Two memory addresses are passed to the function: The first is the effectData, aka the opcode structure that was run. The second is the creatureData, aka the creature structure of the target... this will always be a sprite; if a door or such is targeted the opcode won't function.
In later EEex versions I'll probably standardize all these random memory addresses into userdata types, which include built-in functions / fields that allow safe access to structure contents, instead of requiring the use of arbitrary memory read operations.
Also note that timing modes are a little wacky with this opcode - or I should say, this opcode really shines a light on the wacky way opcodes are applied. If you do an Infinity_DisplayString in the body, you will notice that the opcode can be applied several times, and sometimes seemingly randomly. For consistent results, I would recommend using Instant / Limited with a duration of 0.
For the modals - a bottom-top color unfill over the modal buttons on the actionbar.
For the spell/item timer - similar over the actionbar buttons (cast spell, use item).
For the contingency timer - rotary/clock around/behind the Quickloot button.
I know opcode 215 can do something similar, when using a non-looping animation. The animation will repeat whenever you start casting a spell or get hit, but won't won't repeat if it's currently playing.
I found the .dmp files, will upload tonight or tomorrow..
Why not make them appear where your GIF shows them, but only when a single party member is selected? Each party member will have their own timings anyway, so a combined line wouldn’t work.
An exception could be made for the red line; it might make sense to display it for the rogue even when other party members are selected (provided that he was using an ability,) although that would pose a challenge in the case of multiple rogues in the party at the same time.
appearing for all characters all the time, toggleable
is something like this possible?
Man, this would have “kickass feature” written all over!