Jump to content

tunaisafish

Premium Member
  • Posts

    544
  • Joined

  • Last visited

Everything posted by tunaisafish

  1. I've not tested, but I think the 200 will pick up the 42 (NPC's) and the CREAtures too. If you want to check a vanilla follow is found in the walk then this should work... if ref.IsInList NPCFollowersLIST I totally agree with you about not refwalking too frequently. I've been programming for 30 years now and still have it in my head that CPU cycles and RAM are precious things :)
  2. You use ref variables just the same as you'd use the static ref. ref rTgt set rTgt to CraigBooneREF So now you can use rActorREF.IsKiller rTgt Changing the previous code a little, MyTmpFormList can store companion and teammate refs Just a note about a possible cause of CTD's. When using 2 lists like this you may need to ensure that rActorRef != rTgt. (I had a script of mine hang before when using a container function where the source was the target.) Can easily be avoided above as could add a GetDead == 0 condition to the part populating MyTmpFormList. Of course in the ';Do stuff' part you may also need to make sure you don't 'do stuff' repeatedly :/ The good thing about caching the 'teammates' into a temp fomlist is that it only needs to be updated infrequently. You could also have it completely empty when not in combat... just thinking out loud here really :) FWIW, I've not looked closely at the companion and teammate code but I don't *think* they are related. teammates are the temporary followers? Like the injured NPC you find in the caves in a big mountain. The vanilla followers all seem to be refered to individually and there are 2 flags you need to check to see if they are curently with the player. (something like isHired && !Resting) I've no idea how to identify the companions from new-follower mods if you want to make yours compatible with those. EDIT: Sorry, I didn't explain how to find the ref name's like CraigBooneREF Finding the refs of NPC's (and general GECK searching) The vanilla follower baseforms are listed in NPCFollowersLIST If you type one of those (eg CraigBoone) in the 'filter' box and select to show all forms you'll see it. Right click the baseform and choose 'use info'. In the bottom pane you'll see that there is a reference in some interior cell, just double-click that to open the cell and have the reference highlighted. You could do that for each NPC in the list, but there are lots of ingame scripts that already use the vanilla refnames. To find them, Choose 'Edit->Find Text' from the main menu, and search for CraigBooneREF Under the scripts tab, you'll see many scripts. VUltraLuxeInteriorDoorSCRIPT is one that lists them all.
  3. Yep, you got it :thumbsup: A file *can* have the 'esp' extention and also have the master flag set, but that's not what we are doing here. FNVMasterUpdate uses that technique. The master flag is needed to make things like navmeshes work correctly. But FNVMasterUpdate can also break mods (My Sortomatic-AWOP breaks). I believe this is because a flagged-master cannot overide references in another master. I'll try to explain what is happening when you add another file to the Master List. Say your patchmod has a header linked your your mainmod and foreignmod (by another modder) The patchmod header is a lookup table (These could just as easily be named *.esm - that's not important) A = mainmod.esp B = foreignmod.esp When you edit your patchmod with a link to an editorID in one of the masters, then only the last 6 characters of the EditorID are stored, together with the index in the lookup table. A,12346 When the game loads, all the esm's and esp files have their first 2 digits replaced. So we have another lookup table here. Depending on load-order mainmod.esp and foreinmod.esp will have all their first 2 digits replaced. (Lets say this is 05 and 0A respectively) So using the 2 lookup tables... A, 123456 => mainmod.esp, 123456 => 05, 123456 So whether the file in the master list actually has the master flag set or not is unimportant. Hope that makes sense :)
  4. One way to do it... Open FOMM Right click your slave mod and choose TESsnip Choose Edit->AddMaster (then select the esp you wish to link to) Edit->Save Now go to GECK and choose the slave mod as your active file. The masters will be loaded automatically. So now your 2 esp's will both need to be loaded ingame. Supply load order notes to users that the master esp comes first. EDIT: @deu58 lol we appear to be ninja'ing eachother. I just noticed totaoy you ninj'd me in another thread yesterday. So my turn today ;) @Kasdar You also asked how to reverse the op. To be honest I'd think it best to keep a pre-linkage slave esp around. Once you edit the slave.esp with links to the master.esp then you'd have to keep a track of what you edited that depends on the master. You can simply open the slave.esp with FNVEdit and delete the master from the header section. which will leave invalid links around. If you then open the slave in GECK it will silently remove *most* of these (formlist entries etc.), but your linked scripts will no longer compile.
  5. The weapons that use a particular caliber have a pointer to the caliber formlist. Take a look at the formlist AmmoList50MG. Add your new ammo to the end of that list. There's a lot of other things to edit too to make your new ammo available in levelled lists and vendors etc. But you don't need to reinvent the wheel - take a look at the CaliberX mod.
  6. 1&2 yes. Look for the modder 'Imp of the Perverse' (IMCN and PPA) It's in one of those. 3, I've not seen.
  7. The magic number is 4096. See the Units page on the GECK Wiki. -70,992 / 4096 = -17.something => Grid -18 2560 / 4096 = 0.something => Grid 0
  8. Yep that will work :) But effieciency is a pet peeve of mine. 1/ Always test least CPU intensive conditions first. A simple test for equality is faster than calling a function and then testing equality. So the order of the tests should be... if ( (hasit == 0) && (player.GetPermanentActorValue Perception == 10) ) 2/ Caveat: The && and || operators do not act like they do in most other languages In most languages, the l.h.s. operation is evaulated first and the r.h.s. op is skipped if the whole result is already known. eg. in the following examples the 'Some expensive operation' will *never* be evaluated in most languages... if ((1 == 0) && (Some expensive operation)) if ((1 == 1) || (Some expensive operation)) However, the GECK scripting language does not have this efficiency shortcut. Both sides are *always* evaluated regardless of the l.h.s. result. So for the above example it is more efficient to use 2 'if' statements. if (hasit == 0) if (player.GetPermanentActorValue Perception == 10) endif endif 3/Always stop your quests when they have served their purpose. Once the quest script has added the perk, then it serves no further use. So we can change the code to... scn (name and make a quest script) begin GameMode if (player.GetPermanentActorValue Perception == 10) player.addperk (name of perk) StopQuest (name of this quest) endif end I would also increase the default time that the quest script runs. If you leave it at the default value then the quest will run every 5 seconds. For this type of script I'd set the 'Script Processing Delay' to 60 seconds or more.
  9. You could cache the inner loop refs to a formlist. I'm not sure exactly what refs you are trying to scan over. But looking at your recent questions you are scanning teammates and dead actors? The scan for the inner loop teammates could also use the static refs of the standard companions (you mean the ones in NPCFollowersLIST?) As you are using nested loops, then for efficiency do all the processing of the potential 'killers' once outside of the main loops and sotre the valid refs to MyTmpFormList. Something like the code below could be used...
  10. Nested loops are not a problem. Just make sure to use different integers for your labels. Only one of the loops may use refwalking though. GetNextRef cannot nest.
  11. I can just imagine the trial and error stages for that. Great detective work :) kudos+ and a beer should we ever meet.
  12. Simple typo... scnZZSRblah needs a space after 'scn' I'm *really* going to miss GeckPU. I make those kind of mistakes all the time.
  13. There's a reference to the Pulse Gun in the TunaSCDSWeapUniq formlist (Sortomatic-AWOP). Looking at version .6 that weapon is also on another 4 ingame formlists, 1 cell and a container. I've been following this thread and scratching my head along with you. The only 'new' idea I've got may be a red-herring, but may be related to the sleep problem. I think I recall someone saying they have had the sleep problem in a version prior to the latest patches. I noticed just yesterday that there's a new sleep script function (00001279 0000 ShowSleepWaitMenu), though I can't see any use of it ingame. I think this was introduced with the DM patch, so it could be evidence that the core sleep functions were changed in some way then. Though *if* that were the cause, then it would probably be a more widespread problem.
  14. Take a look at FNVEdit and the manual. There's instructions there for merging files together. It's not an automatic process though, so it would be a good idea to plan out which parts each of you would be doing, and create a skeleton file to start with.
  15. Have you tried declaring the quantity variable as an integer? set iOmniConvert2 to (fOmniConvert * 10 + 0.5) If you've got NVSE installed, also use the printtoConsole function so you can test that your script logic matches the logic you've got in your head :) printc "Trying to add %.0f Gels" iOmniConvert2
  16. Try it on a different key. If the game is entering VATS mode then running an animation on the player at the same time is probably asking for trouble.
  17. Look for... Name: Follower Home Marker Author: pintocat I have mine wait for me just beyond the black stump.
  18. What's the default type of form scanned for when you don't specify any params to GetFirstRef? If it is an actor, then could that include the player? I could see that crashing if enemy == player.
  19. btw, I wasn't saying FNV *didn't* use them :) You're talking to someone with the artistic talent of a dung beetle. I stay well away from graphics when I can. If they are in the files then yep I guess they are used. As to why no modellers have yet replied... as ozziefire said it's still early. Your question was also asking if anyone had actually *experimented* with the values. So no need to be shocked ;) There are lots of very talented modellers on these boards.
  20. The last time I heard that term was back when I was modding TS2 (coding not modelling). Not *all* engines use them. SL assets use just one flat image on a prim surface. At a crowded place we used to get the girls to take their hair and jewelry off to ease the lag. Yes I'm sure if I zoomed into their diamond ring it would look very pretty... but downloading 30k for every pixel of sparkle was a bit much sometimes. This link will get you to the dds :) BSA files
  21. The repair menu will un-grey when you select an item in your pipboy that can be repaired from other items in your inventory. So selecting on a stack of 'like' items will un-grey the menu if they are not at 100%. <shameless plug> If you are lucky enough to live in a house with Sortomatic (see sig.), then you can have the system retrieve all relevant repair items from stock. It also takes into account the extra items you can use to repair if you have the Jury Rigging perk. </shameless plug>
  22. Repair kits don't work through the repair menu. Equip the crappy weapon you wish to repair, then in the pipboy click the repair kit.
  23. Here's a good link on Tokens. The most important part about tokens is the non-playable flag. It is this flag that affords the token some protection against being accidentally removed by other mods or ingame scenario's such as simulators etc. (ie. RemoveAllItems, RemoveAllTypedItems will avoid it). The link talks exclusivley about tokens being used as code vessels, but a codeless token can be just as useful by just checking for its' existence in an inventory. If you plan on adding a menu, which sounds the best approach to me, then if you follow Cipscis tutorial it leads you through the setup using a menu token. What might be a good idea for the different holodisks is using Notes. The player could find a misc item (that can use the holodisk nif for appearance sakes). The code in that item would just contain some simple code... OnAdd if GetHasNote ProgramNoteSniper == 0 AddNote ProgramNoteSniper endif RemoveMe End Your menu's can use the GetHasNote conditional to hide the menu options when the note is not present. There's another 'technique' that you may find handy for projects that have a lot of variables and state data. The variable resource quest - It's a quest that never actually starts. The main script just contains some variable definitions. So in some way it's like having your own personal Globals. If you decided that the holodisks could only be used in one android at a time, then you could use variables here to keep track of how many of each tape were owned, and how many were in use. There are dozens of ways to skin a cat though :)
×
×
  • Create New...