Carabosse Posted September 12, 2020 Posted September 12, 2020 GetCurrentGameTime is a function that returns a float that measures game time since you began playing. You could periodically check that, maybe every time you wake up etc? But why not use the in built timer functions. That's what they're there for. As someone who makes fallout and skyrim mods, I would kill for the timer functionality in skyrim.
RealBarenziah Posted September 12, 2020 Posted September 12, 2020 OK thanks. It's because of my experience with Skyrim's Papyrus spamming mods I was reluctant to, but if timergametime is more efficient than the former method that will be fine then I suppose. I have another question, how do I use globalvariables with ints? I'm trying to multiply one with the other but the compiler shits itself no matter what method listed on the (not very helpful for beginners at all) CK wiki that I use to try to convert the global to an int. Also I'm trying to compile a modified version of the AN2 menstrual cycle expansion script, and I get these errors: "OnItemEquipped is not an event on scriptobject or one if its parents" Also the same for other functions like OnDeath etc. In the original script it says: Self.RegisterForRemoteEvent(PlayerREF as ScriptObject, "OnItemEquipped") etc. But I've been Googling like mad and I can't figure out what that means and how to attach the script objects to my script.
Carabosse Posted September 13, 2020 Posted September 13, 2020 No timers in Fallout will automatically repeat like updates could in Skyrim. You can of course be specific and force them to repeat but that's your choice. You can also have multiple timers acting on a specific script which I don't think you could have in Skyrim. Globalvariables are floats by default. When you use getvalue on a global it will return a float. There is a getvalueint function on the global script which automatically casts the value to an int. If you're doing arithmetic with values in your mod, my experience is that you should be using all floats to do this. You can very easily convert ints to floats for this (and back again for message processing etc). Keep in mind there is also a math (maths!!!) script with super helpful functions like floor, ceiling, abs. "OnItemEquipped is not an event on scriptobject or one if its parents" It's as it says. ScriptObject is a top level script, it doesn't understand OnItemEquipped. That's an Actor script event. You'd have to use it on a script that extends Actor or inherits from the Actor script.
EgoBallistic Posted September 13, 2020 Posted September 13, 2020 9 hours ago, RealBarenziah said: "OnItemEquipped is not an event on scriptobject or one if its parents" Also the same for other functions like OnDeath etc. In the original script it says: Self.RegisterForRemoteEvent(PlayerREF as ScriptObject, "OnItemEquipped") etc. But I've been Googling like mad and I can't figure out what that means and how to attach the script objects to my script. Like Carabosse said, you can only register for events that an object can actually generate. ScriptObjects don't generate OnItemEquipped so you get that error. Because of that, Self.RegisterForRemoteEvent(PlayerREF as ScriptObject, "OnItemEquipped") doesn't make sense. However, Self.RegisterForRemoteEvent(PlayerREF as Actor, "OnItemEquipped") should work.
HR_Sinop Posted September 14, 2020 Posted September 14, 2020 I am currently trying to reverse-engineer and study ignotum_virum's Just Business mod. In his JBSlaveQuestScript at line 600, he uses the following function: ActorSourceData Function GetSourceActorData(Actor akActor) ActorSourceData newData = new ActorSourceData Form sourceActorRace = akActor.GetRace() as Form If JBCompatibilityQuest.JBRaceHumanGhoulList.HasForm(sourceActorRace) ;Debug.Notification("Race - Human or Ghoul") newData.sourceLeveledActor = JBLCharSlaveHumanGhoul newData.sourceActorBase = JBSlaveHumanGhoul ... return newData EndFunction When I try to use a variable of type “ActorSourceData”, the CK gives me the following compilation error: unknown type actorsourcedata Since this Data type is not explicitly defined in his mod (by himself), he must have used it from an external source. Does anyone know how to “teach” the CK the ActorSourceData variable type? Is this a type introduced by F4SE? If so, then my follow up question would be how to use variable types introduced by F4SE. (Sorry if this is a stupid question, I am new to papyrus scripting)
EgoBallistic Posted September 14, 2020 Posted September 14, 2020 28 minutes ago, HR_Sinop said: Since this Data type is not explicitly defined in his mod (by himself), he must have used it from an external source. It is a struct defined at line 120 in JBSlaveQuestScript. To use one of these in your own scripts you can declare it as a JB:JBSlaveQuestScript:ActorSourceData e.g. JB:JBSlaveQuestScript Property JBScript Auto Const JB:JBSlaveQuestScript:ActorSourceData myActorSourceData myActorSourceData = JBScript.GetSourceActorData(SomeActor)
HR_Sinop Posted September 14, 2020 Posted September 14, 2020 Ahh, thanks a lot - learned something new today ? (sorry for being stupid)
RealBarenziah Posted September 15, 2020 Posted September 15, 2020 What exactly, without having the specific combination of 3DSMax and Havok needed to create your own, can you do with animations? Can you combine parts of them? Play one partway through and then reverse it? I can't see anything in the CK to edit such things.
HR_Sinop Posted October 3, 2020 Posted October 3, 2020 I want to extend the WorkshopScript to add some specific/custom variables and functions to it (e.g. storing the number of specific NPCs) I have a file MyWorkshopScript : Spoiler Scriptname MyWorkshopScript extends WorkshopScript bool myWorkshopBool = false When i try to convert a "normal" WorkshopScript Object to a MyWorkshopScript via workshopRef as MyWorkshopScript the line returns None This should work, right? Have I forgotten a step in the conversion process?
EgoBallistic Posted October 3, 2020 Posted October 3, 2020 39 minutes ago, HR_Sinop said: This should work, right? Have I forgotten a step in the conversion process? You are trying to cast in the wrong direction. That will not work. You can cast an object as a script that is attached to it (MyWorkshopRef as WorkshopScript) and you can cast an object as any of the script's ancestors (myWorkshopRef as ObjectReference). But you can't cast an object as a descendant of a script that is attached to it (MyWorkshopRef as MyWorkshopScript). If you try, it will return None because the cast is not allowed. You would need to attach MyWorkshopScript to the workshop object before you can do what you are attempting.
HR_Sinop Posted October 4, 2020 Posted October 4, 2020 Thanks, makes perfect sense in hindsight. I had a flaw in my logic. I have a question with a completely different topic: I have a constructible object the player can build in workshop mode (similary to a chair or table) Is there an easy way in the CK to: Allow the player to have at most one of this object built in the settlement (i.e. The player cannot build this object if its already in this settlement) Prohibit the player from scrapping this object once it was built? Can this be done e.g. via keywords attached to the object (which ones?) or do I have to listen to Events that are fired every time the player constructs/scraps an object and check if the object was my special object?
Eperke Posted October 9, 2020 Posted October 9, 2020 maybe someone knows ... How can I make a portable backup of the built Vault 88 for further use... json or any other form? ------ Tehát: Hogyan csinálhatok további hasznosításra az épített 88-as pincéről hordozható mentést ... json vagy más formában?
Tentacus Posted October 19, 2020 Posted October 19, 2020 Is there a way to give an NPC a unique face texture without having to create a new race?
Indarello Posted October 19, 2020 Posted October 19, 2020 1 hour ago, Tentacus said: Is there a way to give an NPC a unique face texture without having to create a new race? https://www.nexusmods.com/fallout4/mods/42571 BodyGen.SetSkinOverride(akActor, "Your id of textures in F4SE\Plugins\F4EE\Skin\youresp.esp\skin.json") example skin https://www.nexusmods.com/fallout4/mods/45697 Maybe there is another way, I dont know
far_kas Posted October 19, 2020 Posted October 19, 2020 If it works here but is empty in the game ... There is nothing... or crash. Then what's the problem?
Indarello Posted October 19, 2020 Posted October 19, 2020 3 hours ago, far_kas said: If it works here but is empty in the game ... There is nothing... or crash. Then what's the problem? I dont think that this is counted as "works here" because it dont have any morphs displayed You can try reinstall mod that have this outfit
Tentacus Posted October 19, 2020 Posted October 19, 2020 10 hours ago, Indarello said: https://www.nexusmods.com/fallout4/mods/42571 BodyGen.SetSkinOverride(akActor, "Your id of textures in F4SE\Plugins\F4EE\Skin\youresp.esp\skin.json") example skin https://www.nexusmods.com/fallout4/mods/45697 Maybe there is another way, I dont know Thanks man. I'll give that a try... Though if that works why hasn't anybody done that for cum yet? I guess cause it'd require everybody to use the same face textures.
far_kas Posted October 19, 2020 Posted October 19, 2020 5 hours ago, Indarello said: I dont think It's just boots .... and body.
HR_Sinop Posted October 19, 2020 Posted October 19, 2020 I want to add a keyword to an Armor Form without altering the Form in the CK, ideally during runtime. I stumbled upon the setKeywords Function from the F4SE However, the way I am using the Function does not result in the Armor getting the keyword. Interestingly, the Function GetGoldValue (which also requires the Owner Struct as a parameter) returns the value specified in the CK (i.e works as it should) My code: Spoiler Keyword Property kw1 Auto Const Keyword Property kw2 Auto Const .... Armor myArmor=(Game.GetFormFromFile(0x00123456, "someplugin.esp") as Armor) Keyword[] keywordsToSet= new Keyword[0] keywordsToSet= keywordsToSet.add(kw1) keywordsToSet= keywordsToSet.add(kw2) ; Create the owner struct InstanceData:Owner ownerInstance = new InstanceData:Owner ownerInstance.owner= myArmor ; set the owner field of the owner struct to myArmor InstanceData.setKeywords(ownerInstance, keywordsToSet) myArmor.hasKeyword(kw1) ;> returns false InstanceData.GetGoldValue(ownerInstance) ;> returns the amount of gold specified in the CK Am I using the Function incorrectly or is it a F4SE bug? What would be the correct way to accomplish my goal?
Indarello Posted October 19, 2020 Posted October 19, 2020 13 hours ago, far_kas said: It's just boots .... and body. But 99+% outfits have morphs, you can check if you build outfit in right folder and file name
far_kas Posted October 20, 2020 Posted October 20, 2020 12 hours ago, Indarello said: But 99+% Yes it's true. However, there is 1%.
far_kas Posted October 20, 2020 Posted October 20, 2020 There is this: Power Armor Voiced Operating System (PAVOS)... somewhat clashed work. I wanted it to work. You can see broken. Using the original will immediately ruin the game. // Using the wrong slot. // Spoiler However, i can't record the route of the dds because i don't know how.... otherwise it would look great. The original is blank and does not include dds paths. I randomly typed the dds path ... and because of the result, it would be worth doing. The point: -- there is a picture description the use of this tool? -- or would someone describe the solution? *thank you very much.
Indarello Posted October 20, 2020 Posted October 20, 2020 2 hours ago, far_kas said: There is this: Power Armor Voiced Operating System (PAVOS)... somewhat clashed work. I wanted it to work. You can see broken. Using the original will immediately ruin the game. // Using the wrong slot. // Reveal hidden contents However, i can't record the route of the dds because i don't know how.... otherwise it would look great. The original is blank and does not include dds paths. I randomly typed the dds path ... and because of the result, it would be worth doing. The point: -- there is a picture description the use of this tool? -- or would someone describe the solution? *thank you very much. Dont type dds, use material filesand material editor
Eperke Posted October 21, 2020 Posted October 21, 2020 meat scattered explosion: *does anyone know a code to terminate? (without restarting the game or loading an old save) Spoiler I didn't see that among console commands.
far_kas Posted October 28, 2020 Posted October 28, 2020 *material filesand material editor.. ahha... now i know everything. However, I am neither a programmer nor a genius.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now