Jump to content

MaxShadow09

Supporter
  • Posts

    103
  • Joined

  • Last visited

Everything posted by MaxShadow09

  1. This is the script: Scriptname GSELinkerScript extends ObjectReference Perk Property GSE_Perk Auto Message Property GSE_Menu1 Auto Message Property GSE_Menu2 Auto Message Property GSE_Menu3 Auto Message Property GSE_Menu4 Auto Message Property GSE_MenuWeapons Auto Message Property GSE_MenuArmor Auto Message Property GSE_MenuPotions Auto Message Property GSE_MenuCrafting Auto Message Property GSE_MenuFood Auto Message Property GSE_CloseMessage Auto FormList Property GSE_BannedContainers Auto MiscObject Property GSE_Token Auto MiscObject Property GSE_Linker Auto Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer) if akOldContainer && akOldContainer == Game.GetPlayer() && akNewContainer && akNewContainer.GetBaseObject() as Container && !GSE_BannedContainers.HasForm(akNewContainer.GetBaseObject() as Container) if !Game.GetPlayer().HasPerk(GSE_Perk) Game.GetPlayer().AddPerk(GSE_Perk) endIf Menu(0,akNewContainer) endIf endEvent Function Menu(Int num = 0, ObjectReference akNewContainer) ; stuff EndFunction Basically, when you put it inside a container, it gives a perk to the player, if he doesn't have it already, and then it shows a menu to select what "type" of container this will be (its for cloud storage and autosorting). The Menu() function has all the options that the player can choose, it's irrelevant now since the menu is not even shown unless I give myself the item again. This is attached to the misc item in Creation Kit. As far as I can tell, it's not a script lag problem (I waited a long time and the menu still didn't show, then I give myself the same item and it starts working again). If I place the items from the same stack into different containers without leaving the cell, it works fine. It stops working after playing for a while. I'm aware of the stack bug, but I always place individual items, so that doesn't seem to be the problem.
  2. Hi people. I'm having a little problem with a mod I'm making. I have a misc item with a script attached. This script executes a little piece of code with the event OnContainerChanged. When I give myself a few of these items with the console, they work fine and do what they are supposed to do when I put them in a container. However, after playing for a while, keeping the item in my inventory, I put it inside another container and it does nothing. I have to give myself the item so it starts working again. It's like it is losing the script after a while. Do anyone know why this happens?
  3. Hi people, I'm having a weird bug with a heavily modded Skyrim SSE installation. Recently I arrived to Whiterun, and Uthgerd the Unbroken started attacking me, and also a random "Laborer" npc became an enemy. My followers killed both. I did a little research on internet and apparently Uthgerd has a bug which makes her aggressive, so I used a couple of command on her and problem fixed. After that, I moved to Riverwood, and as soon as I get there, some random citizens start attacking me, and a moment later, all the guards become hostile. I thought that maybe I killed a chicken with my Gypsy Eyes Caravan, and I got a bounty, but that doesn't seem to be the case. Loading a previous save game, I go to Whiterun again. Once I go through the city main doors, a couple of "Hunter" NPC's become hostile (these NPC's appeared before inside an inn, also aggressive, I don't know from what mod they come from). A moment later, all the guards become hostile. I don't know what's happening, but everyone seems to be becoming hostile to me randomly. I am not a vampire, and I don't seem to have any active effect causing that (I did resurrect on my character and my followers but the problem persists). I don't have Civil War Overhaul installed, and I also tried to unistall "WARZONES - Civil Unrest" and it's "DLC", but nothing changed. Whatever is causing this, it has to be something related to factions, or bounties, or some script making ppl aggressive randomly. Here's my plugin list: EDIT: After reading many posts on internet, I finally fixed it. The bug seems to be somehow related to Populated Skyrim HELL EDITION, or could also be a vainilla bug. To fix it, I attacked a guard in Whiterun and sheathed my weapon. Then I went to jail and used the bed to skip the sentence. Paying the bounty could work too, but just in case... After that the random attacks stopped.
  4. I don't think that's a bug, just a badly thought feature. Anyway, this mod allows you to restore power armor frames from bodies, although I can't remember if it removed the ownership from the parts. http://www.nexusmods.com/fallout4/mods/20890/?
  5. You have to check "Save to Records". Otherwise, it just shows the changes in the console.
  6. This will help you: http://www.nexusmods.com/skyrim/mods/49373/? The Renamer script allows you to rename multiple records passing a certain condition, like having a specific keyword, or a substring in EDID or FULL. It allows to change the entire name, append a prefix/suffix or snip everything after a certain string. The Quick Change script is quite useful too. It allows you to change records with a formula (for example, to set the weight of all ammo and aid items to zero, or halve the damage of certain weapons), or even add things like keywords. Both scripts modify the records directly, so if you're making a patch, copy the records as overrides first. And yeah, they work for FO4Edit even tho it was made for TES5Edit.
  7. The script "WorkshopNPCScript" seems to be undocumented, but it has some properties that you may find useful. I've taken this directly from the source: bool bIsWorker: set to TRUE if this NPC is a worker of any kind bool bIsGuard: set to TRUE if this NPC is a "guard" bool bIsScavenger: set to TRUE if this NPC is a scavenger ActorValue assignedMultiResource: if NONE this worker is assigned a single object to work on. Otherwise, this is the rating keyword (food, safety, etc.) of the type of resource this NPC can work on. Here's a code snippet I took from another mod (Settlement Management Software from matzman666), which shows how to use that last property: ;Property workshopparentscript Property WorkshopParent Auto Const mandatory ;Variable workshopdatascript#workshopratingkeyword[] ratings workshopnpcscript worker ratings = WorkshopParent.WorkshopRatings If (worker.assignedMultiResource == ratings[WorkshopParent.WorkshopRatingFood].resourceValue) ;he is a farmer EndIf
  8. Yeah but then I can't restore the name, and I need that to be possible. I have to flag the alias to clear names when the ref is removed. I haven't tried it yet, but perhaps if I do what you say, and then I try to add the reference to another alias with "<BaseName>" as text, it would restore it's original name. That way I would only need two aliases.
  9. Debug.Trace doesn't work? It should write someting in the papyrus logs, if you have them enabled. Have you tried with ".GetFormID" (returns in decimal, not hex) or ".GetName" (F4SE)? You could try Debug.Notification instead, but I don't know if you can display variables there.
  10. That's weird. Both ".item" and ".model" should return a Form. Have you tried casting kArmor to Form? It shouldn't have any effect tho. Maybe if you invert the comparison? Check if the equipped item in each slot is NOT the dummy item? I would add a few debug lines to see what the functions are returning. Alternatively, you could do something like the example in the wiki. Iterate over all the slots from 0 to 43 until the comparison returns true. That index is the biped slot. It may be a bit more resource expensive tho. If those functions don't work, maybe you should go with AWKCR keywords, it has one for every slot. At least you can use the vainilla weapons and some modded weapons. Those item's that can't be recognized could be moved to another container for the player to retrieve.
  11. Hey Imp, nice work with the mod. I noticed you're having problems to add support for armors. I investigated a bit and couldn't find any efficient way to get the biped slot of an item. However, there may be some workarounds. One option would be to use keywords to identify slots, but I noticed the vainilla items are a bit inconsistent on what keywords they have associated. AWKCR seems to have better ones. That would allow you to organize any armor piece compatible with AWKCR, including all vainilla armors. Another option is to use this F4SE function: https://www.creationkit.com/fallout4/index.php?title=GetWornItem_-_Actor You could create a dummy actor somewhere, equip it with an item, and then iterate over all biped slots until you find the equiped armor. That will tell you what biped slot it's using, so you can place it in a formlist or something. This would take quite some time, so it should only be done when the player decides (add a menu option like "Analyze armor items" or something like that).
  12. What happens when you try to add a script? As far as I know, scripts are edited in an external text editor, and then imported to CK, where you can compile it (you can also compile them outside CK, the papyrus compiler is standalone). Perk script fragments are a bit more tricky, as they need to be edited both inside CK and externaly, since CK will update the source every time you change someting in the perk.
  13. Oh, I forgot about RefCollections, I never use them. I tested it and it works fine too, it's probably better than using ApplyToRef because I can clear the alias anytime, restoring all the names. The only limitation is that you can't have more than 255 references in a RefCollection, but that probably won't be a problem. Thanks again Lisselli. Nothing says you have to only use 1 RefCollection. Though depending on the code scenario using more than 1 might be cumbersome. I saw a mod before that did that. I forget the name of the mod I looked at, but the quest it used had something like 30 RefCollections. I didn't look at the script but I'd presume it used an array of the RefCollections. Then a custom lookup function that just cycled through them all till it found the one it wanted and returned a single RefAlias. A custom setting function just looking at the sizes as it looped the array looking for a free spot. Then a removal function doing the same. I'd arguably say anyone needing to house that many Ref's at once might have other concerns. Specifically regarding persistence. Yeah, in my case the containers can be renamed to 18 different names, so I have 18 RefCollectionAliases. I doubt players would have more than 255 containers of the same type, and since the Alias is just there to change the names, the worst that could happen if they go over the limit is that the containers stop renaming, while the rest of the mod works fine. Just in case I could add an extra RefCollection for every name, and do a simple check to add the reference to the second one if the first is full, but no more than that.
  14. You won't get any copyright related problems if you edit vainilla or DLC scripts. In fact, there are mods that edit them, to change quests for example. It's perfectly fine, as long as you don't include any content from a DLC to a mod that doesn't require the DLC. I think that applies only to resources, but scripts are just code that generally works everywhere (some things will probably not work anyway if you don't have the DLC installed), so you can use them anywhere you like.
  15. Oh, I forgot about RefCollections, I never use them. I tested it and it works fine too, it's probably better than using ApplyToRef because I can clear the alias anytime, restoring all the names. The only limitation is that you can't have more than 255 references in a RefCollection, but that probably won't be a problem. Thanks again Lisselli.
  16. Yeah but the problem with aliases is that they can hold only one reference at a time, so If I want to rename 10 objects, I need 10 aliases, or I need to script a way to dynamically change the reference every few ticks. However, I found another solution. There's a function called ApplyToRef, which applies the Alias data to an Object Reference, without pointing the Alias to that reference. This allows you to have more than one object using the data from a single Alias. The data can be removed with RemoveFromRef. If the Alias was flagged to clear names on removal, the name of the reference will be restored when the Alias data is removed. Keep in mind the Alias has to be flagged so it can apply data to non-aliased references. These functions seem to be new to Fallout 4, as they are only documented in the Fallout 4 part of the CK wiki. I did a quick test and those functions effectively allow me to rename an infinite amount of objects with the same alias. I don't know if there are other risks or side effects of these functions, but for now it seems to be exactly what I need. Anyway, thanks for the reply.
  17. Yes, I already use that Entry Point to change the activate action name, I was looking for a way to rename the object itself. In skyrim, "Set Activate Label" did that if I'm not mistaken. In FO4 it does nothing. I made another post with a different approach to this problem (I wanted to delete this one, but I think it's not possible).
  18. Hi people. I'm working on a little mod, and I'm having problems with something. Basicly, I need to rename a container when I put a specific item inside, and restore the name when the item is not longer present. The item already has a script attached, but this has to work with any container in the world. I looked for answers on the internet, and I found two ways to do this: The first option is to use a Reference Alias. As far as I know, If I create a quest with an alias, any reference attached to that alias will take it's properties, including the name. However, I don't know how to attach an object reference to an alias dynamically, and also I don't know if I can attach the same alias to more than one reference. I could use "Find Matching Reference" as described in this tutorial: https://www.creationkit.com/index.php?title=Dynamically_Attaching_Scripts , but this requires me to refresh the quest constantly, and that will probably reset the name of the reference for an instant every time I restart the quest. Isn't there a way to attach a reference to an alias with a script function? The other option is to use SetName(), a function of F4SE, but that changes the name of the base object (an thus all the references). There's also a SetDisplayName(), but It's not documented, so I don't know how it works. Any other ideas?
  19. Hi people. I'm making a little mod, and I need to override the name displayed over certain furniture objects when the player has a specific perk. There is an Entry Point called "Set Active Label". If I remember correctly, in previous games this did what I need, changing the name that is displayed when you look at an activable object, but in FO4 it doesn't seem to be working anymore. I set it in a perk effect with the correct conditions, but nothing changes. I also noticed there isn't any perk in the game using this entry point, so maybe they never implemented it. Is there any other way to change the name of a furniture object when you look at it with certain perk?
  20. Actually,SS does work outside of the original area - Neeher even got some help from Kinggath to MAKE it play nice with SS. The only issue I've encountered was that sometimes,Martial Plots won't update their flag to the one you've chosen,instead defaulting to an American flag. Yeah I heard Neeher fixed that problem, but I thought it could still happen if you used Place Everywhere to build farther, beyond the ASE limits.
  21. As far as I know, there isn't anything like that. You'll have to check the ESP in FO4Edit. I think the perks are applied via keywords, either in the guns or the mods. So a pipe pistol with automatic receiver is affected by Commando, and one with semi auto long receiver is affected by Rifleman. Check the keywords applied to default vainilla weapons and mods, and then compare them to the ones in your custom weapon. Edit: I just took a quick look at the vainilla perks in FO4Edit. These are the keywords used by the main perks: Rifleman: WeaponTypeRifle, NOT WeaponTypeAutomatic, NOT WeaponTypeHeavyGun Commando: WeaponTypeAutomatic, NOT WeaponTypeHeavyGun Heavy Gunner: WeaponTypeHeavyGun Gunslinger: WeaponTypePistol, NOT WeaponTypeAutomatic, NOT WeaponTypeHeavyGun If your gun or one of its possible attachments use those keywords, then it will be affected by the perks.
  22. Also check Place Everywhere, a F4SE plugin. One of the keys allows you to disable the timeout when leving the workshop area, so you can build anywhere. Keep in mind that is unknown if this could cause problems or not. I guess settlers will stop working on your stations if you go too far, Sim Settlements will probably not work outside the original workshop area.
  23. There are like 4 mods adding buildable custom animation markers, so I guess most, if not all possible idle animations got covered by those mods. As far as I know, just by adding an animation keyword to the furniture item, it changes what animation is played when an NPC "uses" that marker. However, not all the animations in the game have their own keyword, and I don't know if it's possible to add more (I don't even know how those animations are assigned to the NPCs, is it a hardcoded? or there's a script that does it?). Speaking of save bloat, It shouldn't increase the save size at all, as you don't need to add any custom script to make it work (unless you want to make something more complex).
  24. Whats the point of this post? You're complaining because some modders leave behind things in their plugins that shouldn't be there, or the plugins themselves are a mess? Well, everyone has to start somewhere, and when you are new to modding, you make mistakes. Lukily, it doesn't take long before your comments section is flooded by complains, so anyone who comes a day or two after the mod is released will easely notice that mod is not worth downloading. I usually order the mod browser by endorsements first, and then by date. Any mod that doesn't appear in the first pages of those lists is prone to be forgotten, unless the author tries to fix the problems. Anyways, if every modder left modding just because he had to "know his limitations", then many good mods today wouldn't exist. Constructive criticism is always better than angry complains.
×
×
  • Create New...