-
Posts
188 -
Joined
-
Last visited
Everything posted by Magicockerel
-
I wouldn't know much about Bethesda.net. I've been trying to ignore Bethesda's site as best I can. I've only used it a couple times in the past when I had to, and that was far from a pleasant experience. I doubt it was a database hiccup considering it appears to be an isolated incident and the views accumulated over a 60-90 minute period and then suddenly stopped. I'd imagine a database hiccup would result in an instant boost in views, rather than them accumulating over time. Edit: That's not to say that it couldn't have been a database hiccup, I just find view-botting (or something to that effect) more likely.
-
That seems to be regarding fake downloads though, which is an entirely different matter. A single account could spam refresh on the page to fake views, whereas you'd need a new account for each unique download. However, it's odd that someone would want to fake either for a mod they have no involvement in. It's not like fake views benefit the mod page at all, considering everything seems to be sorted by endorsements. If anything, it just makes it looks less appealing, as it reduces the mods downloads per view.
-
There was nothing suspicious until last night, at which point there was an hour where the page was gaining insane views for 60-90 minutes (I ended up gaining almost 5,000 views in this period of time). If you look at the stats page you'll see that I gained 5,128 views yesterday, almost 5 times the pages previous peak. In this 60-90 minute period, I received approximately 5 downloads - what I would consider normal, which makes me think my page was view-botted. While it was going on I could refresh the page and receive more than a view a second. However, once it stopped, it stopped immediately, making it all the more suspicious. Edit: In the past I tend to translate 5-10% of views into unique downloads, which the mod was on track for prior to this event.
-
So one of my mods (Workbench Control Panel, found here) has received approximately 4,000 views in the past hour (double what it originally had), barely any of which translated into downloads (less than 10) - to such a degree that it's making me suspicious. Is my page somehow getting view-botted? I have no idea what's going on, this started very suddenly and I don't have a way of finding the source of these views. I'd imagine legitimate sources of signal boosting (such as mod spotlights) would result in significantly more downloads per view. Any help would be appreciated. Edit: It seems to have stopped now, it's sitting at approximately 8600 views (compared to approximately 3500 views an hour ago).
-
Conditioning : Global Variable
Magicockerel replied to ajs52698's topic in Fallout 4's Creation Kit and Modders
It would be helpful if you could post the script you're using to do this. -
Restrict NPC Movement?
Magicockerel replied to TorgueMania's topic in Fallout 4's Creation Kit and Modders
Well as a starting point you could have a look at some tutorial here. A list of all script references can similarly be found here. I myself learnt through a combination of Arron Dominion's videos, Googling, the CK wiki (which I've linked you to), asking for help on the Nexus forums, and background knowledge from other languages. Hopefully that helps. Edit: You could potentially find more information on certain functions, events, etc. by looking at the Skyrim equivalent wiki, which you can redirect yourself to here.- 12 replies
-
- npc
- creation kit
- (and 5 more)
-
Will editing Vanilla Quests work?
Magicockerel replied to DWooT's topic in Fallout 4's Creation Kit and Modders
Not sure if it's much help, but I have successfully edited vanilla quests in the past (at least the script component). More specifically it was the quest controlling the vertibird fast travel system, I think it was just named "VFT". -
Restrict NPC Movement?
Magicockerel replied to TorgueMania's topic in Fallout 4's Creation Kit and Modders
I haven't used it myself, but you could look into something like disabling the AI using the function EnableAI() when the distance between you and the captive is greater than a set amount using the OnDistanceGreaterThan() event. You'd obviously also have to enable the AI when the distance between you and the captive is less than a set amount using the OnDistanceLessThan() event. Edit: You could alternatively (or additionally) move the captive back into the cage (there are several move function variants) when the distance between you and the captive is less than a set amount using the OnDistanceLessThan() event.- 12 replies
-
- npc
- creation kit
- (and 5 more)
-
I've been working on recreating and expanding upon an existing mod of mine using scripts. This involves adding turret NPCs to formlists (and subsequently to the workshop menu) via the AddForm() function, which seems to work fine. The formlists are linked to a constructable object, where the appropriate material requirements have been set up. The issue is that in-game the material requirements aren't shown unless the player doesn't meet the material requirements, and I'm unable to pick up or interact the turrets once they've been constructed. Doing some Googling has revealed that there was a vanilla bug with the generators (and potentially other constructable objects) in the past where the same thing happened, but I can't find what the fix was. A solution would be greatly appreciated. If you're looking at the functionality of the mod itself, it's intended to recreate what the existing mod accomplishes with several different versions and a FOMOD installer. The final version will include a holotape that allows the global variables to be configured, but I haven't gotten that far yet. I wanted to deal with this issue first. I'll also be changing the existing features as it appears that Bethesda have removed the random element themselves, which pretty much leaves me playing with the requirements (as they've messed with them as well) and showing all available turrets. Here's a dropbox link to the full mod, including the source, so that you can view this through the CK. All mod-specific forms have the prefix "NMRTM". Alternatively, here's a text dump of the source: Of course, any help is appreciated :happy: Edit: The title was intended to be "[script] I can't move or see any material requirements for constructable objects if they're added via AddForm()", pretty sure I can't change it now. Please let me know if I can. Edit 2: I changed the code format to something not awful.
-
Open container inventory from Pipboy
Magicockerel replied to MaxShadow09's topic in Fallout 4's Creation Kit and Modders
As far as I know there's no way to close the pipboy using papyrus, but you can run an event when the player closes the pipboy themselves using the OnMenuOpenCloseEvent. -
Cheers guys, I'll look into your recommendations once I wake up. Your help is definitely appreciated :smile:. I've been absent from my threads because I've been busy with exams over the past couple of weeks, which I only just finished a few hours ago. I probably ended up spending too much time modding when I should have been studying as it was haha.
-
What makes certain scripts harmful?
Magicockerel replied to Magicockerel's topic in Fallout 4's Creation Kit and Modders
Fortunately, all armour pieces are considered armor, so there shouldn't be any issues there. I've been mainly working off of the Fallout 4 wiki to make sure I'm using the functions correctly, so I only realised that the EquipItem function added the item to the player's inventory after a bit of testing (if you didn't have the item to equip in the first place). Unfortunately, this means I require this check. One check that I'm not entirely sure on (just off the top of my head, I'm heading to bed as soon as I post this) is whether it matters if I equip an item that's already equipped. I currently only equip an item if it's not already equipped, and vice versa. I'm not sure if this matters at all, but I added it just in case. If it doesn't matter, then I'll remove it to improve performance. I'll probably just remove it and add it back if I notice anything odd going on as a result. That sucks about most items not being persistent. Being so new to papyrus, I don't even know what that implies, but it's good to know that I have to look elsewhere. Either way, as it will improve compatibility, and potentially save me time in the long run, I'll still try to use the event to get the base object anyway using the akBaseObject parameter and add it to a form list. I'm assuming that this will work anyway, given that it doesn't appear to require the item to be persistent. Unfortunately, the only "vanilla" papyrus function that allows you to determine what the player currently has equipped relates to weapons and spells (the GetEquippedWeapon function and its variants). -
What makes certain scripts harmful?
Magicockerel replied to Magicockerel's topic in Fallout 4's Creation Kit and Modders
Bloody hell mate you've done a lot, thanks for all of the help :smile: I honestly didn't think of the GetSize() function being called every time it looped, makes sense now that you mention it (second time's the charm I guess haha). The items were sometimes added to the player on a second or more delay, or at least that was the delay between some of the featured items popping up. I guess I assumed that it was calculated once, and then the value held constant and used as a condition in each of the loops. Thanks for pointing that out, that will obviously make it run a lot faster (as it was looping a minimum 116 times). I honestly didn't think of adding the base objects to a form list and equipping the entire form list, I only thought to determine which entry in the form was to be equipped using a global variable. I like your idea better, as it should make it compatible with everything and remove the mods dependency on any .esm/.esp that adds headgear. It would also make it easier on me as well haha. Hopefully, I'll be able to determine the reference ID of a specific piece of armour using the OnItemEquipped event (or one of its variants) and then add that reference ID to a form list. That is, I'm assuming I can get the reference ID from the akReference parameter (I haven't had a chance to test it yet). This would allow me to equip specific armour pieces, and not just the base object. I plan on using the OnItemEquipped event to get the reference ID of the next object equipped. This would be something the user would have to initiate through a settings holotape, though it should still be better than selecting the base object from a huge list. I did think of expanding this mod to all armour, but I'm not sure how efficient I could make the script. I could probably get it to a decent state with everything that you guys have told me, though. For now, I'll get it working with headgear and then see how I go expanding it to all armour. This whole mod was at least originally geared toward people who wanted to see their characters face, but were also wanting the benefits that come with headgear. One shortcoming I can't see myself overcoming is being able to determine which armour piece is in which slot, at least until F4SE is released anyway (I'm pretty sure you're able to with SKSE). All this really means though is that the user will have to keep track of what can be equipped with what. Unfortunately, I won't have the time to work on this for the next couple of weeks, so I won't have a chance to test these ideas out for a little while. I do definitely appreciate the help in the meanwhile though of course, you guys have substantially improved the quality of the script, and had some great ideas. I'll definitely have a look at implementing your ideas once I get the chance, thanks again mate! Apologies if I missed anything, I'm on my way to bed. -
What makes certain scripts harmful?
Magicockerel replied to Magicockerel's topic in Fallout 4's Creation Kit and Modders
This is just an update for anyone interested in the script itself. Here's a link to the script (and the mod as a whole) as it currently is (and of course the source code is included in the relevant folder): Dropbox Download I've taken on board your recommendations and made the required changes to the script. At least, I'm pretty sure I've taken them all on board. I've made a couple other small changes (such as adding back a few debug notifications from previous versions), but they're not important. The script appears to run faster, so thanks for your tips everyone. I will be too busy over the next couple weeks to really do anything more, but I plan on finishing everything off as soon as I can. As the process is the same regardless of whether the player is entering or leaving combat, I plan on making it a function. The only difference is the values the variables take, so it should be fine. To make things easier on me, I've removed the code for power armour. It's pretty much exactly the same as when the player's not in power armour, only with a single slot (and tweaked variable names). Removing it just means that I don't need to make the changes twice. I'll add it back once I've converted the process into a function, hopefully I can set up checks for the number of slots. It should be easy enough, there are only a couple differences, which I can set up if statements for or something. I haven't really looked into how functions work in papyrus, I've only created a couple really basic functions so far, but you should be able to pass variables into them. -
What makes certain scripts harmful?
Magicockerel replied to Magicockerel's topic in Fallout 4's Creation Kit and Modders
Edit: Sorry, either you edited your message or your entire message didn't load, either way I only read the first couple of code excerpts when I made my reply. I'll be sure to at least ditch the declaration of the parameters. I didn't know functions were tied to the frame rate, I'll be sure to use them as rarely as possible knowing that. I didn't put much thought into the efficiency that different implementations had, so thanks, that's pretty important. -
What makes certain scripts harmful?
Magicockerel replied to Magicockerel's topic in Fallout 4's Creation Kit and Modders
@Contrathetix Thanks for the additional pointers, I'll make sure to use and add PlayerRef to my properties and cut down on the unnecessary use of repeated functions. Hopefully my script will end up being significantly more efficient, because by the sounds of it, it could be. The while loop only repeats a maximum of 3 times, 1 for each of the slots. I wrote a version of the script yesterday that checked whether every single base object on my form list was in my inventory, whether it was equipped, and if it was equipped and not intended to be, it was unequipped. It was a laggy mess, not that I expected it not to be, I wrote it up more to test how efficient the scripting system is more than anything. The current version just equips the base object in each of the 3 slots, and if there's either none of the item intended to be equipped in the players inventory, or the slot is just empty, the item in the opposite slot is removed if it's currently equipped. It has a couple more checks than that, but those are the basics anyway. By opposite slots I mean slot 1 out of power armour and in combat and slot 1 out of power armour and out of combat. The version of the script that I uploaded only has a very slight delay (less than half a second), but hopefully I can cut that down with the advice you guys have given me. Again, thanks for the tips and reading through my script in the first place, this has been a valuable experience :smile: -
What makes certain scripts harmful?
Magicockerel replied to Magicockerel's topic in Fallout 4's Creation Kit and Modders
@cdcooley Thanks mate, I'll make those changes when I get the chance. I originally had the "active" variable defined as an int, but I ended up defining it as a bool to improve the readability of the script. I had no idea that GetValue as int was more efficient than GetValueInt, cheers. I'll also have a look at PlayerRef when I get some free time. Just like with the bool function, I added and defined those parameters to improve the scripts readability, but if it slows the script down I'll make it as bare bones as possible. Thanks for spending the time to read through my script, I definitely appreciate the pointers :). -
What makes certain scripts harmful?
Magicockerel replied to Magicockerel's topic in Fallout 4's Creation Kit and Modders
@BigAndFlabby Thanks for the detailed reply mate :smile: I'm very new to papyrus, but from what I've learnt so far, it appears to be pretty limited. The only "GetEquipped..." functions appear to be for weapons, which is pretty disappointing. Without an equivalent for armour, I'm not sure how I would go about determining the reference ID of the headgear. You appear to be able to get the reference ID using the "OnItem..." events, but that doesn't help me with what I'm doing (I need the reference ID to equip it, not the other way around). I guess I just have to hope F4SE adds something to help with this. They appear to have added some mask related functions in Skyrim, so hopefully they get ported over to Fallout 4. I added all of the headgear in the game to a form list and created a global variable for each slot to identify an entry in the form list (where there's 109 entries for regular headgear, and 7 entries for power armour helmets, split up into two form lists for convenience). You can have a look at it in the source code I provided, or even just load it up in the CK and have a look there. As I said, every form I've added has the prefix "KE_DEH", so they should be easy to find. As the .esp is dependent upon multiple masters, you will have to add the following to your CreationKit.ini file though: [General]bAllowMultipleMasterLoads=1 As the form list is just all of the headgear I identified in the "Armor" section of the CK, it limits me to only being able to equip and unequip base objects. So while I could probably find a workaround to get the reference ID of each of the objects using the "OnItem..." events, it would probably require a tedious amount of user input. While the settings holotape I plan to add won't be the most convenient thing in the world, it will probably be a lot more convenient than anything else the current papyrus functions would allow, even with it limiting me to the base object. Beyond this point might not make much sense, I'm tired, sorry:After writing this all out, it occurs to me that I may be able to use the "OnItem..." events to get the reference ID after all. I might be able to have an entry for each slot in the settings holotape, and when activated will take the next equipped item as the item to equip when going in or out of combat. I might even add a check to make sure that its base object appears on my existing form list, to make sure that it's actually headgear. This would probably be more convenient than my previous idea for both me and the user. It doesn't appear that you have to register for each instance of these events like the "OnHit" event though, which is annoying because I only want it to be done once. I would probably have to implement some global variable or something to make sure that it's only the next item that the player equips. What I mean is set the global variable to 0 when the user wants to change what is to be equipped in the settings holotape, and set it back to 1 when the event is called to select the item. These are all just my initial thoughts though, this only occurred to me after writing this up. I wont have any free time for the next couple or so weeks, so I'll have to wait until then to actually see if this can be done. This would depend upon the reference being able to be remembered by the save file though. I'm not sure if that's possible, as I said I'm still new to scripting, and modding in general. As global variables can be remembered by the save file, this would at least be a way to determine the base object. Implementing this would save me from adding all 109 entries for each of the 6 slots though, even if it is just the base object. I'm really tired at the moment, apologies if any of this doesn't make any sense, I only just thought of this while writing this up. I'm not sure if there are any more convenient methods to determine the reference ID, but akReference of the "OnItem..." events should work. -
I am looking to release my first mod that includes a script, and I am wanting to make sure that it won't harm people's save games. After rewriting it from scratch multiple times, I've finally got the script to a stage where I'm happy with it (at least mechanically, I'll probably condense it where I'm able). However, I'm unsure whether it will harm people's save games. Could anyone tell me how scripts harm save games and how you detect it? If it's just save game bloat that I have to worry about, then it should be reasonably easy to tell through testing. However, it would obviously be convenient to be able to tell without having to do that (and instead be able to look out for certain things in the script itself). Here's a download link to my mod as it is currently, including the scripts source code in the relevant folder: Dropbox Download For anyone interested in looking at what I've done so far and what the mod actually does: While the script is done (mechanically), the mod as a whole isn't. I've still got to create a holotape with settings, but beyond that, it should be good to go. In saying that, I'll also have to add it to the players inventory via script, hence the OnPlayerLoadGame event (to make sure that it's in the players inventory each time the game's loaded), but beyond that it's finished. What the mod does is it allows the player to define two sets of headgear, one for when the player's in combat, and one for when the player's out of combat (using the OnCombatStateChanged event). This allows you to equip more defense orientated headgear in combat, and whatever you want outside of combat (for instance you could just remove everything or define a whole other set of headgear). The mod as it is now is just a quest with the script running, and some global variables and form lists (all with the prefix "KE_DEH"). Without F4SE though, I'm unable to hotkey it, and the player has to define exactly what headgear they want to equip. I've given the player 3 slots for headgear when out of power armour, and only 1 slot for headgear when in power armour (as far as I'm aware that's the maximum number of pieces you can equip respectively). For instance, when you're out of power armour you're able to equip a helmet, a bandanna, and some glasses, but when in power armour you're only able to equip a single helmet. As you can only define base objects when equipping and unequipping, this means that the player either can't carry duplicates of what the script is set to equip, or the player has to settle with the script potentially equipping the wrong combat helmet for example. From what I was told in my previous thread, I can't change this unless I want to remove all other base objects from my inventory and apply the correct modifications to a single base object via script, which doesn't sound ideal. The global variables control what headgear you have equipped, and their integer values correspond to entries in their respective form lists. To equip nothing in a certain slot you give the corresponding global variable a value of "-1" or below. There's 109 pieces of headgear, excluding 7 power armour helmets (including the Automatron and Far Harbor DLC, which each add helmets to the game). That means that I'll have to make a holotape with 6 lists that have 109 entries, and 2 lists that have 7 entries (3 slots in and out of combat and out of power armour, and 1 slot in and out of combat and in power armour). So yeah, the holotape will probably take a while to set up as I don't know how I would streamline the process. I'll be busy over the next couple weeks anyway, so it will be a while before I get to that. Beyond the missing settings holotape though, it performs just fine in-game, as far as my testing has shown so far anyway.
-
So by the sounds of it, the only way to equip an item with specific modifications is to only have one of the base object in your inventory. I'm assuming that Xylozi's method won't work if you already have multiple copies of the base object in your inventory (as it will equip one of the base objects, and not necessarily the item you just applied modifications to). Thanks for the code Xylozi, I might end up using it (and I'll of course credit you for it). @BigAndFlabby - Sorry about not giving you guys any specifics, basically the mod automatically equips your helmet while you're in combat, and removes it once you exit combat. I'm going to include a settings holotape with the mod that allows the user to specify which helmet needs to be equipped during combat, hence my current problem. Thinking about it now, I'll probably have two sets of headgear, what should be worn in combat for defense, and what should be worn outside of combat for aesthetics. I've set it up using the OnCombatStateChanged event. As I don't want to duplicate the helmet each time the user enters combat, my best bet is to exploit how the EquipItem and RemoveItem functions work (which items they prioritise equipping and removing respectively). Though, I might use something along the lines of what Xylozi has done if I can't get anything else to work. While it would be similar, I'd be using global variables instead of form lists, as global variables are the only way I know how to allow the user to change settings. Again, thanks for the replies guys :smile:
-
So are you saying the only way to equip an armour piece with specific modifications would be to create a form for each combination of modifications (and this will need to be done again for each legendary effect, etc.)? While that does sound like it would work, that would require thousands of different base objects. This is because I'm looking to have the player automatically equip an armour piece of their choosing, which they already have in their inventory. I'd probably be better off choosing one of the base objects from their inventory and then attaching their existing modifications to it using something like AttachModToInventoryItem, which they'd also have to select. The issue becomes that if I attach modifications to a random base object, this would duplicate those modifications, and the player might not even want that done. I'm currently changing a few other things around in the script, but once I do that I'm going to see if there's some pattern to how the base object is selected (it seems to prioritise unmodified base objects over modified equivalents from my brief testing yesterday), and exploit that to at least increase the chances of the right armour piece being equipped. Hopefully it's not random. Thanks for the reply by the way :)
-
I'm wondering whether it's possible to equip an item (more specifically an armour piece) that has specific modifications applied to it. I am asking because I need to have the player automatically equip an item for the duration of an event. Everything I've found points to you only being able to specify a base object, which obviously means you can't have the player equip an item with specific modifications applied to it. I've got the script working fine with the base object. If you're unable to equip an item with specific modifications, then that's a shame, but an answer would be appreciated all the same. If there are workarounds though, any information would be appreciated.
-
Edit: Looks like I've found the solution... I had to go into the Bethesda launcher settings and save. As there are very limited settings, I've only done this once or twice when trying to find a fix. This only seems to work half the time, and I have to click install pretty quickly after saving my settings for it to actually work for whatever reason, which is why I guess I didn't come across this sooner. I've reinstalled the game itself twice and the Bethesda launcher countless times trying to fix this, this has been an experience haha. The cause seems to be a poor connection to the Bethesda servers for whatever reason, considering I can download from the Nexus at 10+ MB/s, and it's apparently going to take me 90 minutes to download the 80 MB Creation Kit. I'm in one of the far corners of the world... Australia, so I guess they don't have any local servers. I can't remember having these connection issues in the past, though. Just leaving this in case someone else has a similar issue. I've been trying out solutions to even somewhat related problems that I've found through Google, and none of them mentioned anything along these lines. Original Post: I'm having trouble reinstalling the CK. I'm hoping that I'm just being an idiot and missing something, but all that's happening at the moment once I click install is Bethesda's square logo rotating endlessly in the center of the launcher, as shown here: http://i.imgur.com/FubiD3u.jpg Hopefully someone has either encountered this before, or can point me in the right direction. This all started earlier this week, when Steam screwed up installing the latest version of FO4 somehow. I was having issues validating the CKs files around the same time, or something along those lines, and I figured it would be easier to reinstall (considering it's only 70 MB). The issue is that nothing happens when I click on the install button (beside the spinning square logo). I ended up doing a clean install of FO4, that works just fine, but the CK doesn't seem to want to install. I'm not sure if Steam screwing up the update for FO4 is related, but it did occur at pretty much the same time (just as I'd reinstalled FO4). I've tried reinstalling the Bethesda launcher, running in administrator mode, disabling my firewall, leaving it open for long periods with the logo spinning, and nothing seems to be working. This has been going on for the past 5 or so days, and I'm out of ideas at this point. Nothing relevant comes up on Google. I've got Skyrim's CK installed as well, and that works fine, but that of course runs through Steam. I've had no issues with FO4's CK prior to this. Any help would be greatly appreciated, as I can't really do much without the CK.