Jump to content

Hjorr

Members
  • Posts

    22
  • Joined

  • Last visited

Nexus Mods Profile

About Hjorr

Profile Fields

  • Country
    France

Hjorr's Achievements

Explorer

Explorer (4/14)

  • First Post
  • Collaborator Rare
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. Sure, here you go :-) Scriptname AYF_BardQuestScript extends Quest import ski_activeeffectswidget import SKI_ConfigBase import SKI_ConfigManager import ski_configmenu import ski_favoritesmanager import ski_main import SKI_PlayerLoadGameAlias import ski_qf_configmanagerinstance import SKI_QuestBase import ski_settingsmanager import ski_widgetbase import ski_widgetmanager MiscObject Property Lute Auto MiscObject Property Flute Auto MiscObject Property Flute01 Auto MiscObject Property DancersFlute Auto MiscObject Property Drum Auto Form ItemForm String ItemName String selectedEntry Bool InventoryMenuOpen = False Event OnInit() RegisterForMenu("InventoryMenu") EndEvent Bool Function IsInstrument() ItemForm = Game.GetFormEx(UI.GetInt("InventoryMenu", "_root.Menu_mc.inventoryLists.itemList.selectedEntry.formId")) ItemName = UI.GetString("InventoryMenu", "_root.Menu_mc.inventoryLists.itemList.selectedEntry.text") If (ItemName == "lute" || ItemName == "flute" || ItemName == "flute01" || ItemName == "drum") return true ElseIf (ItemName!= "lute" || ItemName != "flute" || ItemName != "flute01" || ItemName != "drum") return false EndIf EndFunction Event OnMenuOpen(String menuName) InventoryMenuOpen = True selectedEntry = UI.GetString("InventoryMenu", "_root.Menu_mc.inventoryLists.itemList.selectedEntry.text") DetectStringChange() EndEvent Event OnMenuClose(String menuName) InventoryMenuOpen = False EndEvent Function DetectStringChange() While selectedEntry == UI.GetString("InventoryMenu", "_root.Menu_mc.inventoryLists.itemList.selectedEntry.text") && InventoryMenuOpen == true && Utility.IsInMenuMode() ;this while loop pauses the script until the selectedEntry string changes EndWhile Utility.WaitMenuMode(0.1) If InventoryMenuOpen == True && selectedEntry != UI.GetString("InventoryMenu", "_root.Menu_mc.inventoryLists.itemList.selectedEntry.text") selectedEntry = UI.GetString("InventoryMenu", "_root.Menu_mc.inventoryLists.itemList.selectedEntry.text") && InventoryMenuOpen == true && Utility.IsInMenuMode() If IsInstrument() == true Game.SetGameSettingString("sCantEquipGeneric", "You start playing") Else Game.SetGameSettingString("sCantEquipGeneric", "You cannot equip this item.") EndIf DetectStringChange() ;re-runs the function. The function will only run while in the inventory menu. Endif EndFunction
  2. @IsharaMeradin Thank you very much for taking the time to explain. I think I get it now and well, it might not be of use right now but at least I've learnt something and that's always worth taking. @dylbill My thanks to you, I used a while loop just like you suggested and I'm very pleased to say that it works like a charm. @revenant0713 I needed to monitor the changes of the highlighted item in the inventory in order to change the "sCantEquipGeneric" game setting string. The reason for that is that I am working on an alternate start mod for Skyrim SE which allows the player to choose from a list of classes at the start of the game. At the moment I'm working on the bard class which among other things allows the player to start playing an instrument by selecting it in the inventory and I wanted to find a way to get rid of the annoying "you cannot equip this item" top-left notification when selecting a lute or a drum. Now thanks to @dylbill, it dynamically changes from you "you cannot equip this item" to "you start playing an instrument".
  3. Hello everyone, I'm having quite a hard time trying to understand how to create a custom event. My goal would be to create an event that detects when a string name has been changed, namely: UI.GetString("InventoryMenu", "_root.Menu_mc.inventoryLists.itemList.selectedEntry.text") I think that I'm supposed to use the information available here, here and here but I'm not sure how to set up the whole thing. Would it be possible at all? Some help would be much appreciated. Thanks in advance,
  4. Ok, solved. The script works with SKYUI installed. I just needed to extract and copy the SKYUI .psc and .pex scripts into the data/scripts folder and then to import them in my script like so. Scriptname AYF_BardQuestScript extends Quest import ski_activeeffectswidgetimport SKI_ConfigBaseimport SKI_ConfigManagerimport ski_configmenuimport ski_favoritesmanagerimport ski_mainimport SKI_PlayerLoadGameAliasimport ski_qf_configmanagerinstanceimport SKI_QuestBaseimport ski_settingsmanagerimport ski_widgetbaseimport ski_widgetmanager MiscObject Property Lute AutoMiscObject Property Flute Auto MiscObject Property Flute01 Auto MiscObject Property DancersFlute Auto MiscObject Property Drum Auto string itemName Int IKey Event OnInit()IKey = Input.GetMappedKey("Activate")RegisterForKey(IKey ) EndEvent Event OnKeyDown(Int KeyCode) If KeyCode == IKey itemName = UI.GetString("InventoryMenu", "_root.Menu_mc.inventoryLists.itemList.selectedEntry.text") debug.Notification("Item = " + itemName ) EndIfEndEvent
  5. Hello Everyone, I'm trying to get the formID of the item that has got mouse focus on while in the inventory, In other words, the item which is highlighted, not necessarily activated. I've done some research, and I think that I have found what I need, but I can't seem to make it work properly. My script compiles with no errors but the notification displays Item = None on the "activate" while in inventory Keyup event. Other users seem to have used the same path (_root.Menu_mc.inventoryLists.itemList.selectedEntry.formId) with success Any idea of what I'm doing wring here? I could really use some help. Thanks in advance! Here's my script: Event OnInit() IKey = Input.GetMappedKey("Activate") RegisterForKey(IKey) EndEvent Event OnKeyUp(Int KeyCode, Float HoldTime) If KeyCode == IKey Form ValuableItem = Game.GetFormEx(UI.GetInt("InventoryMenu", "_root.Menu_mc.inventoryLists.itemList.selectedEntry.formId")) debug.Notification("Item = " + ValuableItem) EndIf EndEvent
  6. Hello there, First of all, allow me to describe the purpose of my mod: I am trying to create a belt bag that will allow the player to get a carrying capacity bonus when wearing it. Here is a picture of my model: Click here Truth is that it looks pretty good with most armors in the game: Image 1, Image 2. My problem is that with a few armors, I get some annoying clipping. In order to solve this clipping problem, I am working on a script which is supposed to swap between two versions of the belt (light and heavy) so that when the player equips the belt or an armor it will change the version of the belt accordingly to avoid clipping issues. So far, I've created a script and attached it to the player through the Reference Alias tab of a quest. Here is my script, I've tried quite a few things already to be honest, but being far from an expert modder, I'd really appreciate if some of you could take a look at it and let me know what is going wrong with it. It does compile but nothing happens in game. Thanks for reading and for helping! Scriptname CheckPlayerArmor extends ReferenceAlias Armor Property aaaBelt Auto ; the standard version of the belt for most armors. Armor Property aaaBeltBig Auto ; the heavy version of the belt for the armors with clipping issues. Event OnObjectEquipped(Form akBaseObject, ObjectReference akReference) Armor Cuirass = Game.GetPlayer().GetWornForm(0x00000004) as Armor ; gets the armor worn by the player int WeightClass = (Cuirass).GetWeightClass() ; Determines if the armor worn by the player is light or heavy If akBaseObject == aaaBelt ; If the equipped object is the light version of the belt If (WeightClass == 0) ; check if player armor is light ; everything should be normal ElseIf (WeightClass == 1) ; check if player armor is heavy ;remove the standard version, add and equip the heavy belt Game.GetPlayer().RemoveItem(aaaBelt) Game.GetPlayer().AddItem(aaaBeltBig) Game.GetPlayer().EquipItem(aaaBeltBig) ElseIf (WeightClass == 2) ; Check if it is another Cuirass ; everything should be normal Else ; If the player is not wearing an armor ; everything should be normal EndIf ElseIf akBaseObject == aaaBeltBig ; If the equipped object is the heavy version of the belt If (WeightClass == 0) ; check if player armor is light ;remove the heavy version, add and equip the standard belt Game.GetPlayer().RemoveItem(aaaBeltBig) Game.GetPlayer().AddItem(aaaBelt) Game.GetPlayer().EquipItem(aaaBelt) ElseIf (WeightClass == 1) ; check if player armor is heavy ; everything should be normal ElseIf (WeightClass == 2) ; Check if it is another Cuirass ;remove the heavy version, add and equip the standard belt Game.GetPlayer().RemoveItem(aaaBeltBig) Game.GetPlayer().AddItem(aaaBelt) Game.GetPlayer().EquipItem(aaaBelt) Else ; If the player is not wearing an armor ;remove the heavy version, add and equip the standard belt Game.GetPlayer().RemoveItem(aaaBeltBig) Game.GetPlayer().AddItem(aaaBelt) Game.GetPlayer().EquipItem(aaaBelt) EndIf ElseIf akBaseObject as Armor ; If the equipped object is an armor If (WeightClass == 0) ; check if player armor is light If (Game.GetPlayer().IsEquipped(aaaBelt)) ; check if player is wearing the standard belt ; Everything should be normal ElseIf (Game.GetPlayer().IsEquipped(aaaBeltBig)) ; check if player is wearing the heavy belt ; remove the heavy version, add and equip the standard belt Game.GetPlayer().RemoveItem(aaaBeltBig) Game.GetPlayer().AddItem(aaaBelt) Game.GetPlayer().EquipItem(aaaBelt) Else ; check if player is not wearing a belt ; Everything should be normal EndIf ElseIf (WeightClass == 1) ; check if player armor is Heavy If (Game.GetPlayer().IsEquipped(aaaBelt)) ; check if player is wearing the standard belt ; remove the standard version, add and equip the heavy belt Game.GetPlayer().RemoveItem(aaaBelt) Game.GetPlayer().AddItem(aaaBeltBig) Game.GetPlayer().EquipItem(aaaBeltBig) ElseIf (Game.GetPlayer().IsEquipped(aaaBeltBig)) ; check if player is wearing the heavy belt ; Everything should be normal Else ; check if player is not wearing a belt ; Everything should be normal EndIf ElseIf (WeightClass == 2) ; Check if it is another Cuirass If (Game.GetPlayer().IsEquipped(aaaBelt)) ; check if player is wearing the standard belt ; Everything should be normal ElseIf (Game.GetPlayer().IsEquipped(aaaBeltBig)) ; check if player is wearing the heavy belt ; remove the heavy version, add and equip the standard belt Game.GetPlayer().RemoveItem(aaaBeltBig) Game.GetPlayer().AddItem(aaaBelt) Game.GetPlayer().EquipItem(aaaBelt) Else ; check if player is not wearing a belt ; Everything should be normal EndIf Else EndIf EndIf endEvent
  7. Okay, for those who want to alter the menus ingame. I succeeded in exporting the different menus thanks to various programs. Several steps are required: First, you need to extract your menu files by using "Fallout Mod Manager" or "BSAopt" for instance. (The file where the menu ressources are located is "interface.bsa" in your skyrim data folder). Once you've done that, you are going to need a ".swf" decompiler. With this decompiler (I use FFDec which is free), it seems that you can edit everything in your menu. I'm still learning about how to edit what I want but at least I know where to look now.
  8. Since I have no idea about how to do it, I was hoping that some of you could have an idea about how to disable the health, stamina and magicka bars at the bottom in the different menus. I'm already using Immersive HUD using 0% opacity to hide the bars ingame, but it's only working when I'm outside of the menu. Do you think that it is possible to disable them while being in menu mode? As to why, I'm using Skill Interface Retexture and I would like to be able to make the most of those beautiful textures unhindered by information I don't need since I also use Important Information Overhaul Could somebody more learned than I am in how Skyrim menus work help me build this? That would be really appreciated.
  9. Yes, that's already done, but it has no effect on the bars in the skills menu. they act independently from one another.
  10. Thanks, but I forgot to mention that I already use Immersive HUD. And it seems that the bars in the skills menu can not be disabled thanks to this mod.
  11. Hi there, Since I have no idea about how to do it, I was hoping that some of you could have an idea about how to disable the health, stamina and magicka bars at the bottom of the skills menu. I would like to be able to simply gaze at Tko007's stars ingame unobstructed by data I don't need since I use Important Information Overhaul Any ideas about how to do that? Thanks :-)
  12. Hello there, I'm working on something which started as a simple food animation mod: when you eat or drink food, controls are first disabled and the player character starts playing an eating or drinking animation before getting the controls back. What I would like to do now is to prevent the player from being able to eat during a fight, or when swimming for example. So far i've added a magic effect to all the food items that scripts what is described just above. I'm trying to figure out a way to block the activation of potion type items and to allow their use under specific circumtances only. This is something I find quite complicated since I am not able attach a script to a potion type item. If I get it right, it is possible to attach a script to a potion through a quest by using a form list but I'm still unsure about how to do it properly. Any ideas on how to do this? Please?
  13. my script compiles correclty but everything does not occur as I expect it. Can you guys see any problem with it? I've only been a modder for only a week or so, so I am not exactly able to figure out my mistakes on my own. If it pleases you, may I ask you to take a look at it in order to see if there's something wrong with it? Here's a short description of what this script is supposed to do. It is a knock out spell, it is supposed to give you a perk which allows you to have a chance of casting a knock out spell on an enemy with a mace weapon while sneaking undetected. On a hit event, it is supposed to set the target unconscious, to set it unalerted, not to show the target as detected on the stealth meter and to push it away in order to make the target ragdoll.. Here are my problems: 1- First, I'm trying to find a way to prevent the effect from being cast when the target is already under the effect of the spell. I've tried to use keywords and checking the box as well as adding keyword conditions but I'm not sure whether I'm doing it properly or whether it is about an in editor bug. 2- I'm also trying to paralyse the target for the duration of the spell. I've worked quite a bit on it and so far I haven't been able to figure out how to do it effectively. I've been thinking about using the cast command. But again it does not seem to work even if the script compiles correctly. Here is the script I've come up with so far. It only includes what is fully working. Scriptname knockoutspellscript extends activemagiceffect Event OnEffectStart(Actor akTarget, Actor akCaster) if akTarget.isdead () aktarget.DispelAllSpells () else akcaster.pushactoraway(aktarget,0.1) aktarget.setnotshowonstealthmeter(true) aktarget.setalert (false) aktarget.setunconscious () utility.wait (28) aktarget.setnotshowonstealthmeter(false) aktarget.setalert () aktarget.setunconscious(false) endif endevent
  14. Hello there ! Being new at modding I'm trying to figure out what function or command I need to prevent the casting of a spell on a target while its effect is already affecting it? Any ideas?
×
×
  • Create New...