Jump to content

ReDragon2013

Members
  • Posts

    640
  • Joined

  • Last visited

Everything posted by ReDragon2013

  1. Thank you, dafydd99, for your papyrus code related to rotation matrix. In this context I want to reflect to wiki page https://www.creationkit.com/index.php?title=Spatial_functions_and_snippets, which is a mirror from an old bethesda forum posting made by chesko. GetPosXYZRotateAroundRef() And as second hint, it is possible to use an array (of any type) as function parameter. You do not have to initialize the array every time and return it back to caller function. My changes of your code as follow: Utility_Rotation
  2. By using a web search engine you'll find next: https://forums.nexusmods.com/index.php?/topic/7194756-error-setting-up-condition-for-spell-effect/ steve40 wrote: "Try adding the condition to the spell instead of the effect." and later "Do you have all the required source scripts installed? Sounds like it could be a missing script." http://www.gamesas.com/quick-questions-quick-answers-thread-t291560-25.html Big Homie wrote: "In case anyone else has a similar problem, i tried deleting the condition from the magic effect and adding the same condition to the nested effect item (inside the Spell menu, when you double click the effect, there is a way to add some conditions right there). So, it works now. No idea why it didn't work when the condition was added to the base magic effect itself. The specific condition I'm using is HasMagicEffectKeyword"
  3. In this forum thread https://forums.nexusmods.com/index.php?/topic/10012243-my-flora-mod-has-a-huge-problem/ you posted a link to your flora mod. The release was 2018. 1. May I ask you, what time did you find the mistake? your post: "if you save after harvesting and returning and reload the save the flora goes back to its harvested appearance." It would be a good idea to explain the flora issue a bit more here. 2. There exists an script called "defaultFakeHarvestableScript" in vanilla Skyrim, but I think its a dummy only without any ingame action.
  4. For Skyrim (32-bit) exists a tool called "TESVESSE.exe" TESV Savegame Editor made by fubrus. https://www.nexusmods.com/skyrim/mods/27119/ You are able to open a savegame ".ess file" and look what is happen inside. Under Global data table 3 > 2 Papyrus > Strings (string count) you'll see what kind of strings are stored in the savegame. Every loaded script name, as well as properties and variables inside, is baken. At the end of the stored strings you can find the strings of active scripts like temp0, temp1, GotoState etc. That means: "What about the scripts themselves?" Yes, depends on this object is loaded in Skyrim, the name of an attached script is baken to savegame.
  5. The problem is that you have no skill in papyrus scripting. Script below is thought to use for your triggerbox solution. Maybe its helpful. It does not despawn enemies as soon as player has left the triggerbox. psychLvlActorTriggerScript This is the wiki database for papyrus https://www.creationkit.com/index.php?title=Category:Papyrus
  6. IsharaMeradin wrote: "if you are wanting to actually view container A alongside container B, that is not possible with papyrus alone." Because the player (better to say: players inventory) is always one part of menu to transfer items. TheWanderer001 wrote: "instead of the menu for that container being between the player and that container have it open between the two containers so the player can transfer items between them." If I remember right we had a thread here (in Skyrim SE) or in normal Skyrim forum about transportable chest. The chest can be activated by player to transfer items from players inventory to the chest and vice versa. That means this chest is also an item, which can be taken to players inventory or drop down to Skyrim world. Maybe you could look at this mod https://www.nexusmods.com/skyrim/mods/99249 "bag of holding", which could give you inspiration for your work.
  7. That means your installed script version of RaceMenu should be updated. The base script is "RaceMenuBase.psc" as source and "RaceMenuBase.pex" as executable. ; RaceMenu version check If RaceMenuBase.GetScriptVersionRelease() < RACEMENUBASE_SCRIPT_VERSION startupError += ("Invalid RaceMenuBase script version detected (" + RaceMenuBase.GetScriptVersionRelease() + ") expected (" + RACEMENUBASE_SCRIPT_VERSION + "). Please update your base script. ") errorCodes += "(2)" ; *** EndifRaceMenu code snippet LE is using 32-bit with SKSE, SE is using 64-bit with SKSE64. Racemenu should also have two different mods one for Skyrim LE and one for Skyrim SE.
  8. My idea in shorten: A quest script is storage for two properties (the caster and a controller spell). The controller spell has an array as property with all your familiar spells. Controller spell has to be added to follower directly (its your choice to do that). The familiar spells will be casted by controller spell. After spell casting of familiar, the controller spell will be removed from caster. If the familiar is gone the controller spell will be addad back to caster. 1) create a new quest (you can duplicate an existing quest, make sure its a pure quest, no stages, no alias or any other thing), no idea whether the quest has to be "start game enabled" or not (probably not), attach next script to that quest jaypSF_QuestScript 2) create a controller spell (no duration here, with type fire and forget) and attach next script to the magic effect which this spell is using jaypSF_ControllerMGEFScript 3) now attach this script to the effect(s) which is/are used in your created spells to conjure a spriggin jaypSF_MGEFScript Do not forget to fill the properties. And keep in mind its an approach, maybe something has to be fine tuned or its not working as intended. Limitation: This is working for one NPC only. It cannot handle multiple actors which are using the controller spell.
  9. Approach: a) Use a Xmarker placed in a cell you want to show the receipe. b) Or a triggerbox to handle players entry. c) Or place the receipe disabled" to the cell, OnCellLoad() event should work for to trigger if player share the same cell with the receipe. sample script for a) pwShowReceipeOnMarkerScript
  10. Nothing special here, I only want to show IsharaMeradins very nice code samples inside a script with different functions. xyzSample_GiveItemsToPlayerScript
  11. you wrote: "I'm curious to know why your first script isn't working as expected" maxarturo: ObjectReference shrine = Self.placeAtMe(ShrineACTIVATOR, 1, false, true) ; non-persistent, but disabledxGoReTHeRoNx: ObjectReference shrine = placeAtMe(ArtisanShrineActivator, 1, false, true) shrine.enable()and here is the wiki page: https://www.creationkit.com/index.php?title=PlaceAtMe_-_ObjectReference activator script object script
  12. cuddleman1975 asked: 1. "Can I safely delete the leveled predator marker (green M in game) and their xmarkers spawn points linked (x3) to them?" DO NEVER DELETE VANILLA GAME PLACED MARKERS !!! 2. "Or better yet a way to disable specific ones without the need to delete?" too late
  13. first approach CustomSoulGemRefuser second approach CustomSoulGemRefuser third approach CustomSoulGemRefuser
  14. There is a logic error in your while loop. It doesn't matter to make it in "bottom-up" or "top-down" method. Let me explain: You have for example 3 soulgem fragments of type 3 (SoulGemPiece003). The player got the empty petty soulgem after confirming the message selection, but only one fragment has been removed from inventory by the loop, not three. Nyrolian loop: AnishaDawn loop:
  15. Conclusion: Different ways lead to the same aim. I know that a division or modulo operation is slower than Shift Right or And operation. The fact is (and that was my statement) all you do with SKSE LogicalXXX functions can be done with vanilla papyrus math operators. (1) your version (is calling 11x SKSE based Math.LogicalXXX() functions to reach the aim) (2) my version (has taken vanilla papyrus math operators to get the same result) https://www.creationkit.com/index.php?title=Operator_Reference (3) You wrote: "I'm gonna chalk that up to "different people think differently" because what you called simpler, I see see as the opposite." Maybe you do not really understand what I meant. My suggestion was next code; no overhead, no costs to compress and decompress Int int1 Int int2 Int int3 ;---------------- FUNCTION Func_1() ;---------------- int1 = 0x01ff ; store value here, no compression int2 = 0x02ff int3 = 0x03ff ENDFUNCTION ;---------------- FUNCTION Func_2() ;---------------- int i = int1 ; get back the stored value, decompression not required int j = int2 int m = int3 ENDFUNCTIONThat means normally its not required to get a "return of multiple values from a function".
  16. If you read the whole article here https://www.creationkit.com/index.php?title=Arrays_(Papyrus) you'll see this headline: "Assigning/Passing Arrays" int[] Array1 = new int[5] int[] Array2 = new int[10] Array2 = Array1 ; Array1 and Array2 now look at the same 5 element array, and Array2s original 10 element array is destroyed. The same applies to your sample which is using the same array variable. In case you want to destroy an array, which is a script variable or pre-filled as property look at these (it works for each array type like actor[], form[], string[], float[], ..): Int[] PROPERTY myArray auto ; pre-filled by CK Int[] a EVENT OnInit() a = new Int[128] ; script variable has been initialized Debug.Trace(" Array length is " + a.Length) ; 128 DestroyArray() Debug.Trace(" Array length is " + a.Length) ; Zero ENDEVENT FUNCTION DestroyArray() ;---------------------- int[] b ; set undefined array function variable of same type a = b ; destroy script variable myArray = b ; destroy property as well ENDFUNCTION
  17. 1. The name of the script could be better like "aaaBreathSoundMGEFScript". 2. There is a lot of redundant code inside. 3. The conditions (you met) are not consistent. I cannot see a good order to get a reliable priority. 4. As IsharaMeradin asked: Which conditions change the value of the global? aaaBreathSound
  18. Did you fill the property right with CK? IF yes, your code snippet is too short to give any advice.
  19. subhuman0100 wrote: "the tone of your post seems to be that you're disagreeing with me" I am sorry. I would not make you angry or flaming your post. 8-bit digit, from 0 .. 255 ------------------------------- hexadecimal 0x00 .. 0xff binary 0000 0000 .. 1111 1111 10-bit digit, from 0 .. 1023 ---------------------------------- hexadecimal 0x000 .. 0x3ff binary 00 0000 0000 .. 11 1111 1111 32-bit digit unsigned, our papyrus "int" type ------------------------------------------------------ hexadecimal 0x00000000 .. 0xffffffff decimal 0 .. 4,294,967,295 bit31 bit23 bit15 bit7 bit0 | | | | | binary 00000000 00000000 00000000 00000000 .. each bit can be unset 11111111 11111111 11111111 11111111 or set(1) re-order of 32 bits for better explanation bits 10 9 8 7 6 5 4 3 2 1 0 / / / / / / / / / / / | | | | | | | | | | | binary 0 0 0 0 0 0 0 0 0 0 0 10 bits + unused bit10 ---------------------------------------------- bits 21 20 19 18 17 16 15 14 13 12 11 / / / / / / / / / / / | | | | | | | | | | | binary 0 0 0 0 0 0 0 0 0 0 0 10 bits + unused bit21 --------------------------------------------- bits 31 30 29 28 27 26 25 24 23 22 / / / / / / / / / / | | | | | | | | | | binary 0 0 0 0 0 0 0 0 0 0 10 bits left(2) code to "compress" as follow: int i = 0x00000000 ; init by Zero; our three 10-bit digits, with different values as sample int n1 = 0x1ff ; 511 int n2 = 0x2ff ; 767 int n3 = 0x3ff ; 1023; store n1 into i i = n1 ; that is simple; fill bits 11 up to 20 i = i + (n2 * 0x800) ; hex 0x800, dec 2048; fill bits 22 up to 31 i = i + (n3 * 0x400000) ; explanation with binaries for variable "i" ; 00000000 00 | 0 | 00000 00000 | 0 | 00 00000000 = 0x00 ; -------------------------------------------------------------- ; 01 11111111 = i1 = 0x1ff ; 10111 11111 = i2 = 0x2ff ; 11111111 11 = i3 = 0x3ff ; ------------------------------------------------ ; 11111111 11 0 10111 11111 0 01 11111111 = i = 0xffd7f9ff(3) and now the "decompress" code: Keep in mind: bit10 and bit21 are unused! you wrote: "But I'm not sure where you're going with the modulus. Could you explain that?" ; get back the 10-bit digits n3 = i / 0x400000 ; div n1 = i % 0x800 ; modulo by 2048;all in one n2 = ((i % 0x400000) - (i % 0x800)) / 0x800; or step by step n2 = i % 0x400000 ; modulo by n2 = n2 - n1 ; subtract the first digit n2 = n2 / 0x800 ; div
  20. Yes you are right. Its possible, but what are the costs? Its much more faster (and easier to handle) to use script variables, and take these in different functions. Only functions inside scripts like Scriptname Utility Hiddenwhich do not have an own self, would have benefit from your posted method. Because script variables and properties are not allowed. By the way you do not need SKSE functions to compress/uncompress three 10-bit digits in one 32-bit int variable. You can use the operator * and % to do this as well.
  21. Hmm.. not so easy to explain. You wrote: " a way to store additional variables on Actor" Maybe next is helpful. You have a predefined class called "actor". All native events and native/convenient functions (which are available) for this class are declared in the source script "actor.psc". This script is loaded ingame as executable "actor.pex", which means its the compiled version of source script. For example of vanilla actor script, see next: atronachFrostActorSCRIPT What can we do, to add an additional property without changing (too much) this script? We change the script Reference from "Actor" to a custom named script, here "atronachFrostActorExtenderScript". As follow: Scriptname atronachFrostActorSCRIPT extends atronachFrostActorExtenderScriptOur new extender script (which is now the parent from atronachFrostActorSCRIPT) looks as follow: atronachFrostActorExtenderScript Both scripts have to be compiled. And after that the property right filled with CK. Int, Float or String do not need to be filled, but the GlobalVariable is required because of the use of FomID. Every ingame spawned FrostAtronach actor is now using the extender script too. Every script property above can be used in CreationKit conditions like GetVMScriptVariable probably. But the properties are not changed during runtime. We have to change the vanilla script as well a bit more or make changes in parent script like next. atronachFrostActorSCRIPT (changed)
  22. You cannot place an object to the world without an anchor or the right coordinates. Cells may have totally different x,y,z values, which means (0,0,0) is anywhere else, but not in the visible part of the cell. By using this thisPile.MoveTo(thisPile, 0.0, 0.0, _CurrentCoinZ)You have the same issue, because the object is somewhere "Over the rainbow". code snippet
  23. maybe something like that Another way could be a distance check between xmarker and the actor by using GetDistance(). WHILE (TRUE) float f = sitActor.GetDistance(self) IF (f > 100) ; adjust the distance, if required Debug.Notification("Stand up") RETURN ; - STOP - ENDIF Utility.Wait(0.25) ENDWHILE
  24. The easiest way would be to remove the script from the magiceffect. And after that add the same script again to this effect. Now fill the properties which should be automatic added by CreationKit. The thing with a property, which has to be a pre-filled array, is a bit tricky but not really. The array does not need to be initialized. The length of array is depending on the entries you add into. Take you time to fill the ammo in right order as you need. You have to add this one by one through selection menu.
  25. the script on mod page (you linked) has an error SC_BW_BoundBowScript or this script variant SC_BW_BoundBowScript
×
×
  • Create New...