Jump to content

Magicockerel

Premium Member
  • Posts

    188
  • Joined

  • Last visited

Everything posted by Magicockerel

  1. I have no experience with armour/weapon mods, I stick to scripting. So, to me the puzzling thing is why they start biped slots at 30 in the CK. Is there some sort of legacy reason for this? It at least appears to be the same in Skyrim, that's about as far back as I go with modding.
  2. As I said to Shavkacagarikia, thanks for your contributions to the CK wiki :)
  3. For anyone interested, I've published the mod. You can find it here on the Nexus. I've included the source code on the file page, so you guys should be able to figure out how everything works if you want. I'm pretty happy with how I've got everything set up. The biggest thing that isn't shown in any iteration on this page is how I've set up selecting the hotkey. I have the user select a menu option in a Pipboy holotape, prompt them to exit the Pipboy and then to select a hotkey. The hotkey becomes the first working hotkey that they press after leaving the inventory menu.
  4. There's some funny business going on (or I'm an idiot and have missed something fundamental in my testing). Calling the following functions appears to unequip headgear*: *Please note that I'm subtracting 30 from the actual biped slot numbers shown in the CK. Biped slot descriptions have been taken from this page. However, my earlier attempts to unequip all slots (0 -> 29) failed to unequip headgear. So, yeah, not really sure why this works if that didn't. Again, this is testing done with a single set of headgear, I'll do more testing later. I've been busy with a couple other things, so I haven't done much more testing than this. However, I'll get it done and report back later today. Edit 1 Ok guys, I've finished the body of the mod that I've been working on relating to this post. I'll post the script below in spoilers. I've just attached the script to a quest, the only other form in the mod is a global variable (HH_GLOB_Hotkey), which allows you to define the DirectX Scan Code of the hotkey that you want to use. All the mod does is unequip your headgear when you press the hotkey and re-equip the same headgear when you press the hotkey again. All I really have left to add is a holotape to allow the user to define their desired hotkey. I don't have any experience with creating holotapes, so this might take a little while to work out. Beyond that there's just testing for bugs. The only shortcomings that I can think of are: -For some reason GetWornItem() only works in third person. It's not doing anything for me in first person, despite setting the parameter "firstPerson = True". I suppose this is ok, because I can't think why you'd want to toggle your headgear if you weren't able to see it anyway. Ideally I'd fix this, but I can't see a way around it. -Of course, as with equipping any item, you're only able to equip an item with the same base form ID. This means that if you have multiple of the same armour, but you've attached certain mods to one of them, the mod may not equip the armour with the desired modifications. The only way around this is if the item is persistent, which is rarely the case. Edit 2 So I've got the mod working. I'll be uploading it once I record and upload a short video, and create a page for the file.
  5. Ok, this has been helpful guys, thanks (even if it tells me that the function's just borked). I have been using this page to determine biped slots, which is linked to from UnequipItemSlot() and GetWornItem(). I wasn't wanting to unequip everything from the player, just headgear. I expanded to try and unequip everything because I wasn't having any luck with just those slots. I too was trying to get GetWornItem() to work, but it was only returning None (at least, for the Item, it appeared to return data on the ModelName). I'll let you guys know if I have any luck. Haven't had any so far haha. Edit 1 Ok, for some reason if I unequip biped slots -999 to 29, everything is unequipped (beside the Pipboy, which is unequipped with biped slot 30). For some reason the Militia Hat and Sunglasses is unequipped with a negative biped slot number, not sure why. Everything else is unequipped through slots 0 to 29. I have no idea why this is the case. The CK shows which biped slots an item uses (ranging from 30 to 61, as the CK wiki suggests), and they don't align with what actually works with the UnequipItemSlot() function. Edit 2 So, the Militia Hat and Sunglasses are unequipped if I run UnequipItemSlot() between -200 and 29, but not if I run it between -100 and 29. This implies that these headgear items have biped slots between -200 and -101. Again, not sure why. Edit 3 GetWornItem() doesn't appear to be working for the CK defined slots either. You can see in the spoiler Debug.Trace() log output from the script I directly copied from the CK wiki page: Actor Player = Game.GetPlayer() int index = 30 int endSlot = 61 const while (index < endSlot) Actor:WornItem wornItem = Player.GetWornItem(index) Debug.Trace("Slot: " + index + ", " + wornItem) index += 1 EndWhile Edit 4 Instead starting to check biped slots from 0... This suggests that GetWornItem() also doesn't use the CK defined biped slots (30 -> 61), but instead uses biped slots 0 -> 29 for armour. Again, no idea why this is the case. This makes it a pain to determine which slots are used for which. It at least appears that the main hat slot is 0 instead of 30, and the Pipboy is 30 instead of 60, so maybe they're in the same order, but just start at 0 instead of 30. Edit 5 It looks like there are no negative biped slot numbers (at least, according to GetWornItem()). This of course makes sense, and I was hoping that this was the case. I'm clarifying this because UnequipItemSlot() fails to unequip the headgear the player has equipped in the save file that I am using for testing unless I start from -200. They won't be unequipped if I instead start at -100.
  6. I like to write and fill out each of the parameters in a function to improve the readability of the script and to better serve for future reference. The only exceptions I make to this are those that don't recognise the name of their parameters listed on the CK wiki for some reason (e.g. GetValue(), SetValue(), etc.), and the Show() function (afArg1, afArg2, ..., afArg9), which is just bloody long. It's just personal preference and I've been told that it doesn't affect the efficiency of the script.
  7. The UnequipItemSlot() function only manages to unequip the pipboy (rendering it invisible) when I run through each of the potential biped slots (30 to 61). As this is part of a larger script, I'll quickly write up the relevant part of the script. ScriptName UnequipPlease Extends Quest ; ========== ; Properties ; ========== Actor Property PlayerRef Auto Const Mandatory ; ====== ; Events ; ====== Event OnInit() ; --------- ; Variables ; --------- Int IterationCount ; ---------- ; Operations ; ---------- IterationCount = 30 While (IterationCount <= 61) PlayerRef.UnequipItemSlot(aiSlot = IterationCount) IterationCount += 1 EndWhile EndFunction Yes, the PlayerRef property has been correctly set up, and the .esp itself has been saved. I can probably get away with just using the UnequipItem() function, but I'd prefer not to. And yeah, I realise that this is about my millionth recent thread, sorry about that.
  8. Sorry, it was just the generic "XXX is not a function or does not exist" error, so I didn't think to include it. Thanks for clearing up my scepticism towards the src folder. I was grasping at straws, so I was trying anything haha. Not sure what I did to fix it, but it appears to be working now. "getf4seversion" was working in the console in-game, as it is now. I've reinstalled the files (a couple times...) and it appears to be working. I am installing the Data folder files via NMM (as that makes uninstallation easier), so that might have had something to do with it, but probably not. Sorry to take up your time, I at least now know for sure what I have to do to have F4SE work in the CK in the future.
  9. Yeah, you can only have a maximum of three activate options on any one object. If you add a fourth, you won't be given an error, it will be added to the object, however, it won't be available. To dictate the order of the activate options, you set their priority level. I can only think of one way to make these mods compatible. That is, to have the third activate option open up a MesssageBox to choose between which of the two mods that want to make use of at that point in time. Too bad you can't change priority level on the fly with scripts.
  10. I'm having trouble getting the CK to compile F4SE functions and events. I have F4SE 0.3.0 installed and working fine in-game. Beside installing F4SE, I have made the following alteration to CreationKit.ini sAdditionalImports = "$(source);.\Data\Scripts\Source\F4SE;.\Data\Scripts\Source\Base" I have taken the final comment of this thread to mean that I should potentially move the contents of the F4SE src folder into the Fallout 4 base folder. I have tried a few different locations with no luck. If anyone could show me how I've been an idiot, that'd be great.
  11. I haven't tested this myself, but I would assume "SecondaryAttack". Keep in mind that shavkacagarikia mentioned in this thread that only a few controls work at this point.
  12. Thanks, but the CustomControlMap.txt file that comes with F4SE appears to have what I was looking for.
  13. I'm looking for the list of potential controls that I can register for through the OnControl... Fallout 4 Script Extender events. I haven't managed to find them on the relevant CK pages, looking through Fallout 4 settings files, Google, etc. I'm sure that I'm an idiot and I've just overlooked something. If anyone could point me in the right direction, that'd be great.
  14. What I was trying to say was that you'll need to trigger the function in some way. The function itself does nothing by merely being present in the script. An event, an activator, a messagebox, a dialogue option, they all achieve the same thing. You shouldn't need another function to subtract from the current value. You can test these things by using Debug.Trace, Debug.Notification, or Debug.MessageBox before and after the function is called to see the value of the global variable for yourself (as shown above).
  15. You've created a function that will set the value of KimberlyGlobal to 1.000... (a float). However, you still need to define an event in which this function will be run. For example, if you want to run this function when the quest that the script's attached to initialises, you'll want to add the following: Event OnInit() Test() EndEvent Just because something compiles, it doesn't mean that it's going to do what you want it to do. So basically, you'll have a script that's attached to a quest that looks like this: ScriptName JustTestingDeleteLater Extends Quest ; ========== ; Properties ; ========== GlobalVariable Property KimberlyGlobal Auto Const Mandatory ; ====== ; Events ; ====== Event OnInit() Debug.Notification(asNotificationText = "KimberlyGlobal = " + KimberlyGlobal) ; This should display "KimberlyGlobal = 0", assuming a default value of 0 Test() Debug.Notification(asNotificationText = "KimberlyGlobal = " + KimberlyGlobal) ; This should display "KimberlyGlobal = 1" EndEvent ; ========= ; Functions ; ========= Function Test() KimberlyGlobal.SetValue(1 As Int) EndFunction Assuming that the quest starts with the game, and you want to change the value of the global variable when the user first loads the mod, this will function as intended. You'll want to look at the various events you can use if this isn't what you want (where some events require you to attach the script to the relevant ObjectReference, Location, etc.) Also, make sure that you've set your properties up properly. I quite frequently forget to open up the Properties window to establish each of the properties I've defined in the script, and spend ages trying to see what's wrong.
  16. I've been slowly working on these scripts over the last couple of months. I lost what I had originally been working on when I reformatted my computer (again, I'm an idiot), which I did after being out of country for over a month. What ended up happening was me trying to work myself back to where I was purely in Notepad++ (that is, just the scripts themselves), as I only recently attempted to compile the scripts in the CK and create the .esp itself. Given that I hadn't worked on the mod for over a month, though, it took a while to re-familiarise myself with my previous work. These sort of bugs that result from discontinuities in design choices are a result of this. Luckily I had the source files that I have uploaded on the file page to work with. However, if you care to contrast what I've released on the mod page and what I uploaded to dropbox this morning, you'll see that I pretty much rebuilt the mod from scratch. Again, thanks for the help mate :)
  17. Oh, I wasn't aware that the reference collection alias functioned as an array. Thanks, that solves that issue. Here's what the script currently looks like. It compiles fine, but I don't get any notifications when I trigger those events in-game. I'll have a look at making those edits to the Self.GetReference() sections of the script shortly. I haven't made them prior to making this post as solving this issue won't fix whatever's wrong with how I've created these aliases. I've provided the mod as a whole in a dropbox link in the first post, as it was when I first made this thread. Edit: I just noticed that the Enabled state wasn't set to Auto, so that could explain those issues (I'll have a look at fixing it now). However, that doesn't explain why the OnActivate event wasn't giving me any feedback. Edit 2: Or rather, I forgot to change the state of this script from Disabled to Enabled in the perk script when this feature is enabled. Edit 3: Yeah... after remotely changing the state of the script in the spoiler to Enabled, the script appears to function as intended. I guess I'm an idiot. Still, you've helped me understand reference collection aliases, so this hasn't been a waste. Thanks for your help mate.
  18. Hey, thanks for the response. The save-game did actually start right next to the Sanctuary workbench, so the In Loaded Area flag didn't cause any issues. I originally didn't have that box ticked, but I ended up messing around with a few things because I was running out of ideas. The quest itself starts enabled with the game. I have only ever messed around with reference aliases, and never with reference collection aliases. Am I correct in assuming that the only real advantage to creating a reference collection alias over a reference alias is that you don't need to create a new reference alias for each reference that you want to keep track of? That is, I don't need to create 28 reference aliases for each of the WorkshopWorkbenches in the vanilla game (Workbench0, Workbench1, ..., Workbench27)? Using the SQV 07000F9C console command (0x000F9C being the quest FormID) reveals that both the reference alias and the reference collection alias have correctly registered each of the workshop references (that are linked to the WorkshopWorkbench containers). That is, it returns the FormID's of SanctuaryWorkshopREF (010250FE), RedRocketWorkshopREF (01054BAE), etc. However, I've had no luck whatsoever getting any feedback from the script that I've attached to either the reference alias or the reference collection aliases. I've added Debug.Notifications to each of the various OnWorkshop... events that I'm using, and I even added the OnActivate() event to the script, to see if I could trigger anything by activating the workbench. I haven't been able to trigger any of the notifications that I've embedded in the script, so there's still something wrong somewhere. The OnWorkshop... events are apparently sent to the workshop reference. Considering the reference collection alias is keeping track of each of the workshop references, the events should be triggered, but aren't. Another issue I'm having with the reference collection alias is the use of the Self.GetReference() function. I can't see any equivalent function on this page. I'm sure that there's some way that I can achieve the same functionality in the script that I've attached to the reference collection alias, but I haven't been able to find it so far. At the moment I've just got that section of the script commented out, because the script functions fine without it. However, I will need to resolve this issue before I release the mod.
  19. I am wanting to create a workbench alias so that I can attach a script to each of the workbenches that you find throughout the game world. Attaching a script to each of the workbenches allows me to make use of the OnWorkshop... event variants at each of the settlements. I have attached a previous incarnation of the script directly to the workbench forms, and the script's worked fine. However, I'd rather not edit vanilla forms, so I thought creating an alias would be the go. My issue is that I can't see the script running at all (which I can tell from notifications that are displayed at certain events), so I'm assuming that I haven't set the alias up correctly. I have only done quite limited experimenting with aliases in the past, so that's very likely the case. As shown below, I have attempted to alias the various workbenches that I've put in a couple form lists. I'll note that I am using the same form lists to add an activator to the workshop workbenches (which is working fine), so there's nothing wrong with the form lists themselves (to my knowledge). I've only added the base game workbenches to the form lists to ensure that there are no DLC requirements. However, I've added any DLC workbenches to those form lists via script if those .esm files are loaded, so there shouldn't be any issues there. To put things simply, I need help creating an alias so that I can attach scripts to the various workshop workbenches in the game. http://i.imgur.com/yZs27Uy.png The mod in its current state can be found in the following dropbox link. It's in a relatively complete state, as there's really only bug testing left to do (this being just one of them). For some context, it's version 2 of my Workbench Control Panel mod. Any help would be appreciated.
  20. To cure the player of vampirism, you use: If (Game.GetPlayer().HasKeyword(akKeyword = VampireKeyword)) (PlayerVampireQuest as PlayerVampireQuestScript).VampireCure(Game.GetPlayer()) EndIfWhich I took from the DLC1LycanthropyRegiftQuestScript script. This is the vanilla script that runs when Aela re-gifts you the beast blood. Keep in mind that this is player specific. You'll have to look at a similar quest to cure NPC's.
  21. The core of Pumping Iron is using the SetWeight() SKSE function. There is no equivalent function in vanilla Fallout 4. We'll have to wait for it to be ported to F4SE (which has only recently released hotkey related functionality).
  22. As far as I know, you aren't able to get the name of a form in Skyrim without SKSE. That would therefore be something to wait and hope that F4SE addresses.
  23. By the sounds of it you're talking about Fallout 4. If so, your best bet is to post here.
  24. I have only seen it used on Zaric's stream, but it sounds as if Jaxonz Positioner does what you want. The issue is that it apparently requires SKSE, meaning that it isn't yet available for SSE. Edit: Sorry, wrong game. I thought I was in the SSE equivalent forum.
×
×
  • Create New...