Jump to content

FiftyTifty

Premium Member
  • Posts

    1274
  • Joined

  • Last visited

Everything posted by FiftyTifty

  1. Edit4: Solved! You just need to add two functions: SetDoingFavor(false) and SetCanDoCommand(false) Here's what the new function looks like: Function SetFollowPackage(Actor akActor) int iTokensToAdd RemoveExistingTokens(akActor) iTokensToAdd = AAAFyTy_FollowerFramework_Message_FollowSelect.Show() + 1 akActor.AddItem(AAAFyTy_FollowerFramework_NPCToken, iTokensToAdd) akActor.EvaluatePackage() akActor.SetDoingFavor(false) akActor.SetCanDoCommand(false) EndFunction The next roadblock in this follower framework, is making NPCs attack NPCs that are hostile to the player. The easy way about this is to use SetPlayerTeammate(), which is what the vanilla follower system uses. However, this shoehorns the NPC to use the vanilla follower framework; when you activate the NPC, you get the Command prompt which brings up the Talk/Trade/Cancel/Wait dialogue menu. That's a pain in the ass, as you then have to select the "Talk" dialogue to get to the dialogue from my framework. I tried adding a condition to the vanilla Followers quest, but the Command prompt appeared regardless. Any idea how to avoid this, whilst still having NPCs attack hostiles (e.g, a Raider follower attacking other Raiders)? Adding the PlayerAlly faction to the RefCollection alias didn't do anything. Edit: Turns out it's due to a different reason entirely. I've a package template based off the FollowPlayer template package, which activates the Command interaction. So now I need to figure out how to have an NPC follow the player, without them being in the Command state. Edit2: Seems to be tied to the Followers quest, that calls SetPlayerTeammate() with favor mode enabled. Edit3: Alas, it seemed like the issue, but adding a check for the relevant keywords did nothing.
  2. That's probably it. The Papyrus docs on the wiki don't tell you how this is done, only that "return results the functions return type". In Pascal, you'd suffix a column and the variable type at the end of a function, but Papyrus? Nae idea.
  3. As a bit of background, I've created a large (~500 lines) script for a follower framework that is very similar to what was in Skyrim, but with several RefCollection aliases to allow for multiple followers. Initially, I'd use a slew of if checks to determine which RefCollection to use for an NPC. But that's a right pain in the arse and super branchy. Much easier to have a function return the RefCollection I'm looking for, so I only have to call the same block of if checks. But Papyrus, far as I can tell, doesn't like returning RefCollectionAlias variables. This is one of the lines that throws an error: Function CreateRelaxMarker(Actor akActor) RefCollectionAlias refcollMarker = GetMarkerRefCollToUse(akActor) ... GetMarkerRefCollToUse() calls this code: Function GetMarkerRefCollToUse(Actor akActor) RefCollectionAlias refcollMarker RefCollectionAlias refcollFollower = GetFollowerRefCollection(akActor) if refcollFollower == AAAFyTy_FF_FollowerRefColl01 || iRefCollectionID == AAAFyTy_FF_SandboxRefColl01 refcollMarker = AAAFyTy_FF_RelaxMarkerRefColl01 ElseIf refcollFollower == AAAFyTy_FF_FollowerRefColl02 || iRefCollectionID == AAAFyTy_FF_SandboxRefColl02 refcollMarker = AAAFyTy_FF_RelaxMarkerRefColl02 ElseIf refcollFollower == AAAFyTy_FF_FollowerRefColl03 || iRefCollectionID == AAAFyTy_FF_SandboxRefColl03 refcollMarker = AAAFyTy_FF_RelaxMarkerRefColl03 EndIf refcollFollower = None Return refcollMarker EndFunction And Papyrus throws this error: The problem, assuming I haven't f*#@ed something up, is that Bethesda's just half-assed their scripting system. I'd rather not have to compare integers again and again, with nested functions calling nested functions, so if there's something I'm just doing wrong here...
  4. Of course the UV's are messed up, you're using the diffuse map for the vanilla body mesh, but are using the CBBE body mesh. You'll have to delete the outfit's CBBE body mesh, and insert the vanilla one.
  5. I made a follower system in my Raider Communications mod, and it was glorious albeit a clusterf*#@. So I'm remaking it into something nice and clean, and not tied to a bunch of other stuff, that other people can use merely by adding a faction to an NPC with a supported voicetype, then calling my MakeIntoFollower() function. All ya gotta do, and everything's fab. There are ten RefCollectionAliases in total. Three are RefColls with follow packages, another three are RefColls with sandbox packages (Guard, Sandbox, Wait), with each package type having 3 or 4 distance variants (Very Far, Far, Med, Short). I needed to create pairs of RefColls, so that I can attach a script with RegisterForPlayerTeleport(), without having to somehow check for which package is running. Instead, only have the player teleport functionality attached to the follow RefColls. Each RefColl pair has a different level of NPC importance. 01 Makes the followers essential, 02 protected, 03 unprotected. So if you don't want Ack-Ack and Red Tourrette die in a firefight, put them in 01. If you have a bunch of generic raiders and don't care if they get smashed, put them in 03. The last four RefColls are for storing dead bodies. The intent was to allow the player to stash the bodies of their fallen comrades, put their heads on shelves, etc., without the bodies being cleared up by the game.
  6. Since I couldn't be arsed buggering around with package scripts, I've gone and restructured the whole framework. Currently having to emulate RefCollectionAlias arrays, as there's no vanilla support for RefCollectionAlias[]. Right pain in the arse.
  7. I'm fairly certain that Bethesda f*#@ed up here. When you add a script to a package, it looks for scripts that extend ObjectReference. But according to the CK wiki, and the Papyrus compiler, it should look for scripts that extend Package. To demonstrate: Scriptname FyTyFollowerFramework:AAAFyTy_FF_PackageFollowTeleport extends ObjectReference Actor property PlayerRef Auto Const Mandatory Actor actorPackageOwner Event OnStart(Actor akActor) AkActor.RegisterForPlayerTeleport() actorPackageOwner = akActor EndEvent Event OnPlayerTeleport() actorPackageOwner.MoveTo(PlayerRef) EndEvent Event OnEnd(Actor akActor) UnregisterForPlayerTeleport() actorPackageOwner = None EndEvent The above script throws two errors, that each event cannot be defined as the script isn't native. That's because those two events are part of the Package form, not ObjectReference. Changing the script type to Package makes the compiler happy, but then you can't add the script to other packages through the CK. Is there something I'm missing, or do I have to add the scripts as ObjectReference extensions, then change them to Package once I've added it to all the packages I need? If I have to do the latter...f*#@'s sake Beth.
  8. Look at the docs for OnActivate() and Utility.RandomInt Here's some hacked up Papyrus to show the general idea. Dunno if it works. ObjectReference Property objMarker01 Auto Mandatory ObjectReference Property objMarker02 Auto Mandatory int iRandom bool bActivated = false Event OnActivate(ObjectReference akActionRef) if bActivate == false then bActivate = true int iRandom = Utility.RandomInt(1, 2) if iRandom == 1 then WaitThenDisable(objMarker01) Else WaitThenDisable(objMarker02) EndIf EndIf EndEvent Function WaitThenDisable(ObjectReference objMarker) Utility.Wait(20) objMarker.Disable() bActivate = false EndFunction
  9. Most of the game systems are the same as in Skyrim. So look at it's version for all the tutorials: http://www.creationkit.com/index.php?title=Main_Page
  10. I'm working on a follower framework, and in order to make the sandbox, guard & wait packages work properly, I need to add a LinkedRef to each follower. Now, since the system works at runtime, and you can dismiss/recruit followers at will, I need to create these LinkedRef objects, that are persistent for as long as the player hasn't fired the follower. I've created three functions. One that uses PlaceAtMe() with the persistent flag set to true, another that moves the marker to the follower, and another that deletes it. Making the LinkedRef persistent through PlaceAtMe() is what gives me the jeebies. If it works fine with Delete(), then all is good. But I don't know if that's true, and as far as I can tell, f4se doesn't have a SetPersistent(false) function yet. If it's any help, here are the three functions: Function AddRelaxMarker(Actor akActor) akActor.SetLinkedRef(akActor.PlaceAtMe(AAAFyTy_FollowerFramework_RelaxMarker, 1, true, false, false), AAAFyTy_FollowerFramework_RelaxMarkerKWRD) EndFunction Function MoveRelaxMarker(Actor akActor) ObjectReference objRelax = akActor.GetLinkedRef(AAAFyTy_FollowerFramework_RelaxMarkerKWRD) objRelax.MoveTo(akActor) objRelax = None EndFunction Function RemoveRelaxMarker(Actor akActor) ObjectReference objToDelete = akActor.GetLinkedRef(AAAFyTy_FollowerFramework_RelaxMarkerKWRD) objToDelete.Disable() objToDelete.Delete() objToDelete = None EndFunction One potential workaround is to add the created LinkedRef to a RefCollection alias, but if the script has no issue, then why bother. Edit: Decided to go with the RefCollection method. Code was changed to the following: Function AddRelaxMarker(Actor akActor) ObjectReference objRelax = akActor.PlaceAtMe(AAAFyTy_FollowerFramework_RelaxMarker, 1, false, false, false) AAAFyTy_FF_RelaxMarkerRefColl01.AddRef(objRelax) akActor.SetLinkedRef(objRelax, AAAFyTy_FollowerFramework_RelaxMarkerKWRD) objRelax = None EndFunction Function MoveRelaxMarker(Actor akActor) ObjectReference objRelax = akActor.GetLinkedRef(AAAFyTy_FollowerFramework_RelaxMarkerKWRD) objRelax.MoveTo(akActor) objRelax = None EndFunction Function RemoveRelaxMarker(Actor akActor) ObjectReference objRelax = akActor.GetLinkedRef(AAAFyTy_FollowerFramework_RelaxMarkerKWRD) AAAFyTy_FF_RelaxMarkerRefColl01.RemoveRef(objRelax) objRelax.Delete() objRelax = None EndFunction
  11. Figured it out. The problem was that the greeting topic generated, when I enabled the "Player Dialogue" scene flag, was not named properly. Deleting it, and creating a new topic with the [Greeting] subtype, without touching it's name, did the trick. It also turns out that you cannot reference a group of SharedInfo dialogue records. You can only use individual SharedInfo dialogue records, sadly.
  12. That tutorial fills an alias with a specific actor. That's acceptable for one-trick-ponies that have a unique voice type, and aren't used for any quests, etc. But for generic dialogue? Es no bueno. What you have to do is create dialogue in the Greeting topic, that checks for a specific voicetype. Then you set the dialogue to start a specific phase in a scene, which fills the alias with the NPC that spoke the generic greeting dialogue. Done that, doesn't work. Worked for my Raider Communications mod, but not this framework. I've no idea why, either.
  13. Going to give this a wee bump. Still not resolved this issue. Tried messing with the scene options, and did a bit of work on the scripts. Nada. Current state of the mod's here: http://www76.zippyshare.com/v/Dujvjzkb/file.html
  14. A bit on the background of what I'm doing, is I'm making a follower framework replete with voiced dialogue. It's essentially a port of my Skyrim mod Everybody Is A Potential Follower, as well as a correctly-made version of the system in my Raider Communications mod. Trouble is, I can't for the life of me remember how to get a dialogue scene to run when you "press E to talk". The system has changed a bunch from Skyrim, where you just needed to make sure the quest conditions are met & the dialogue is present. Now we have to create everything in scenes. Here's the mod: http://www70.zippyshare.com/v/al2qNojd/file.html Here's the Quest Data tab: Here's the Alias tab, with the selected alias being the one used in the dialogue scene: Here's the Scenes tab: And here's the shared dialogue group, that the scene's start phase is using: In Skyrim, when creating scenes, you'd have to fill the alias to begin with. But how am I supposed to do that without calling a script on every NPC, whenever you activate them? Do we even do that in Fallout 4, just for the dialogue? Edit: To clarify when the dialogue should occur, I've essentially replaced the 3rd level of the intimidate perk. When aiming at a raider, the option to "Conscript" should appear when you're close to them. If you succeed, they'll be added to the quest's ref collection. You should then be able to talk with them, but the scene doesn't function.
  15. I think it's due to linked references. Don't know any more than that.
  16. Update: Went through every _skin bone, in order to determine precisely which parts of the mesh they affect. Main post has the complete list.
  17. Now that I've made a properly working .sclp creator, along with Zilav's .sclp import script for FO4Edit, I ought to get this info noted for posterity. What are SCLP Files? SCLP files are simple, plain text files that have XYZ scaling values for certain bones. The bigger the values, the larger the triangles that use them. The smaller the values, the smaller the triangles. If you pay attention when swapping under armour, such as the vault suit and raider leathers, your equipped armor pieces will change in size. This is due to the difference in bone scales. The bones that are used by the engine, to scale armour pieces over underarmour, are denoted with the suffix _skin. Other bones should not be added to the .sclp file. How does the game use SCLP Files? The .sclp files themselves are not used by the game at runtime. Instead, they are added to armor addon records ahead of time. The .sclp file's data gets imported to an .esp/.esm file, through the Creation Kit or FO4Edit. How to create SCLP Files It's actually fairly simple. As I use 3ds Max, I can't guarantee that other 3D packages will export the bone data as text in the same format. Other users would have to see for themselves and report back. Install the nif import plugin for 3ds Max 2015/2016. Note that if your 3ds Max install is in a folder other than C:\Program Files\Autodesk\..., the installer will place the plugin there anyway. Simply cut and paste it to where your actual install is located. The link: https://github.com/figment/max_nif_plugin/releases Load 3ds Max, and the following .nif files in order: - Skeleton.nif - The nif file for the outfit, uncheck importing the skeleton when prompted. - The nif files for a full set of heavy armour, also without importing the skeleton. For example, import these files for a full set of heavy metal armour: FArmL_Heavy_1.nif, FArmR_Heavy_1.nif, FLegL_Heavy_1.nif, FLegR_Heavy_1.nif, & FToroso_Heavy_1.nif Once imported, select the outfit and collapse the skin modifier (modifier list -> right-click Skin -> Collapse to). This avoids the outfit from being scaled. I also recommend freezing the outfit object. Before you modify the scales, be sure to select all of the skeleton bones and export them as an ASCII file (.ase). This gives us the default, un-modified values for the bones. These will later be compared to the modified bones. You only need to export the unmodified skeleton once. Use the following settings when exporting: Remember to often export and import the data into the game, so you can see what will need fine-tuned in 3ds Max. Now use my program to generate a .sclp file, from the source .ase file (the unmodified skeleton), and the modified .ase file (modified skeleton). You need only download the .exe from here: https://github.com/MajinCry/Fallout-4-SCLP-From-ASE Use this Fo4Edit script by Zilav to import the .sclp file to an armor addon record in Fo4Edit. : https://pastebin.com/raw/0SWSbm04 ~Fin~ Bugs and pitfalls 1. The first big caveat, is that the Creation Kit's SCLP importer is broken. Don't use it, it messes up the values for certain bones. 2. The second, is that there are particular scaling bones that armour pieces use, but are ignored by the engine. Certain scales are also ignored for some bones. I'll update the list as I discover them. An asterisk indicates the bone itself is ignored, #0 means the Z scale is ignored, #1 = Y scale, #2 = X scale. Suffixed is where on the body they affect: 3. There is a discrepancy between the bone scaling you see in 3ds Max, and the game itself. Possibly due to the race records containing bone scaling data (as well as rotation & position data) themselves, but that's just a guess. To demonstrate, compare the armour pieces in these two images: As a result, you must often compare the modified scaling data between 3ds Max & Fallout 4, as you go through the _skin bones. 5. Fallout's XYZ axis are different from 3ds Max's. In the bone data for the ARMA record, Value #0 = Z. Value #1 = Y. Value #2 = X.
  18. Once I get a hang of manipulating the scaling bones, I'll release it as a full blown mod. There's a discrepancy between the bone scales in game, and the scales in 3ds Max; in the above picture, you can see that the armour on the right arm is visible, albeit missing a few details. In 3ds Max, only the pauldron and the end of the wrist guard is visible. To scale the armour, only scale the xyz values for the "_skin" bones. Do not touch anything else, and do not scale bones that aren't skin bones. To export a proper .ase file, select the entire skeleton -> File -> Export -> Export Selected -> ASCII Scene Export. Then use the following settings: Export the skeleton before modifying it to get a source bones file, or use the one in the repo. Then export the modified skeleton to another .ase file. Load the program, chuck in the two .ase files, click the button, and you get a 100% correct .sclp file.
  19. Update - Turns out the CK's import isn't broken, I just f***ed up which bones get put in. All skin bones are meant to be inside the file, even if their scales are unchanged. The repo's been updated and is fully working now. Proof: That's the Greaser Jacket, boys.
  20. When you say it crashes, do you mean that it freezes and Windows says that it's not responding? Or actual "Has Stopped Working" errors appear?
  21. Update - I'm fairly certain that the CK's SCLP importer is f*#@ed. it set a couple bones to have negative scaling, when they should have positive. The values aren't always correct either, and I'm not talking by some tiny fraction. Been steadily working on an FO4Edit script that provides the same (fixed) functionality. Should be done within a day.
×
×
  • Create New...