the Sim Settlements forums!

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Scripted items not showing up

Mistwalker17

New Member
Messages
26
I'm making a redux of my Better Randomized Robots mod, and I'm trying to add different armors to the vanilla Automatron robots. I've modified the original BotModQuestScript to allow additional vanilla armors to spawn on robots insead of the three or four that already do, but now bot mods aren't showing up on assaultrons (the only ones I've changed) at all!

I added the Assaultron_Torso_Armor_Wasteland01_Front_enc armor to the template, but it isn't showing up in game. I even added custom keywords and a new global so that it wouldn't interfere with vanilla functions. Anybody have any idea what's going on here? Tested it on a new character, popped up to level 22 and rescued Ada, built a robot bench and spawned in a bunch of assaultron devils to kill and they don't drop mods at all, just ammo and repair kits.
 
To help you, more information is required. What exactly are you trying to do? What changes are you making?

Post some screenshots. Specifically the changes you are making to BotModQuestScript and what object the script is attached to.

My best guess as to your goal is -
a) to modify the list of potential armors an assaultron is equipped with when spawned
b) to modify the list of potential inventory items an assautron is spwaned with
 
To help you, more information is required. What exactly are you trying to do? What changes are you making?

Post some screenshots. Specifically the changes you are making to BotModQuestScript and what object the script is attached to.

My best guess as to your goal is -
a) to modify the list of potential armors an assaultron is equipped with when spawned
b) to modify the list of potential inventory items an assautron is spwaned with
My goal is to randomize the weapons and armors that Rust Devi. robots can spawn with, and have them be lootable. The robots that come vanilla aren't actuall randomized, they're just a set of stock creatures with set loot and builds. I want them to actually be random. I've already made this mod once https://www.nexusmods.com/fallout4/mods/54407 but I had used a workaround to give the robots proper loot. Now I'm trying to do it the way the actual DLC does it, by using the BotModQuestScript to add the items to your inventory and unlock them for crafting.
In the below image, you can see the original way that an item is included in the script. On the right is my duplicate added version. I created a new Global and new Keyword so that it wouldn't interfere with vanilla unlocks and implemented it into the assaultron devil's object template.BOTMODISSUE.pngBOTMODISSUE2.png
I'm not sure what I've done wrong.
 
My goal is to randomize the weapons and armors that Rust Devi. robots can spawn with, and have them be lootable.
I'm not too knowledgeable on the systems that randomize spawned armor and weapons. From what I have seen, vanilla handles this by creating a bunch of Actor templates, add them to a Leveled Character record and spawn from the LChar record. This creates the illusion of random spawns. Weapons and Armor have a template that is used to determine what OMODs are attached to a spawned weapon / armor. To make an OMOD craftable at a workbench, the OMOD record requires a unique MiscItem record defined. (Loose Mod field in your pic above)

Usually, an NPCs inventory is calculated from a leveled list when the NPC spawns, although sometimes items can be injected via script.

I'll have to look at the source for BotModQuestScript to see what it does. My gut tells me it is only responsible for managing which OMODs are available at the robot workbench. The ModMiscItem property should point to the Loose Mod defined in the OMOD record.

I'll take a look at your existing mod and see if I can get a feel for it. In the mean time, you might want to look into joining the Nexus mod author's Discord server. There should be people there who understand the Actor, Armor, Weapon and Object Mod records better then I do.
The information in the thread is old. The Discord server has a bot to help you link your Nexus account.
 
Looking at DLC01:DCL01BotModQuestScript it seems when an Actor with the DLC01:DLC01BotAddMiscMod is killed, it calls AddMiscModToMe on DLC01:DCL01BotModQuestScript to add a misc item to the killed actor's inventory. It loops through the ItemData struct checking if the killed actor has the ItemData.BotModKeyword applied. If it does, ItemData.ModMiscItem is added to an array of possible items to add. If ItemData.ModUnlockGlobal is not set to 1, it is added to a preferred array. It will randomly add an item from the preferred array unless empty, then it will randomly add an item from the array of possible items to add.

