Jump to content

PushTheWinButton

Premium Member
  • Posts

    240
  • Joined

  • Last visited

Everything posted by PushTheWinButton

  1. Why are there quotation marks around the reference's ID? Also you should have only one GameMode block, containing both if statements. Never use more than one of any block type unless it's something like MenuMode "[different menu code]". You're much better doing this in the quest script or in quest stages because GameMode scripts attached to world objects run every frame, which is bad for performance.
  2. You have two options: 1. Packages have a tab in the GECK so you can add scripts that run when they begin and end. Use AddItem (if they don't already have the clothes) and EquipItem to make them wear the outfit, and UnequipItem and/or RemoveItem to make them unequip the item at the end of the package. The problem with this is that you need a way to re-equip the actor's original clothes after you un-equip the package-specific clothes. 2. You can script the actor and use the OnPackageStart and OnPackageDone blocks to change the actor's clothes. This way you can use a script variable to store the actor's original outfit. An (untested) example: scn CookinTrooperSCRIPT ref rOutfit ;stores the torso armor the actor was wearing prior to starting the cooking package begin OnPackageStart TrooperCookPackage let rOutfit := GetEquippedObject 2 if (GetItemCount OutfitCook < 1) AddItem OutfitCook 1 endif EquipItem OutfitCook end begin OnPackageDone TrooperCookPackage if (GetItemCount rOutfit < 1) AddItem rOutfit 1 endif EquipItem rOutfit end If you know what outfit the actor is wearing by default there's no need to use GetEquippedObject (which is an NVSE function) - just call EquipItem [clothingForm] for the item they should be wearing.
  3. Nope, but you could use the Fallout Wiki to find the editor ID and then you should be able to filter by that with FNVEdit.
  4. You just make a levelled list to contain the item and set the level field to what you want. Add that levelled list to the merchant. It's better to give the merchant a new merchant chest so your mod doesn't conflict with other mods that edit that merchant's inventory. To add the item to rare loot, just add it to the game's default jewellery levelled lists (and set the level as before). They probably have a name like "LLxLootJewelery" or "LLxNPCJewelery" if memory serves.
  5. It sounds more like a mod adds something to those locations that's not scripted very well, or just adds a tonne of objects. You could try looking in FNVEdit see which mods edit the cells. If you find one that's common to the areas where you have issues, that'll likely be the culprit.
  6. I wrote a script to re-implement the repair limit but it had an issue that I couldn't be bothered to troubleshoot. I'm a bit pressed for modding time at the moment. I'll post it here when I'm back at my PC so you can fix it up if you want. I documented the effects of the repair gamesettings in the article section of JSawyer Ultimate Edition if that'll help you weaken repair.
  7. The NVSE Command Docs and the CS Wiki are probably the best two sources for event handler information. The GECK Wiki has some but it's not very complete. An event handler is a script which runs in response to an event sent by NVSE, which is a response to something occurring in-game. The scripts are UDFs (CS Wiki, GECK Wiki) - the links can probably explain better than I can. You UDF could be something like: scn PoisonEvOnHit ref rTarget ref rAttacker int iUses ref rWeapon begin Function { rTarget, rAttacker } let rWeapon := rAttacker.GetEquippedObject 5 if (RefMapGetType "PoisonUses" rWeapon) ;has entry in refmap let iUses := RefMapGetFlt "PoisonUses" rWeapon ;get remaining poison uses rTarget.CIOS TestPoisonEffect let iUses -= 1 ;decrement uses if (iUses) RefMapSetFlt "PoisonUses" iUses rWeapon ;update remaining uses in refmap else RefMapErase "PoisonUses" rWeapon ;out of uses so delete from refmap endif endif endThen the poison effect should be something like: scn PoisonEffectSCRIPT begin ScriptEffectStart ref rWeapon let rWeapon := PlayerREF.GetEquippedObject 5 if (GetWeaponSkill rWeaopon == 38) || (GetWeaponSkill rWeapon == 45) ;weapon is melee or unarmed so can be poisoned RefMapSetFlt "PosionUses" 5 rWeapon ;gives the weapon form 5 poison uses SetEventHandler "OnHit" PoisonEvOnHit "second"::PlayerREF ;only calls the handler when the player hits someone else PlayerREF.AddItem Poison 1 1 ;return the poison as it wasn't used MessageEx "Your current weapon cannot be poisoned." endif end
  8. Ok, I've found the following set of conditions acts as a pretty decent filter: if (IsQuestItem rForm == 0) && (GetWeight rForm == 0) && (GetValue rForm == 0) ;item is probably an armor addon and not armor endifDon't really know how performance intensive that's going to be on a large number of forms, though. Might be better in a different order with ORs instead.
  9. For some reason, armor addons behave like armor when the game is started. GetType returns 24 (armor) and not 96 (armor addon), and GetLoadedType/GetLoadedTypeArray 24 from Lutana NVSE return all armor AND all armor addons. Does anyone know how to differentiate between the two in a script? Armor addons have no weight, value, or DT - but the same goes for some armor items so that doesn't help (some return a value for DR, too) . They both have have equipment slots, and a good number of armor addons also have names, so neither of those are much good either. Similarly, they both have equip types and models, and yes - IsPlayable returns true for armor addons. The best way I've found is to check that weight, value, and DT all equal 0. But I was just wondering: does anyone know of a better way (and am I missing something blatantly obvious)?
  10. So does that mean it works without the GetIsID condition if you use the 1 parameter?
  11. The poison system is all very hardcoded I believe. In Oblivion, and even Skyrim, it's pretty hit and miss trying to detect when they're used, etc so you probably won't have much luck with existing functions. There are still some other ways to implement your changes though. Perhaps you could make poisons not-poisons and then attach a script effect to them, so that when they're used it sets an OnHit event handler with the player as a "second" filter. This could apply a magic effect to any target the player attacks, and you could add extra conditions in the handler script so it only works for melee weapons and/or only the weapon you had equipped when you used the poison. It could then remove itself after a set number of hits. Maybe auxiliary variables from JIP NVSE would be a good way to track remaining hits on a per-form basis? Probably some other details to work out but it's the bare bones of idea, anyway.
  12. Yeah, seems you can. Dang, I thought that would be a great idea. Makes you wonder why they bothered making repair lists for every weapon and armour if they were only going to populate them the same item in 99% of cases. Oh well. Sorry, the GLTA function is a shortened alias for "GetLoadedTypeArray" from the Lutana NVSE Plugin. It returns an array containing all forms of a certain type code, so passing 40 would be weapons. By default it returns forms from all used mods but you can refine it by passing an index. I have a pretty simple script which enforces a repair limit like Fallout 3 which I wrote for JSU. If I can perfect it, I'll post it here so you can reuse it.
  13. 1. Yes, ENBs break image space modifiers. I'm not sure what aspects of them but I know that people who use ENBs have problems with Cateye effects and the Friend of the Night perk in vanilla. Both of these apply a tint to the screen so maybe it's something to do with that but you might want to wait for a second opinion. In my opinion people who use ENBs should use them knowing that they will break some game effects but I can understand if you don't like that YouTubers are unintentionally spreading misinformation because of it - "this mod doesn't work properly", etc. If it is a problem with colour effects you could try making a new fade effect which turns brightness down to zero instead. 2. That's a strange one. All I can say is that the skin mismatch bug can be easily fixed by setting "bLoadFaceGenHeadEGTFiles=1" in Fallout.ini/FalloutPrefs.ini (pretty sure that only Fallout.ini is needed but some people say all the .ini files including the defaults). If you recommend that change in your description you could still use the .esp header. Most users will have the ini set anyway because a lot of mods mention it, other than that I don't know what could cause the issue you're having, sorry. Are you sure that changing the header isn't changing the scripts' formID somehow so breaking the references to it? Might be something to check in FNVEdit.
  14. The console command "tmm 1" adds all the map markers to your pipboy and makes them all possible to travel to. Using "tmm 1,0,1" instead makes them visible but not available for fast travel. "tmm 1" won't update the locations discovered statistic though, and using either of them will probably show map markers that aren't meant to be visible to you yet (e.g. The Prydwen before it's actually arrived). Both are irreversible.
  15. I can't really tell what the script is meant to say - try using the code option when writing your post. You can do logical ANDs and ORs if that's what you're asking: scn aScript begin OnActivate if (PlayerREF.GetItemCount Form01 > 5) && (PlayerREF.GetItemCount Form02 > 10) ;player has more than 5 Form01 and more than 10 Form02 endif if (PlayerREF.GetItemCount Form01 == 1) || (PlayerREF.GetItemCount Form02 == 1) ;player has exactly 1 Form01 or exactly 1 Form02, or both. endif end
  16. I just had a cool idea to fix the easy repairing you mentioned. I know it's not what you wanted but I thought it would be good to mention it. You could remove all items from weapons' repair lists and replace then with Weapon Repair Kits or something. That would mean you couldn't repair a weapon with another weapon - instead you'd need to use the repair interface to fix it with a repair kit or whatever other misc item you wanted the player to use. Fairly quick and easy to do with Lutana NVSE and it utilises the existing game systems so you won't have issues working around it.
  17. If you plan on releasing your mod then you might need to find a way around editing the .xml file, because many people use UI mods which have different files. Yep, I was trying to make the Goodsprings Settlers respawn if killed and it wasn't working. It's one of those things that's really hard to test and I ended up drifting into other things so I never worked it out. I'm not sure if the flags are a persistent change or not either. Most NVSE changes are only in the memory so don't save with the game. Very few are permanent - setting a weapon reference's active mods is the only one that comes to mind right now. It may also be the case that setting flags on a base form isn't permanent whereas settings flags on a reference is. Probably needs testing. A sure-fire and pretty unclean method of getting rid of them would be to just Disable the actors instead of editing the respawn flag. Obviously, this would definitely be permanent but it'd be difficult to reverse if you want your mod to be remove-able. Depends what you're going for.
  18. Two ideas immediately come to mind for the repair question. For the first you could detect when the player is in the inventory menu, then disable the R and Y key and button. You'd need to detect when the player has left the inventory screen (either to game-mode or another menu) and then re-enable the controls so this method would require MenuMode and GameMode blocks with a relatively quick delay. Therefore you need to make sure you doing stuff efficiently or there might be performance concerns. The second idea would be to detect when the player is viewing the inventory screen, then use SetUIFloat to set the <visible> trait of the repair button to 0. This'll be preferable to the other method as it removes the button and so the player won't find it strange that the option is there, but they can't use it. Whatever method you choose, I'd also recommend changing the tutorial and help messages to reflect your changes - those kind of inconsistencies drive me up the wall! Bitmasks can be a bit tricky to get your head around: they're a single integer which is the sum of the binary flags (bits). So if the 1st flag (decimal = 1), 3rd flag (dec = 4), and 4th flag (dec = :cool: are set then the total would be 13. Only one combination could ever add up to this values so that's how it works. Anyway, first you need to retrieve the bitmask using the "Get" function for the flags you're editing, then use SetBit on the retrieved bitmask to set the appropriate flag (bit) to what you want, THEN use the "Set" function for the flags to set them to your edited bitmask them. A word of warning, though - I once tried setting the respawn flag on an actor but I couldn't get it to take effect. The flag was definitely set but I don't know if maybe I was testing it wrong, or the cell wasn't set to reset or something.
  19. I had a quick look when I opened the GECK this morning. Seems it's simpler than I thought. This is the code responsible in the Robo-Scorpion's script: BEGIN OnDeath CastImmediateOnSelf NVDLC03GiantRoboScorpionDeathSpell; END ; OnDeath Basically it casts an actor effect on the Scorpion that has a scripted effect which handles the explosion and dismemberment. All you need to do is use the same code above for the other robots you want to explode. A more universal implementation is possible if you want all robots, even new ones from other mods, to be taken into account - but it requires some pretty advanced scripting. (You can probably ignore this because it goes above and beyond, and I know you said you're new to scripting, but I'll include it as a spoiler for completeness.)
  20. Definitely not in the vanilla game but if they're voiced then it's probably cut content that's been restored by a mod. Are you using anything that restores NPCs? New Vegas Uncut: Outside Bets and Mission Mojave Ultimate Edition are the ones that come to mind.
  21. I'm not at my PC at the moment but here's how I'd go about it: go to the explosion tab in the GECK and filter by something like "roboscorp". If there's an explosion with that name, look at its use info (right click on it) and see when and how it's being used. Just copy that implementation for the other robots. You may run into compatibility issues if it is a completely script based thing but I'm sure there'd be ways about it. My guess is that the Robo-Scorpion's script has an OnDeath block which does an explosion "PlaceAtMe", or triggers a destruction stage on the Scorpion which has the explosion linked to it. Should be simple enough to copy.
  22. You want to edit all the "Camera Shot" forms pertaining to VATS (they're listed under "Special Effects" in the GECK) so that they all have the First Person Camera flag checked. I thought I saw some NVSE script functions which could edit VATS cameras but I can't find any trace of them now so I'm probably mistaken. Not that you need them - it's just better than manually editing each record because it reduces errors and will make your mod more compatible. To reduce your workload, you could add the flag to every record using FNVEdit and Mator's Quick Change script from Automation Tools (they work for any xEdit).That'd make it a 1 minute job so I'd recommend doing it that way instead of manually (which could take a long time seeing as their quite a few forms).
  23. Using an OnAdd and checking the container with GetContainer is probably your best bet. I'm sure there's not going to be any performance issue with using GetContainer, especially since it's confined to an OnAdd block. Alternatively, you could use a quest script to check when the container menu is open and then remove the item, and re-aad it once the menu is closed. Probably over complicated for what you need but just an idea. Add and remove a Bobby Pin or something to force the inventory lists to update after you've moved the item.
  24. You're better referring to the CS Wiki rather than the GECK Wiki for this - the information there is usually more complete. I believe the settings starting with "fCombatSpeak" are the ones you want: http://cs.elderscrolls.com/index.php?title=Category:Settings The effect in NV should be the same as in Oblivion.
×
×
  • Create New...