Jump to content

[FO4 CK] General Help Thread


Recommended Posts

Hello I have been doing some building in FO4 vault 88.

I do not have a menu board for Vault-tec items, so I have been using the spawn command in console.

This means that all I have to do is find the associated ID number for the item then spawn it.

This method although somewhat tedious, works very well...when you can find the number for the item you want to spawn.

 

I need a number for the Vault-Tec sliding door/w controller that will respond to the "select and place" command originating from the workstation in game.

I did find a number, but once spawned, I cannot access the part in build mode so that I can install it.

 

ANY help or suggestions would be appreciated.  Thanks in advance.

Link to comment
  • 1 month later...

Hello everyone, I am trying to write a sctipt to change my custom CBBE slider from Looks Menu when character eat any food, but I have a problem:
 

 

 


Scriptname SSBBW extends Quest

 

MagicEffect Property MagicEffectFood Auto Const

 

Keyword property LoL auto

 

Event OnMagicEffectApply(ObjectReference akTarget, ObjectReference akCaster, MagicEffect akEffect)
    Actor Player = Game.GetPlayer()
    Self.RegisterForMagicEffectApplyEvent(Player as ScriptObject, None, None, True)
    If (akEffect == MagicEffectFood)
        Self.SsbbwSetBody(0 as float, 0.5)
    EndIf
EndEvent

 

float Function SsbbwSetBody(float akOperation, float akBelly)
    Actor Player = Game.GetPlayer()
    If (akOperation == 0 as float)
              BodyGen.SetMorph(Player, true, "Giant belly (coldsteelj)", LoL, akBelly)
    Else
           Debug.Notification("SSBBW Error: Function input doesn't equal 1")
    EndIf
EndFunction
 
 

 


Unfortunatelly I am getting this errors:
"SSBBW.psc(18,14): variable BodyGen is undefined
SSBBW.psc(18,22): none is not a known user-defined script type"
Can someone help me to understand how to fix it? I understand that BodyGen is undefined in my script since it is a part of "Looks Menu" scripts, but how do I link my script so that it uses the functions of "Looks Menu" mod scripts?

Link to comment

Hey I'm trying to script something to add keywords to added armors and getting an error when I try this:

Scriptname CCL:Kerrigan extends Quest

KeyWord Property kw01 Auto Const

Event OnInit()
	Int iArmorLevel = 1
	Armor arArmor
	Int iForm

	iForm = 0x00000800 ; Kerrigan Skinsuit
	arArmor = Game.GetFormFromFile(iForm, "Kerrigan.esp") as Armor
	arArmor.AddKeyword(kw01)

EndEvent

The error is :

"C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\CCL\Kerrigan.psc(35,9): AddKeyword is not a function or does not exist"

Any idea what I'm doing wrong and how to do it?
I cant seem to find any F4SE Functions to AddKeywords to armor, though I cant seem to find the proper list anymore either.

 


Also is there an Equivalent to IsModLoaded so I could lock out the script if the Mod was not in Load Order?

Link to comment
3 hours ago, Halstrom said:

Also is there an Equivalent to IsModLoaded so I could lock out the script if the Mod was not in Load Order?

 

This is from Vinfamy's Violate script, dealing with if Devious Devices is loaded or not:

 

Function LoadDD()
	If Game.IsPluginInstalled("Devious Devices.esm")
		Quest DDQuest = Game.GetFormFromFile(0x09004C50, "Devious Devices.esm") as Quest
		DDlibs = DDQuest.CastAs("DD:DD_Library")
		DD_FL_All = Game.getFormFromFile(0x0905E95B, "Devious Devices.esm") as FormList
		DD_MaleModelItems = Game.getFormFromFile(0x09044EBB, "Devious Devices.esm") as FormList
		
		debug.notification("Vinfamy: Violate integrated with Devious Devices.")
		utility.Wait(0.1)
		DDLoaded = 2	
	Endif
EndFunction

 

You are looking for the 'If Game.IsPluginInstalled()' function there?

Link to comment
6 hours ago, AWP3RATOR said:

 

This is from Vinfamy's Violate script, dealing with if Devious Devices is loaded or not:

 


