Jump to content

corrado33

Members
  • Posts

    103
  • Joined

  • Last visited

Everything posted by corrado33

  1. I had planned on pretty much doing exactly what you suggest, mainly because that's how my other script already works and it's easy to change it around. Thanks!
  2. Oh, perhaps this was one of those times where I should have just... tried it rather than reading about it first. :( Sorry.
  3. I had originally played skyrim at 75 fps using the fmaxtime hack in the skyrim.ini file. (Mainly just to keep the fps from dropping below 60 because that works for some reason.) However, I've recently been told of the havok fix, which allows for more than 60 fps. So what should be my settings for the fmaxtime value now? What about iPresetInterval in the skyrimprefs.ini? Note I'm running ENBoost but NOT an ENB preset. The mod page doesn't......... elaborate....and the comments are a... crap show.
  4. No that's.... what I had planned on doing... I need to identify containers so that I can have the container it's in... glow.... so that the player can find it. Use a quest alias to look for and find any chests with a given form or forms in them, via GetIsObjectType and GetItemCount conditions, then apply an effect shader to any of the aliases that are filled. I used something similar to create a loot-aura enchantment. The tricky bit is in finding some way to allow the player to specify what item(s) they're looking for, without them actually having the items on them at the time. GetIsObjectType doesn't have any documentation that I can find (other than this crap which doesn't... elaborate.), can you elaborate? I was just going to allow the player to type in a name to search for, then use string utils to.... well... search through the names of the items in the chests. Or, if that's not possible, setup an array of menu options for different types of stuff.... weapons-sword-greatsword etc. then armor then daedric artifact etc. However, typing a name in would be so... so much easier, albeit slower.
  5. No that's.... what I had planned on doing... I need to identify containers so that I can have the container it's in... glow.... so that the player can find it.
  6. New mod... Going to spell it out from the get go in case anyone has already done it they can just point me there. I want to write an "item search" mod. Like, you lost the ebony blade in a container in one of your houses somewhere and you can't, for the life of you, find it. I only found ONE.... on google, and it wasn't what I wanted to do. It was basically an MCM menu that let you spawn in items from specific mods. If that HASN'T been done.... I need a way to identify containers. Of course I could just drag all the game's containers into a formlist and go from there, but that's... not DLC safe. I looked through the conditional statements in papyrus and found nothing. Only a few that related to furniture (which aren't...containers.) The only way I could think to do this. Both doors and containers can be locked. I'm assuming non traditional containers can be locked (like sacks) although I haven't tried. I don't.... THINK anything else can be locked. So if I run "isLocked" and get 1 or 0, then the object must be LOCKABLE. Therefore it must be a door or a container. Now, this is likely all hogwash and that function is likely just to return 0 if the object can't be locked (like a chair.) Honestly, I haven't tried, I'm just spitballing here. Anyway, if the above is true, then I can simply identify a door by checking if the object is static? or a container. Or maybe parse the name of the object for the word "Door". Or check if the object has an inventory... Maybe I should start with that. If it's a container then I'm good! Anyway, is there a better way to do this? The only reason I'm writing this mod is cause I'm an idiot and I constantly lose stuff in the house. And I hate spawning stuff in, too cheaty. Hell, it'd be even funnier to make one of the NPCs in the house run around to each found container and "interact" with it, then they return the item to you if/when they find it. The rest of the mod should be pretty easy, in essence it's almost identical to my last mod. I just need to know if there's an easy way to identify if an object is a container.
  7. Thanks for the support :smile: On a side note.... I program in the real world too (for fun... mostly)... what were you saying about writing new skse scripts? I didn't even know that was possible. What language is it? Python? C++? Any more info on that? I'm guessing it's more complicated than writing papyrus scripts but if it gives greater control over the player inventory... I may be able to write a "drop all but equipped" function.
  8. IsharaMeradin : Wait so you DID this already? Grumble grumble grumble :wink: Good learning experience regardless. I'm still publishing it ;)
  9. Hmmmm ok. Idea #4: Make a list of the players contents and refuse to transfer those items to the player from the chests. Idea #5: Design an "Everything but this" script that sets a "base" item set that the player has. When a button is pressed, everything but what the player has designated will be transferred out of their inventory (honestly this was going to be my next mod anyway.) Of course, this still runs into the problems from the idea 1 above. Idea #6: Tell the player to enchant their items so that they have different names so that none of this will be a problem? :wink: EDIT: Idea #7: Create a cloud chest that transfers everything the player has into it when activating a crafting station (before the stuff is given to the player.) Then when finished, and after transferring stuff OUT of the player's inventory, transfer the stuff back and equip the stuff that was equipped. Of course,the player would be naked.... and any enchanted items wouldn't... you know... work. UNLESS I forced the effects onto the player... that'd be some.... work. For now, I'm just going to not transfer armor or weapons to the player when activating a crafting station. :wink:
  10. Last... issue, shall we say. My mod transfers stuff in and out of the players inventory based on formlists. However, when transferring stuff OUT of the player's inventory, I simply transfer a large amount of those items because I never counted them anywhere (and counting them would require twice the number of lists and that's already too many lists.) So ideas for protecting player equipped items from being transferred away from the player. Idea 1: When transferring items out of the player's inventory, run a script on the player that utilizes the "onObjectUnequipped" event. If that event fires, then re-equip that item, and remove the item from the chest it was transferred to. Potential problems: I likely have no idea where the item was transferred do. Although I could loop through all possibilities. (30ish containers.) Other potential problem: I'm unsure if the correct version of that thing will be grabbed. Armor that is improved is seemingly identical to the game's eyes to normal armor. So I'm unsure if the "improved" version will be given back to you. Same goes for enchantments. Idea 2: Before transferring items out of the player's inventory, create a formlist of all of the equipped gear the player is using. Then, prevent that stuff from being unequipped by... well.... unequipping it, then equipping it with the cursed bool true (preventing removal.) I'm.... unsure if this will prevent a script from taking the equipped item. Then of course unequip/equip it again allowing the player to unequip it at will. This seems like a great way for the script to screw up and curse all of the player's armor. Idea 3: Similar to idea 2, except this time I go through and physically remove the equipped items from the formlists to be removed from the player's inventory. This, in itself would require a couple of loops. Then I count how many the player has, and remove 1 less. Then add them BACK to the formlists afterward. This one seems... complicated. Potential Problems: I'm unsure if the "1 less" will actually be the one the player has equipped. Any other ideas that I'm missing? Which sounds best to the you guys and gals(who have a lot more experience than I?) EDIT: When I remove the items, I simply do "player.removeitem(formList,1000,true,chestRef)" and that loops through the formlist and removes everything. If I were to manually loop through the formlist, I could check to see if the item was equipped, but that'd be slow.
  11. So you're saying I should replace all of my "getref()" statements with "getreference()" statements? Easy enough. I always wondered why they had two different things do the same thing... Thanks!
  12. It was a joke :) You always seem to respond to my posts and I'm very thankful! :)
  13. Yep, you're right. I fixed that and it worked :smile: Luckily all of the chests are contained in the same quest (Even the player!) so I just looped through those aliases and it worked great. BTW: Are you the only one on here? :wink: Sorting script is nearing completion. It works 100% now, I just need to figure out a way to give the players the 3 spell tomes. (Give sorting indicators, remove sorting indicators, and select crafting stations.) Debating creating a lore friendly quest for it. (3 dungeons to find all 3 spell tomes)
  14. I have a formlist of items. These items are likely in various containers throughout the skyrim world. (Not necessarily in the same cell as the player.) How can I remove all of those items from all of those chests? Is there an easy way? I COULD write a script that uses the quest aliases that I made with all of those items (each item makes a quest alias for the container it's stored in (provided it's not the player.). But that's.... annoying because I'd have to fill all those references manually cause I can't figure out how to fill quest alias properties automatically. (And there are.... a lot... of references and I'm feeling lazy.) Would "Delete" work? The objects themselves aren't in an alias.... and aren't ever a script property... I don't think. This is what I've tried. formlist Property RASUtilityStones auto quest property RadoAutoSortMasterQuest auto Event OnEffectStart(Actor akTarget, Actor akCaster) int aliasLength = RadoAutoSortMasterQuest.GetNumAliases() alias tempAlias while (aliasLength >= 0) tempAlias = RadoAutoSortMasterQuest.GetNthAlias(aliasLength) as alias tempAlias.getref().removeitem(RASUtilityStones) aliasLength -= 1 endwhile EndEvent Doesn't work, unfortunately :(
  15. Perfect, apparently I suck at searching :sad: (In all honesty I just think the creation kit search bar sucks. ;) )
  16. Working on my sorting script. Want to find a way to sort food from drinks. The game doesn't differentiate, it's all "food". The thing that IS different is the sounds the objects make when used. Can I use papyrus to parse those sounds? Searching the creation kit didn't... help me. Yes yes, I could make a couple of formlists, but I want to be compatible with DLC/mods.
  17. Finally got around to doing this, and wyre bash worked perfectly. (While simply renaming did not...) Thanks!
  18. Oh thanks, I'm not quite working on that yet though :smile: What... exactly does your mod do? Buy stuff from vendors? Conceptually, it's straightforward: I wanted working display mannequins added to armour & clothing vendors, like Radiant Raiment or Warmaidens. There'd be mannequins in the store, which would have a set of outfits they would display. They'd refresh regularly, equip it, and you could walk up and either buy it from the merchant, through activating the mannequin or talking to the merchant directly, or try to steal from them. The mechanics of getting that *working* were, uh, not straightforward. :D Oh geeze, I bet... I mean I think the hardest part would be to find the items that the vendor is selling correct? Other than that, making a mannequin dress with items from that list (should be?) easy enough, a few if statements and equipitemex with an onload event. However, being able to steal them.... that'd be hard. I think.... very hard. Since mannequins are essentially NPCS stealing from them would be essentially pickpocketing from them and you'd have to override that and THAT'D be hard. I guess you could make them owned by the store NPC, but I've never tried that. Or you could make the mannequin activator have a custom activate message when the player is crouching. I think that'd be easy enough. (Maybe?) And being able to buy them from the mannequin would be... interesting. A few ways you could probably do it. Make a dynamic message box (is that... possible?) with the name of the armor set and the price and a simple "Buy" or "Do not buy". Or you could simply make it an activator for talking with the store npc. (I'm still.... awful with activators, so I have no idea if that's possible.) Sorry, I love spitballing program ideas. Fun stuff :)
  19. Oh thanks, I'm not quite working on that yet though :) What... exactly does your mod do? Buy stuff from vendors?
  20. Oh yeah? Is it.... published? Sometimes searching for things on the nexus is... hard. The store I've used is the drunken dragon mod, which I find to be a nice... lore friendly way to sell all of your loot (although I tweaked the sell function a bit, more expensive items sell less often, and if someone buys a piece of armor there is a chance they'll buy a whole set of armor.)
  21. Super.... super good information. Thanks so much. As for speed... if I were able to transfer 100 items in less than 30 seconds, I'd say that's fine. Not super fast of course, but it'll certainly do the job. I think for most people, unless they're specifically going out of their way to collect ingredients, are going to have less than 100 unique items every time they come home. (Because duplicated items don't matter.) I thought about having formlists for every type of item.... and I suppose I still could. Any item added by DLC will be sorted the slow way though. Theoretically if the item is a weapon or armor, it could be sorted in three function calls. As for your "being able to dump everything except favorite potions/weapons/equipped stuff".... I thought about that, and I may implement it. (Basically just be able to add items to a formlist dynamically and then a script on the drop off container will automatically transfer everything BUT those items (excluding quest items of course.) Then obviously my mod will auto sort everything that WAS dumped.) It wouldn't even be that hard, just have a spell that says "everything the player has right now is the "base" list. Everything not on this list gets transferred. Would be slightly harder cause I'd have to deal with item amounts (cause I like to keep 5 potions of each time.) Honestly though, the point of this mod WASN'T to auto sort. It was simply to make an "auto pull" mod that pulls from multiple containers and has support for all of the containers I want. (The dynamic auto sort mod can do this, but doesn't support individual weapon chests (like a chest for daggers, chest for swords, etc.) and the author has no desire to change it.) That mod also only works with ONE crafting station at a time which is.... slightly annoying. (I think it only works with one at a time.) I also REALLY.... REALLY want to implement a "unique" chest that is filled with unique items obviously (because I'm a dum dum and I often sell them.... by accident.) Funnily enough, the previous paragraph is wrong. The point of me starting this type of mod was to make a self dressing mannequin that would automatically pull items out of a chest and dress itself with them. But I didn't know how to dynamically link chests with mannequins. Now, this may sound stupid, but my idea was for the "player owned store." And a store should have rotating stock, and this would make sense. I haven't actually... made that mod yet, bud I did make an auto mannequin switch clothes script that you activate by sneak-activating a mannequin then all your equipped items are put on the mannequin and all the mannequin's equipped items are put on you.
  22. Ah.... I didn't think about it this way. I technically already do half of this. Each alias handle's it's own formlist if an item is added to that specific chest. BUT, if an item is added to the "drop off chest" however, that's handled by the "drop off chest" alias script. But I like your way better. It'll probably be quicker honestly. Instead of having to add every single alias to the drop off chest script, I simply have to add the drop off chest alias to every single individual chest's script. Right now adding every vanilla weapon + every ingredient to the drop off chest takes.... a while to sort though.... I don't know exactly because notifications are slow... I should use messagebox for the final debug line. I like... I like... Although technically I DID just finish the sorting algorighm and what you're suggesting means I have to... re do it. Eh, just thought of something. Your way works assuming all of the individual chests don't... overlap. Say I have a "light armor" chest, but also an "elven material armor" chest. Those two would clash, so I'd have to write special scripts for every individual chest. With exclusions.... ORRRR... I could include some empty properties that would be the "exclusions". If they're filled, the script won't run, if they're empty, the script will run. EDIT1: Yeah the script is WAYY too slow right now. It takes 86 seconds to sort through 100 items. This could be optimized a bit more if I made... smarter if statements (check for the most general keywords first, then check for more specific ones inside of those ones, instead of each keyword in its own elseif.) But I think it'd be a lot faster if I did what you suggested. EDIT2: Yeah "HasKeywordString" is SUPER slow. "HasKeyword" with a property setup properly is ~twice as fast. 100 items only takes 46 seconds with "haskeyword" instead of "haskeywordstring." EDIT3: Yeah turns out optimizing your if statements is really.... important. Previously, the check for weapons was the final elseif because.... you know.... weapons starts with "W" and I went alphabetically. If I move the check for weapons to the FIRST if statement, sorting 100 weapons takes 15 seconds. The check for weapons will probably be... 2nd if I keep this type of setup.
  23. I thought about exactly what you're suggesting, but I can't seem to make a formlist of quest aliases. (That was my first idea to complete what I wanted to do, just make the indices match.) Unless there is another way to fill formlists, I cannot drag quest aliases into a formlist like you can anything else in the game. For now, I've completed my replication of the "Dynamic auto sorting mod." I've made 26 (for now, more to come) different "unique objects" (right now just every different type of "vendor Item") that assign any chest in the game to a specific type of item. Then I have a spell that selects the nearest 10 crafting stations (in the cell that's loaded) and whenever you activate any of those crafting stations, every single item in each of those 26 chests are transferred to you. And when you exit, every single item is transferred back to the chest it came from. AND IT WORKS! (Mainly thanks to your help :wink: ) It's not... super complicated. For every new type of "sorting" chest, you need A. a new unique item, B: a new formlist, C: a new quest alias in the master quest. And you need to attach the correct scripts to each of those things (except the formlist) and make sure the properties are filled out correctly. There are a few other things you have to do, but they're not complicated (like adding the new unique item to the "unique items" formist so that it doesn't get transferred to you when you activate the crafting station.)There are 4 or 5 scripts total, but there is only 1 complicated one. The rest are simple "On item added, add form to formlist, on item removed blah blah." The only thing that runs constantly is a quest to detect if you've casted the "Find new crafting stations" spell. The only thing I have to do now is to... well... write the special "sorting" if statement, which is just going to be one freaking huge massive if statement. If item.haskeyword(blah) then move to blah chest, elseif item.haskeyword blah blah blah. I plan on making it differently than the dynamic auto sorting mod. I'm starting with the most specific keywords, like WeapTypeDagger, but if that chest doesn't exist, then check for WeapMaterialElven, and if that doesn't exist then check for WeaponOneHanded, and if that doesn't exist then check for VendorItemWeapon or whatever the specific keywords are. So you can pick and choose HOW specific you want the sorting to be.
  24. Sorry yes, it should just be "removeItems" not "removeAllItems" What I'm TRYING to do create a better sorting mod and dynamically assign chests to aliases to my master quest. This all works great. However, if I want to transfer the correct items BACK to the correct chests, I fill out formlists for EACH of these chests. To work through all of the chests, I want to put them in a loop then have a way to work through all of the formlists to get the items back to the correct chests. Basically what I was thinking of doing is to have a formlist of formlists. Then loop through these formlists, use some stringutils to get the "basename" of the formlist (everything before the text "list") to match it up with the correct alias. However, the problem I' running into is that I can't seem to get a formlist of formlists to work. I don't know if you're supposed to be able to have a formlist of formlists. I mean, of course, I can just NOT have a loop and just write out every line... but considering my sorting mod may have 100+ different chests.... that may result in an annoying long script. And before you ask... why? Because I can and I'm OCD (not... literally, not trying to belittle OCD) about where my items are stored. The scripting isn't hard... but making it DYNAMIC IS hard. I could program this into a cell extremely easily. I want to make it work in ANY cell though. EDIT: And for the record, I already made it work... but only if I hard program in the properties of the script. (Meaning the specific quest aliases, so the dynamic part IS working.) I'd like to make it use the "getAlias" function so the script doesn't have 100+ properties. Using getalias would allow me to just use a single editable property or variable, instead of properties for every... single.... linked quest alias.
  25. Say I have this code snippit. FormList Property RASWeapons Auto referencealias property WeaponsChest auto FormList Property RASTool Auto referencealias property ToolChest auto FormList Property RASArmor Auto referencealias property ArmorChest auto ;What I currently have Event onInit() WeaponsChest.getref().removeallitems(RASWeapons,100,true,game.getplayer()) ToolChest.getref().removeallitems(RASTools,100,true,game.getplayer()) ArmorChest.getref().removeallitems(RASArmor,100,true,game.getplayer()) endevent ;what I WANT EventonInit() FillFormListArray(FormListArray) ;Somehow fill a form list array FillAliasArray(AliasArray) ;Somehow fill an alias array maxItems = FillAliasArray.length() while maxItems > 0 FormListArray[maxItems].getref().removeallitems(ALiasArray[maxItems],100,true,game.getplayer()) maxItems -= 1 endwhile endevent Is what I want possible? Basically the questions are these: Can I store a bunch of formlists in a... list? I suppose I could store them in a formlist of it's own but the harder question is... can I store a bunch of quest aliases in a list? EDIT: The best way I've found to do this is to create a formlist of the formlists. Then use the "GetAlias" function and freaking PAINSTAKINGLY make sure the aliases have the correct ID numbers and are sequential and are in the same order of the formlist. I say painstakingly because everytime you delete an alias with other aliases behind it it just gets rid of that ID number.... so you have to create them correctly, the first time.
×
×
  • Create New...