monsto Posted January 23, 2017 Share Posted January 23, 2017 (edited) I'm one of those Home Tweaker types of skyrim players. I have a couple of custom player homes that I've been just kinda noodling with for a couple years now. Thanks to some recent problems with those cells and the associated bat files, I need to clean things up.My scripted mods are incomplete as yet . . .GalleryCam: setup camera positions in advance, then "Take a Tour" by cycling thru the positions to view the gallery.Stuff Exporter: look at a thing, gather it's position data, and contents if any, then export it to a file. (Would eventually like to just scan the cell an copy everything out. Obviously not a good idea to do on Bleak Falls Barrow, but it'll be fine for a custom player home with only a couple hundred items.)If there's a TL;DR that can be taken away from this it would be this: Repost your skyrim/fallout4 scripting question in as many places as you can".Nobody told me directly of any of this below. If you did, I apologize for forgetting you as a source. But thru constant rephrasing of search terms, I tripped across the answers via 3rd, 4th, 5th generation clicks and searches. Therefore, by posting a bunch of places, you just might get the one response that gets you started down the path to find the answer. I did wind up getting most of what I wanted by installing a couple of modders tools, but I thought I'd post all my discoveries for posterior.Can you add extra data to an asset?Yes, using PapyrusUtil.SKSE plugin that allows you to save any amount of int, float, form and string values on any form or globally from papyrus scripts. Also supports lists of those data types. These values can be accessed from any mod allowing easy dynamic compatibility.For the gallery, I wanted to add some info to a marker (fov and sgtm, more on that below). This mod provides a simple, clean interface for doing it, along with other tools and helpers . . . including, exporting data to file.Can you place the player at an arbitrary point in space.While this question lead to a number of discoveries, none of which were positive, the answer is ultimately yes, using ConsoleUtil.Papyrus functions behave very differently compared to their console command counterpart. I could do exactly what i wanted via console, but not even close via papyrus.Using papyrus, you cannot place the player at an arbitrary point in 3d space. The Z position will be dropped to nearest horizontal before spawning the player. They don't fall, they're just on the floor when they get to XY coords.Using papyrus, you cannot set the players X-axis/vertical view (chin to chest), the directives are simply ignored. Z-axis(turning head) worked only half the time.In other words, given a 6-point position (xyz position, xyz angle) using the console, you can set 5 points (no tilt, y axis (ear to shoulder)). Using papyrus, with regards to the player, you can only set 3 (xy position, sometimes z angle) Using ConsoleUtil, I was able to issue console commands, from papyrus, silently (no console pop). This allowed setting FOV and SetGameTimeModifier (can't do these in papyrus) for dramatic gallery effects.Can you look at a characters gear and get a copy of it?This one's a tuffie. You can get the slot, and do GetFormID(), but it returns the item in decimal not hex. With in game papyrus, you can just pass the object (programming object, not skyrim object) or variable to the next actor. But since I tabled Stuff Exporter while I worked on GalleryCam, the jury is still out on whether or not exporting/importing a decimal formId will be acceptable to papyrus. ConsoleUtil also lead me to a snippet of code for building your own console commands which is great for the Stuff Exporter. With the planned options, a key/spell wouldn't be enough and building menus would have been super tedious. I finished the prototype of the GalleryCam yesterday: Get into position, use keys to set sgtm/fov (since you can't detect those settings and I want to track them). Use the "place a marker" key and it does a placeatme with a marker and adds fov/sgtm to the marker. To tour the markers, I get all the furnitures (marker base object) in the cell, check for isCameraMarker keyword, then setposition the player to the marker position (not player.moveto() which unvoluntarily pauses after the move). However, in order to truly manage the markers tho (delete, move/update, keep certain order, etc), i think I need to dispense with the markers entirely and use a PapyrusUtil list that's attached to the cell. I'm betting it will be faster (not having to search the whole cell) and be much more flexible. All in all, I've not only learned how crazy papyrus is and that Beth put up arbitrary walls in the game & lang, but I think i'm now like a 5th Degree Google-Fu Black Belt as when it was all said and done, I tended to have answers for all my questions even if I didn't like them.I hope this post helps someone along the way. Edited January 23, 2017 by monsto Link to comment Share on other sites More sharing options...
irswat Posted January 24, 2017 Share Posted January 24, 2017 papyrusutil file functions are very nice! Link to comment Share on other sites More sharing options...
Recommended Posts