Function LoadDD()
	If Game.IsPluginInstalled("Devious Devices.esm")
		Quest DDQuest = Game.GetFormFromFile(0x09004C50, "Devious Devices.esm") as Quest
		DDlibs = DDQuest.CastAs("DD:DD_Library")
		DD_FL_All = Game.getFormFromFile(0x0905E95B, "Devious Devices.esm") as FormList
		DD_MaleModelItems = Game.getFormFromFile(0x09044EBB, "Devious Devices.esm") as FormList
		
		debug.notification("Vinfamy: Violate integrated with Devious Devices.")
		utility.Wait(0.1)
		DDLoaded = 2	
	Endif
EndFunction

 

You are looking for the 'If Game.IsPluginInstalled()' function there?

Yeah that solves my second question :smile:
I'm still stuck on the first problem though adding keywords to armor by script, I really don't want to add a script to all the armors to do it, there must be an easier way.

Link to comment

Right, so I've got an NPC, and I want it so that they're human, but they attack enemies of the player the same way that feral ghouls attack, generally lunging towards the enemy. I also want it so that they're spawned in much like how synths are spawned in via the Synth Relay Grenade.

Now, I've got the whole spawning them in part down. That works. What doesn't work is that they won't attack enemies. They'll go in to the fighting stance, and even run up to the enemy, but they won't actually do anything beyond that.

 

The way they're set up, is that their overall race is the DefaultHumanRace, and their Attack Race is FeralGhoulRace. Their Combat style is csFeralGhoul, and their class is FeralGhoulClass.

The template data is set up so that the NPC gets their AI Packages from POIWastelanderFemale01, and they get their Attack data from encFeralGhoul01Template. The Combat Override Package is set to DefaultCombatMasterPackageList.

They're set to be part of the PlayerAllyFaction, with a rank of one.

 

i'm stumped as to why they're not attacking properly. Any ideas? Am I doing something wrong? I've been at this for several hours, and I'm at my wit's end.

Link to comment
On 2/10/2018 at 4:40 AM, Halstrom said:

Hey I'm trying to script something to add keywords to added armors and getting an error when I try this:


Scriptname CCL:Kerrigan extends Quest

KeyWord Property kw01 Auto Const

Event OnInit()
	Int iArmorLevel = 1
	Armor arArmor
	Int iForm

	iForm = 0x00000800 ; Kerrigan Skinsuit
	arArmor = Game.GetFormFromFile(iForm, "Kerrigan.esp") as Armor
	arArmor.AddKeyword(kw01)

EndEvent

 

 

On 2/10/2018 at 6:56 PM, Halstrom said:

Which is what I'm trying to do with this line:

arArmor.AddKeyword(kw01)

But it seems it only works in a native script

 

AddKeyword only works on an specific object reference. Not the base object type. There is no function to add a keyword to the entire class of that object in one shot. That must be done in the plugin as a record override creating a master dependency which it looks like you're trying to avoid. So, adding it piecemeal after it's been created as a reference is your only option.

Link to comment

Any other suggestions for this NPC not attacking anything? As I said before, they'll walk right up to the enemy, but they just will not attack. I'm at my wit's end trying to find a solution to all this. I just want them to dive at enemies, the same way that ghouls do. Spoilered is screenshots of what I think is all relevant NPC pages in the CK.

Spoiler

image.thumb.png.373b5a437631aa53c3469407c70711e0.png

image.thumb.png.f05a44c7a97aa0003fe5e2ad4ea540bb.png

image.thumb.png.427e5fc9d918013212cd7d39da613341.pngimage.thumb.png.12831c8fb430f22397b15dd28d5569d9.png

image.thumb.png.25e88d4a053b9ec34403022aa811d3f3.pngimage.thumb.png.164f9e4119d577c6eff4d712b1edff90.png

image.thumb.png.736592a9e540b16133544daa35bf7908.png

image.thumb.png.8e22253ee80bf15712ca023294bac0a7.png

image.thumb.png.551e78d6a17eb0e47e2f954751002ba7.png

image.thumb.png.a9e39d95839a6619e2925c248a3f2dfe.png

Link to comment
4 hours ago, SlapMeSilly said:

 

 

