FiftyTifty Posted June 23, 2017 Share Posted June 23, 2017 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. Link to comment Share on other sites More sharing options...
llamaRCA Posted June 23, 2017 Share Posted June 23, 2017 I have several package fragments and they all extend package. I didn't have to do anything to make that happen so what you are seeing isn't a universal issue. Link to comment Share on other sites More sharing options...
FiftyTifty Posted June 23, 2017 Author Share Posted June 23, 2017 I have several package fragments and they all extend package. I didn't have to do anything to make that happen so what you are seeing isn't a universal issue. C'est non Fragmént, c'est le Scíptoisé! Link to comment Share on other sites More sharing options...
llamaRCA Posted June 23, 2017 Share Posted June 23, 2017 Oops! Misread it. Link to comment Share on other sites More sharing options...
FiftyTifty Posted June 23, 2017 Author Share Posted June 23, 2017 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. Link to comment Share on other sites More sharing options...
Reneer Posted June 23, 2017 Share Posted June 23, 2017 May I ask why you're trying to make RefCollectionAlias arrays? Link to comment Share on other sites More sharing options...
FiftyTifty Posted June 24, 2017 Author Share Posted June 24, 2017 May I ask why you're trying to make RefCollectionAlias arrays? 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. Link to comment Share on other sites More sharing options...
Recommended Posts