Jump to content

Stealth21

Members
  • Posts

    48
  • Joined

  • Last visited

Everything posted by Stealth21

  1. I decided to present here a collection of the soulgem spell scripts. I wrote them for myself and tested out (except the grand souls voider cause that is irrationally). Everyone can include them in your mods if you like. Edit them in any way you imagine. Requires OBSE. Every spell has the next flags checked: Disallow Spell Absorb/reflect Script Effect Always Applies Immune to Silence Every spell has script effect only, and in any of them: Range - Self Duration - 1 School - Mysticism Visual Effect - SoulTrap Processing the stolen soulgems is thought out, so voiding/filling them do not "transform" them to the non-stolen. Vanilla soulgems only, excluding Azura's Star and tomato. Objectally filled soulgems have a different cost comparing to their empty analogs, so there is a compensation to give or to take according to the difference. In some 3/4 corellation from the minused difference. However, as the practics showes, all the scriptally added empty soulgems will be a united stack/stacks in the player's inventory (even if to add them one by one, one piece per frame) at least after the game/savegame load. That 'united stack's behavior is - when the player is capturing the soul, that whole united stack is filling with just that one captured soul becoming a stack of the filled soulgems. I did not find a way to avoid it. Only the empty soulgems which existence in the world is due to the plugins which adds them (...or in theory, scriptally add the one piece of the empty soulgem to some container, save game, load game... but the player HAVE TO get it from it by -him/-herself) - only those soulgems will be not uniting in one stack. But there is a way to fix that situation - through the quest script and the ability 'spell'.
  2. Well... it is not. But it has an English voices (I do not like the translated, the englishmans were ensounding the characters with more expression than the translators) and a translated text I just used to. In GOG version there is an ability to play with an original English voices as well, but when I tried to play that, there are places when the voices are translated too (maybe they were because of the Unofficial Oblivion Patch though...) Yes, I thought that the fix could be an alternative menu. Good job. However, for me that is unacceptable, because I would like to not include the dependences such as MenuQue in this case.
  3. Thanks, good to know. I am an owner of the one of the first DVDs released with that game, and I decided to make the additions to the "Unofficial Oblivion Patch" with some fixes (mostly orphography) and novations (like upgrade this and that item if it has a more powerful self type in the Oblivion.esm, for example, MG12AmuletX) while playing now, just for myself though. Can you, please, share that script with me if you don't mind that it is your intellectual property?)
  4. I supposed that if STRP handler is changed then "Souls trapped:" counted value in the statistics is not triggered to be raised. Do someone knows the way to raise it in code, it's variable maybe? It is not the global so I can not find where such variables are stored... Also, a side question. When enchanting at the altar, when the item is choosed, the soulgem is choosed, the effect is choosed and I am choosing the same effect - that message: That effect has already been added. Edit the effect instead - do someone knows the way it can be translated in other way than HEX-editing Oblivion.exe ? I would like to avoid the HEX-editing way because that OBSE is binded to Oblivion.exe's checksum. Note that even with the translated setting "fEffectAlreadyAdded" that message actually stays untranslated in the game. I wonder what for is that variable then...
  5. KatsAwful, no, as I said, I have no github account and would like to not create it. And it is a little bit hard for me to explain things which I am translating first... But if you (or any other else person) understood what I wanted to explain, you just could make that issue there by yourself)
  6. Function GetOwner when used as a check within GetCurrentSoulLevel check is providing not a true. For example, I have next items in my inventory: - 3 empty petty soul gems customly filled with a petty soul which owns by a player (which is not 00000014/00000007 but just zero); - 1 empty petty soul gem which stolen from... ehm... Elsynia (BaseID 3e183, RefID 3e185 ElsyniaRef, no matter) also customly filled with a petty soul; - 1 empty petty soul gem which stolen from... Gogan (no matter) also customly filled with a petty soul. Stolen or not, BaseObject is same for both types. I would like to remove only the stolen empty petty soul gems like this: ForEach iter <- Player if ( iter.GetBaseObject == SoulGemEmpty1Petty ) && ( iter.GetCurrentSoulLevel == 1 ) && ( iter.GetOwner != 0 ) iter.RemoveMeIR endif loopbut it removes ALL the customly filled petty soul gems of both types either player's or stolen. Alright, then, I would like to remove only the player's empty petty soul gems and leave the stolen untouched like this: ForEach iter <- Player if ( iter.GetBaseObject == SoulGemEmpty1Petty ) && ( iter.GetCurrentSoulLevel == 1 ) && (( iter.GetOwner == 0 ) || ( iter.GetOwner == Player )) iter.RemoveMeIR endif loop- now it removes NOTHING, either player's or stolen. If to exclude the SoulLevel checking like this: ForEach iter <- Player if ( iter.GetBaseObject == SoulGemEmpty1Petty ) && ( iter.GetOwner != 0 ) iter.RemoveMeIR endif loop- then it is "Owner-sensetive" and works as it suppose to be working - in this certain example it removes the stolen soulgems only and leave the player's untouched (however, if I would have also a stolen empty lesser soulgem even without a soul filled with - the script would remove also it too). The workaround fo this is just to use GetOwner check right in the next 'if' like this: ForEach iter <- Player if ( iter.GetBaseObject == SoulGemEmpty1Petty ) && ( iter.GetCurrentSoulLevel == 1 ) if ( iter.GetOwner != 0 ) iter.RemoveMeIR endif endif loop
  7. Yes, I saw your posts where you describe that you met that issue with RemoveItem(NS). And also I saw that every person makes a comment that that function is working adequately, either in scripts I wrote where it is removing Gold001 in much more quantities than 1. Can you share your script with me? - maybe I could replicate it and test by myself. But I will not install any dependencies if it has. I have no a github account, because even if I would have, I do not actually understand the answers from the people who knows programming)) And a translative describing in not my native language is kinda mindful action. I wonder how much "sentencevelly" correct I am writting...))
  8. Another bug discovered. When using a function RemoveMeIR to remove an item from inventory (at least, not sure about when the case the items are in the container/NPC) completely. For example, I would like to remove (or transfer with that function, whatever) the lesser empty soul gems completely from the player which has them four pieces (only them and no other soul gems at all): Player.GetItemCount SoulGemEmpty1Petty shows 4. OK. ref iter Begin ScriptEffectStart ForEach iter <- Player if ( iter.GetBaseObject == SoulGemEmpty1Petty ) iter.RemoveMeIR end loop ENDThe soul gems are disappearing from player's the inventory. If to search for them with a ForEach<->loop once again, it will find nothing. However, the result of further [Player.GetItemCount SoulGemEmpty1Petty] command is 1. Allright, 1+1=2, right? - not in this case: Player.AddItem SoulGemEmpty1Petty Player.GetItemCount SoulGemEmpty1Petty the result is 1. But the difference is that now I can see it in inventory. So, to remove the item completely, it has to be removed with RemoveItem(NS) function.
  9. Tried that - not all of the icons on their places. Also there is a bug persists, there is a note about it in that mod description and some people reporting about that they met the situation where that bug triggers. Looks like that mod is just a try of making the custom spell icons mod be compatible with OBME, but it actually is compatible partially. Maybe there is an alternative to OBME exists?..) A bit limited but have less incompatibilities with other .dlls?
  10. Yes, thanks for the answers, guys. And yes indeed, Oblivion Magic Extender aka OBME was the answer for me - with this plugin it IS possible to change the hardcoded script of magic effects to the script and write it as one likes. However, people are reporting about incompatibilities with this plugin, and my case is not an exception unfortunately. I am currently playing so have saves and using SupremeMagicka mod. Thought, OBME has no incompatibilities with SupremeMagicka mod itself, but with it's optional but not exceptional dependence plugin - CustomSpellIcons. The game just crashes to load whenever a new game or a save. In the OBME's description there is even a note that OBME is incompatible with Custom Spell Icons v3.1. This is because both attempt to patch the same game code. So even thought I can load my current save without CustomSpellIcons.dll , it ruins the icons of the SupremeMagicka mod spells, making them all of the scripted spell default icon. Some plugins which are created using OBME can theoretically be fully functional without OBME presence, for example, if to not use a script functions provided by OBME. But in my case when I am going to change the magic effect's hardcoded script and choose that it will be a script from now, that plugin have to be loaded with OBME presence for it's full functional. And since the custom mods based on OBME will have incompatibilities with other mods because of OBME's .dlls presence, the result is that I have to give up in that I was going to implement. If only there would a spell icon setter alternative created for the SupremeMagicka exist... But it IS possible to rewrite Soul Trap functional. The steps would be simple: - change STRP magic effect's effect handler to "Scripted" - write a custom script. The icon/visuals/magnitude/spell_cost/spell's_dispel_behavior will be the same as original STRP have. The logic in the script of the soul trapping behavior could be like this: - target ref spell is casted to is obtainable with GetSelf - caster ref of the spell is obtainable using While<->Loop among the all of the casted to the target magic effects and check whenever it is a STRP magic effect code (by the way it is 1347572819) checking with the function GetNthActiveEffectCode, so we will surely find that ref whenever the spell casting method - projectile/touch ; enchanted to arrow/staff/melee_weapon (not sure about ranged weapon like bows, need testings) - if target is already dead, do nothing (return). Do next (ScriptEffectUpdate) only if the target is alive - whenever target IsCreature (GetCreatureSoulLevel) or actor (else), the logic will be going to the way of soulgems for the white souls or black souls And a big code of caster's soul gems iterating after the target OnDeath - the logic should search (ForEach<->loop iteration) for the appropriate to the gotten SoulLevel soul gems in filling priority dependence of maximum soulgem capacity. Also, GetOwner of the best suitable soulgem founded. I see the suitable soulgems filling in case of white souls of course in this priority way (BaseObjects) - Azura's star -> perfectly fittable vanilla soulgem -> perfectly fittable stolen vanilla soulgem -> perfectly fittable custom mod soulgem -> perfectly fittable stolen custom mod soulgem -> not perfactly fittable vanilla soulgem -> not perfactly fittable stolen vanilla soulgem -> not perfectly fittable custom mod soulgem -> not perfectly fittable stolen custom mod soulgem. If there was not found a suitable soulgem, show message from the sSoulGemTooSmall setting's string. Obviously, continue if founded - to process Azura's star, select it's ref and SetCurrentSoulLevel to SoulLevel obtained - to process other soul gems, select it's ref , GetBaseObject of it, GetOwner of it and GetRefCount of it. (not sure about that the stolen soul gems could be stacking into the stacks...) * if the owner is the player and to fill the vanilla soul gem - RemoveMeIR the founded soulgem which player owns, AddItemNS the already filled appropriately base object soul gem; if the founded soulgems ref quantity was > 1 then CreateTempRef from the base object of that empty soul gem, SetRefCount to the quantity of pastly founded soulgems quantity minus one, CopyIR to the caster; ** if the owner is not the player and to fill the vanilla soul gem - RemoveMeIR the founded soulgem which own by not the player; if the founded ref quantity was > 1 CreateTempRef from the base object of that empty soul gem, SetRefCount to the quantity of pastly founded soulgems quantity minus one, SetOwner to the owner of the pastly founded soulgems, CopyIR to the caster; another CreateTempRef from the already filled appropriately base object soul gem, SetRefCount 1, SetOwner to the owner of the pastly founded soulgems, CopyIR to the caster; *** if the owner is the player and to fill the custom mod soul gem - RemoveMeIR the founded custom mod soulgem which player owns; if the founded ref quantity was > 1 CreateTempRef from the base object of that empty soul gem, SetRefCount to the quantity of pastly founded soulgems quantity minus one, CopyIR to the caster; another CreateTempRef from the base object empty soul gem, SetRefCount 1, SetCurrentSoulLevel to SoulLevel obtained, CopyIR to the caster; **** if the owner is not the player and to fill the custom mod soul gem - RemoveMeIR the founded custom mod soulgem which own by not the player; if the founded ref quantity was > 1 CreateTempRef from the base object of that empty soul gem, SetRefCount to the quantity of pastly founded soulgems quantity minus one, SetOwner to the owner of the pastly founded soulgems, CopyIR to the caster; another CreateTempRef from the base object empty soul gem, SetRefCount 1, SetOwner to the owner of the pastly founded soulgems, SetCurrentSoulLevel to SoulLevel obtained, CopyIR to the caster; In the end, PlaySound ITMSoulTrap, show message from the sSoulCaptured setting's string.
  11. Looks like LAME is some way based on / inspirited with SupremeMagicka. But either of these mods changes the magic effect's visuals/icons/sounds(maybe)/power(in total)/cost... ...and I would like to edit the code itself of the existed standard magic effect. For a grotesque example analogy: when casting any spell which uses restore health REAT magic effect - there is a weather change to be snowing; when casting any spell which uses frost resist RSFR magic effect - Dagoth Ur is falling to the caster; when casting any spell which uses light LGHT magic effect - a nearby tree becomes a mudcrab. - and in each case there were no any health restoration, frost shield or light casted as we used to see and perceive them. As for a goal of it, I would like to rewrite (or better to edit) the logic code of STRP magic effect.
  12. Is it somehow possible to edit/rewrite the code of the magic effects? Is that code unaccessible? Where are they - among the game engine's .dlls / .exe ? I saw only one mod - SupremeMagicka.esp where there is in it somehow added a new magic effects, and moreover all the original spell/new spell from 3rd side mods which are using telekinesis magic effect are accompanied with the appropriate to telekinesis script effect. Thought, I doubt that in case of that mod the code itself of the standard telekinesis magic effect was rewritten, rather it is accompanied with a 3rd side script.
  13. Yes, I am also using EngineBugFixes and have bInstallMenuEntryMappingOverride=1 bInstallLeveledItemRemovalCountFix=1 bInstallItemStackCounterFix=1in EngineBugFixes.ini . Well, looks like the simple trick is that I have to never drop the customly filled soulgems into the world. Or be very cautions picking them up while having the empty ones... ...OR... Soulgem Magic is a type of mod that could be a possible fix for that situation. Indeed, there are "static" soulgems in the game, already prefilled (and could not be voided using the function "SetCurrentSoulLevel 0") which are in the Oblivion.esm from the beginning. I think that the SoulTrap magic effect released in incomplete state, and it's engine code should be reworked fitting in this logic: - after the creature effected with ST dies, the check process triggers on that effect's caster; - that check process checks for an appropriate soulgem (Azura's star is in the highest filling process priority, next - SoulGemEmpty1Petty, SoulGemEmpty2Lesser, SoulGemEmpty3Common, SoulGemEmpty4Greater and SoulGemEmpty5Grand are in a bit lower filling process priority, and other soulgems - tomato or from mods - in the lowest filling process priority) and it's owner; Next, going according to the priority: - when there is an empty Azura's Star - fill it in the currently implemented way; - when there is one of the appropriate suitable SoulGemEmpty1Petty, SoulGemEmpty2Lesser, SoulGemEmpty3Common, SoulGemEmpty4Greater and SoulGemEmpty5Grand soulgems - remember it's ownership, remove one piece of it, add a "static" version of a soulgem of an appropriate type and ownership; - when among the empty soulgems in the effect caster's inventory there is only a tomato or there are only the soulgems from the 3rd side mods - fill them in the currently implemented way. As my opinion, I dislike Soulgem Magic mod of those implementations like Multi-soul gems and fulfilling the soul levels in the filled soulgems. The voider spell could be enough.
  14. I met a bug in next situation. Suppose I have a stack of an empty grand soulgems. I have no any grand soulgem filled by myself in my inventory, but have at least one empty grand soulgem. In front of me, in the location of game world, I see a stack of whatever ownership (which contains more than 1 pcs) of grand soulgems which are filled, for example, with a common souls. And when I pick it up, the quantity of the empty grand soulgems in the inventory is raised to the quantity of [picked_stack - 1]), and only one filled with the common soul grand soulgem is added from that picked up stack. This situation of picking up the stack of customly filled soulgems independence of their ownership can be concluded like this: - if player has no such type of customly filled soulgem in his/her inventory WHILE has at least one empty soulgem of that type - only one piece of the picked up filled soulgems type, and [that stack minus one] quantity of empty soulgems of that type will be added to player's inventory. No bug in the each next circumstance: - there was no empty soulgem of that type in the inventory - there was at least one filled soulgem of equal type in the inventory - that filled soulgem stack's quantity is just one piece - picking up not from the game world but from the container/body - not picking at all but adding the equal object using codes - when the contrary conditions - player has any customly filled soulgem in his/her inventory WHILE has no any empty soulgem of that type. Picking up the stack of empty soulgems goes normally, it not merges with anything. Looks like that is the engine's bug. Also, I met another situation. For example, I have a 9 pcs stack of empty lesser soulgems. I am dropping it from the inventory. I see that there is not a single 9pcs stack falling down, but two/three items of different quantities, totally 9 pcs, thought. When picking them up, they are stacking in one stack. And when dropping them again, the situation persists, and not a single stack falling down.
  15. Meanwhile, I complete another script to empty any possible vanilla soulgem (except Azura's star and tomato) from the petty soul inside the player's inventory. Emptying from the lesser,...,grand soul will be a kind of cut copy-past. Here is a complete code: When we are catching the souls, for example, the lesser souls to the stack of 5 empty soulgems, the soulgems are filling not in stacks (however, if drop/relocate them one by one - they will stack). So, I implemented a possible stacks counter in ForEach loop searching like this: let PettyPetty := PettyPetty + iter.GetRefCount instead of let PettyPetty := iter.GetRefCount cause while passing each inventory's item reference, each soulgem matching those requirements if ( iter.GetBaseObject == SoulGemEmpty1Petty ) && ( iter.GetCurrentSoulLevel == 0 ) will be "in script's mind" and counted. Then, let it just "manually" iterate all the cases of vanilla soulgems player possess. Priority is such foundable/buyable soulgems like SoulGem2Lesser1PettySoul ... SoulGem5Grand1PettySoul. But those soulgems are differs in the price/cost, so I implemented a compensation - plus or minus (add or remove). You can see in code how the proccess is catching the soulgem references which are in the player's inventory. Then they are REMOVING theyselves. And meanwhile, somewhere far-far away from the player, in the player inaccessible cell, there is a container with an appropriately named (zzSMPurifiersChestRef) persisted reference. There is an empty soulgems appearing in there, just a stack, the count of which is equal to the filled with a petty soul soulgems of equal capacity, counted in the beggining of the script, minus one. Then changing the soullevel of that stack to 1 (petty). Then return it to the player. What about the empty soulgem, player is getting one just with a simple additem function. Why it is like this? First, I tried to change the number of item's reference with a function SetRefCount BUT, near it's description, there is a note, that IT IS NOT WORKING (and so it is) when the item inside the container (I do not know about/did not test the case when it is inside the actor, but in my case I am using a container). Next, you are writting about the function GetInventoryObject - you will Get Inventory Object ID. But you actually need to process the references of such objects like soulgems, because having equal ObjectID of an empty soulgem, filled with an appropriate souls, they will be presented in different stacks, so in different references. It is not possible to select the reference with the given ObjectID, neither to choose between references giving ObjectID... well... maybe it IS possible, but is NOT rational... For example, I have in my inventory: 3 SoulGemEmpty3Common without souls 1 SoulGemEmpty3Common with petty soul 2 SoulGemEmpty3Common with lesser soul 3 SoulGemEmpty3Common with common soul Let's try to select the reference value giving ObjectID SoulGemEmpty3Common let refvariable := Player.CreateTempRef SoulGemEmpty3Common For example, for my purposes I need one with a petty soul inside of it. What will be selected with the command above? - I do not know, but I assume it will be the first met stack of SoulGemEmpty3Common objects. If that stack will be not that I am seeking for, being unaavailable to set additional requirement such as soullevel=1, then I have to relovate it to somewhere, and search from the beggining. So that's there is ForEach loop exists, where we can implement additional requirements while iterating the items in that loop proccess. And CreateTempRef is preferable for the cases when there is only one type of object inside the player/container. HOWEVER, I tested to select zzSMPurifiersChestRef.AddItem SoulGemEmpty1Petty PettyPetty let iter := zzSMPurifiersChest.CreateTempRef SoulGemEmpty1Petty iter.SetCurrentSoulLevel 1 iter.RemoveMeIR Player - the items did not return to the player. I opened that container in the game and obtained that there is a stack of empty SoulGemEmpty1Petty, which should be filled with petty souls... and which should NOT be inside that container, they should be relocated to the player. So, once again, ForEach loop used at that stage too. I did not use the CreateTempRef function because further I would needed to set the count of the stack, which SetRefCount function can not do cause the soulgems are inside the container. You can use it (the SetRefCount function), if you are going to do something {not related to change the count of the stack of the object inside the container} Also, I could not use the function, for example, RemoveItem SoulGemEmpty3Common 1 on a container I would relocated the filled SoulGemEmpty3Common soulgems, because in case if there are lot of SoulGemEmpty3Common soulgem, equal but not in the stack, once again, I would need a SetRefCount implementation to the container item. CopyIR was also not used too - if to copy each reference of identical items to the container - they will be presented there not as a single stack of identical items but as a different stacks of one piece even if they are identical. So, I choosed to create anew a single stack of empty soulgems and fill it with the appropriate soullevel, so it will be a one reference to relocate back to the player. Totally saying, I did not use a function in such way SetCurrentSoulLevel 0 and the script do not make an actual "purifying" the soul level to zero :D Moreover, and contrarily, my PurifiersChest is a liar!!! It is a SoulFillerChest :D Thought, the script is complete, I would like to have such sound and visuals when it is casts: - case when there is no any requireable for the spell proccess soulgems, no visuals and a fail sound - case when there is not enough money "to pay" for a transformation as a compensation, no visuals and a fail sound - case when the spell process purify the soulgem, visuals and a success sound I handled the sounds by adding a constant script effect (ability spell) which searches whenever player selected the certain spell and the script will change the sounds for that particular magic effect. When any of the certain spells are not selected by the player, the sounds changes back to their origins. It is possible to script in the quest script the awaiting for the casting animation starts when those certain spells are selected by the player, then cast alternative spell with none visual effects in certain cases... But that "awaiting" should "await" with as minimum delay in the frames as possible. I know about the function which changes the frequency of script execution in frames (do not know it's name thought), but I do no want that that script will be executed hundred times in a minute, keeping itself in the game engine's memory. I think that here I just have to accept the engine limits, give up and make a spells with a standard visuals and sounds rules. --------------------------------------------------------------------- After some tests, I finally understood that is the purpose of the function CreateTempRef! It is NOT working in the way it is selecting the item by it's ObjectID, it is CREATING a reference from the given ObjectID SOMEWHERE in the game's temporaries. For a one frame. So now I can exclude the container "services", and rewrite the script without it's use: elseif ( stage == 3 ) if ( Player.GetItemCount SoulGem1Petty1PettySoul > 0 ) Player.RemoveItemNS SoulGem1Petty1PettySoul 1 Player.AddItemNS Gold001 22 else ForEach iter <- Player if ( iter.GetBaseObject == SoulGemEmpty1Petty ) && ( iter.GetCurrentSoulLevel == 1 ) iter.RemoveMeIR endif loop if ( PettyPetty > 1 ) set PettyPetty to ( PettyPetty - 1 ) let iter := CreateTempRef SoulGemEmpty1Petty iter.SetRefCount PettyPetty iter.SetCurrentSoulLevel 1 iter.CopyIR Player endif endif ... instead of elseif ( stage == 3 ) if ( Player.GetItemCount SoulGem1Petty1PettySoul > 0 ) Player.RemoveItemNS SoulGem1Petty1PettySoul 1 Player.AddItemNS Gold001 22 else ForEach iter <- Player if ( iter.GetBaseObject == SoulGemEmpty1Petty ) && ( iter.GetCurrentSoulLevel == 1 ) iter.RemoveMeIR endif loop if ( PettyPetty > 1 ) set PettyPetty to ( PettyPetty - 1 ) zzSMPurifiersChestRef.AddItem SoulGemEmpty1Petty PettyPetty ForEach iter <- zzSMPurifiersChestRef if ( iter.GetBaseObject == SoulGemEmpty1Petty ) iter.SetCurrentSoulLevel 1 iter.RemoveMeIR Player endif loop endif endif ...And so, the functions SetRefCount and CopyIR are used teamwise with CreateTempRef. And looks like the function RemoveMeIR (for example, "iter.RemoveMeIR Player") can be used only for the reference removes, not for the reference relocates, in cases when it is applied to the temporarily created reference value. So many trifles undocumented for imperical understanding... So, totally saying, I see only one way of selecting a certain item('s stack) from the player/actor/container excluding the player's interactiveness - using the function ForEach loop.
  16. While wearing own hat :D : Why you didn't meant about the function GetTelekinesisRef ?!? Did you see my very first post question, the answer to which was a simple GetPlayerSpell ?)) So, I didn't see that function too, and now when I saw that, the script is complete, it have no cares about the soulgem type (Azura's star, black soulgem, tomato of souls, vanilla/mod soulgem)... but I do not like that the telekinesis is forcing the target=target, and also SupremeMagicka mod has own telekinesis effect modification, adding TWO telekinesis effects on the spell using that effect. Moreover, using telekinesis and GetTelekinesisRef, the value from GetTelekinesisRef is set only to the next frame after the telekinesis is applied to the object, so the spell just can not be a moment spell, there have to be a duration, and as a result, the item will be telekinetically moved a little to the player's direction. Here is a piece of code: short stage ref soulgemsearcher ref null ;Begin ScriptEffectStart ;nothing is here cause GetTelekinesisRef provides the object's ref value only to the next frame it's effect applied to that object ;End Begin ScriptEffectUpdate if ( stage == 0 ) if ( GetTelekinesisRef != null ) set soulgemsearcher to GetTelekinesisRef set stage to 1 endif elseif ( stage == 1 ) if (( soulgemsearcher.IsActivatable ) == 1 ) ... else set stage to 2 PlaySound SPLDestructionFail endif elseif ( stage == 2 ) Player.Dispel StandardEmptySoulGem3CommonSoul ; set stage to 0 endif Begin ScriptEffectFinish set stage to 0 EndSo, the problem was in GetCrosshairRef, indeed. And so, this is for the script with a two effects: 1st effect - telekinesis effect, target=(forced)target, duration=1, magnitude>=1 (3 is more than enough); 2nd effect - script effect, target=self (or else the script effect do not triggers because of the invalid target which is not an actor/creature), duration=1. We are dropping the items from the inventory, or they were "laying" already in the game world, or else way they are appeared in the front of the player's eyes. - if the item is not a soulgem at all - the cast to it ends up with an appropriate message about that; - if the item is a soulgem with an empty or with not a common soul - the cast to it ends up with an appropriate messages about that; - and if all of the requirements are observed, and the item is a soulgem with a common soul - the cast to it ends up with a soul purifying of it... and with an appropriate message about that) Also, you did not meant about that there was a way to get a reference value from the object inside a actor/container - ForEach<->null iterations ) ref iter ref container short stage Begin ScriptEffectStart let container := Player.GetSelf set stage to 1 End Begin ScriptEffectUpdate if ( stage == 1 ) ForEach iter <- container if ( iter.GetBaseObject == SoulGemEmpty4Greater ) && ( iter.GetCurrentSoulLevel == 3 ) iter.CopyIR zzSMOrigsChestRef endif loop set stage to 2 let container := zzSMOrigsChestRef.GetSelf elseif ( stage == 2 ) ForEach iter <- container if ( iter.GetBaseObject == SoulGemEmpty4Greater ) && ( iter.GetCurrentSoulLevel == 3 ) iter.SetCurrentSoulLevel 0 iter.CopyIr Player endif loop set stage to 0 Player.Dispel StandardEmptySoulGem3CommonSoul endif End- this is an example piece of code of purifying the soulgem of an exact ObjectID inside the player's inventory. If it appears that there will be a stack of SoulGemEmpty4Greater filled with a common souls, it's ref value will be different from the other SoulGemEmpty4Greater empty soulgems or filled with not a common souls. Purifying the stack of SoulGemEmpty4Greater soulgems filled with a common souls ends up with a purified stack, not a [stack of SoulGemEmpty4Greater soulgems filled with a common souls minus one, which is purified]. Further, purification process is actually going in the container to which that stack was copied. And it have to be presented in that way of copies. To purify just one, it is needed to copy one stack's ref to two containers, RemoveItem 1pc based on that ref's ObjectID in the container where will be no purification process, RemoveItem [stack - {stack - 1}] based on that ref's ObjectID in the container where is an actual purification process. And return the items to the player, cleaning from the items from all of the containers. I see my goal script will in this way - it consists of manually iterates of the all of the combos of the vanilla soulgems (with black but without Azura's star. And without tomato) are laying inside the player's inventory possession. And yes, that needs the concentration.
  17. Well... alright. I think that the case in the CrossHairRef... so I stopped thinking in that way. I was reading about the iterations, ForEach and loop - they can get the references of the objects inside the actor/container. It has a description... but I notice it right now: with it we can get on this example four iterations, each one is a reference with a stacks. For example, 3 Grand.lesser will be not a three references but just one with a stack of three. So, if to setcurrentsoullevel to 0 to that reference of three, the all of the three will be purified. I just tried to implement it with a stack of 3 greater.common soulgems copying inside the persisted reference containers far far away from the player which I never visited, and I can say, that I can write a script which - will find some exact soulgem(s stack) with exact soullevel, - as there is a warning to not change the quantity inside the source container which processed by the ForEach<->loop, copy that found soulgem(s stack) to the two containers, to the each one - remove the found soulgem(s stack) from the player - in one container, remove one item from the stack with SetRefCount - in another container, leave only one item with the same SetRefCount and purify it with setcurrentsoullevel - copy the contents of the both containers to the player - remove the contents of the both containers Even the script can be careless about the soulgem type, it could be any - Azura's star, vanilla soulgems + black, soulgems from the mod... But I will make a specifically vanilla cares. Today it is too much for me. I will be writting lately, maybe even not tomorrow... But I will)) So, I screwed and "rised a cross" over the GetCrossHairRef :D
  18. Yes, it actually can either change soulgem level or playmagiceffect/shader.
  19. That's a good thought. The sorted items are always in the same order. But I see a problem here: 2 Grand.empty 1 Grand.petty 3 Grand.lesser 0 Grand.common 5 Grand.grand For ex., I have a soul purifier for grand souls only. The described items are in my inventory/container. They ALL SoulGemEmpty5Grand = 11 pieces, the same BaseID for all of them. I do not see a way to rely on their ingame order, neither to check their soul levels cause they are presented as BaseIDs, not as the RefIDs. Even if I place just one grand.grand soulgem in the container, is there a way to get it's soul level?.. I think that is implemented in that mod Yeah, I am also stopped to play until done with soulgems... or after the absolute fail) If you ask me, in the moments of mind's dead end, I am pushing the buttons in Project Diva :D Thanks for the hint. I tried it, and this do not solves the problem. I CAN NOT understand the problem. The code once again: short stage ref soulgemsearcher Begin ScriptEffectStart if ( zzSMEmptySoulGemQuest.soulgem == GetCrossHairRef ) MessageBox "Equal" else set zzSMEmptySoulGemQuest.soulgem to GetCrossHairRef MessageBox "Was not equal" endif set soulgemsearcher to zzSMEmptySoulGemQuest.soulgem set stage to 1 End Begin ScriptEffectUpdate if ( stage == 1 ) [color=red]if (( soulgemsearcher.IsActivatable ) == 1 )[/color] if (( soulgemsearcher.IsSoulGem ) == 1 ) if ( soulgemsearcher.GetCurrentSoulLevel == 0 ) Message "This soulgem is empty" set stage to 2 elseif ( soulgemsearcher.GetCurrentSoulLevel == 3 ) Message "You have freed the common soul from this soulgem" soulgemsearcher.SetCurrentSoulLevel 0 set stage to 2 else Message "There is not a common soul inside this soulgem" set stage to 2 endif else Message "The spell applied not on the soulgem" set stage to 2 endif else PlaySound SPLDestructionFail set stage to 2 endif elseif ( stage == 2 ) ; set soulgemsearcher to SkingradWestGateMapMarker ; set soulgemsearcher to ar_Null ; set soulgemsearcher to GetSelf set soulgemsearcher to GetFirstRef Player.Dispel StandardEmptySoulGem3CommonSoul set stage to 0 endif EndScript work is a paradoxly both right and wrong in the same moment :/ It becomes hardly to translate the explanations... I added the MessageBox checks of whenever the ref definitions are equal or they are equal not. And it is working as it should: - new spell - new definition of the void/empty ref HOWEVER, when I firstly apply the spell, for example, to the sign - it will obviously gives me a message "The spell applied not on the soulgem". With the further spell cast to the nothingness/air/Sun/Masser/Secunda, according to my script, it should end up with nothing (with a fail cast sound). Instead, it provides me the message result of that spell cast when it was applied to the activator (or any other crosshair reacheable object, even a static wall). So, in the same situation, the MessageBox checks are reporting me that the reference sets are going normally to nothing, and the script goes in the branch of the ref already set to something instead of to nothing. And as I wrote, if I'll pick up the object I JUST applied the spell on, the further spell castings going with a broken not working at all script. If first to apply the spell on the first item, then on the second item and then pick up the first item - the script will not be broken. Such a mistery... I would like to try the declaration of the ref variable inside of "ScriptEffectUpdate/GameMode". I saw that in some others mod. I am using TES4 Construction Set Extended, and it deny me to do that, deny me to compile the script, but the game's engine is not against of that. If someone know the OBSE script editor in which it is possible to declare the variables inside the functions, please, note it here.
  20. Looks like I triggered your inspiration)) So, you are saying adding the telekinesis spell... Well, it do not made a trick - I tried to exclude the 'soulgemsearcher' ref and relied on the target accepting by the telekinesis effect; tried "set soulgemsearcher to GetSelf" - the spell is working only on an already placed in the world activatable objects, just like it was with a 'script effect' on touch. Also, when it is with a telekinesis effect, it becomes target=target, which becoms hard to hit such a little object like a soulgem... but when it is hitted it flies away) Still, script with a telekinesis is not working as it should. The script written above is working (I was not care to meant, it is in 1 sec duration, and I do not see a difference yet between "GameMode" and "ScriptEffectUpdate" in that particular script), it set the reference of the soulgem/weapon/key/etc. dropped item, but, as I descripted, it's behavior is strange - the ref value do not voiding after the spell duration is over OR after the further next fresh spell castings. And I think that I need a ref voider way. I do not know any mod which has a spell with a script effect which accepting non-living object reference value to use it as an example.
  21. scn zzSMEmptySoulGemCommonSoul short stage ref soulgemsearcher Begin ScriptEffectStart set soulgemsearcher to GetCrossHairRef set stage to 1 End ;Begin GameMode Begin ScriptEffectUpdate if ( stage == 1 ) if (( IsActivatable ) == 1 ) if (( soulgemsearcher.IsSoulGem ) == 1 ) if ( soulgemsearcher.GetCurrentSoulLevel == 0 ) PlaySound SPLDestructionFail Message "This soulgem is empty" set stage to 2 elseif ( soulgemsearcher.GetCurrentSoulLevel == 3 ) PlaySound UIItemEnchant Message "You just freed the common soul from this soulgem" soulgemsearcher.SetCurrentSoulLevel 0 soulgemsearcher.PlayMagicEffectVisuals DSPL set stage to 2 else PlaySound SPLDestructionFail Message "There is not a common soul inside this soulgem" set stage to 2 endif else PlaySound SPLDestructionFail Message "The spell applied not to a soulgem" set stage to 2 endif else set stage to 2 PlaySound SPLDestructionFail endif elseif ( stage == 2 ) set soulgemsearcher to SkingradWestGateMapMarker ; set soulgemsearcher to ar_Null set stage to 0 endif End It appears that not everything is fine. The script is having such a strange behavior. The spell now has three behavior stages, and it seems that the problem is in the reference: - casting the spell to not an activatable objects do not sets a reference value to a 'soulgemsearcher' ref (but it SHOULD set the reference of ANY object) - once casted to an activatable object, the reference value sets to a 'soulgemsearcher' ref, and the further castings to a non-activatable objects shows that that ref value do not changes! Even if it passes the 'stage 2' where it should be set to something different than 'GetCrossHairRef', like the 'SkingradWestGateMapMarker' (persisted reference in the world) or a null-valued reference. - if to remove the activatable object after the spell was applied to it (for example, the emptied soulgem or a wrong-applied soulgem), the spell totally stops to work. The spell is casted to the player. It has two "scripted" effects - the first one is a fake (none) with a target=touch, just to achieve a "casting on touch" animation (that script is not fully working in case it is target=touch, it is working only when it is applyed to the NPC/creatures), and the second one is scripted with a code above with a target=self. I just do not understand WHY the spell remembers the reference value of the 'soulgemsearcher'... it is declared inside the spell's script, shouldn't it be empty with each spell cast?!? And why I can't make it to forget about the ref value set?!? I am sure that the script passes through ( stage == 2 ), I checked that with a MessageBox.
  22. DrakeTheDragon, yes, that's what I was looking for! That simple function... Looks like I just was tired yesterday... cause I was reading the OBSE function list all and over, searching the function with the "spell", "sound", "player" keyword... and was angry when only the "GetSpells" function is appearing in front of my eyes, which provides the array... Thanks.
  23. Hello. I would like to know is there a function exists which is checking what spell is currently selected/prepared for casting by the player. And I mean not the case of the moment when I am selecting it from the spellbook (not a GetActiveMenuSelection, because the spell can be set for a quick access number keys, avoiding the process of that check), but when it is selected and we can see it's icon in the "GameMode" which hints that if you'll press the "C" button, the associated spell will be casted. If where is no such function exists, then I'll try to explain the situation where I need that function. I scripted the spell to empty the soulgem. The process is excatly "emptying", not a "replacing with an empty item", using such functions like GetCrossHairRef, GetCurrentSoulLevel, SetCurrentSoulLevel on a dropped in the world soulgem-with-a-soul. Script is doing it's purpose, everything fine... except the sound. I selected "Soul trap" in the "Visual Effect" of the spell's script magic effect. That means, that animation, shader/enlightment, casting sound, bolt sound, (hit sound) and area sound are "inheriting" from the "soul trap" (code STRP) magic effect. I need the animation and the enlightment from that magic effect, but I do not need the sounds of casting and of the area. I tried to place a piece of code (not literally, an example) "SetMagicEffectCastingSound STRP null" to the spell script itself, but it works only after the spell is firstly casted, so I need it even before the spell's first cast. I do not need it changed permanently (for example, changing the STRP magic effect section in an editor) and will return the original sound after the spell's script work is done. So, I wanted to make an 'ability spell' which holds a script which checks whenever the soulgem emptier spells are prepared for the casting by the player to change the sounds only in those moments. I know that there might be a various alternative ways - not a spell but an enchanted weapon... a staff for example. There are enough equip checks to apply before 'attacking with the staff'... But in that case if I will be casting "soul trap" spells while that staff is equipped, there will be no sounds of STRP effect. Or an amulet which gives that 'scripted ability spell' changing the sounds while it is equipped... but there is the same problem - while it is equipped, there is no STRP effect sounds when casting "soul trap" spells... Or if a case with a GetActiveMenuSelection check, I need to know a way to deny my particular spells setting to the quick access panel.
×
×
  • Create New...