Jump to content

ThalonMook

Premium Member
  • Posts

    20
  • Joined

  • Last visited

Everything posted by ThalonMook

  1. Hi, I tried to make it. Atm the patch is not on the right position but it's easy to move ;-) http://www.tzd-online.de/fallout4/SpaceSuitNasa.jpg *edit Ok now it's on the shoulder. http://www.tzd-online.de/fallout4/SPSuit2.jpg Cu Thalon
  2. Ahh thx. This was the missing thing :-) I found all other part names with this info. But one thing I also need to know. How did I get the parts I that where needed for the repair? Cu Thalon
  3. Hi all, is it possible to repair the Power Armor with a script? I searched all papyrus commands but didnt found one that gives the damage of the PA. Thx Thalon
  4. Yeah it works as it should :yes: Thx for your help :thumbsup: Cu Thalon
  5. Hi Plarux, did I understand it right. You want to enter the shelter and then it will teleport you to a special place? CU Thalon
  6. Ok I did it now this way. Scriptname ThalonCompAmmo extends Quest string Property ThalonComp = "ThalonCompAmmo" AutoReadOnly Int ThalonTimerID = 100 Event OnInit() RegisterForExternalEvent("OnMCMSettingChange|ThalonCompAmmo", "OnMCMSettingChange") EndEvent Function OnMCMSettingChange(string modName, string id) ;Debug.Trace("[MCM Quest Script] OnMCMSettingChange modName: " + modName + " id: " + id) If (modName == ThalonComp) If (id == "iSliderAmmo:Main") Int newValue = MCM.GetModSettingInt(ThalonComp, "iSliderAmmo:Main") MCM.SetModSettingInt(ThalonComp, "iSliderAmmo:Main", newValue) ;Debug.Trace("Id: " + id + " Value: " + newValue) MCM.RefreshMenu() ElseIf (id == "bEnabledMunCheck:Main") int iTimer = MCM.GetModSettingInt("ThalonCompAmmo", "iSliderTime:Main") If (MCM.GetModSettingBool("ThalonCompAmmo", "bEnabledMunCheck:Main")) CancelTimer(ThalonTimerID) Debug.MessageBox("Mod enabled") StartTimer(iTimer*60, ThalonTimerID) Else CancelTimer(ThalonTimerID) EndIf EndIf EndIf EndFunction EVENT onTimer(int aiTimerID) Debug.Notification("Überprüfe Begleiter Munitionsvorat!") If (MCM.GetModSettingBool("ThalonCompAmmo", "bEnabledMunCheck:Main")) CheckCompMuni() int iTimer = MCM.GetModSettingInt("ThalonCompAmmo", "iSliderTime:Main") Debug.Notification("Starte Timer " + iTimer + "Min!") StartTimer(iTimer*60, ThalonTimerID) EndIf EndEVENT Function CheckCompMuni() blub blub blub do your thing EndFunction It compiled so I think it will work :D The bEnabledMunCheck:Main is a switch so if it's enabled the value ist true and if disabled it's false. The iSliderTime:Main is a slider that will give the timer length. If the switch is of the timer should be stoped Thx Thalon
  7. Hi thx for your help. In the MCM script there is a function that will be fired when a setting ist changed. I think I can use this to start the timer and maybe stop it. I used the demo script and changed it to my needs. Scriptname ThalonCompAmmo extends Quest string Property ThalonComp = "ThalonCompAmmo" AutoReadOnly Event OnInit() RegisterForExternalEvent("OnMCMSettingChange|ThalonCompAmmo", "OnMCMSettingChange") EndEvent Function OnMCMSettingChange(string modName, string id) ;Debug.Trace("[MCM Quest Script] OnMCMSettingChange modName: " + modName + " id: " + id) If (modName == ThalonComp) If (id == "iSliderAmmo:Main") Int newValue = MCM.GetModSettingInt(ThalonComp, "iSliderAmmo:Main") MCM.SetModSettingInt(ThalonComp, "iSliderAmmo:Main", newValue) ;Debug.Trace("Id: " + id + " Value: " + newValue) MCM.RefreshMenu() ElseIf (id == "bEnabledMunCheck:Main") Debug.MessageBox("Mod enabled") EndIf EndIf EndFunction As you said I want to be sure that the timer will be run only in one script. So that I dont have x timer running. There where the messagebox is called I can start the timer. But I dont how to start it in a seperate script. Or will this script do other stuff when it waits for the timer is down? Then I can start the timer here. Thx Thalon
  8. Hi all, can nobody help me with this? I need the timer start from MCM if the switch is enabled but I dont know how to. What I tried atm is following: ScriptName ThalonCheckInventoryScript extends ScriptObject EVENT onInit() ; This event will run once, when the script is initialized int iTimer = MCM.GetModSettingInt("ThalonCompAmmo", "iSliderTime:Main") Debug.Notification("Starte Timer " + iTimer + "Min!") StartTimer(iTimer*60) gotoState ("waiting") endEVENT STATE waiting EVENT onTimer(int aiTimerID) Debug.Notification("Überprüfe Begleiter Munitionsvorat!") If (MCM.GetModSettingBool("ThalonCompAmmo", "bEnabledMunCheck:Main")) CheckCompMuni() int iTimer = MCM.GetModSettingInt("ThalonCompAmmo", "iSliderTime:Main") Debug.Notification("Starte Timer " + iTimer + "Min!") StartTimer(iTimer*60) gotoState ("waiting") EndIf EndEVENT EndSTATE It works as I need but I know if I disable the switch in MCM it will never run again :-( Thx Thalon
  9. Hi Plarux, for the meshes make a folder with modname in data\meshes and put them there. With the other files you can do the same, e.g data\texture for the textures, but then you have to change the paths in the nif files. If you made own textures and materials then better create the folders. If they are the vanilla ones you dont need them. Cu Thalon
  10. Ok I made a quest 'ThalonCompInventory'. Set 'Start Game Enabled' disabled 'Run Once' Then I added a new script: Scriptname ThalonCheckInventoryScript extends Quest EVENT onInit() ; This event will run once, when the script is initialized StartTimer(20) gotoState ("waiting") endEVENT STATE waiting EVENT onTimer(int aiTimerID) Debug.Notification("20 Sekunden Timer abgelaufen!") endEVENT endSTATE It works an brings a message when the timer is down. Now how I can restart it? *Edit* Ok I learned that OnInit only runs one time :D Then I need a better way to start the script :unsure: It should be startet with an other script from MCM when I activate the setting. How can I do that? Thx Thalon
  11. Hi all, I need to make a script that check the inventory of a companion in a defined time period. I new with papyrus so I need to know how to start a script on an actor/companion. How to get the comainon I know. Also how to manipulate the inventory. I only need the beginning from scratch plz. Ahh ok I also need to make this switchable. So that I can set the companion check on or off. I will use MCM for this. How to make a switch with MCM and how to read or write I know. Thx Thalon
  12. Hi, I seperated the parts. Both are in game. Animation works fine. But Im working on the collitionObject. Atm you can not enter the shell :D *Edit* Ok it works. I removed the CollisionObject from the shell http://www.tzd-online.de/fallout4/ShelterShell.nif http://www.tzd-online.de/fallout4/ShelterDoor.nif Ok short discription what I did: I made 2 copys of the nif. and named them ShelterDoor / ShelterShell Then I removed the shell from the 1st nif with Block->Remove Branch. Saved it. Then I removed all from the 2nd nif exept the shell. After this I also removed the collisionobject. Thats all ;-) Cu Thalon
  13. Ok nobody has an answer :D I found a solution by my self ;-) I moved the CompEnabled script in front of the SetMuni func and set it to global. Now it compiled and work as I want to. Thx Thalon
  14. Hi, I have a problem how to call a function right. Heres the script I wana use. Function SetMuni() global Bool acComp = 0 Debug.Notification("Ammo Anz Start!") int AnzMuni = MCM.GetModSettingInt("ThalonCompAmmo", "iSliderAmmo:Main") Debug.Notification("Anzahl: " + AnzMuni) ;Debug.Trace("Anzahl: " + AnzMuni) Actor[] playerFollowers = Game.GetPlayerFollowers() Actor akActor = playerFollowers[4] acComp = CompEnabled(akActor) Debug.Messagebox(akActor.GetDisplayName() + "<br>Aktiv: " + acComp) EndFunction Bool Function CompEnabled(Actor coActor) If (MCM.GetModSettingInt("ThalonCompAmmo", "bEnabledDeacon:Main") && coActor.GetFormID() == 0x50976) return true ElseIf (MCM.GetModSettingInt("ThalonCompAmmo", "bEnabledVex:Main") && coActor.GetFormID() == 0x49002e1a) return true ElseIf (MCM.GetModSettingInt("ThalonCompAmmo", "bEnabledPiper:Main") && coActor.GetFormID() == 0x49002e1a) return true ElseIf (MCM.GetModSettingInt("ThalonCompAmmo", "bEnabledCait:Main") && coActor.GetFormID() == 0x79305) return true ElseIf (MCM.GetModSettingInt("ThalonCompAmmo", "bEnabledMcCready:Main") && coActor.GetFormID() == 0x2a8a7) return true Endif return false EndFunction This error I got from compiler: cannot call member function CompEnabled in global function setmuni without a variable to call it on How I have to call the function? The 'SetMuni' function I have to declare as global cause I want to start it via hotkey 'cgf "myscript.SetMuni" If there is an other way to start it then I need to know how :-) Thx Thalon
  15. Ok found it out. I looked at the MCM_Demo.psc and saw I have to use: Int AnzMuni = MCM.GetModSettingInt("MCM_Demo", "fSliderValue:Main") Ok other question :smile: Is it possible to make dynamic MCM menus. What I need is that MCM shows all my companions from an array that I create in my scipt. I need to set some parameters to every one of them via the MCM. Cu Thalon
  16. Hi, I want to read a value from the MCM setting file. I found the 'int Function GetModSettingInt(string asModName, string asSetting) native global' command but dont know to use in my script. I realy new on scripting papyrus but I learn fast. So I need a little more info. Atm I use the MCM_Demo to learn how to use the MCM I tried: Int AnzMuni = GetModSettingInt("MCM_Demo", "fSliderValue") it will not compile I think I have to connect this command to the MCM_Demo script or what ever. My script dont have a quest atm and I start it with hotkey and cgf "MyScript.MyFunction" Cu Thalon
  17. Hi, I enhanced my script by copy all the worn armor in an array and equip it after adding the ammo. This works fine. But now I have an other problem. Some weapons have a mod that change the ammo type is used. My script will only refill the original ammo of the weapon. So I will check if the weapon has a mod and the change the type of ammo that will be added. I have some problems with this script. The compiler will not recognise the GetAllMods() command. Heres my script: Function WeaponMod(Weapon compWeapon) int ind = 0 ObjectMod[] weMods = New ObjectMod[0] Actor player = Game.GetPlayer() Weapon currentweapon = player.GetEquippedWeapon() weMods = currentweapon.GetAllMods() while (ind < weMods.Length) if (weMods[ind].HasKeyword("dn_HasReceiver_Converted")) Debug.Messagebox("Waffe: " + currentweapon.GetName() + "<br>" + "Mod: " + weMods[ind].GetDisplayName()) Endif ind += 1 EndWhile EndFunction Also I don know how to use the HasKeyword command right. Cu Thalon
  18. Thx for your fast response. I know the infinite ammo mods but I want them to use ammo ;-) I wrote a script that works. The ammo will be refilled but I have an other issue. See here https://forums.nexusmods.com/index.php?/topic/7068721-ammo-refill-script-will-unequip-companions-armor/ Cu Thalon
  19. Hi all, I wrote a script that will refill the ammo of my companions. Atm I start the script via hotkey. Later I try to do this with quest and edit the settings with MCM. Maybe with the MCM I need also some help :-) I get a array of all followers and check the type of ammo they have equiped. Then I count how much they need and put the needed amount from players inventory to companions. All works fine but after the refill all companions have their default armor equiped. Here's my script: Function CompAmmo(float waitTime) int AddAmmo = 0 Actor player = Game.GetPlayer() Actor[] playerFollowers = Game.GetPlayerFollowers() int index = 0 while (index < playerFollowers.Length) Actor akActor = playerFollowers[index] Weapon currentweapon = akActor.GetEquippedWeapon() Ammo companionammo = currentweapon.GetAmmo() String Ausgabe = akActor.GetDisplayName() String Waffe = currentweapon.GetName() String Muni = companionammo.GetName() int Anzahl = akActor.GetItemCount(companionammo) int CountPlayer = player.GetItemCount(companionammo) if (Ausgabe != "Dogmeat" && Ausgabe != "Deacon") If (Anzahl < 200) AddAmmo = 200 - Anzahl if (AddAmmo > 0) If (CountPlayer > 500) player.RemoveItem(companionammo, AddAmmo) Utility.Wait(0.1) akActor.AddItem(companionammo, AddAmmo) Debug.Messagebox("Name: " + Ausgabe + " Muni: " + Muni + " Anzahl: " + Anzahl + " Waffe: " + Waffe + " Hinzugefügt: " + AddAmmo) Endif Endif Endif Endif index += 1 endWhile EndFunction I hope someone can help me with this. *edit* I checked it also ingame via console. When I use additem to the companion all items are unequiped. Cu Thalon
  20. Hi all, I need to make a mod where your companions will refill their ammo if you command them. I have more than one companion traveling with me. Atm I have 8 Dogmeat included. It's annoying to look in every ones inventory to check if they have enough ammo. So I want to make a box or what ever where the comps can refill the needed ammo. A config menu where you can set different parameters eg. amount of ammo I have some experience with CK and with Papyrus Scripts also with NiFScope and FO4Edit If some one want to work together with me, write a pm. Cu Thalon
×
×
  • Create New...