Jump to content

JustChill

Premium Member
  • Posts

    284
  • Joined

  • Last visited

Everything posted by JustChill

  1. Use two times "GetIsID" as condition and choose as reference the base form of your two NPCs. Also be sure that you use "OR" as you cannot speak with both NPCs at the same time, so if you use "AND" to connect the conditions with each other, it won't work either. You can see the "OR"-checkbox right in your screenshot down below where the condition settings are. :)
  2. @KatsAwful Well, I barely use ForEach as I still struggle with its functionality. I doubt that "item" and "container" are set up in OBSE to work like that? These are just variables in your example I guess? Where "container" is an array and "item" is a reference variable? Furthermore I am not using xOBSE, as Nehrim doesn't have it and I am not making mods where users have to update their OBSE. Arthmoor also didn't really appreciate me using SkyBSA as requirement for the Unofficial Nehrim Fixes, as I simply wanted to pack all fixed Unofficial Oblivion Patch resources into a BSA. ^^ It's just that I love BSAs, but without SkyBSA, they are not really getting loaded properly in Oblivion. But I understand that it is a struggle adding new requirements for mods. I know that OBSE has issues, but currently it's the only solution for Nehrim. If people want to fix that, they have to update to xOBSE themselves, but currently Nehrim just uses the OBSE version from Silverlock in its default installation. @Pellape Thanks, I'll stick with it then. I don't think that any of these dead NPCs has a an enormous amount of items in its inventory, so it shouldn't be that bad. :smile:
  3. Maybe it doesn't like being used this way for World references? Player.SetEyes eyeDarkSeducerBut rather onto the actual NPC form: SetEyes eyeDarkSeducer PlayerAlso don't forget to use Player.Update3Dafterwards, otherwise the new eyes are not applied visibly. Also you can trick the Construction Set if it doesn't want to let you use a function in the way you want, even if it would work in the way you want. I had an issue with "GetName": Let strNOAmsgText2 := "You have to defeat the "+GetName SchattenrufAlptraumTroll01+" to activate that system!" MessageEx $strNOAmsgText2This does NOT work, as the compiler screams, when I try to use "GetName SchattenrufAlptraumTroll01", which is the EditorID of a creature base form. Let refNOAblackTroll := SchattenrufAlptraumTroll01 Let strNOAmsgText2 := "You have to defeat the "+GetName refNOAblackTroll+" to activate that system!" MessageEx $strNOAmsgText2This works. The compiler is fine with it. The idea behind that is, that I don't need to look up the different naming for each language of that troll. Instead the script gets the name by itself and only the rest of the message has to be translated.
  4. It definitely does not function the same, as the accuracy of the time evaluaton is gone because of the truncation. I've had this issue from time to time, until I realized that I used a wrong variable type regarding the stuff I wanted to do. ^^ "fQuestDelayTime" does either not work properly when using an integer. But I agree, you can use it.
  5. Redited original response: Hmmm... I just checked your use of that again. Let Arrowvar := player.getnumitems arrowammountI think you are mistaking GetNumItems https://cs.elderscrolls.com/index.php?title=GetNumItems with GetItemCount :wink: https://cs.elderscrolls.com/index.php?title=GetItemCount GetNumItems DOES NOT require any item ID, but just the container / actor ref. Player.GetNumItems Will return how many different items the player has in its inventory. It is normally used to walk through the whole inventory of a container / actor, as it can be used as maximum index value, when using "Player.GetInventoryObject <index>". But here are some notes on the Wiki page, that are concerning: Even though it's stated that the effiiciency got improved, I would still like to hear about experiences using this function. As I avoid stuff like this or "PlaceAtMe" like the plague. ^^
  6. Well I don't think that you can use an int / short / long, if you want to use "GetSecondsPassed" for example. It surely does matter how you define your variables. As using non-float variables for functions that require floats will give you a hard time. ^^
  7. I used to take over a script that actually uses if Ref.GetInventoryObject 0 else ;===> There is something in the inventory of the ref endif for checking if an enemy corpse has something in the inventory for the "Disintegrate corpse" spell of Nehrim Expanded (now implemented in the Nehrim Magic Overhaul). Yet, the problem with that was, that it also runs the ELSE-block, when there are non-playable items in the inventory. Which triggers the same behavior (warning messagebox) as if there were items in the inventory. So I saw no other solution than running through the inventory, checking for non-playable items: Begin ScriptEffectFinish Set ZielRef to GetSelf If ZielRef.IsActor && ZielRef.GetDead Let ZielInventarCount := ZielRef.GetNumItems ;=> CPU-heavy, so rather safe it into if ZielInventarCount > 0 ;=> a variable! While ZielInventarCounter < ZielInventarCount ;=> GetInventoryObject starts with inventory index 0 Let ZielInventarRef := (ZielRef.GetInventoryObject ZielInventarCounter) ;=>so no <= again in the loop condition. ;) if IsPlayable2 ZielInventarRef else Let ZielNotPlayableCounter += 1 endif Let ZielInventarCounter += 1 Loop endif if ZielNotPlayableCounter == ZielInventarCount ;=> When only non-playable items are available, Let ZielInventarRef := 0 ;=> we set the reference to 0, as if there would be no item in the inventory endif Let ZielNotPlayableCounter := 0 Let ZielInventarCounter := 0 if ZielInventarRef ;=> There are items in the inventory else ;=> There are NO, or only non-playable items in the inventory endif endif EndYet, I have never used "GetNumItems" before, as the wiki says it's a bad command. Does someone has experience using it? Could this script really harm the game, just because of using that function? Cheers
  8. I use int (now we know it's just a short), as bools (where I use 0 as equivalent for "false" and 1 as equivalent for "true") :wink: Initially I thought INT is even smaller than short, but well... learning never stops. ^^
  9. Thanks for bringing this up. I recently started to use INTs either, but rather for bools. Where I merely just use tiny amounts (like 0 or 1). :) I would be interested in a clarification about this type either. ^^
  10. oO I've never resulted in a positvie detection on any of my uploads. Dem false positives. :/ In addition: This is your new Hobbit Home, right? I only see "Save to use" files up there. :) So it seems to be fixed now.
  11. Wait how can you start an array with index 1? Ah, I see. I like how you defy the laws of arrays by simply skipping index 0 as of writing an empty entry into it and never taking index 0 into account then. XD I'm happy it works now. :D
  12. I am not sure if using an item that is created with PlaceAtMe gets cleared. At least for custom summon spells that use PlaceAtMe, the summons (when spell time over or killed) resulted in a bloat of the savegame as their objects never got cleared out of the game, even if disabled and moved to another cell. They only get cleared if they are disabled and the cell they are in gets reset (which only happens if the player visits that cell once). In that case it was recommended to use Initially disabled actors that get enabled and moved to the player when the summon spell is used. But used bottles cannot get resurrected and re-enabeld, so similar to the drop torch mod, PlaceAtMe might be the only way to solve this. You raise the array index by 1 before actually using it as index for the array. So the index var will never be 0 and probably be higher than the amount of entries in the array. You may use While eval(Ar_Size BottleExistArr) > BottleIndex ; Operations... Let BottleIndex += 1 Loopto be sure that you won't run outside of the actual array size. Ar_Size returns -1 if the array is not initialized 0 if the array is empty and any other positive amount regarding the size. :D In addition: Ah I just realized that you don't run through the array in State 2. Being a bit unsure about why you raise the array index right upon start in that state then. Regarding the index value before, this could still turn out to end up as index mismatch anyways. :/
  13. Thanks for pointing that out. :) I will remember that when I move objects that take the X and Y angle into account. Your solution seems to be the only one that works then. :thumbsup:
  14. Player.PlaceAtMe BottleRef 1Ah, I wish there would be a workaround for occasions where PlaceAtMe is required. PlaceAtMe creates a copy of the base item that is saved into the "BottleRef" reference variable. This copy gets permanently saved into the savegame. https://cs.elderscrolls.com/index.php?title=PlaceAtMe#Warning:_Repeated_Use_Causes_Save-Game_Bloat It's similar to "Drop Torch OBSE", where you can drop lit torches. It either uses PlaceAtMe. For each torch dropped. XD For Nehrim, I've updated the mod by giving the placed torches a reference, and use https://cs.elderscrolls.com/index.php?title=DeleteReference when the player activates the dropped torch. In that case I rather use "AddItem" to put a proper torch into the player's inventory and disable the torch the player klicked on and set them up for deletion. :smile: Yet, if your shelf isn't used excessively it may not bloat the savegame drastically with these PlaceAtMe bottles. :wink:
  15. Nice. ^^ I often bite into my desk when scripting and suddenly something weird occurs which I have to figure out by debuggin the whole stuff. Glad you found it out. Just one thing that comes into my mind about your video. I see that you firstly move the bottles into positon and then they are blinking on the spot. Would it either work, if you disable the bottles first, then move them into postion and enable them afterwards. That would fix the blinking for moving the bottles from shelf to shelf, even though it wouldn't for the button which fixes the placement of already positioned bottles. But still, might look a bit more appealing? ;)
  16. In that case PositionCell would be a bit faster as State 3 and 4 wouldn't be necessary. But - despite of hating relative math - I see how your formula works for other shelfs, which makes it easier to convert since the exact bottle location will be calculated according the shelf location. :thumbsup: Nice work, I often go the longer way to avoid such formula's as I fear that I mess up the calculation by not being that good with math. ^^ That's true. Which then requires SetAngle X and SetAngle Y used separately. After using PositionCell. As everything should happen within the same frame, I doubt that Havok will kick in and make a mess. ^^ Ah, just checked on SetAngle... Seems this one either doesn't update the collision box on the object. :( This would require further testing. Maybe it's not bad for the shelf, but if so then the method with enabling and disabling seems really to be the only way. :(
  17. You can convert degrees to radians by multiplying the variable that holds the degree amount with 0.01745. :smile: Except it might be good to convert the outcome in a float with only 4 decimal values, even though I am not sure if using floats with more decimal values is bad for PositionCell.
  18. Nice. :D That "blinking" comes from the disable / enable fix I guess? Feel free to try "PositionCell", that should have a similar result but doesn't require you disabling and enabling the bottles.
  19. Ah, sorry for overlooking that. I see it's State 3 and 4 where you fix the collision. I guess with PositionCell you could skip these 2 states at all. :D I would love to see a video about. :wink: I've made a similar case, just with the exception of having really items in it. As in my case, these are just static objects. XD It's rather a container which dynamically showcases its inside in New Vegas: .You are also NOT allowed to put anything else into the container than the items for which it is desired. These are poorly scripted... I mean I wrote a dumb amount of script, while I could lower it down. But this mod was one of the first where I freely programmed without the support of my mentor and after all, it just works. ^^
  20. That's interesting. You hadn't any issues using SetPos? As it doesn't work as clean as MoveTo or PositionCell. I would have rather used something like that, Let zAngle *= 0.01745 ;=> You need this as PositionCell doesn't use degrees for the ZAngle, but radians' BottleRef.PositionCell xPos, yPos, zPos, zAngle, <Your CellName> BottleRef.SetAngle x xAngle ;=> Not sure if PositionCell takes over the x and y angle, but if not then this should do it. BottleRef.SetAngle y yAnglebut if it works fine for you then that's good. Guess SetPos only causes issues on static object, not on activateable ones. Like moving a static brick or stone with SetPos will move it visually, but its collision still stays at the default position. Having a stone in front of a cave entry for example. Moving it with SetPos will still give you an invisible collision in front of the entry. XD I also like to use PositionCell to move a thing from one cell to another. While "MoveTo" works well for moving NPCs to a specific marker, moving objects to markers may cause issues as markers are big and objects (like shoes for example XD) are tiny. Therefore I like to use PositionCell in that regard. BUT, it doesn't work as good as it should. As if you move an object from one cell to another via a quest script, while the player is NOT in the target destination the object not appear there. Therefore I had to make sure the object only gets moved when the player is in the target cell. if Player.GetInCell <Target Cell> object.PositionCell blabla endifWorks fine then. :smile: About the issues, I couldn't find any problem either at first look. :sad: Will check again, but I guess direct debugging with printc "BIndex: %.0f, Bottle: %n, State: %.0f" BottleIndex, BottleRef, Stateand also with much more variables will help you out. Hm, you may be aware of much better way to debug things. ^^ I am oldschool in that regard. Putting in my own debug messages at specifc places in the script and check the results ingame. When I am really mad at the script I sometimes put in printc "f*** YOU!"God beware I ever forget to delete these debug messages. ^^ Luckily the CS(E) allows you to search for "PrintC" and it will list all entities that use this command. So cleaning out self-made debug messages should be easy then.
  21. It might be possible that "GetItemCount" in your loop return something weird, which is also the reason why I rather use a variable to count and remove it one by one. Yet my script only takes specific items into account, not a databse of 10 chests and 719 objects. So yeah, that one-by-one loop might produce a lag when you take these much items into account. oO
  22. sv_destruct str1, str2, str3, str4, ...Can destroy up to 10 string variables at once. I previously used it like that Let str1 := sv_destructwhich is actually a dumb way to use it. ^^ It's recommended to use these to clear Arrays Vars (Let arrayVar := ar_Null) or String Vars, when no longer in use, otherwise it will result in savegame bloating. @QQuix Thank you sooooo much! :D I might try and get nested arrays working now. Nothing gets over a good example. :smile: @KatsAwfuk Thanks for your example too. Every bit of code helps to dig in. :wink:
  23. I had crashes yesterday, when trying to load up cells into the render window. The issue persisted even after I restarted the CSE once. Yet it magically fixed itself when I restarted it another time. oO So aside of occasional hickups, I really like that program and it's awesome that it still gets supported. :smile: About your issue @MercerMeka, I can't remember having something similar like that. But I hope you'll figure it out. :thumbsup:
  24. Really? Well that's weird. I actually gave my Oblivion.exe the LAA-flag to use more than 2 GB, but if OR lowers the RAM usage to 800 MB, I guess that was not worthy at all. XD
  25. That's weird. I never had issues with RemoveItem removing the proper amount of items of one stack. Your loop appear different to the one I use. As I remove one item after another and reduce the item count either one by one to exit the loop at 0. Yet that was meant to catch the issue when having a normal stack and a stack of stolen goods. It still bugs me that you have issues with just one item getting removed from one stack. :/
×
×
  • Create New...