Jump to content

Sweet6Shooter

Premium Member
  • Posts

    84
  • Joined

  • Last visited

Everything posted by Sweet6Shooter

  1. Okay, looks like you don't have to do "player.command" Just "command value baseform" I just totally misunderstood the way that the information on these commands was presented in the wiki.
  2. Solved, see here: https://forums.nexusmods.com/index.php?/topic/10411073-why-does-setammo-fail-to-work-and-break-all-proceeding-options/
  3. Well, looks like I actually figured it out. Even though the wiki implies that putting "WeaponEID.setammo AmmoList" will work, putting "player.setammo AmmoList WeaponEID" fixes the issue. How dumb.
  4. So I've tried editing the ammo of a weapon in a script, and the "setweaponammo.baseform formlist" command not only fails to change the weapon's ammo, but it also prohibits the rest of the lines in the script from working. I've got this script right here: scn sDCSCPTStartup3 array_var 12GaChildren int SimpleRealism int ChanceBoth begin gamemode if GetGameRestarted printc "dc a 2 sc 3 restart" if GetINIFloat "Unique Changes:sBackwaterRifle" "DC Arsenal Config.ini" == 1 DLC04WeapUniqueRewardRifle.setammo NVDLC02AmmoList45Auto endif printc "dc a 2 sc 3 end" endif end If the setammo line is removed, the end console print fires. If it's there, it doesn't fire. Doesn't do anything different if I use a specific ammo instead of a formlist, or add the baseform afterwards, like it's detailed in the wiki. https://geckwiki.com/index.php?title=SetWeaponAmmo Can someone please offer some advice as to what's up? I'd really like to be able to make these changes in scripts.
  5. So I've got this script to redo a bunch of the stats on the SMMG and Minigun, to go along with a rechamber. The problem is, it just... won't do the stuff inside the config ini checks. I've used GetINIFloat in game to see if it's just not finding the ini or something, but all the values are visible to the console in game when I check them. The "script update" and "game restarted" prints are totally firing, so it's not that the script isn't tied to it's startup quest. Any ideas? This thing is basically ready to release once this dumb issue goes away and I can test it. scn sssSCPTMinigunSMMGRechambers begin Gamemode printc "script update" if GetGameRestarted printc "game restarted" if GetINIFloat "Settings:sSMMG" "Rechamber Config.ini" == 1 NVDLC04WeapSMMG.setweaponammo AmmoList556mm printc "ammo set smmg" NVDLC04WeapSMMG.setattackdamage 17 NVDLC04WeapSMMG.setweaponminspread 0.6 setweaponfirerate 12.5, NVDLC04WeapSMMG NVDLC04WeapSMMG.setweaponcritchance 1.0 NVDLC04WeapSMMG.setweaponcritdamage 12 SetPickupSound NVDLC04WeapSMMG UIItemGunsBigUp SetPutDownSound NVDLC04WeapSMMG UIItemGunsBigDown SetWeaponShellCasingModel NVDLC04WeapSMMG "weapons\2handautomatic\assaultrifleshellcasing.nif" LListClear NVDLC04WithAmmoSMMGSpecial LeveledListAddForm NVDLC04WithAmmoSMMGSpecial NVDLC04CondSMMGNPC 1 1 1.0 LeveledListAddForm NVDLC04WithAmmoSMMGSpecial Ammo556mmArmorPiercing 1 1 1.0 LeveledListAddForm NVDLC04WithAmmoSMMGSpecial Ammo556mmArmorPiercing75 1 25 1.0 LeveledListAddForm NVDLC04WithAmmoSMMGSpecial Case556mm75 1 18 1.0 LListClear NVDLC04WithAmmoSMMG LeveledListAddForm NVDLC04WithAmmoSMMG NVDLC04CondSMMGNPC 1 1 1.0 LeveledListAddForm NVDLC04WithAmmoSMMG Ammo556mm 1 1 1.0 LeveledListAddForm NVDLC04WithAmmoSMMG Ammo556mm75 1 25 1.0 LeveledListAddForm NVDLC04WithAmmoSMMG Case556mm75 1 18 1.0 NVDLC04Road02Crate.baseremoveitem LootAmmo10mmDouble 99 NVDLC04Road02Crate.baseadditem LootAmmo556mmDouble 15 if GetINIFloat "Settings:sSMMGScript" "Rechamber Config.ini" == 1 NVDLC04WeapSMMG.setscript sssSCPTSMMGBurstFire elseif GetINIFloat "Settings:sSMMGScript" "Rechamber Config.ini" == 2 NVDLC04WeapSMMG.setscript sssSCPTSMMGRechamber elseif GetINIFloat "Settings:sSMMGScript" "Rechamber Config.ini" == 3 NVDLC04WeapSMMG.setscript sssSCPTSMMGRechamberBurst endif endif if GetINIFloat "Settings:sSMMGSoundChange" "Rechamber Config.ini" == 1 SetWeaponSound NVDLC04WeapSMMG 0 WPNRifleAssaultFire3D SetWeaponSound NVDLC04WeapSMMG 1 WPNRifleAssaultFire3DDist SetWeaponSound NVDLC04WeapSMMG 2 WPNRifleAssaultFire2D endif if GetINIFloat "Settings:sMinigun" "Rechamber Config.ini" == 1 WeapMinigun.setweaponammo AmmoList308 printc "ammo set minigun" WeapMinigun.setattackdamage 18 setweaponfirerate 17, WeapMinigun WeapMinigun.setweaponcritdamage 18 SetPickupSound WeapMinigun UIItemGunsBigUp SetPutDownSound WeapMinigun UIItemGunsBigDown SetWeaponItemModValue WeapMinigun 1 0.2 SetWeaponShellCasingModel WeapMinigun "Projectiles\762mmCasing.NIF" SentryBotMinigun2HR.setweaponammo Ammo308 HVBrokenWeapMinigun.setweaponammo Ammo308 WeapNVMinigunUnique.setweaponammo AmmoList308 WeapNVMinigunUnique.setattackdamage 19 setweaponfirerate 24, WeapNVMinigunUnique WeapNVMinigunUnique.setweaponcritdamage 19 SetPickupSound WeapNVMinigunUnique UIItemGunsBigUp SetPutDownSound WeapNVMinigunUnique UIItemGunsBigDown SetWeaponShellCasingModel WeapNVMinigunUnique "Projectiles\762mmCasing.NIF" NVDLC04SentryBotMinigun2HR20.setweaponammo AmmoList308 NVDLC04SentryBotMinigun2HR30.setweaponammo AmmoList308 NVDLC04SentryBotMinigun2HR40.setweaponammo AmmoList308 NVDLC04SentryBotMinigun2HR50.setweaponammo AmmoList308 NVProspectorMaleWDEADDevilsThroat.baseremoveitem ammo5mm 999 NVProspectorMaleWDEADDevilsThroat.baseadditem ammo30875 233 LListClear WithAmmoMiniGunNPC LeveledListAddForm WithAmmoMiniGunNPC CondMinigunNPC 1 1 1.0 LeveledListAddForm WithAmmoMiniGunNPC Ammo308 1 25 1.0 LeveledListAddForm WithAmmoMiniGunNPC Ammo30875 1 55 1.0 LeveledListAddForm WithAmmoMiniGunNPC Case30875 1 24 1.0 LListClear ClipMinigun240 LeveledListAddForm ClipMinigun240 Ammo308 1 60 1.0 LeveledListAddForm ClipMinigun240 Ammo30875 1 60 1.0 LListClear WithAmmoMiniGunSupermutant LeveledListAddForm WithAmmoMiniGunSupermutant CondMinigunSupermutant 1 1 1.0 LeveledListAddForm WithAmmoMiniGunSupermutant Ammo308 1 20 1.0 LeveledListAddForm WithAmmoMiniGunSupermutant Ammo30875 1 40 1.0 LeveledListAddForm WithAmmoMiniGunSupermutant Case30875 1 60 1.0 LListClear WithAmmoMiniGunLoot LeveledListAddForm WithAmmoMiniGunLoot CondMinigunLoot 1 1 1.0 LeveledListAddForm WithAmmoMiniGunLoot Ammo308 1 20 1.0 LeveledListAddForm WithAmmoMiniGunLoot Ammo30875 1 40 1.0 LeveledListAddForm WithAmmoMiniGunLoot Case30875 1 60 1.0 LListClear WithAmmoMiniGunChupacabraNightkin LeveledListAddForm WithAmmoMiniGunChupacabraNightkin WeapMinigun 1 1 0.12 LeveledListAddForm WithAmmoMiniGunChupacabraNightkin Ammo308 1 20 1.0 LeveledListAddForm WithAmmoMiniGunChupacabraNightkin Ammo30875 1 40 1.0 LeveledListAddForm WithAmmoMiniGunChupacabraNightkin Case30875 1 60 1.0 LListClear WithAmmoMiniGunLootSpecial LeveledListAddForm WithAmmoMiniGunLootSpecial CondMinigunLoot 1 1 1.0 LeveledListAddForm WithAmmoMiniGunLootSpecial Ammo308ArmorPiercing 1 20 1.0 LeveledListAddForm WithAmmoMiniGunLootSpecial Ammo308ArmorPiercing75 1 40 1.0 LeveledListAddForm WithAmmoMiniGunLootSpecial Case30875 1 60 1.0 CrSentryBotMG.baseremoveitem ammo5mm 999 CrSentryBotMG.baseremoveitem ammo5mm75 999 CrSentryBotMG.baseadditem ammo308 30 CrSentryBotMG.baseadditem ammo30875 30 CrSentryBotMGHard.baseremoveitem ammo5mm 999 CrSentryBotMGHard.baseremoveitem ammo5mm75 999 CrSentryBotMGHard.baseadditem ammo308 40 CrSentryBotMGHard.baseadditem ammo30875 40 V22Koch.baseremoveitem ammo5mm 999 V22Koch.baseremoveitem ammo5mm75 999 V22Koch.baseadditem ammo308 30 V22Koch.baseadditem ammo30875 30 NVDLC03CrSentryBot01.baseremoveitem ammo5mm 999 NVDLC03CrSentryBot01.baseremoveitem ammo5mm75 999 NVDLC03CrSentryBot01.baseadditem ammo308 30 NVDLC03CrSentryBot01.baseadditem ammo30875 30 NVDLC03CrSentryBot01Respawn.baseremoveitem ammo5mm 999 NVDLC03CrSentryBot01Respawn.baseremoveitem ammo5mm75 999 NVDLC03CrSentryBot01Respawn.baseadditem ammo308 30 NVDLC03CrSentryBot01Respawn.baseadditem ammo30875 30 NVDLC03CrSentryBot01Respawn.baseremoveitem ammo5mm 999 NVDLC03CrSentryBot01Respawn.baseremoveitem ammo5mm75 999 NVDLC03CrSentryBot01Respawn.baseadditem ammo308 30 NVDLC03CrSentryBot01Respawn.baseadditem ammo30875 30 NVDLC03CrSentryBotBoss.baseremoveitem ammo5mm 999 NVDLC03CrSentryBotBoss.baseremoveitem ammo5mm75 999 NVDLC03CrSentryBotBoss.baseadditem ammo308 50 NVDLC03CrSentryBotBoss.baseadditem ammo30875 50 NVDLC04CrSentryBotMGArmy01.baseremoveitem ammo5mm 999 NVDLC04CrSentryBotMGArmy01.baseremoveitem ammo5mm75 999 NVDLC04CrSentryBotMGArmy01.baseadditem ammo308 50 NVDLC04CrSentryBotMGArmy01.baseadditem ammo30875 50 BMMinigunTrunk.baseremoveitem ammo5mm75 999 BMMinigunTrunk.baseadditem ammo30875 100 if GetINIFloat "Settings:sMinigunScript" "Rechamber Config.ini" == 1 NVDLC04WeapSMMG.setscript sssSCPTMinigunRechamber endif endif if GetINIFloat "Settings:s9mmGreaseGun" "Rechamber Config.ini" == 1 setweaponfirerate 24, WeapNV9mmSubmachineGun endif if GetINIFloat "Settings:s9mmGreaseGunScript" "Rechamber Config.ini" == 1 WeapNV9mmSubmachineGun.setscript sssSCPTGreaseGunJunkRounds endif endif end
  6. So I've set up a startup script in my mod that rechambers TTW's combat shotgun to 20 ga., and I made this optional script to be added to the weapon's base form, to try to catch any instances where another modder made their own WithAmmo for it and provide the correct ammo. I've had the script check that it's not being added to the player, a companion, or someone that already got their ammo exchanged. I did the last part using a dud non-playable ammo. Are there any other conditions that I should check for, to make sure that there's no circumstance where the script becomes an ammo fountain? Script: scn sDCSCPTOnAddCombatShotgun ref container int count begin onadd Container = GetContainer if (container != playerref) && (container.GetPlayerTeammate == 0) && (container.getitemcount sDCAmmoDud == 0) count = (Container.GetItemCount AmmoList12ga) if (count > 0) && (Container.GetitemCount AmmoList20ga == 0) container.removeitem AmmoList12Ga 99 container.removeitem Hull12ga 99 count = (count * 2) Container.additem Ammo20Ga count container.additem Hull20Ga75 count Container.additem sDCAmmoDud 1 endif endif end
  7. Here's a pastebin of all the ballistic weapon leveled lists I use when I integrate a weapon script, and a couple of merchant lists near the bottom: https://pastebin.com/eD9aiKf3 You'll need to take out the ones that aren't appropriate for assault rifles. The lines are formatted using JIP commands, to make sure the additions aren't save baked. Here's a pastebin of a burst fire script that DC Uniques uses (permissions are not open, please don't just reuse this): https://pastebin.com/WGDYhYE2 It'll make the weapon's barrel reciprocate three times, but I just provided it as an example in case you wanted to try the scripted burst route.
  8. For some reason, doing that crashes the game? It does so in a very similar manner to the initial gamehour change, where it loads in for a second, then hangs and crashes. EDIT: Nope, it looks like it was still the gamehour change crashing the game again, and I somehow got a fluke where it didn't crash a few times in a row.
  9. This ended up being the final script that worked correctly: scn sDMSCPTDryCtoMojave short sButtons float sEnds float sSurvs float sIngestPenalty float sSleepPenalty short fExit ref rCompanion begin onActivate if (IsActionRef player == 1) showMessage sDMMSGLeaveDryCtoMojave endif end begin menumode 1001 set sButtons to GetButtonPressed if sButtons == -1 return elseif sButtons == 0 set fExit to 1 elseif sButtons == 1 return endif end begin gamemode if fExit == 1 RemoveImageSpaceModifier FriendOfTheNightInteriorISFX RemoveImageSpaceModifier FriendOfTheNightISFX player.DispelAllSpells ; Removes all chem effects. PipBoyRadioOff ; Turn off PipBoy radio. if player.getitemcount sDMWeapFlareGunDryC == 0 player.additem sDMWeapFlareGunDryC 1 endif set rCompanion to 0 If (VNPCFollowers.bBooneHired == 1) set rCompanion to CraigBooneRef ElseIf (VNPCFollowers.ArcadeHired == 1) set rCompanion to ArcadeREF ElseIf (VNPCFollowers.bCassHired == 1) set rCompanion to RoseofSharonCassidyRef ElseIf (VNPCFollowers.bVeronicaHired == 1) set rCompanion to VeronicaRef ElseIf (VNPCFollowers.RaulHired == 1) set rCompanion to RaulRef EndIf if rCompanion rCompanion.moveto sDMPostDryCMarker endif set rCompanion to 0 if sDMCarMerRef.GetDead == 1 if sDMCarMerRef.GetDisabled == 0 sDMCarMerRef.disable sDMCarMerRef.markfordelete sDMCarBrahminRef.disable sDMCarBrahminRef.markfordelete endif endif if sDMCarBrahminRef.GetDead == 1 if sDMCarBrahminRef.GetDisabled == 0 sDMCarMerRef.disable sDMCarMerRef.markfordelete sDMCarBrahminRef.disable sDMCarBrahminRef.markfordelete endif endif if (sDMCarMerRef.GetDisabled == 1 || sDMCarBrahminRef.GetDisabled == 1 || sDMCarMerRef.GetDead == 0 || sDMCarBrahminRef.GetDead == 0) set sIngestPenalty to 200 set sSleepPenalty to 200 set sEnds to player.getpermanentactorvalue Endurance set sSurvs to player.getpermanentactorvalue Survival set sEnds to 1 - (sEnds/10) set sSurvs to 1 - (sEnds/100) set sIngestPenalty to (sIngestPenalty * sEnds * sSurvs) set sSleepPenalty to (sSleepPenalty * sEnds * sSurvs) player.damageAV hunger sIngestPenalty player.damageAV dehydration sIngestPenalty player.damageAV SleepDeprevation sSleepPenalty endif player.moveto sDMPostDryCMarker set GameHour to (GameHour + 18) endif end
  10. Wait, hang on, it works out fine, but I have to remove that menumode condition criteria you put in. Something about it makes the script not work right, and there aren't any other issues with the menu popping up or doing things it shouldn't during other messages. EDIT: And it also fixes the gamehour change crash. Excellent!
  11. Yeah, I did the print for it, and it totally sets it, the script just doesn't register the gamemode section. Maybe it's because it's an activator script?
  12. So I ended up adjusting the hardcore penalties into the gamemode block along with the transit lines. The issue at the moment seems to be that the gamemode part of the script isn't firing, even when it's variable is set to 1. It's successfully checking the gamemode, but it doesn't want to recognize fExit being 1. scn sDMSCPTDryCtoMojave short sButtons float sEnds float sSurvs float sIngestPenalty float sSleepPenalty short fExit ref rCompanion short bShowMenu begin onActivate if (IsActionRef player == 1) showMessage sDMMSGLeaveDryCtoMojave set bShowMenu to 1 endif end begin menumode 1001 if bShowMenu != 1 return elseif bShowMenu == 1 set sButtons to GetButtonPressed set bShowMenu to 0 if sButtons == -1 return elseif sButtons == 0 set fExit to 1 elseif sButtons == 1 return endif endif end begin gamemode printc "gamemode checked" if fExit == 1 printc "fexit is 1" RemoveImageSpaceModifier FriendOfTheNightInteriorISFX RemoveImageSpaceModifier FriendOfTheNightISFX player.DispelAllSpells ; Removes all chem effects. PipBoyRadioOff ; Turn off PipBoy radio. if player.getitemcount sDMWeapFlareGunDryC == 0 player.additem sDMWeapFlareGunDryC 1 endif set rCompanion to 0 If (VNPCFollowers.bBooneHired == 1) set rCompanion to CraigBooneRef ElseIf (VNPCFollowers.ArcadeHired == 1) set rCompanion to ArcadeREF ElseIf (VNPCFollowers.bCassHired == 1) set rCompanion to RoseofSharonCassidyRef ElseIf (VNPCFollowers.bVeronicaHired == 1) set rCompanion to VeronicaRef ElseIf (VNPCFollowers.RaulHired == 1) set rCompanion to RaulRef EndIf if rCompanion rCompanion.moveto sDMPostDryCMarker endif set rCompanion to 0 if sDMCarMerRef.GetDead == 1 if sDMCarMerRef.GetDisabled == 0 sDMCarMerRef.disable sDMCarMerRef.markfordelete sDMCarBrahminRef.disable sDMCarBrahminRef.markfordelete endif endif if sDMCarBrahminRef.GetDead == 1 if sDMCarBrahminRef.GetDisabled == 0 sDMCarMerRef.disable sDMCarMerRef.markfordelete sDMCarBrahminRef.disable sDMCarBrahminRef.markfordelete endif endif if (sDMCarMerRef.GetDisabled == 1 || sDMCarBrahminRef.GetDisabled == 1 || sDMCarMerRef.GetDead == 0 || sDMCarBrahminRef.GetDead == 0) set sIngestPenalty to 200 set sSleepPenalty to 200 set sEnds to player.getpermanentactorvalue Endurance set sSurvs to player.getpermanentactorvalue Survival set sEnds to 1 - (sEnds/10) set sSurvs to 1 - (sEnds/100) set sIngestPenalty to (sIngestPenalty * sEnds * sSurvs) set sSleepPenalty to (sSleepPenalty * sEnds * sSurvs) player.damageAV hunger sIngestPenalty player.damageAV dehydration sIngestPenalty player.damageAV SleepDeprevation sSleepPenalty endif player.moveto sDMPostDryCMarker ; set GameHour to (GameHour + 18) set fExit to 0 endif end
  13. Thank you so much for the guidance on this. Looks like I made a similar mistake in another few scripts, this is an excellent example of how to fix them up, I really appreciate it!
  14. I tried moving the gamehour change until after the moveto, which succeeds, but then the game crashes after a couple seconds. I don't think I've changed my timescale, so I don't really know why it's happening.
  15. Okay, so it looks like the GameHour line screws it up. Taking it out fixes the issue. Is there a way to safely pass game time in a script? I can't really find anything on the wiki.
  16. Yeah, if I add a printc below and above it, both print to the console I also double checked the marker reference on the script entry in xEdit, and it's going to the right marker. EDIT: Also, putting the command in the console takes me to the correct location.
  17. So I'm using this script to move the player from a new worldspace called Dry Canyon (yes, that modder's resource) to the Dead Money end of DLC marker, in the abandoned BOS bunker. Everything in the script seems to be working correctly, except the final line that's supposed to move the player. They do get moved, but only like ~20 yards away, to what I believe to be the center of the cell that the activator is in. It runs into this issue, regardless of whether the Dead/Disabled checks are in the script. Any ideas what's up? It's the same function that the original Dead Money transition to mojave script used, I'm not sure why it's acting so strangely. I originally was just using the vanilla NVDLC01EndMarker for the moveto, but I tried adding my own and referencing that, and it didn't change anything. The new marker is literally right next to the original. scn sDMSCPTDryCtoMojave short sButtons float sEnds float sSurvs float sIngestPenalty float sSleepPenalty begin onActivate if (IsActionRef player == 1) showMessage sDMMSGLeaveDryCtoMojave endif end begin menumode 1001 set sButtons to GetButtonPressed if sButtons == -1 return elseif sButtons == 0 RemoveImageSpaceModifier FriendOfTheNightInteriorISFX RemoveImageSpaceModifier FriendOfTheNightISFX player.DispelAllSpells ; Removes all chem effects. PipBoyRadioOff ; Turn off PipBoy radio. if player.getitemcount sDMWeapFlareGunDryC == 0 player.additem sDMWeapFlareGunDryC 1 endif if sDMCarMerRef.GetDead == 1 if sDMCarMerRef.GetDisabled == 0 sDMCarMerRef.disable sDMCarMerRef.markfordelete sDMCarBrahminRef.disable sDMCarBrahminRef.markfordelete endif endif if sDMCarBrahminRef.GetDead == 1 if sDMCarBrahminRef.GetDisabled == 0 sDMCarMerRef.disable sDMCarMerRef.markfordelete sDMCarBrahminRef.disable sDMCarBrahminRef.markfordelete endif endif if (sDMCarMerRef.GetDisabled == 1 || sDMCarBrahminRef.GetDisabled == 1 || sDMCarMerRef.GetDead == 0 || sDMCarBrahminRef.GetDead == 0) set sIngestPenalty to 200 set sSleepPenalty to 200 set sEnds to player.getpermanentactorvalue Endurance set sSurvs to player.getpermanentactorvalue Survival set sEnds to 1 - (sEnds/10) set sSurvs to 1 - (sEnds/100) set sIngestPenalty to (sIngestPenalty * sEnds * sSurvs) set sSleepPenalty to (sSleepPenalty * sEnds * sSurvs) player.damageAV hunger sIngestPenalty player.damageAV dehydration sIngestPenalty player.damageAV SleepDeprevation sSleepPenalty endif set GameHour to (GameHour + 18) playerref.moveto sDMPostDryCMarker elseif sButtons == 1 return endif end
  18. Thanks GamerRick, that's some really helpful stuff, I appreciate you sharing it. I'll probably get around to converting those changes into AGE eventually too, I'm pretty sure the ini call was what makes performance so terrible when Rez-ing out is turned off.
  19. scn NVDLC01GlobalToxicDamageSCRIPT float sHealths float sHealth1 float sHealth2 float sHealth3 float sHealth4 float sHealth5 float sHealth6 float sHealth7 float sHealth8 float sHealth9 float sHealth0 BEGIN GameMode ;If the player is in any interior, or has low health dont do anything. ;Or is Hardcore Off? if (Player.IsInInterior) || (Player.GetAV Health < 35) || (Player.IsHardcore == 0) return elseif (Player.GetInWorldspace NVDLC01Villa) || (Player.GetInWorldspace NVDLC01VillaChristine) || (Player.GetInWorldspace NVDLC01VillaDean) || (Player.GetInWorldspace NVDLC01WestTownN) || (Player.GetInWorldspace NVDLC01WestTownS) || (Player.GetInWorldspace NVDLC01EastTownN) || (Player.GetInWorldspace NVDLC01EastTownS) ;If the player is in specific DLC01 locations, then apply damage. printc "Toxic Script started" set sHealths to PlayerRef.GetEquippedCurrentHealth 0 set sHealths to sHealths * .98 PlayerRef.SetEqCurHealth sHealths 0 set sHealth1 to PlayerRef.GetEquippedCurrentHealth 2 set sHealth1 to sHealth1 * .98 PlayerRef.SetEqCurHealth sHealth1 2 set sHealth2 to PlayerRef.GetEquippedCurrentHealth 3 set sHealth2 to sHealth2 * .98 PlayerRef.SetEqCurHealth sHealth2 3 set sHealth3 to PlayerRef.GetEquippedCurrentHealth 4 set sHealth3 to sHealth3 * .98 PlayerRef.SetEqCurHealth sHealth3 4 set sHealth4 to PlayerRef.GetEquippedCurrentHealth 5 set sHealth4 to sHealth4 * .98 PlayerRef.SetEqCurHealth sHealth4 5 set sHealth5 to PlayerRef.GetEquippedCurrentHealth 7 set sHealth5 to sHealth5 * .98 PlayerRef.SetEqCurHealth sHealth5 7 set sHealth6 to PlayerRef.GetEquippedCurrentHealth 8 set sHealth6 to sHealth6 * .98 PlayerRef.SetEqCurHealth sHealth6 8 set sHealth7 to PlayerRef.GetEquippedCurrentHealth 9 set sHealth7 to sHealth7 * .98 PlayerRef.SetEqCurHealth sHealth7 9 set sHealth8 to PlayerRef.GetEquippedCurrentHealth 10 set sHealth8 to sHealth8 * .98 PlayerRef.SetEqCurHealth sHealth8 10 set sHealth9 to PlayerRef.GetEquippedCurrentHealth 11 set sHealth9 to sHealth9 * .98 PlayerRef.SetEqCurHealth sHealth9 11 set sHealth0 to PlayerRef.GetEquippedCurrentHealth 14 set sHealth0 to sHealth0 * .96 PlayerRef.SetEqCurHealth sHealth0 14 printc "armor health set" if (GetINIFloat "CustomSettings:sCloudHardcorePenalty" "DMT Config.ini") == 1 && (player.getequipped NVDLC04HelmetBreathingMask) == 0 playerREF.DamageActorValue Health 3 playerREF.DamageActorValue RadiationRads 2 ApplyImageSpaceModifier GetHit elseif (GetINIFloat "CustomSettings:sCloudHardcorePenalty" "DMT Config.ini") == 2 && (player.getequipped NVDLC04HelmetBreathingMask) == 0 playerREF.DamageActorValue Health 2 playerREF.DamageActorValue RadiationRads 2 ApplyImageSpaceModifier GetHit elseif (GetINIFloat "CustomSettings:sCloudHardcorePenalty" "DMT Config.ini") == 3 && (player.getequipped NVDLC04HelmetBreathingMask) == 0 playerREF.DamageActorValue Health 2 ApplyImageSpaceModifier GetHit elseif (GetINIFloat "CustomSettings:sCloudHardcorePenalty" "DMT Config.ini") == 4 && (player.getequipped NVDLC04HelmetBreathingMask) == 0 playerREF.DamageActorValue RadiationRads 2 ApplyImageSpaceModifier GetHit endif endif printc "health damage done" END ;
  20. Thanks for the help! Once I lined everything up inside of a single if block and started using the correct functions to actually reference the player's equipped gear, it's all working perfectly! Can't believe I never realized that I was trying to grab armor references with a function that just gets health values. I'll put up the fixed script as an example for anyone looking, but I can't find anywhere describing how to use code tags. Could you point me in the right direction so that I can format it correctly for the forums? EDIT: Nvm, I just have to replace the /spoiler with /code
  21. I'm trying to adjust the Dead Money toxic damage script to damage the player's gear and have ini configurable health/rad penalties, but the script isn't working even though it compiles with no issues. Neither part is working, the health damage or the equipment damage. It's my first time really working with floats and such, so I wouldn't be surprised if there were a rookie mistake in here: scn NVDLC01GlobalToxicDamageSCRIPT float sDmg float sDmg1 float sDmg2 float sDmg3 float sDmg4 float sDmg5 float sDmg6 float sDmg7 float sDmg8 float sDmg9 float sDmg0 float sHealths float sHealth1 float sHealth2 float sHealth3 float sHealth4 float sHealth5 float sHealth6 float sHealth7 float sHealth8 float sHealth9 float sHealth0 ;(Should one of the preceding float sets be int instead?) ref sArmorRef ref sArmorRef1 ref sArmorRef2 ref sArmorRef3 ref sArmorRef4 ref sArmorRef5 ref sArmorRef6 ref sArmorRef7 ref sArmorRef8 ref sArmorRef9 ref sArmorRef0 BEGIN GameMode set sArmorRef to player.getequippeditemref 0 set sArmorRef1 to player.getequippeditemref 2 set sArmorRef2 to player.getequippeditemref 3 set sArmorRef3 to player.getequippeditemref 4 set sArmorRef4 to player.getequippeditemref 5 set sArmorRef5 to player.getequippeditemref 7 set sArmorRef6 to player.getequippeditemref 8 set sArmorRef7 to player.getequippeditemref 9 set sArmorRef8 to player.getequippeditemref 10 set sArmorRef9 to player.getequippeditemref 11 set sArmorRef0 to player.getequippeditemref 14 set sDmg to player.getequippeditemref 0 set sDmg1 to player.getequippeditemref 2 set sDmg2 to player.getequippeditemref 3 set sDmg3 to player.getequippeditemref 4 set sDmg4 to player.getequippeditemref 5 set sDmg5 to player.getequippeditemref 7 set sDmg6 to player.getequippeditemref 8 set sDmg7 to player.getequippeditemref 9 set sDmg8 to player.getequippeditemref 10 set sDmg9 to player.getequippeditemref 11 set sDmg0 to player.getequippeditemref 14 ;(Will these update when the player changes their equipment?) ;If the player is in any interior, or has low health dont do anything. ;Or is Hardcore Off? if (Player.IsInInterior) || (Player.GetAV Health < 35) || (Player.IsHardcore == 0) return elseif (Player.GetInWorldspace NVDLC01Villa) || (Player.GetInWorldspace NVDLC01VillaChristine) || (Player.GetInWorldspace NVDLC01VillaDean) || (Player.GetInWorldspace NVDLC01WestTownN) || (Player.GetInWorldspace NVDLC01WestTownS) || (Player.GetInWorldspace NVDLC01EastTownN) || (Player.GetInWorldspace NVDLC01EastTownS) ;If the player is in specific DLC01 locations, then apply damage. set sHealths to sArmorRef.GetItemRefCurrentHealth set sHealths to sHealths * .97 sArmorRef.SetItemRefCurrentHealth sHealths set sHealth1 to sArmorRef1.GetItemRefCurrentHealth set sHealth1 to sHealth1 * .97 sArmorRef1.SetItemRefCurrentHealth sHealth1 set sHealth2 to sArmorRef.GetItemRefCurrentHealth set sHealth2 to sHealth2 * .97 sArmorRef2.SetItemRefCurrentHealth sHealth2 set sHealth3 to sArmorRef.GetItemRefCurrentHealth set sHealth3 to sHealth3 * .97 sArmorRef3.SetItemRefCurrentHealth sHealth3 set sHealth4 to sArmorRef4.GetItemRefCurrentHealth set sHealth4 to sHealth4 * .97 sArmorRef4.SetItemRefCurrentHealth sHealth4 set sHealth5 to sArmorRef.GetItemRefCurrentHealth set sHealth5 to sHealth5 * .97 sArmorRef5.SetItemRefCurrentHealth sHealth5 set sHealth6 to sArmorRef6.GetItemRefCurrentHealth set sHealth6 to sHealth6 * .97 sArmorRef6.SetItemRefCurrentHealth sHealth6 set sHealth7 to sArmorRef.GetItemRefCurrentHealth set sHealth7 to sHealth7 * .97 sArmorRef7.SetItemRefCurrentHealth sHealth7 set sHealth8 to sArmorRef.GetItemRefCurrentHealth set sHealth8 to sHealth8 * .97 sArmorRef8.SetItemRefCurrentHealth sHealth8 set sHealth9 to sArmorRef9.GetItemRefCurrentHealth set sHealth9 to sHealth9 * .97 sArmorRef9.SetItemRefCurrentHealth sHealth9 set sHealth0 to sArmorRef0.GetItemRefCurrentHealth set sHealth0 to sHealth0 * .94 sArmorRef0.SetItemRefCurrentHealth sHealth0 if GetINIFloat "CustomSettings:sCloudHardcorePenalty" "DMT Config.ini" == 1 if (player.getequipped NVDLC04HelmetBreathingMask == 0) playerREF.DamageActorValue Health 2 playerREF.DamageActorValue RadiationRads 1 ApplyImageSpaceModifier GetHit endif endif if GetINIFloat "CustomSettings:sCloudHardcorePenalty" "DMT Config.ini" == 2 if (player.getequipped NVDLC04HelmetBreathingMask == 0) playerREF.DamageActorValue Health 1 playerREF.DamageActorValue RadiationRads 1 ApplyImageSpaceModifier GetHit endif endif if GetINIFloat "CustomSettings:sCloudHardcorePenalty" "DMT Config.ini" == 3 if (player.getequipped NVDLC04HelmetBreathingMask == 0) playerREF.DamageActorValue Health 1 ApplyImageSpaceModifier GetHit endif endif if GetINIFloat "CustomSettings:sCloudHardcorePenalty" "DMT Config.ini" == 4 if (player.getequipped NVDLC04HelmetBreathingMask == 0) playerREF.DamageActorValue RadiationRads 1 ApplyImageSpaceModifier GetHit endif endif endif END ;GameMode
  22. Thanks for the info y'all, you just saved me a huge headache!
  23. Figured it out: Make sure that when you change your texture path, you remove everything to the left of textures\ in your paths. Leaving it up for posterity. If a mod sees this, feel free to edit the title to say SOLVED
  24. So I'm doing a retexture of mc_tammer's crowbar, and even though the texture looks great in nifskope, when I load it in the game, it uses the texture of the equipped armor? I'm not really sure what I did wrong, I exported the dds with mipmaps and bc3 compression, and the weapon is referencing the right nif. I'd really love some help with this, it seems like a simple step that I just don't know to do. I'm very close to being able to release this retexture and another, much larger mod, once it's done.
  25. I'm trying to refine the categories in https://www.nexusmods.com/newvegas/mods/71714 but the new categories I've sectioned off into "if GetINIFloat... etc." blocks aren't showing up in the leveled lists they're supposed to even though the value is 1 in the ini. I've used the GetINIFloat command in the console to verify that the game can see that the float is indeed 1. I tried moving them to their own script, but that didn't do anything. All the editor IDs are the same as they ever were, there's no errors in the esp, all the references are right in FNVEdit and only referencing things from inside the right plugin. I have absolutely no idea why the new categories just don't function, while all the ones from the last version did. In this script, the dragonfly always shows up, but the radroaches and mutant fly trap never do. Creating a new save without the mod enabled, then loading it in fresh doesn't fix it. EDIT:They seem to show up some places, but not everywhere they should be. The mutated mantis hunter shows up in the Zion lists, but not the generic EncGiantMantis list.
×
×
  • Create New...