azmodan22 Posted June 28, 2024 Posted June 28, 2024 Can't do that. You what U have in blender and looks like one mesh, it is actually 9 meshes in the nif. So the original one mesh get broken to pieces. I am going to try to add the same lod 0 mesh to all the lod for each of them and see if that changes anything.
azmodan22 Posted June 28, 2024 Posted June 28, 2024 yea tha't not going to work. Nifskope is strugling and seems about to crash mid way through and thats a sing of doing something wrong
Reigor Posted June 29, 2024 Posted June 29, 2024 (edited) So I'm trying to get to the point where the game will run a script after a dialogue with an npc companion. I've run into two problems First, I managed to add a topic to the npc's conversation tree "I want to talk to you about something" in phase 1. She responds in phase 2 correctly. But what should appear next "I want to change your appearance" in phase 3 doesn't appear, instead it loops back to the beginning. Second, I added a simple script to phase 3 which I want to run. Instead, on loading a save game it runs right away. I probably have the wrong event, I'm using "OnInit". I'm not sure which one I should be using. Scriptname AFG_EnhanceNPCscript2 extends TopicInfo Event OnInit() debug.messagebox("This will open the enhance menu") EndEvent EDIT: So I got it partly functional by running the messagebox line as a fragment. Issue is the box will appear twice. I replaced the debug message with the looks menu line and it opened, could edit my appearance, save and then it would open again, so why is the fragment running twice? EDIT2: So I made an entirely separate quest. Created a scene with the conditions that it was with the Adoring Fangirl and she was a follower. Created one line with a fragment and the code ran once. So that works. Now I need to figure out how copy the player's appearance onto a temp actor. Copy the Adoring Fangirl's appearance onto the player. And then open looks menu (this I know how to do). Then once the charmenu closes, copy the new player appearance to the Adoring fangirl and finally restore the player's original appearance by copying the temp actor to the player. Edited June 29, 2024 by Reigor
DocClox Posted June 29, 2024 Posted June 29, 2024 17 hours ago, azmodan22 said: Yea but that would not be precise. It would just be an invisible box around my mesh. I did all the collision for the Raider Reform School furniture this way. Chossr your source collisions with care and maybe some careful scaling and it'll be as precise as anything form Bethesda. 17 hours ago, ag12 said: Is it possible the collision data is directly in the mesh file rather than the nif at all and so can just be done in blender? SesamePaste, who made the Geometry Bridge Blender plugin, is working on collision as the next thing, I believe. So if you want wait fro that, OK. The mesh files are pure geometry as far as I understand it. 16 hours ago, azmodan22 said: None of the actuall meshes are in the nif any more, the nif just point to them. Yeah, but all the other metadata that used to be in nif files is still there.
ag12 Posted June 29, 2024 Author Posted June 29, 2024 7 hours ago, Reigor said: So I'm trying to get to the point where the game will run a script after a dialogue with an npc companion. I've run into two problems First, I managed to add a topic to the npc's conversation tree "I want to talk to you about something" in phase 1. She responds in phase 2 correctly. But what should appear next "I want to change your appearance" in phase 3 doesn't appear, instead it loops back to the beginning. Second, I added a simple script to phase 3 which I want to run. Instead, on loading a save game it runs right away. I probably have the wrong event, I'm using "OnInit". I'm not sure which one I should be using. Scriptname AFG_EnhanceNPCscript2 extends TopicInfo Event OnInit() debug.messagebox("This will open the enhance menu") EndEvent EDIT: So I got it partly functional by running the messagebox line as a fragment. Issue is the box will appear twice. I replaced the debug message with the looks menu line and it opened, could edit my appearance, save and then it would open again, so why is the fragment running twice? EDIT2: So I made an entirely separate quest. Created a scene with the conditions that it was with the Adoring Fangirl and she was a follower. Created one line with a fragment and the code ran once. So that works. Now I need to figure out how copy the player's appearance onto a temp actor. Copy the Adoring Fangirl's appearance onto the player. And then open looks menu (this I know how to do). Then once the charmenu closes, copy the new player appearance to the Adoring fangirl and finally restore the player's original appearance by copying the temp actor to the player. OnInit runs exactly once, when the script *first* initializes on a new save. The way to have something run everytime the game is loaded is via OnPlayerLoadGame which gets sent to the player character after loading the game. The reliable way to listen to that is with a ReferenceAlias that is set to the player. So generally, OnInit handles your install logic, OnPlayerLoadGame handles update logic. Be advised that when you first load a mod, OnPlayerLoadGame will not trigger.
Reigor Posted June 29, 2024 Posted June 29, 2024 11 minutes ago, ag12 said: OnInit runs exactly once, when the script *first* initializes on a new save. The way to have something run everytime the game is loaded is via OnPlayerLoadGame which gets sent to the player character after loading the game. The reliable way to listen to that is with a ReferenceAlias that is set to the player. So generally, OnInit handles your install logic, OnPlayerLoadGame handles update logic. Be advised that when you first load a mod, OnPlayerLoadGame will not trigger. Ok that makes sense. I would need something that would work everytime the dialogue choice is selected. What worked was using it as a fragment for the dialogue choice, I got a messagebox to display. So now my stumbling block is learning how to use aliases and properties. For example: PlayerREF.CopyAppearance(TempActor) and TempActor.CopyAppearance(PlayerRef) I presume this is supposed to mean, "Copy the appearance of the player and put it on the temp actor" and its reverse. But the compiler needs to know what the playerref and tempactor are. I'm used to declaring variables in C, is that the Alias? Or the Property?
ag12 Posted June 29, 2024 Author Posted June 29, 2024 Quest Aliases are their own thing, they're a bit like variables but outside of a scripting environment. They're defined in the Alias tab of a Quest. They'll usually hold a reference to an object/actor (there are Location Aliases, but they're irrelevant for now), and basically work like a layer on top of whatever they're referencing. So say you have a RefAlias that has a keyword attached and the alias points at a reference, if you check that reference with HasKeyword, it'll return true. Basically, it's temporary game data that can be dynamically attached to references. Properties on the other hand only exist within a given script. The difference between a variable and a property is that you have an interface for properties to set their content in the CK and also you can reference a script's properties from another script. As for syntax, if you call PlayerRef.CopyAppearance(TempActor), this will try to look at PlayerRef and see if a function CopyAppearance exists and run it with the given parameter. In this case the function is ; Copy character customization appearance data from a given actor Function CopyAppearance(Actor akSourceToCopyFrom) native So a way you could handle this is by making a dummy NPC that you use as storage, defining an actor property 'Actor Property dummyNPC Auto Const', and pointing that at the dummy NPC. Then you could have something like Actor Property dummyNPC Auto Const function SetNPCAppearance(Actor akTarget) ; this could also point at a ReferenceAlias with the player in it ; or have an actual property defined. this should work though Actor playerActor = Game.GetPlayer() as Actor ; copy the current player appearance to the dummy NPC dummyNPC.CopyAppearance(playerActor) ; show race menu and wait 1 second (waits do not execute during menu time) Game.ShowRaceMenu() Utility.Wait(1) ; copy the appearance to the target akTarget.CopyAppearance(playerActor) ; copy the appearance from the dummy NPC back to the player character (playerActor).CopyAppearance(dummyNPC) endFunction Not tested, might have some syntax errors. But that's the concept. Or don't have it as a function and just have it in a fragment on the topic. 1
Reigor Posted June 29, 2024 Posted June 29, 2024 (edited) I was currently using a fragment since that reliably works for my messagebox test message in the game. Using your script above, it doesn't compile in the fragment, but it will compile as a script in the scripts tab of the quest. Ok, so how do I call that function? If I'm using a fragment is it something like this? Game.SetNPCAppearance(Actor akTarget) That gives an error C:\Users\reigo\AppData\Local\Temp\PapyrusTemp\Fragments\TopicInfos\TIF_AFG_EnhanceNPC_Quest_020009E6.psc(12,28): no viable alternative at input 'akTarget' Edited June 29, 2024 by Reigor
ag12 Posted June 29, 2024 Author Posted June 29, 2024 8 minutes ago, Reigor said: I was currently using a fragment since that reliably works for my messagebox test message in the game. Using your script above, it doesn't compile in the fragment, but it will compile as a script in the scripts tab of the quest. Ok, so how do I call that function? If I'm using a fragment is it something like this? Function SetNPCAppearance(Actor akTarget) native ; what is native? When I try to compile it I get this error. Compiling "Fragments:TopicInfos:TIF_AFG_EnhanceNPC_Quest_020009E6"... C:\Users\reigo\AppData\Local\Temp\PapyrusTemp\Fragments\TopicInfos\TIF_AFG_EnhanceNPC_Quest_020009E6.psc(12,0): mismatched input 'Function' expecting ENDFUNCTION No output generated for Fragments:TopicInfos:TIF_AFG_EnhanceNPC_Quest_020009E6, compilation failed. Native is for... native functions. You don't add that to anything you write, the only place it shows up (even in what I typed above) is in the function definition for CopyAppearance, which I copied straight from the Actor Script. If you put what I pasted above in a script on the Quest tab, I'm going to just say it's called "AFG_QuestScript", then what you can do on the topic fragment is: (GetOwningQuest() as AFG_QuestScript).SetNPCAppearance(akSpeaker) I'm pretty sure that akSpeaker is available in topic infos. This only works if the topic is part of the same quest as the script, if it is not then you have to add a Quest property to the topic info and then cast that as AFG_QuestScript. (or whatever you called the script).
ag12 Posted June 29, 2024 Author Posted June 29, 2024 Also, it sounds like you're brand new to things - so you might want to have a look at this: https://ck.uesp.net/wiki/Papyrus_Introduction and the rest of the wiki. It's for Skyrim, but for the most part the concepts apply. 2
Reigor Posted June 30, 2024 Posted June 30, 2024 Well I am learning This is a dialogue topic fragment Actor targetActor = player.GetDialogueTarget() as Actor <<--- Trying to get the player's dialogue target Actor playerActor = Game.GetPlayer() as Actor <<-- This should return the player id right? ;test messages debug.Messagebox("The target is" + targetActor) ; <<-- Returns "NONE" debug.Messagebox("The player is" + playerActor) ; <<-- Returns "[Actor"
ag12 Posted June 30, 2024 Author Posted June 30, 2024 1 hour ago, Reigor said: Well I am learning This is a dialogue topic fragment Actor targetActor = player.GetDialogueTarget() as Actor <<--- Trying to get the player's dialogue target Actor playerActor = Game.GetPlayer() as Actor <<-- This should return the player id right? ;test messages debug.Messagebox("The target is" + targetActor) ; <<-- Returns "NONE" debug.Messagebox("The player is" + playerActor) ; <<-- Returns "[Actor" playerActor is working - messageboxes have a habit of cutting off weirdly like that. In something as straight forward you can assume that if its not NONE then something good happened. "player" isn't a thing Game.GetPlayer() is what you use to get that reference to the player you're looking for. So either do Game.GetPlayer().GetDialogueTarget() as Actor or try 'akSpeaker'. 1
Reigor Posted June 30, 2024 Posted June 30, 2024 (edited) 15 hours ago, ag12 said: playerActor is working - messageboxes have a habit of cutting off weirdly like that. In something as straight forward you can assume that if its not NONE then something good happened. Thank you. That's good knowledge. I did a lot of reading and went back to your earlier post and figured out part of what I was doing wrong. I put the NPCEnhance script, based on your previous post, in its own quest. I substituted akSpeaker for akTarget, because it didn't like akTarget (is undefined). It compiled akSpeaker. Went back to the Adoring Fan quest and added a scene there for changing her appearance. Dialogue works in game. Huzzah The hangup is the fragment. This is on the Adoring Fangirl's response. debug.Messagebox("Fragment is working?") <--- This does appear in game. (GetOwningQuest() as AFG_EnhanceNPCQuestScript).SetNPCAppearance(akSpeaker) <--- This isn't working. It compiled fine. I added another messagebox inside the script and it isn't appearing so I don't think the function gets activated. As a test, I moved the fragment to the player's statement instead. Got the message box, but nothing else, So it doesn't matter if the player or the npc is speaking. Maybe because akSpeaker instead of akTarget isn't correct, as its actor speaking not the "target" So I've been trying to make an Actor TargetActor variable as a substitute but that is where I run into other problems. From what I can tell using Game.GetPlayer().GetDialogueTarget() as Actor is that there is no actual dialogue target. Keeps returning NONE. So the rest of the script doesn't work. On the other hand, akSpeaker.GetDialogueTarget will give a return, but its only right if the player is the speaker, not the npc responding to the player. So got it to work, partly, when I went back to using a fragment and moved it to the very beginning of the conversation. That brought up the looksmenu with the Adoring fangirl's face! Finally! And when I changed the appearance and saved she kept the face, but so did the player. So something off with the dummyNPC maybe. Made some progress at least. Off to bed. Here is the current code for the semi-working fragment: I have dummyNPC and PlayeREF as properties. Spoiler Actor targetActor = akSpeaker as Actor ;test messages debug.Messagebox("The target is" + targetActor) debug.Messagebox("The dummyNPC is" + dummyNPC) debug.Messagebox("The PlayerREF is" + PlayerREF) ;Copy player appearance to dummyNPC dummyNPC.CopyAppearance(PlayerRef) ;Copy Target appearace to Player PlayerRef.CopyAppearance(targetActor) ;Open the Enhance menu Game.ShowRaceMenu(none, 2, none, none) Utility.Wait(1.0) ;Copy the appearance to the target targetActor.CopyAppearance(PlayerRef) ;Copy dummy to player PlayerRef.CopyAppearance(dummyNPC) And here is the current code for the quest script whose function I could not get to activate. It's only property is the dummyNPC. Spoiler Scriptname AFG_EnhanceNPCQuestScript extends Quest Actor Property dummyNPC Auto Const function SetNPCAppearance(Actor akSpeaker) ; identify the player Actor playerActor = Game.GetPlayer() as Actor debug.Messagebox("playerActor is " + playerActor) ;identify the target Actor targetActor = Game.GetPlayer().GetDialogueTarget() ; copy the current player appearance to the dummy NPC dummyNPC.CopyAppearance(playerActor) ;Copy Target appearace to Player playerActor.CopyAppearance(targetActor) ; show race menu and wait 1 second (waits do not execute during menu time) Game.ShowRaceMenu(none, 2, none, none, none) Utility.Wait(1) ; copy the appearance to the target targetActor.CopyAppearance(playerActor) ;copy the appearance from the dummy NPC back to the player character (playerActor).CopyAppearance(dummyNPC) endFunction Edited June 30, 2024 by Reigor
Reigor Posted June 30, 2024 Posted June 30, 2024 (edited) Back at it. Currently have modified the fragment script so it has 3 test messages which tell me who is the PlayerREF, who is the targetActor, and who is the dummyNPC. The playerREF is working, returns [Actor. dummyNPC returns none (which matches its property value), and TargetActor returns NONE. TargetActor WAS working yesterday. So I must have changed something. For the targetActor, it should give me something with akSpeaker.getdialoguetarget but isn't. Fixed: Moved the fragment to when NPC is responding, made "Actor TargetActor = akSpeaker as Actor" that gave a non-NONE return. I can change my character's appearance and copy it onto the npc in dialogue. The final problem is that the player's old appearance isn't being restored. dummyNPC.CopyAppearance(PlayerREF) and PlayerREF.CopyAppearance(dummyNPC) aren't working as intended. Now for the dummyNPC, it is a property and has none as a value listed. Do I need to fill it with something so the game knows where to copy the player's original appearance to? But the only option the CK is giving me is none in the property window. Edited June 30, 2024 by Reigor
ag12 Posted June 30, 2024 Author Posted June 30, 2024 Just make sure you have the topic/dialogue on the same quest as the quest script and in the topic fragment run (GetOwningQuest() as AFG_EnhanceNPCQuestScript).SetNPCAppearance(akSpeaker) That will run the function "SetNPCAppearance" with akSpeaker passed as a parameter. The rest can be handled there. If you run the code on the actor response, you don't need to call GetDialogueTarget(). The speaker is already the actor you're looking for. I've already given you all the code you would need and anybody that knows how scripting works in Beth games would be able to implement it - the fact that you're struggling means that you should pick up a tutorial or two and try to learn via that instead of brute forcing your specific project. Check out that wiki I sent you and for the most part you should be able to do any tutorial stuff on there in Starfield. Just, replace with appropriate Starfield things. Good luck! 1
Reigor Posted July 1, 2024 Posted July 1, 2024 (edited) Thank you @ag12 So the final problem was that I couldn't fill the dummyNPC property with a value other than none. I had made a NPC named AFG_dummyAPC dropped him into a test cell. But couldn't figure out how to reference that npc to actually use as the dummyNPC in the script. That answer was creating a ObjectReference property through the Starfield CK which will ask for the specific cell and the specific object in it in drop down menus. In this case the test cell and the npc I dropped into it. I also made an Actor property for PlayerRef. And with that I could do "Actor dummyNPC = AFG_DummyNPC auto" which worked with dummyNPC.CopyAppearance(PlayerRef) to copy the player's appearance onto the dummy and the reverse. Tested it in game and it works! Edited July 1, 2024 by Reigor
azmodan22 Posted July 1, 2024 Posted July 1, 2024 (edited) Het Everyone I need some help with the CK this time. I am trying to make a new category/menu in the root Home/Outpost Decoration thingy. I have made My custom Keyword and my Form Lists, Constructible objects and Static, and I have added my Keyword to the form list 'OutpostRecipeCategories, that seems to be the root menu. Problem is, my Keyword/Menu does not appear in game. Is there another list that I must added it to for the menu to appear? Edit Dont worry I figured it out The sub categories don't show up but propably becase the are empty or have only one thing in them. Edited July 1, 2024 by azmodan22
fred200 Posted July 2, 2024 Posted July 2, 2024 On 6/24/2024 at 7:46 AM, ag12 said: The new CK is so nice. I really recommend everyone try just building something. Build a small bar, or a shop or something. It's so fucking fun to use and with the new texture/model swap shortkeys (Shift+Ctrl and LAlt together with mouse wheel) it's just such a breeze. A really neat little thing I noticed is that you really don't need to care about furniture markers anymore. The CK will highlight - in real time - which furniture markers are blocked and which aren't. No more choosing "Chair_L" because you only want the left furniture marker. So nice. Reveal hidden contents If you find the time and inclination, we would love you to do a tutorial/demo video of how you did this. It would help a lot of us... 1
azmodan22 Posted July 3, 2024 Posted July 3, 2024 Ok, I finall (I hope) issue. I have made some new categories in the decoration menu. The first one (main) works fine as it takes its name from a keyword. The subctegories however take their names from the first static that is in the Formlist although the form list does have a name, and the names of the static that are in those categories are also wrong. Cnn you tell me how to add (or edit) the correct names to those categories. If you also know how to add icons like the worckbench in the crafting category it'll be awsome.
Reigor Posted July 9, 2024 Posted July 9, 2024 I'm trying to make a new weapon for Starfield. I successfully duplicated the NovaBlast, renamed the duplicate and changed its stats, gave it the enchant I want, works in game. Great! It's in downloads if anyone wants to try it out. But now I want to change its skin so it looks different from the Novablast. I made a new dds file with GIMP. But how do I apply that texture to the new weapon without overwriting the NovaBlast? When I look at the weapon in the CK, I don't see anything under the Art tab of where I would select the different textures for the weapon.
Djlegends Posted July 9, 2024 Posted July 9, 2024 1 hour ago, Reigor said: I'm trying to make a new weapon for Starfield. I successfully duplicated the NovaBlast, renamed the duplicate and changed its stats, gave it the enchant I want, works in game. Great! It's in downloads if anyone wants to try it out. But now I want to change its skin so it looks different from the Novablast. I made a new dds file with GIMP. But how do I apply that texture to the new weapon without overwriting the NovaBlast? When I look at the weapon in the CK, I don't see anything under the Art tab of where I would select the different textures for the weapon. you need mat swap
Reigor Posted July 9, 2024 Posted July 9, 2024 27 minutes ago, Djlegends said: you need mat swap Let me clarify. To make the Enhancer Gun I duplicated the Novablaster. As of right now, it uses same texture file path as the novablaster. The textures for both are located at textures/weapons/novablaster. I can make a new file path for the Enhancer Gun, example textures/weapons/EnhancerGun. But HOW do I make my weapon use that file path for its textures?
Djlegends Posted July 9, 2024 Posted July 9, 2024 8 minutes ago, Reigor said: Let me clarify. To make the Enhancer Gun I duplicated the Novablaster. As of right now, it uses same texture file path as the novablaster. The textures for both are located at textures/weapons/novablaster. I can make a new file path for the Enhancer Gun, example textures/weapons/EnhancerGun. But HOW do I make my weapon use that file path for its textures? you need to make a custom material
Reigor Posted July 9, 2024 Posted July 9, 2024 Found what I think is the answer. https://www.nexusmods.com/starfield/articles/411 https://www.nexusmods.com/starfield/mods/7830/?tab=description
DocClox Posted July 9, 2024 Posted July 9, 2024 Yeah. Mats are just json files. The format is reasonably self-explanatory if you knew your way around the material editor for Fo4 at all. There's also a Material Editor built into the CK somewhere. Don't ask me where - I haven't gone digging because I can't currently save anything in the CK, but it might be a better bet. Failing that, find something that looks about right and tweak it. 1
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