Jump to content

ajs52698

Members
  • Posts

    140
  • Joined

  • Last visited

Everything posted by ajs52698

  1. https://forums.nexusmods.com/index.php?/topic/1007225-return-the-ids-of-container-contents-is-it-possible/&do=findComment&comment=8174810 :whistling: oh hey pro modder!
  2. you sure the > is wrong? This is greater than > that? and the store objects was what you wanted in the first post : 2: Once gotten, how do I pass the ID's to a form list , also the script isnt perfect its just a example on how I know how to do what you want to do :tongue: you will have to adjust it for your self. YOURLISTOFOBJECTSTOCHECK.getsize() returns as size which will be large, exp 1000 > zero maybe im having a brain fart, dunno
  3. and as for what you want to do with your mod, ill add that to the script. Container Property yourcontainer auto ; this is if you want to use something other than the player container Formlist Property FormlistToAddobjectsto auto ; this is where you store the objects if they are in the chest FormList Property YOURLISTOFOBJECTSTOCHECK auto ; this is a formlist of objects to check for if there in the chest Container PlayerContainer = Game.getplayer().GetContainer() ; get players container, probably not neccessary but whatevs :tongue: int Zeroint = 0 ; this is just as the name says While YOURLISTOFOBJECTSTOCHECK.getsize() > ZeroInt ; while the object list which holds object you want to check for(aka YOURLISTOFOBJECTSTOCHECK) is less than Zeroint if PlayerContainer.GetiTemCount( YOURLISTOFOBJECTSTOCHECK.getat(ZeroInt)) >= 1 ; if the container has a object from the formlist aka using >= 1 ;FormlistToAddobjectsto.addform( YOURLISTOFOBJECTSTOCHECK.getat(ZeroInt)) ; add the object to the storage formlist, ill leave it here for reference. PlayerContainer.AddItem(FormlistToAddObjectsto.getat(ZeroInt) ,PlayerContainer.GetItemCount(( YOURLISTOFOBJECTSTOCHECK.getat(ZeroInt) * 2 ) ; this gets the amount of items that are in the inventory then multiplies it by 2 and adds it back Endif Zeroint += 1 EndWhile Hopefully this works :tongue: Oh and I like your idea! :D
  4. I see you have two form list property references. Are they both filled by the same thing, or have I misread something? Whilst I'm on that; why do you need a second form list in this at all (namely "YOURLISTOFOBJECTSTOCHECK")? I don't see anything being added to it other than you using it as a stand in for an array that gets the size of the player's inventory and then cycles through each address. Also, here's my question; your loop skips address zero in the conditional statement. What's at address zero that you don't want counted? Not entirely sure then, now that you mention it (I always get these ID identities confused). What I really plan on doing is to make essentially a replicator of sorts, the same thing that I did in that skyrim mod I mentioned before; you put an item into a locker, box, or other container, flip a lever which triggers an attached script, the script then gets the ID's of the contents of the box, adds another item of the same kind to the box for each item that's in there (IE; put 2 shotgun shells in the box, pull the lever, open the box again only to find 4 shotgun shells), and then clears the form list so that it doesn't keep giving you more of the same thing. In short; items go in box, lever is pulled, script sticks contents' IDs into a form list, game adds more items to the box based on what's in the form list, form list gets cleared, you take items from box, repeat. The idea is that this is the preliminary prototype of a script that I want to make for a sort of star-trek style matter replicator that I thought of putting as an item to build at settlements. It would consume a ridiculous amount of power and would only work once per day (I'll take care of that much of the scripting myself), but it would, as a late-game item, allow you to produce your own resources from nothing but power and the device itself. It would be big, it would be costly to build (extremely), and would require a god-awful amount of power, but it would let you essentially make something from nothing using the good old law of the conservation of mass and energy, E=MC^2. The First formlist is of all objects that you want to check if there in the chest, the second one is when you want to put these objects into a formlist. and as for the address zero thing Im not sure what you mean.
  5. For getting items this is what I got : ( keep in mind Im no pro so this is just something to go off of :tongue: ) Formlist Property FormlistToAddobjectsto auto FormList Property YOURLISTOFOBJECTSTOCHECK auto Container PlayerContainer = Game.getplayer().GetContainer() int Zeroint = 0 While YOURLISTOFOBJECTSTOCHECK.getsize() > ZeroInt if PlayerContainer.GetiTemCount( YOURLISTOFOBJECTSTOCHECK.getat(ZeroInt)) >= 1 FormlistToAddobjectsto.addform( YOURLISTOFOBJECTSTOCHECK.getat(ZeroInt)) Endif Zeroint += 1 EndWhile So this gets the item count of a object and if its greater than or equal to 1 it gets the form and adds it to the formlist. There might be a better way to do this but as far as Im aware its the only way(in my opinion this way is over complicated) gl
  6. Ill try mess around with it and see If I can figure it out for you as I look forward to your mod :D
  7. I messed around with the placeable minigun idea and actually dont think it would be that difficult, but I personally lack the ck skills to make it happen. Hopefully someone in the future will take a attempt at it :D
  8. oh, im sorry, didnt realize that bothered you, i personally am fine with the way I have it, I guess ill continue to try to fix it myself.
  9. uninstall all mods if you have them would be the first step.
  10. Alright Ill test it soon. Edit: if thats the only issue i guess ive learned alot :p
  11. Alright here ya go reneer, and im not sure what you mean by the tag thing.
  12. Im attempting to start sound instances using scripts, store there id in a array, and then mute them if needed, but for some reason I can play sounds just fine but muting them does not seem to work. I honestly am out of ideas, heres how I have the script set up.
  13. Alright thanks for explaining, and as for what I was going to use this for, a simple mod which gives the player water if its raining :P
  14. Holy moly thats a complicated script, so many vars, you think you can explain what exactly they are used for? the wiki is kinda vague . Im more interested in understanding how these scripts function than rather having someone just write one for me although I do appreciate it :tongue:
  15. Yea using the timer was what I was going to result to but i really would rather some how create a custom event
  16. I have no knowledge on creating custom events, especially ones that run when theres specific weather happening, looking for help!
  17. Yea i want it to be a small radius and when using Debug.notification(blahblah) if it detects the bucket I get Iobjectreference in return and if it doesnt I get none. so what your saying Is I shouldnt specify what Im looking for, example instead of this If blahblah == Bucket I should just do this If if BlahBlah? I need to check IF it FINDS the object, not if it doesnt. ah wait I see you used !, i havent had experience with this, let me see if it works. Yea if I used if !blahblah it still doesnt seem to work as whatever happens after the if isnt conditioned. If !blahblah doesnt work but If blahblah == !none does work! Thanks for help
  18. Im attempting to check if the function Findallreferencesoftype returns a object but Im having issues. Objectreference Blahblah = Game.FindClosestReferenceOfTypeFromRef(Bucket,Self,100.0) The problem Im having is this returns none if it doesnt find the object and Iobjectreference if it does. If BlahBlah == Iobjectreference This will not work So how Can I check if it does find the object[using the bucket like this, If blahblah == Bucket, doesnt work either)
  19. so what do I change? I was just taking what raptor posted
  20. Batch compile of 1 files finished. 0 succeeded, 1 failed. Failed on -f=C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Data\scripts\Source\Base\Institute_Papyrus_Flags.flg Thats the error I get
  21. I believe the last two locations are just where the scripts are and where there saved so I dont think thats the issue but ill give it a try
  22. Im been for a while trying to set up papyrus so I can compile without being in the ck but im getting this loop and I dont know what it means D: C:\Users\Andrew\Desktop\Fallout 4 Mods>"C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Papyrus Compiler\ScriptCompile.bat" "$(FILE_NAME)" -f="Institute_Papyrus_Flags.flg" -i="C:\Users\Andrew\Desktop\Fallout 4 Mods" -o="C:\Users\Andrew\Desktop\Fallout 4 Mods" This is what the papyrus compiler is spitting out over and over.
×
×
  • Create New...