-
Posts
29 -
Joined
-
Last visited
gman517's Achievements
Contributor (5/14)
0
Reputation
-
Using Form list to check if player has items?
gman517 replied to gman517's topic in Fallout 3's GECK and Modders
So from strenuous testing. I found that when using. if player.GetItemCount <FormlistID> >=1 It will still fire even if some of the items on the list are 0. Does anyone know how to get this simple check working 100% without specifically checking for each item individually in code like below? Is this even possible? or should I just stick with individual checking? if player.GetItemCount item1 >=1 && player.GetItemCount item2 >=1 && player.GetItemCount item3 >=1 && player.GetItemCount item4 >=1 && player.GetItemCount item5 >=1 ;etc Sorry about the bump but I need to know if anyone knows about this. Edit: Updated GetItemCount to include my findings. As that is the first result to a google search of GetItemCount. If there is a better place i should be updating let me know by PM. Also I just realized that the answer to my question is not that its for item testing. but in the case of schematics. It's for removing, and this is how code can be made smaller, it may not make a huge difference in some cases but EVERY LITTLE PIECE adds up in terms of clarity :wink:. See my example below, with the correct tweaks should work a charm for you: This is for those who are unaware of the full usage of FormLists. FormList Example: MySuperGrenadeRecipe Scrap metal Abraxo cleaner turpentine Frag grenade 5.56mm bullets My recipe: scrap metal x1 Abraxo cleaner x1 Turpentine x1 Frag grenade x1 5.56mm bullets x10 if player.GetItemCount SpareParts >=1 && player.GetItemCount AbraxoCleaner >=1 && player.GetItemCount Turpentine >=1 && player.GetItemCount WeapGrenadeFrag >=1 && player.GetItemCount Ammo556mm >=10 player.RemoveItem MySuperGrenadeRecipe 1 player.Removeitem 556mmbullet 10 player.AddItem WeapMySuperGrenade endif ;note how short that got? imagine what difference this can make to your super long recipes! Hope this helps. And I will be adding clarity to some wiki pages in the form of notes over the next few days as an extra helper :wink: -
We all know it. We all HATE it. Here's a simple remedy that fixes this problem for me whenever it occurs: Just Log Off and log back in again. Why does this occur? Microsoft OS users at this point will all know that they are known for shooting themselves in the foot. For some really weird reason. An applications memory in the RAM (could be ANY application) somehow gets corrupted. If you tell this to any microsoft staff they will simply tell you to do a myriad of virus scans. And everything else not related. Logging off and logging back on somehow "resets" the memory. Closing and restarting the application does not have this effect. Don't ask me how this works. But definitely don't ask Microsoft. They won't give you a straight answer. A lot of people say to reboot. I want to finish this tip by saying that Logging off and logging back can solve and even prevent a lot of problems and is quicker. I have found that this occurs on a brand new just reformatted system. I would consider reboots a more advanced... more last resort option. Edit: Another Option Before Logging off: Make sure the error is still showing. Do Not click OK In Your Task manager (ctrl alt del) find "GECK.exe *32". Right click and "close process tree" Then try to start it again. Hope this helps someone.
-
Using Form list to check if player has items?
gman517 replied to gman517's topic in Fallout 3's GECK and Modders
Guess I need to just mess around with the code in that case. So my question should be: How do I check for a specific number of each item from the form list? Since GECK only allows you to add the items to the form list but not specify how many. I have not seen this on the geck wiki and I couldn't get it to check for 3 Bent Tin Cans when I had 4 Bent Tin Cans In my inventory and my original form list only had Bent Tin Cans in it My code: which currently has hasperk commented out for testing Edit: Also how do I correctly mark code as GECK script on this forum? scn MetalWorkerAutoCraftingSCR Begin GameMode ;if player.HasPerk Metalworker If player.GetItemCount SparePartsRecipe >=3 ;Form list only has Bent Tin Cans to convert to Scrap Metal ;This isn't firing player.RemoveItem TinCan02 3 player.AddItem SpareParts 1 endif ;endif End But for the sake of those trying to also find this out. And for the sake of my pancake example since I have multiples items in my example form list. Since I've hit a dead end. Is it maybe something like if player.GetItemCount Eggs.PancakeRecipe =>2 && player.GetItemCount Mash.PancakeRecipe >=1 player.RemoveItem Eggs.PancakeRecipe 2 player.Removeitem Mash.PancakeRecipe 1 endif Edit2: In which case I might as well just use player.GetItemCount, player.AddItem and player.RemoveItem for each item. Right now a Form list just seems like an extra step that lengthens the code for recipes and are only useful as reference lists... Unless someone knows a bit more about this. Or do I just skip fo3 entirely since NV actually has recipes as part of NV GECK? Edit3: Or does this type of checking need FOSE? But at the same time it still makes my code longer if that's the case. So does anyone know for certain if this type of check will even make my code shorter? So far all I'm seeing is that it won't. -
Using Form list to check if player has items?
gman517 posted a topic in Fallout 3's GECK and Modders
I am aware that a form list can be used as the parameter for container.GetItemCount. I am having trouble however getting it to check for specific amounts of said list. In my case i just have a form list containing only TinCan02 and tried this: if player.GetItemCount ScrapMetalrecipe >=3 In the interests of learning scripting and to achieve something hopefully bigger. Form List EG; Let's call it PancakeRecipe. Fry Pan Potato Mash Eggs (lol i know but this is only an example after all yeah? :wink: ) I want my recipe to check if I have 1 Fry Pan 1 Potato Mash 2 Eggs I'm hoping to use form lists to minimise code size: instead of If player.GetItemCount FryPan >= 1 && player.GetItemCount PotatoMash >=1 && player.GetItemCount Eggs >=2 player.RemoveItem PotatoMash 1 player.RemoveItem Eggs 2 player.AddItem Pancake 1 endif Im hoping for, With Fry pan removed from form list for obvious reasons if player.GetItemCount PancakeRecipe && player.GetitemCount FryPan >= 1 player.Removeitem PancakeRecipe player.AddItem Pancake 1 endif I noticed that in form lists you can't specify amounts in the form list itself. So for a super long recipe how would I best achieve this if there are specific numbers in the recipe higher than 1? Or is this New Vegas only territory? This isn't mentioned in the geck wiki however... -
Since my custom grenade topic is solved im continuing here on the subject of XP + Karma. So i have a fake explosion with an explosive enchantment attached. This was done to learn about the archetypes of scripting. Thing is. I STILL can't get the resulting explosions to belong to me. I did some testing and found that the only time that I got the XP was when the originating bullet was a Direct Hit. Not the explosion placed on my target after the fake explosion (which is essentially being called from a script) This firing condition is practically identical to that of my Timebomb (Resulting explosion called from a script. With Mktavishs idea. Would be called after an explosion and script. So you can see the problem there) Since I couldn't get this to work. I'm quite sure my Timebomb will still have the same problem. This test was done from the new esp file so there shouldn't be anything getting in the way. Edit: should I just be rewarding XP + Karma based on who the victims are? But at the same time I have no idea on Bethesdas XP/Karma formula. Edit2: Currently going through the nexus forums wiki regarding making a new mod. I'll probably find my answer there. Will mark this as solved if I do. In the meantime feel free to post any suggestions.
-
Hi everyone. I just wanted to give everyone who has been helping me so far a huge thanks for putting up with me being such a noob. You know who you are. I finally understand now what you guys are talking about somewhat. You guys didn't hand everything on a silver platter but made me really think. I really appreciate how you guys have been treating me more or less as a pro and I hope we can keep the discussions going. I am still having some "teething" problems I hope you guys can continue to nudge me in the right direction with. Thanks again guys :happy:
-
OK So If I were to make my projectile explode on impact and run my script from that. Is there a way to make it so that: 1. The Timebomb model is visible in world 2. The Timebomb can be disarmed say if I make it remote detonatable only 3. The Timebomb can be picked up after disarming Also What would be a surefire trigger that will definitely run on impact of any object? Or do such scripts require "fake explosions" as you mentioned? Edit: <truncated> So I found that i needed to create a base effect linked to my bullet explode ScriptEffectStart script, link that to an Object Effect. Which was then attached to an Assault Rifle. OPTIONAL STORY READING: (epic content inside) But it only blows on Actors dead or alive. How would I get it to blow up an any impact? (This current behavior gives me an idea for a sniper rifle though) And the other thing is. Having an object effect attached to a weapon MASSIVELY reduces its durability. Any thoughts on this behavior? Is this normal? Edit2: Just learned about how to save the script TYPE so that i could save it as an effect instead of object but still cant get object impacts to fire any scripts. Edit3: I know that I can just simply add my bullet explode enchantment to a fake explosion with no damage force or sound attached to the projectile which ALSO creates explosions on every Actor in range. Which is pretty epic.... Why am I even trying to script bullets to explode when GECK already has that option built in....Nevermind. I'll figure out what I'm trying to do and mess around from there. That would at least fix the durability problem... I'll have a play around with your code idea Mktavish. It makes more sense now. Now to rebuild... Consider this thread [solved]
-
Why would a custom perk crash the game?
gman517 replied to gman517's topic in Fallout 3's GECK and Modders
Aww Shucks. my esp is a goner. Good thing I haven't put much work into it. Right now just a selection of custom weapons and grenades. @Mktavish: I tried your separate esp idea with my perk and could select it no problems. So looks like I'm back to square one. Regarding causing problems with my esp. Is it better to close GECK entirely during testing or will this have the same effect regardless? In other words. What's the best way to test out my esp? Or just make sure i don't save during testing. Also FOMM doesn't play nicely with my esp. Im currently using Archive Invalidation, Invalidated! instead. Cant see ArchiveInvalidation.txt anywhere. any thoughts on making one or another good way to toggle? When mod managers crash on toggling invalidation is that another good way to tell if the esp is a goner?- 4 replies
-
- custom perk
- fo3
-
(and 3 more)
Tagged with:
-
Why would a custom perk crash the game?
gman517 replied to gman517's topic in Fallout 3's GECK and Modders
To answer your question. My perk is neither a quest or ability but something that really is just a toggle to allow certain scripts to run and items to be created. Maybe I should make a quest instead that gives the player a note I can check for in my script... Hence no character additions or tweaks. I have considered having a static script attached to the item I want it to run with. (Which I do right now. This converts 3 bent tin cans to 1 scrap metal. Was hoping I could get this to work with a HasPerk check only. So I've got it running anyways until I can sort this mess out. But... I wasn't planning on spreading out all the schematics across the map or have them all purchasable. I only really want most of them to be available in the Workbench after the perk is selected. (LIke Anchorage's Warmonger) On that note. NONE of the items are available until they get to Either Craterside supply or Rivet City Market so a brand new save at this point won't achieve anything. My current save is literally as I've left the vault and leveled up already as my perk requires Gun Nut to be selectable. None of my mod items are in this save as of yet. Shall I maybe upload my esp file so someone can take a look? I haven't bothered scripting the Workbench schematics yet as the perk does not yet work. Edit: I have unticked playable to prevent crashing from my other save until I figure out what's happening. I'll Try Scrapping the perk entirely from my esp since I know what needs to be removed and try make it again (from scratch using your separate esp idea). I'll post back here with my results. Also is there a way to copy over something from another esp to my current one? Or do I need to manually add it in? Edit2: Only place I am stumped is how to even trigger such a quest given that I want it rewarded as a perk. I realize that a global var is much easier than an item to check for. Back to the drawing board i suppose...- 4 replies
-
- custom perk
- fo3
-
(and 3 more)
Tagged with:
-
Hi again guys so I'm having a new problem I'm trying to set up a perk with no character additions but allows a script to run because player HasPerk Said perk will also allow a bunch of stuff to be created without schematics at the workbench. For those who have seen my previous topics. You would know that this is from a new game. no saving is done until I am 100% sure it is working correctly so I always have a clean save. Multiple problems. 1. I simply cannot get player.AddPerk to work on any perks whatsoever. So am unable to give myself my perk for testing. 2. I rewardxp to level up. But as soon as the mouse touches (More like as soon as it's over) the name of my perk. Game crashes. I have already compared my perk to a working perk and cannot figure out why its not working. Here is the script for it if anyone thinks that might be the cause. Hope you guys can help with this. scn MetalworkerAutocraftingSCR short BentTinConv short countBentTin Begin GameMode if player.HasPerk MetalWorker == 1 ;convert bent tin can to scrap metal ;TinCan01 = Tin Can ;TinCan02 = Bent Tin Can if player.GetItemCount TinCan02 >3 ;How many bent tin cans does player have set countBentTin to player.GetItemCount TinCan02 ;How much scrap metal can be created? set BentTinConv to countBentTin / 3 ;How many bent tin cans can be removed to make the scrap metal? set countBentTin to BentTinConv * 3 ;Remove ONLY the number of bent tin cans required from updated countBentTin player.RemoveItem TinCan02 countBentTin ;Make the Scrap Metal player.AddItem SpareParts BentTinConv ;Update Scrap metal achievement set countSpareParts to countSpareParts + BentTinConv endif endif End
- 4 replies
-
- custom perk
- fo3
-
(and 3 more)
Tagged with:
-
does the game automatically check for anything with "count<something>"? I don't see any scripts in GECK that specifically add it to the players stats etc so can someone please explain to me how this works? I see that there are a bunch of global vars and something called countWeapAchievement but I cannot see exactly how this information is displayed in player stats etc. E.g. How would i add a custom achievement? Edit: I think the question should be... Where are Misc statistics stored. Eg. "Weapons created" or "Bobbleheads Found" I want to make one that is "Scrap Metal Created"
-
I've noticed that my scripted explosions so far do not belong to player and as such so xp or karma is given or taken. Is this possible for Fallout3? Also how would you script a detonator for on use instead of drop given that OnFire is New Vegas only according to the wiki? Edit: Even if not possible. I would like to know as this will be part of a mod to be released. I mean right now I could blow up the world and everyone in it and my karma would still be very very high. So if not possible I may need to scrap the idea.
-
Edit: Thanks that actually works. I added a playsound to make sure that the code actually fires. The only thing is the playsound is, instead of going beep beep is going brrrrrrrrrrrrrrrrrrrrr....until boom. How do I get it to play sound only once a second? Also timing is perfect. My last problem now is how the sound is seemingly playing as per framerate. When testing on my bad save there is no sound. I guess that saves a goner. What even causes the game to break so much? Edit2: Also I noticed that i don't get the xp from my victims. Is there a way to make the scripted explosion belong to the player so the player gets the XP? Edit3: I can't seem to find a way to fire the script from player throwing the timebomb instead of simply (right click from inventory) dropping it. OnRelease didn't seem to do it. Is this possible? In terms of timer. I thought that a short var should only match a float var once a second. however with this code the sound doesn't play for some reason. Edit4: I could drop one of these with a detonator attached in megaton and it won't affect my karma etc as the explosion isn't connected to me. Any ideas how to fix this? Here is my code. SCN MoabTimeBombScript Short Dropped Short stimer Float Timer Begin OnDrop player Set Dropped to 1 End Begin GameMode if Dropped == 1 && Timer < 30 Set Timer to Timer + GetSecondsPassed Set stimer to stimer + GetSecondsPassed if stimer == Timer PlaySound WPNMineTick 1 endif elseif Dropped == 1 && Timer >= 30 PlaceAtMe MOABExplosion 1 Set Dropped to 0 Set Timer to 0 Set stimer to 0 Disable MarkForDelete endif End
-
[solved] Ok it's actually very simple. In geck you need to find the reference id in the cell window In Rothchilds' instance it is under Interiors in CitadelLab. Then do a filter search for Scriberothchild and the refID simply is. And your going to laugh at this ScribeRothchildRef. So if there is an NPC refname you are after. Chances are it is as simple as eg; MoiraBrownRef. Hope this helps people