Jump to content

KatsAwful

Supporter
  • Posts

    174
  • Joined

  • Last visited

Everything posted by KatsAwful

  1. I asked Maskar and got the help I need. Once I get a good grasp of it I'll release a mod or make a post here or something that goes over it. Its very powerful but very complex
  2. Menu lists are a part of Oblivion's xml schema that allows mod developers to add functional lists to a menu. Maskar's LINK uses them to search through installed mods. However, in classic Maskar fashion I'm having a very hard time following what Maskar does. There's around 100 scripts, and I'm not ever sure where the list gets formed and modify. Anyone have any experience??
  3. Could you make an issue on the xOBSE github? https://github.com/llde/xOBSE I know there's some issues with soul gems in the last release of OBSE, but this does seem unique
  4. This is a known bug and will be fixed with the next release of xOBSE. The fix is currently merged if you feel like building xOBSE
  5. Yeah. A messagebox takes a string, and optional option strings designated by commas after the first string. MessageBox "message string", "option1", "option2", ...
  6. Uh, you enclosed the messagebox options inside your message box lol MessageBox "Voiceless it cries, wingless flutters, toothless bites, mouthless mutters. What is it?", "Bat", "Old woman", "Wind", "Wraith" This is correct
  7. Yeah, I view the arrow as you're taking an item from the reference and storing it into a variable For that example, that is an array foreach loop. The "item" is a stringmap array that contains the current index and the current value at that index of the array being processed, 'item["value"]' and 'item["key"]' respectively. Its a similar idea to inventory references, but instead of an inventory the container is now an array. The last type is for strings, where each item in the string container is a character. Thus after each loop, the 'item' variable is wiped out and refreshed with the next thing being processed ForEach loops are quite powerful and once you learn how they work are super useful
  8. In an inventory reference foreach loop, the 'item' is the specific and current inventory reference found in any container named 'container'. So if you want to walk through the player's inventory you can do something like this: ref item ref container ... let container := PlayerREF ForEach item <- container let itemCount += 1 ; if you need item count at all ; do stuff Loop OBSE will process over every unique item stored in the player's inventory, allowing you to perform reference specific functions to them (like see if an item is stolen). However it works over unique references, so if you have 10 iron arrows that aren't stolen then OBSE will process them as one group of items. This is quite efficient and doesn't require you to know the entire inventory of some container since it happens sequentially. It's the simplest of the ForEach loops, and the OBSE bug is able to be worked around (the bug being an extra item that counts towards item count) However, as xOBSE diverges the importance of using it will begin to become apparent. The inventory reference bug is only a small part of what llde has planned, and once the next release comes out with the merged changes to the let statement, the speedup benefits will begin to be important
  9. Why not use inventory references? It doesn't have the same performance hit from my experience and it seems like that's all you need for your original post. The latest releases of xOBSE and OBSE does have a ghost bug, but that will be fixed with the next xOBSE release Example: ForEach item <- container ; do stuff with item, a temporary reference of the current item in a container ; this item will be gone on the next loop ; and if RemoveItemIR is used Loop
  10. You can use integers for any function with a float result, it'll just get truncated. For GetSecondsPassed it should still function the same
  11. Since numbers are stored as floats its doesn't matter if you use shorts/int or longs at the end of the day. I just use int for everything cause it conceptually lines up with what i use that kind of type for
  12. You can make scripted magic effects, but to add new magic effects you need OBME like qwerty said. It can be weird to work with however, since its trying to added to hardcoded effects
  13. I should clarify, I know what an int is in general, and I'm used to it being an unsigned long (like in C++) My problem is that I have 0 clue what it means for Oblivion. In Oblivion all numbers are stored as floats, and the only other number types are signed short and longs int test Begin OnActivate let test := 9.9 PrintC "number %g", test End This is completely valid in Oblivion, but what is this type actually? I can't find any information on its range. This type does truncate floats properly, but that's all I can conclusively state along with ints being signed still The CS wiki only mentions shorts and longs, and the OBSE docs doesn't describe it at all (but still describes certain function parameters and results as being of the type int)
  14. So for whatever reason I've been using the int variable type for my scripts. I have 0 clue why I use it, no idea what it is exactly, or where it actually comes from. Does anyone have any idea???
  15. Disable HDR in the launcher or use a mod like Oblivion Reloaded or a graphics ENB. The last 2 replace it outright
  16. QQuix, the syntax for the ForEach item assignment was a touch wrong. I had to pass off 'item' to a variable in order for CSE to compile like so: ForEach item <- aArmor[iArmorRandom] let rTemp := item["value"] PlayerREF.AddItemNS rTemp 1 ; add said value to player PlayerREF.EquipItemNS rTemp ; equip said value on player Loop But otherwise everything else you posted was right
  17. Just so I'm understanding right, you're asking about an array that contains 1 ref and 6 shorts? Oblivion arrays aren't constrained to type, you can add any valid variable or value to an array in any combination assuming you follow the inherent rules of arrays. But also if you wanna process over a whole array you gotta make sure you're dealing with the right type first. Can't do math on a reference variable ofc
  18. It's been months since I needed to use it, but I think I made a forum post somewhere asking for help about this kind of syntax. Just not sure where Ok yeah I found the post: https://forums.nexusmods.com/index.php?/topic/8697298-how-do-arrays-of-arrays-function/ I was probably just misremembering everything, my memory isn't very good
  19. This would be quite complex. It requires effectively making a whole new menu which anyone who's ever tried will tell you it's not straightforward (aka me)
  20. Another thing I forgot about nested arrays, OBSE seemingly doesn't like the syntax QQuix mentioned for pure indexed arrays. arrayVar[indexA][indexB] I didn't get complaints when compiling but for some reason the array would never be processed, unless I did something wrong. That's why I ended up doing the method I did
  21. I did nested arrays for a project I'm working. Its kinda weird and silly how I accomplished it however ; initialize needed arrays let aArmor := ar_Construct Array ; array of arrays let aArmCurr := ar_Construct Array ; working array let iArmNum := 0 ; the number of nested arrays ; load up nested arrays, and increment a value of the number of nested arrays let aRichArm := ar_Construct Array let aRichArm[0] := UpperPants06 ; Blue Silks let aRichArm[1] := UpperShirt06 ; Blue Silk Shirt let aRichArm[2] := UpperShoes03 ; Blue Suede Shoes let aRichArm[3] := JewelryRing6Ebony6Diamond ; Ebony Diamond Ring let aRichArm[4] := JewelryAmulet6Jeweled ; Jeweled Amulet let iArmNum += 1 .... ; more arrays, you get the idea ; fill the array with your arrays let iIndex := 0 While ( iIndex < iArmNum ) let aArmor[iIndex] := aRichArm let iIndex += 1 .... Loop ; pass a nested array to a working array let iArmorSize := ar_Size aArmor ; returns numeric size ; we pass the random array we want to a temp array ; for some reason this effectively turns the NOTE, not sure what i meant here ; basically you're using the passed array like a normal array ; I'm getting a random number based on the size of the working array for my own needs let aArmCurr := aArmor[Rand 0 iArmorSize] let iArmCurrSize := ar_Size aArmCurr ; work on the passed array ; yes i used a while loop don't judge me let iIndex := 0 ; set our index to 0 to walk through any array While (iIndex < iArmCurrSize) let rTemp := aArmCurr[iIndex] ; assign a temp ref to the current array value PlayerREF.AddItemNS rTemp 1 ; add said value to player PlayerREF.EquipItemNS rTemp ; equip said value on player let iIndex += 1 Loop .... Let me know if you have any questions
  22. Hi, I made a Vim plugin for Oblivion that also integrates with CSE's ScriptSync support. It has most of the features of the CSE script editor https://github.com/katawful/Obli-Vim
  23. Its the lowest float value possible, which for Oblivion would be insanely small
  24. It doesn't matter how much memory you have. Oblivion will mirror all textures to system RAM and VRAM, limiting you to around 2.5GB of usage before the game crashes
×
×
  • Create New...