AddKeyword only works on an specific object reference. Not the base object type. There is no function to add a keyword to the entire class of that object in one shot. That must be done in the plugin as a record override creating a master dependency which it looks like you're trying to avoid. So, adding it piecemeal after it's been created as a reference is your only option.

Hmm yeah, seems like that, another messy option I'm looking at is to add the keywords via an Enchantment which it seems F4SE has SetEnchantment and it seems to accept it, not sure if it works yet.

Link to comment

Hello everyone, I hope someone here can help me with my modification. I am trying to find a way of how to replace walking, running and sprinting step effect Sounds after my playable character getting Perk. Can someone tell me please how can I do this?
Simply put:
Character get Perk - new footstep sounds.
Character don't get Perk - default footstep sounds.
 

Link to comment

Another question, this time script related. I've extracted the "base.zip" in "Data\Scripts\Source\Base" folder, however line 35 of my script is throwing an error.

Spoiler

 


ScriptName LoveConsumedEggGiver extends ActiveMagicEffect

;List of perks here
Perk property ChangelingPerk Auto
Perk property LoveConsumed01 Auto
Perk property LoveConsumed02 Auto
Perk property LoveConsumed03 Auto
Perk property LoveConsumed04 Auto
Perk property LoveConsumed05 Auto
Perk property LoveConsumed06 Auto
Perk property LoveConsumed07 Auto
Perk property LoveConsumed08 Auto
Perk property LoveConsumed09 Auto
Perk property LoveConsumed10 Auto

;Items and shit defined
int WhichEgg
Weapon property DroneSpawnGrenade Auto
Weapon property EliteSpawnGrenade Auto
Bool property isSilent Auto

;Where the magic happens
Event OnEffectStart(Actor Player, Actor akCaster)
	If Player.hasPerk(LoveConsumed10) == 1
		Player.removePerk(LoveConsumed10)
		Player.removePerk(LoveConsumed09)
		Player.removePerk(LoveConsumed08)
		Player.removePerk(LoveConsumed07)
		Player.removePerk(LoveConsumed06)
		Player.removePerk(LoveConsumed05)
		Player.removePerk(LoveConsumed04)
		Player.removePerk(LoveConsumed03)
		Player.removePerk(LoveConsumed02)
		Player.removePerk(LoveConsumed01)
		WhichEgg.SetValue(Utility.RandomInt(1, 100))
		If WhichEgg > 80
			Player.addItem(EliteSpawnGrenade, 1, isSilent)
		Else
			Player.addItem(DroneSpawnGrenade, 1, isSilent)
		EndIf
;Perk checks to make this thing work properly
	ElseIf Player.hasPerk(LoveConsumed09) == 1
		Player.addPerk(LoveConsumed10)
	ElseIf Player.hasPerk(LoveConsumed08) == 1
		Player.addPerk(LoveConsumed09)
	ElseIf Player.hasPerk(LoveConsumed07) == 1
		Player.addPerk(LoveConsumed08)
	ElseIf Player.hasPerk(LoveConsumed06) == 1
		Player.addPerk(LoveConsumed07)
	ElseIf Player.hasPerk(LoveConsumed05) == 1
		Player.addPerk(LoveConsumed06)
	ElseIf Player.hasPerk(LoveConsumed04) == 1
		Player.addPerk(LoveConsumed05)
	ElseIf Player.hasPerk(LoveConsumed03) == 1
		Player.addPerk(LoveConsumed04)
	ElseIf Player.hasPerk(LoveConsumed02) == 1
		Player.addPerk(LoveConsumed03)
	ElseIf Player.hasPerk(LoveConsumed01) == 1
		Player.addPerk(LoveConsumed02)
	ElseIf Player.hasPerk(ChangelingPerk) == 1
		Player.addPerk(LoveConsumed01)
	EndIf
EndEvent

 

More specifically:

		WhichEgg.SetValue(Utility.RandomInt(1, 100))

Attempting to compile in the CK spews out this single error:

 int is not a known user-defined script type

Everything that I've looked up tells me that I need to have extracted the base source scripts, which I've done already.

 

Any ideas on what could be causing this? Papyrus' syntax is new to me, and I'm not sure how to fix it.

 

 

