Jump to content

KatsAwful

Supporter
  • Posts

    174
  • Joined

  • Last visited

Everything posted by KatsAwful

  1. Try adding the variable, save, and see what happens. If its good then add the part in the GameMode block. It's probably something weird with CS in obse mode, it worked fine doing it at once in CSE
  2. That wouldn't solve the issue. Each custom potion is its own unique ID. You need to parse every healing potion in the players inventory on the fly in order to get a proper count. That's what I did
  3. This is what you have right? ~before stuff~ int potion_val Begin GameMode let tnoHSB.potion_val := Call HUDPotion ~after stuff~ And you are running CS through script extender mode or using CSE right?
  4. Implementing into HUD Status Bars - We need to modify two things, the ini to get the menu element and plugin scripts itself. The ini is simple, you only need to add the following block: ; ==== Display number of available health potions set tnoHSB.hud_type to HUDtxtNoBar set tnoHSB.hud_color to sv_Construct "HUDcolorBlue" set tnoHSB.hud_val to sv_Construct "tnoHSB.potion_val" ; this actually gives us the value we need set tnoHSB.hud_x to 50 ; choose wherever set tnoHSB.hud_y to 70 ; choose wherever set tnoHSB.hud_name to sv_Construct "Potions: " set tnoHSB.hud_textColor to sv_Construct "tnoHSB.color" ; Color matches bar color set tnoHSB.hud_textDisplay to HUDtxtValue ; Display as value SetStage tnoHSB 10 You can play around with the design as you please To implement we need to take the script made above, with the appropriate changes cause Oblivion scripting is painful, and then call it somehow. We will call it on the main quest script so that it runs all the time, its inefficient but shouldn't be a massive drag on CPU time. I'm also going to assume you have some sort of experience using the CS in script extender mode/CSE to modify/add scripts. There's not much we need to do The modified script: scn HUDPotion ;; we need to set up variables ref iter ; our passed inventory reference ref ItemID ; the base object reference for our inventory reference ; PlayerREF is an explicit reference, it can't be a variable int potionCount ; the number of potions int magicCode ; we need a code for the magic effect begin function {} let potionCount := 0 let magicCode := MagicEffectCodeFromChars "REHE" ; we need to get the integer code because this plugin does not use Oblivion.esm as master foreach iter <- PlayerREF ; take each reference in "PlayerREF" and assign it to the ref var "iter" let ItemID := iter.GetBaseObject ; we need to ge the base object in some cases ; we only care about one thing, potions with REHE if (iter.IsAlchemyItem == 1) ; see if the reference is an alchemy item aka potion if (MagicItemHasEffectCode magicCode ItemID) ; see if it has the effect we want using the base object let potionCount += iter.GetRefCount ; += stands for compound assignment, addition in this case. lets us simplify let x := x + 1 to let x += 1 endif endif loop setfunctionvalue potionCount ; we need to return this so the main script can set the variable end Copy and paste this into a new script and save it, this is our user function to be called Next open up the script "HUDMain", this is the main script so it runs on some interval. At the end of variable declaration, around line 260 before the "Begin GameMode" line, add "int potion_val". Then below the begin line add "let tnoHSB.potion_val := Call HUDPotion". Save the script and plugin and everything should work as I presented, the HUD ini settings are a bit weird and might not show up idk how they work exactly This ended up taking a while because this mod is masterless, so it makes working with magic effects really annoying since Oblivion.esm contains most of the magic effects for some stupid reason. I had do to some chatting around to figure that out and how to work around it. This is also not the most efficient way to do this but eh, shouldn't be too bad
  5. Unfortunately this ended up being way more complex than I anticipated due to dumb Oblivion scripting troubles. It'll take me a while to finish implementing this, sorry
  6. This raw script shows how I used an inventory walk with inventory references to pick up magic items by magic effect. It checks if the inventory reference is an ingredient, and compares the magic effects it has to the one we want. If it has it the item is removed from the source and added to the player. What you want is quite a bit simpler at the core script. You only need to walk through the players inventory, see if any potion in the player's inventory has "Restore Health (REHE)", then increment a flag, and finally offload this flag to how HUD Status Bars works (since we can't use the ini file). Where this gets tricky is implementing this into HUD Status Bars The script - OBSE allows us to treat items in an inventory as references. To do this we need a few components. We need a reference to offload the item too, "iter", the container in question, "PlayerREF", and your flag, "potionCount". We then iterate (aka walk) through the inventory and take every reference found and plug it into "iter". We can then pretend that "iter" is a normal reference and do whatever: ;; we need to set up variables ref iter ; PlayerREF is an explicit reference, it can't be a variable int potionCount ;; we are just structuring the idea of the script, it needs to be inside a begin block at some point ; here we set potionCount to 0 at some point, not sure when ; scripting can be annoying foreach iter <- PlayerREF ; take each reference in "PlayerREF" and assign it to the ref var "iter" ;; we only care about one thing, potions with REHE if (iter.IsAlchemyItem == 1) ; see if the reference is an alchemy item aka potion if (MagicItemHasEffect REHE iter) ; see if it has the effect we want let potionCount += 1 ; += stands for compound assignment, addition in this case. lets us simplify let x := x + 1 to let x += 1 endif endif loop It's late so I'm posting what I have rn in case my computer decides not to turn on properly, the other half I'll finish tomorrow
  7. I mean yes, but that sounds like more worth than needed. An inventory reference walk is much simpler and catches any potion with the appropriate magic effect you want. No need to worry about object IDs with it
  8. That runs on a reference which you won't have in this case (you have a base object when you get the potion's object ID). Your formula would still fail as its only finding one unique object ID
  9. You'd have to use a script in this case unfortunately. Even if you get the custom ID, it would only be one of them. Every different restore health spell would create a different ID thus making your formula incomplete
  10. Can't you just walk through the players inventory using inventory references, find the potions with restore health and update your flag? That's what I would do, something like this: ref playerinv ref inv int count ; this is how you update your flag let playerinv := PlayerREF begin "whatever mode, i'd put it in a function to be called" foreach iter <- playerinv if MagicItemHasEffect REHE iter == 1 let count += 1 endif loop Would have to expand it probably, but you never need the object ID of the custom potion, you only need to info from it instead. You'll probably also need to find out the count of the same potions the player has created, it'll only find unique inventory references. I've used this to store potions and ingredients the player has to a container, since we are processing inventory references we can address all of the unique items stored (including stolen). I can show you the script its attached to if you need something more complete
  11. This info is saved to your save file and generated on the fly. They are not exposed to the player as you'd expect. Hard coded object IDs are not used in order to not cause bloat and keep unique items unique What do you need to do? You can always just walk through whatever inventory/crosshair reference and get the info you need. Check out "inventory references" for that
  12. Anything that overwrites the vanilla BSA gets seen. BSAs are still ordered by plugin (if you somehow have multiple BSAs addressing the same files), and loose files always overwrite regardless of BSA. This is the Skyrim's rules Per SkyBSA's mod page:
  13. @chambcra The rule that's supposed to happen is that loose files overwrite the BSAs because the BSAs should always be the youngest files (installed from DVD of course). Not only does this date precedence mean Steam and GoG releases don't work properly, it also only sorta functions so archive invalidation was needed. SkyBSA removes the date precedence outright, reverting back to the original intention/Skyrim rules among other fixes Bethesda didn't test out this system in the slightest, they just used dates for everything and called it a day :/
  14. Decompression does seem to be an issue sometimes. There's a program for Oblivion that uncompresses the vanilla BSAs and seems to help for lower end systems. No idea how well it actually works, doesn't seem to make a difference at all in Wine last time I tried (load times seem to be worse in Wine overall)
  15. Depends on how you start your quest, but I would just make a simple if statement that checks if the quest is complete in your quest script. If the quest isn't, then you stop the quest script with a return statement Another option is to have the Gray Prince quest to start your quest, that way you don't have a quest script running all the time. A bit less self contained however
  16. Oblivion thrashes the data directory for any file, looking for BSAs to parse. This is why there's a disabled plugin limit, it can only handle 512 of these files in memory at once. I doubt that it loads the BSAs into memory, it would quickly run out of space, but it would definitely keep names of the files inside the archive so it doesn't have to read each BSA on the fly when loading a texture to memory I did some quick testing, there wasn't much of a difference loading in OOO and its BSA (600MB file) over not loading it (the plugin and BSA weren't in the Data folder), just about 250MB of RAM and 200 MB of VRAM in either case. If it does cache something it would have to just be file names. I am not smart enough to know or figure out how Oblivion handles BSAs exactly, this is just my supposition @OP replacers are best left outside of BSAs since the vanilla behavior won't allow those to be seen. Self contained large mods are recommended to be in BSAs so they're smaller in size and more manageable for users. Smaller standalone mods have no real benefit to being in BSAs
  17. To expand on Bethesda's intentions with BSAs, the original design for overwriting vanilla files was that newer files overwrite the older Bethesda files in the BSA. The DVD release would always be older than any mod, so any loose file will always overwrite. However, it quickly became apparent that this barely worked in any intended fashion, hence archive invalidation. This is especially important with newer digital releases that leave the file date of all the BSAs as the date they're downloaded. SkyBSA from DavidJCobb fixes this issue and makes Oblivion act more like Skyrim where any loose file that overwrites a file in a vanilla BSA will be used. The same mechanism works for BSAs now, so if you have SkyBSA you technically could package your textures into a BSAs, but as others have said it doesn't offer a ton of utility (BA2 archives are much more efficient so it'll affect things more). Oblivion's I/O situation is very inefficient, you'll have longer load times just from having more plugins or models to load in. I haven't noticed a drastic increase in load times when adding texture packs compared to plugins and LOD generation Mod authors package things into BSAs so they don't have to deal with loose files
  18. Construction Set Extender can call the initial release of the CS to generate lip files if the appropriate text and sound file exists. It should work fine, I have not used it on Windows
  19. There's two kinds of LOD in Oblivion, LOD within the active grid area and LOD outside of that. You can increase the object LOD distance higher so that anything will be rendered within your active grid area. You can also set bForceFullLOD=1 to allow trees to fully render always within that grid area. Outside of that you rely on Oblivion's distant LOD generation For trees there's nothing you can do, the trees render as individual 2D billboards. Oblivion doesn't have anything advanced for them and I haven't seen any mods to improve the quality of billboards For distant objects (ie statics), you need to have the model flagged as VWD and the appropriate *_far.nif for it to be rendered by Oblivion. RAEVWD flags some additional models and also provides models for pretty much everything. I do not recommend going any further than its city module. The models that Arthmoor provided, while small in size, are not as optimal as they could be. Oblivion not only renders each individual static but those statics more often than not take up more CPU time than they could. There are some mods to reduce the CPU load, but imo unless everything is complete you won't see a sizeable improvement Pop-in is the nature of Oblivion and there isn't a reasonable way to get rid of it atm
  20. Bethesda strips out a lot of features from the CS for end-users, plus they have other dev tools to go along with it. From what I gather Oblivion's CS is mostly complete, but it removes anything that hooks into Havok or SpeedTree for obvious reasons. Stripping out these features is done hastily (look at Skyrim SE CK) so it can end up leaving it rather buggy depending on the game. Plus its Bethesda, QA isn't exactly something they're known for
  21. I don't remember ever seeing a mod like that for Oblivion
  22. LOOT masterlists are a lot more descriptive and not static, whereas BOSS is just a bunch of plugins in some sort of order and are completely static. House mod A will always be loaded before house mod B for instance. On LOOT it doesn't really matter, LOOT will see if things conflict in someway and sort from there. If it doesn't it just puts it in some sort of ideal location. The problem is that there's only general groups, not specific ones like BOSS. So a lot of the sorting is from LOOT's internal processing and hoping it does what you want So converting the two isn't really straight forward or simple and with how unpopular Oblivion is these days idk when we will see LOOT be 100% ideal to trust without user rules
  23. I'm waiting for the masterlists on LOOT to either be ported or remade fully. Some mods just do not like the order LOOT puts it in so I can't trust it
×
×
  • Create New...