Jump to content

SparrowJacek

Members
  • Posts

    51
  • Joined

  • Last visited

1 Follower

About SparrowJacek

Recent Profile Visitors

759 profile views

SparrowJacek's Achievements

  1. Wow! It's THAT simple now. And it works properly with opcode 193, which is even cooler. Thank you very much
  2. Hi, My question is exactly, as in the topic title. It would be perfect, if I could make a modification so that using a wand/scroll would trigger "normal" casting, that breaks, when targetting an invisible creature, without opcode 193 applied. Is something like that possible? Or are there any other ways to prevent such behavior? Thanks!
  3. I don't think there's an elegant way to do what you want to do. At least I am not aware of any, but there are ways to achieve something similar, depending on your tolerance for delays in checking the conditions. To ensure that you backstab only once, you can simply use #340 (0x154) Spell Effect: Change Backstab Effect to cast a spell that will dispel your original spell/effect, when the backstab is performed. To check if your character is invisible, you could probably use #272 (0x110) Spell: Apply Repeating EFF coupled with opcode 326. But that would work only once per second (and might be affected by slow). The second option, that I personally don't like, but deem necessary in some situations, is to add some checks to your baldur.bcs and baldur25.bcs script files. This script is fired more often than once per second (once per game tick?), so the delay will be much shorter.
  4. Sorry to post another message here, but thanks to Pecca, the author of Infinite UI++, I now have a working solution, so maybe it will help someone else. The main function for extracting current character id: function getCurrentCharPortraitId() local idMapping = {} Infinity_UpdateLuaStats() local curCharId = id local i = 0 while ( i < Infinity_GetNumCharacters()) do Infinity_OnPortraitLClick(i) Infinity_UpdateLuaStats() idMapping[id] = i i = i + 1 end Infinity_OnPortraitLClick(idMapping[curCharId]) return idMapping[curCharId] end It works properly, but has an unwanted subeffect of really clicking on all characters, which triggers selection sounds and subtitles to these sounds. To fix that, I implemented some functions to temporarily turn off both: sounds and feedback. function getSelectionSoundsValues() panelID = 7 soundOptions = {} soundOptions[5] = Infinity_GetOption(5, panelID) -- Character Subtitles option i = 58 while (i < 61) do -- options 58, 59 and 60 control frequency of Selection Sounds, 60 = Never optionVal = Infinity_GetOption(i, panelID) if optionVal == 1 then soundOptions[i] = optionVal end i = i + 1 end return soundOptions end function setOptionsValues(valuesTable, panel) for k, v in pairs(valuesTable) do Infinity_ChangeOption(k, v, panel) end end function silentlyGetCurrentCharPortraitId() initialSoundOptions = getSelectionSoundsValues() noSoundOptions = {[5]=0, [60]=1} setOptionsValues(noSoundOptions, 7) currentCharPortraitId = getCurrentCharPortraitId() setOptionsValues(initialSoundOptions, 7) return currentCharPortraitId end And finally my implementation for Stealth Button: button { area 353 1 52 52 actionBar 5 enabled "buttonArray:GetButtonEnabled(5)" tooltip lua "actionBarTooltip[5]" action "if buttonArray:GetButtonType(5) == 11 then -- type 11 means Stealth charPortraitId = silentlyGetCurrentCharPortraitId() command = 'ReallyForceSpell(' .. 'STEALTH' .. ', Myself)' C:Eval(command, charPortraitId) else buttonArray:OnLButtonPressed(5) end" actionAlt "buttonArray:OnRButtonPressed(5)" } This still has 2 problems: 1. Using Stealth through keyboard button triggers the original Stealth 2. I am not sure how to block the spell from being cast once again, as disabling the button via Opcode doesn't really block it from triggering action function, however Stealth can just protect from itself for its duration, so it's not really important.
  5. It turns out that characters[currentID] or characters[id] doesn't work as I hoped it would... So right now I can only compare names from Infinity_GetPortraitTooltip and Infinity_GetSelectedCharacterName. This works properly, but can still behave strangely if a player decides to create 2 characters with the same name. Is there really no way to get a better solution without EEEx?
  6. Well, i think I have a solution, though it's not working in all cases. I have access to stuff like current character's name and HP, I also have a function Infinity_GetPortraitTooltip. So I can iterate over all portraits and compare the results (name, current and max HP) to determine CHARACTER_ID. Ofc if someone has 2 characters with the same name and HP, then it won't work properly, but I have no idea how to prevent that...
  7. I assumed that it's doable in EEEx, thank you for giving me the exact solution I still hope that it's possible to get proper ID value without EEEx, as it is unfortunately not compatible with MacOS and I'd really like to have a general implementation, not based on player's operating system.
  8. Hello, I'd been working on my modified Stealth ability, but was never satisfied with the fact, that it was a Special Ability, and not something you could trigger via Stealth button from the main Actionbar. Today I've found a potential solution to my problem, that doesn't even require EEEx, however due to my lack of experience with UI modding, I am not sure how to finalize my implementation. I can overwrite the original action from action "buttonArray:OnLButtonPressed(X)" to action "C:Eval('ReallyForceSpell(Myself,MY_STEALTH)', CHARACTER_ID)" and it works well, but I need a way to dynamically pass that "CHARACTER_ID" value, which IESDP describes as: Do you know if such index is possible to get instantly, or if it can be somehow mapped from some other data? PS. this CHARACTER_ID is an optional parameter, but its value is NOT current character ID if I don't provide it at all, so getting rid of it is not the solution. Thank you very much for your help!
  9. Yes, I wanted to take a look at that to learn what I've done wrong and how to avoid that in the future. @Graion Dilach if you decide to help, it will be very much appreciated! What is more, I will be able to study your changes to have a reference for any other animations we might add to the mod.
  10. I am not an experienced modder, so there might be better ways of doing this, but I'd go about it this way: Give the boots an item effect with Timing mode = 2, that uses this opcode #272 (0x110) Spell: Apply Repeating EFF. Set it to apply an effect once every X seconds and the effect should be to cast a spell (opcode 146) at the character. The spell then should have a chance (so that this tripping happens randomly) to apply all the effects you want it to have.
  11. Hi, I would like to create an ability that could be used once every X rounds, but you have an infinite number of uses. I know I can simply use Pocket Plane as a template, removing (opcode 172) and giving (opcode 171) the ability outside of Spell Ability and put an immunity (opcode 206) to that spell for those X rounds. But I'd have to create a portrait icon for that so players know when they can and when they can not use the ability. The problem becomes harder, if I want to introduce more such abilities, as tracking all those immunities becomes hard for players as they see more and more icons. That's why I would like to have an alternate solution. My idea was to delay opcode 171, so that players would see the ability only after specified time, this method removes the necessity of adding portrait icons, however it has a very serious problem - if a character dies before opcode 171 is fired, then I'd need to rest to be able to use the spells once again. Do you know if there's a solution to that problem? Or maybe there's another idea to achieve similar results? Thanks! EDIT: Hmm, the solution might be to also cast a spell giving that ability when our character dies. This however requires "Permanent after death" duration for all such spells, I wonder if applying hundreds of effects with such duration, each using opcode 171 or 172 on one ability won't become a problem? Won't they stack and overload the creature at some point? Or can I dispel all previous instances of those effects given by a specific spell, somehow?
  12. Hello InKal, I am one of the people working on Improved Anvil right now. It's good to see a thread about the mod on other forums than BWL. Maybe you could create a new account and write a PM to Baronius, asking if he could help? Unfortunately this isn't the case. From what I know, up till IAv6.0 almost all resources in the mod were created by directly editing needed files, without using Weidu, and we haven't had enough time to change that in newer versions. This means that IA directly copies and pastes its files into the override folder regardless of the fact that some other mod could have already made some changes to that file. As a result, you may experience issues during your playthrough, even if you didn't get any errors while installing your mods. Hmm, is something wrong with current Chaotic Commands spell? It's very useful protecting from most nasty effects and spells, like enemy sequencers with Greater Malison + Chaos. I've never played with SR mod installed, but from the description of the spell in Readme file, I see that it's extremely powerful and almost completely negates the possibility of being drained. It has long duration and cannot be dispelled by enemy attacks, so you just apply it to all characters and Vampires become just your standard melee fighters. PnP version of NPP works only for 1 hit, which is an overkill, so in IA enemies have a chance to dispel it.
  13. Hello, I am working on a spell that applies invisibility (EFF_1), adds some percentage bonuses to physical damage (EFF_2) and has a new spellstate (EFF_3) as an alternative to backstab. I want it to behave similarly to BS, so it should increase damage only for 1 action and only if the invisibility is present. I can dispel the spell right after my character performs a physical attack, but there are some other actions that can break Invisibility, like starting an offensive spell. Starting a spell is enough for that and there's always a chance to disrupt it or just start another action, so even patching all "hostile" spells to dispel my spell on cast is not enough. That's why I'd like to ask is there a way to dispel a whole spell right after invisibility (which is a part of this spell) is broken? Or will I need to check for invisibility each second?
  14. It is not exactly "aura cleansed", as you can try to go invisible at any moment, even right after casting a spell/using an ability, but yeah - you can click the button only once per 6 seconds. I also want to mimic that, although the more points you put in Hide in Shadows, the shorter the time needed to reuse the ability will be. I might even consider doing some simple GUI changes to remove any usability from Stealth button and make my Hide in Shadows ability block the button (make it gray) for specified period of time, indicating that you can't use the ability yet (ofc disabling the button will only be a visual representation, but underneath I will apply an opcode protecting from my HiS ability). It should be doable without EEEx, from what I remember and I don't need old Stealth behavior. Ahhh, I remember now why I decided to involve enemies in my HiS ability. In general I wanted to preserve the original Stealth behavior, so that it's not hard to go invisible if there are no enemies around, so that monks/rangers can benefit from that, but to reliably hide during combat you'd need high HiS skill and/or additional items. I couldn't figure out a way to enforce that any other way (as described above). Sorry for not mentioning it before, I just came back to modding after a while and I don't remember all the details of my previous ideas.
  15. Thank you for answering! The reason I want to implement it that way is that... I couldn't figure out any other way, that would work instantaneously. I could probably add some checks to global script or even to enemy scripts, but I don't really like that. Firing the checks determining if I manage to go invisible or not only at the moment I use my ability makes the most sense to me. Well, I had another idea, trying to put that % chance to dispel my invisibility into different spell abilities, but sadly opcode 326 does not allow to specify spell level at which the inner spell should be applied. Your idea looks good, it should work, although I still need to create 20 or 50 additional spells, which I really wanted to avoid. I will most probably use your way, if no other solution is mentioned in this thread. That's actually not a problem. It was always weird to me that there are 2 abilities doing the same thing, so you could spend 500 points into something that can't even be used during combat if you're not a Shadowdancer and there were many more reliable ways to go invisible and backstab. That's why I am planning to use only one of them for hiding in shadows and the other one will be used for something else. I have most of that in my head already, I will need to see if I will be able to implement it though I'm planning to reuse most of the behaviors of original Stealth button, so it will be usable at will, not needing aura to be cleansed, it will be usable only once per 6 seconds etc.
×
×
  • Create New...