EDIT: I found the fix for it. Changing the snippet from what it was, to:

WhichEgg = Utility.RandomInt(1, 100)

leads to a successful compilation.

Link to comment

I can't count how many times this Beth Creation Kit naming SNAFU has confused me :confused:

 

Spell Property spShockEffect Auto
Enchantment Property enchShockEffect Auto

   if (rActor.HasSpell(enchShockEffect))

 

Is it a frigging Spell or Enchantment, don't call it one in one place in GECK then call it the other elsewhere :tongue:

And there is no HasEnchantment function either :tongue:

Link to comment

I'm in a real bind with a mod I've been working on for ages. What I need to know is: Is there any way to reliably override Vanilla settler dialogue (IE:  "Want to trade a few things?") with my quest dialog? I haven't had any trouble with most NPCs but 90% of the time Settlers in active settlements will just ignore my quest's dialogue and open their inventory like normal. 

 

I've tried messing with Quest priority (even setting my quest's priority up to 100!)

 

Is there a trick to this or am I just boned?

 

UPDATE:

 

 After not working on my mod for weeks in frustration at this problem, I figured it out on my own. In case anybody else has this problem:

 

The fix was a combination of setting all my greets to have the "forcegreet hello" flag and set the topic priority high (I just went with 90 because screw it)

 

UPDATE:

 

Or my succesful test was just a complete fucking fluke cause it's back to not working today. I am about 10 seconds from throwing away months of work because I am so done with this undocumented pile of crap.

 

UPDATE: 

 

I think I am onto a solution but I probably won't test it for a few days because I am spent and Farcry 5 comes out Tuesday. I think the key to bypassing the Trade and merchant menues entirely is the solution I posted before... BUT Using NON randomized responses. Therefore it will ONLY pick my one reply for the given conditions and not cycle in the vanilla dialogue (I hope)

 

If I solve this crap I hope it helps somebody else. It's times like these I really miss Skyrim's straightforward dialogue system.

 

UPDATE: (Hopefully final)

 

After a very small ammount of very basic testing I do think the last fix did in fact take.

 

Link to comment

Am I missing something extremely basic here?

 

Scriptname Evan555alpha:LLAdder Extends Quest

;properties n shit
Container Property SCGSVendorChest Auto
LeveledItem Property ChrysArmourSet Auto

Event OnInit()
	If SCGSVendorChest.GetItemCount(ChrysArmourSet) < 1
		SCGSVendorChest.AddItem(ChrysArmourSet, 1)
		Debug.Trace("Mod Initialised, adding items!")
	Else
		Debug.Trace("Vendor Has the book. Stopping!")
	EndIf
EndEvent

Even though this script extends Quest, I'm being hit with

LLAdder.psc(8,20): GetItemCount is not a function or does not exist
LLAdder.psc(8,49): cannot compare a void to a int (cast missing or types unrelated)
LLAdder.psc(9,18): AddItem is not a function or does not exist

My other scripts, although they extend ActiveMagicEffect, also use AddItem, and they compile just fine. What the hell?

 

EDIT:: Solution: Change "Container" to "ObjectReference", and refill the property value makes it compile.

 

Edit 2, electric boogaloo:

Okay, so, my Levelled List "item" is added to the vendor chest successfully, as the items in said list show up when I use the "inv" command on the vendor chest in game. A new issue, though, is that these newly added items do not show up in the barter menu at all, even if I exit the cell, sleep for 72 hours, and come back. Any ideas why that might be happening?

Link to comment
I'm trying to check if stuff is enabled before setting it and the short version of my script is this:
 
Scriptname Synth:PhysicalIntegrity extends Actor	InputEnableLayer ielInputLayer
Bool Function IsActivateEnabled()	EventInit()
 ielInputLayer = InputEnableLayer.Create()
EndEvent	EventTimer()	
  Bool bTemp = ielInputLayer.IsActivateEnabled(rActor)
  if (fSystemActivate >= 75) && (!bTemp)
   ielInputLayer.EnableActivate(true)
  endif
EndEvent	

Due to obvious Papyrus noobness its failing to compile of course since I added the check, seems ok with the setting part though.
Can't find much in Google or the Wiki on it as its a F4SE command.
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use