When the player loots the corpse, any items with the DLC01MiscModKeyword keyword are checked against the ItemData array to see if ItemData.ModUnlockGlobal is set to 1. if not, it will set the global to 1 and show the message defined in ItemData.DLC01BotModMessage
DLC01BotModQuest.png
tl;dr, you shouldn't have to modify the ItemData struct unless you are adding custom OMODs. If you are, just add them to the array and leave the vanilla stuff alone.

The actual items equipped to the bot seems to be controlled by the Actor template and is beyond my knowledge.
 
Looking at DLC01:DCL01BotModQuestScript it seems when an Actor with the DLC01:DLC01BotAddMiscMod is killed, it calls AddMiscModToMe on DLC01:DCL01BotModQuestScript to add a misc item to the killed actor's inventory. It loops through the ItemData struct checking if the killed actor has the ItemData.BotModKeyword applied. If it does, ItemData.ModMiscItem is added to an array of possible items to add. If ItemData.ModUnlockGlobal is not set to 1, it is added to a preferred array. It will randomly add an item from the preferred array unless empty, then it will randomly add an item from the array of possible items to add.

When the player loots the corpse, any items with the DLC01MiscModKeyword keyword are checked against the ItemData array to see if ItemData.ModUnlockGlobal is set to 1. if not, it will set the global to 1 and show the message defined in ItemData.DLC01BotModMessage
View attachment 16597
tl;dr, you shouldn't have to modify the ItemData struct unless you are adding custom OMODs. If you are, just add them to the array and leave the vanilla stuff alone.

The actual items equipped to the bot seems to be controlled by the Actor template and is beyond my knowledge.
I've done all of that. Even left the vanilla suff alone except to add my custom OMODs to the list. Still aren't showing up in-game on dead assaultrons and I don't know why.
 
@pra Do you have any advice? I'm assuming you dealt with some of this stuff with your Automatron mod?
 
I'm willing to send out a copy of this mod to anyone willing to take a look. If I can just get this one part to work, I can do the rest easily.
 
@msalaba do you have any advice or ideas?
Not anything I haven't posted in this thread. I don't think you have a script issue. I assume it has something to do with the actor record template, but I'm not sure. I don't really understand how the game determines what equipment is equipped when an actor spawns. That system is pretty complex and I know just enough to get me in trouble.
To make an OMOD craftable at a workbench, the OMOD record requires a unique MiscItem record defined. (Loose Mod field in your pic above)
I would look at the OMOD records and make sure they are correct.

As I said above, your best bet is joining the Nexus mod author's discord. There is also the Nexus forums, but it gets way less traffic. I don't know if anyone still hangs on Reddit.
 
Okay going back through it again.
Starting with DLC01EncBotRaiderAssaultron01A - the Rust Devil Assaultron Devil.
The only thing in her inventory is a levelled list with robot repair kits in it.
The Object Template for the robot has all of the body parts in it and works in much the same way an outfit does. Add items to build a bot.
Most of the items in the template are labelled with an '_enc' on the end, I'm assuming meaning 'enchantment'
These items have a script in them that sets a global variable from 0 to 1 and allows the player to craft these parts when they are looted from the robot.
But for some reason that I DON'T KNOW they refuse to actually spawn on certain robots, regardless of level, regardless of mod. Even vanilla, Assaultron Devils don't drop bot mods, and I can't seem to fix this in my mod.
 
Damn. I just took another look at my original mod, because I had the idea of just adding unlock keywords to the existing Omods and letting them unlock craftable bits for bots - but then looking at it I remembered, this was the original issue and the main reason I'm rebuilding this mod. This way, botmods can spawn on robots irregardless of whether or not you've started the Automatron questline or not. And for immersion (and future framework) purposes, I don't want that. I want the mods to remain invisible in the inventory of dead robots until AFTER you've gained the ability to actually loot them. Doing this, I can also implement other mods to becme available after certain quests (Ironsides' hat, Sonja's sonic emitter, Drinkin' Buddy, etc.)
So that idea train is also a bust. Does SOMEBODY have any ideas?
 
Top