buzzudit Posted February 8 Share Posted February 8 I have a few items (chems) I have created. I have already put them in leveled list to make them appear as loot in containers. It works. I also want to physically place items in the world without having to go and edit each cell. Is there an easy way (script) ? Link to comment Share on other sites More sharing options...
SKKmods Posted February 10 Share Posted February 10 Not EZ but if you fire up a finder quest with a RefCollectionAlias conditional fill on known persistent objects or containers you can get ~ 200 to script placing in or at. Examples: ObjectType Container & LocRefType BOSSChest = 200 boss chests ObjectType Container & Haskeyword WorkshopKeyword = 30 workshops ObjectType Container & Haskeyword WorkbenchGeneral = 90 assorted workbenches. The difficulty is knowing what placed object types or classes are persistent and their conditional attributes to query. Since most base game placed objects are non persistent, they are not findable without being in the loaded uGrids around the player. Link to comment Share on other sites More sharing options...
Glitchfinder Posted February 10 Share Posted February 10 It depends on what you mean. Are you trying to place the object as a physical item in the world without using the creation kit's cell view to place them? Or are you trying to avoid making edits in cells to avoid adding cell records to your mod? The first is much more difficult because the game doesn't really have any established systems for that sort of thing. The closest I can think of offhand is that certain random encounter types (camp encounters and assault encounters, specifically) have markers intended for placing notes and other small objects. If you mean the latter and want to avoid having cell records in your mod, it's doable but it's also a hassle. You have to start by actually placing the items where you want them to be, so that you can get their coordinates and angle. I recommend doing this in a second mod that uses your main mod as a master, so you don't need to clean up afterward. Once you have that, you need to find a persistent reference from the same cell (for interiors) or the same worldspace (for exteriors) and then use a specific combination of papyrus functions to spawn the item, move it, and then angle it as desired: ObjectReference.PlaceAtMe(Form akFormToPlace, int aiCount, bool abForcePersist, bool abInitiallyDisabled, bool abDeleteWhenAble) ObjectReference.SetPosition(float afX, float afY, float afZ) ObjectReference.SetAngle(float afXAngle, float afYAngle, float afZAngle) Link to comment Share on other sites More sharing options...
Zorkaz Posted Saturday at 09:31 AM Share Posted Saturday at 09:31 AM Ask the guy who made this: https://www.nexusmods.com/fallout4/mods/90018 Link to comment Share on other sites More sharing options...
DieFeM Posted Saturday at 10:33 AM Share Posted Saturday at 10:33 AM You could attach a script to the base object of vanilla chems of your choice, so that it drops one of your chems right next to it. Scriptname MyChemSpawn extends ObjectReference FormList Property MyChemList Auto Mandatory int chancePerCent = 20 bool doOnce = False ; Do this once the parent cell loads, so you make sure it is attached to a cell, not thrown from the inventory Event OnCellLoad() ; Make sure to take the chance only once If(!doOnce) int chanceRoll = utility.RandomInt(0, 100) ; Randomly select a number between 0 and 100, ; if this number is under chancePerCent it will spawn some random chem from the list. if(chanceRoll < chancePerCent) int lastIndex = MyChemList.GetSize() - 1 int randomIndex = utility.RandomInt(0, lastIndex) ; Select a ramdom index from the list Potion randomChem = MyChemList.GetAt(randomIndex) As Potion PlaceAtMe(randomChem) endIf doOnce = True endIf EndEvent Link to comment Share on other sites More sharing options...
Recommended Posts