Jump to content

markyrocks

Members
  • Posts

    130
  • Joined

  • Last visited

Everything posted by markyrocks

  1. As a brute force method to this problem would be to save the items in the first container in an array and then force the script to add the items to the second container via a loop and containerRef.additem(itemArray, 1, issilent) something like that. I'm finding this scripting to be very finicky so who knows if what I'm describing would actually work.
  2. Also you might need to register for remote event
  3. Well the first piece of advice I can give you (NC I'm dealing with a similar issue...) is make sure the game is even seeing your script. Add some notifications in there to at least let you know the thing is loaded. That would be my first guess as to what is happening on your end. I can't even get a debug message to show ... at this point I'm not even sure scripts will run from the user folder. I know .esp dont. I've added my script to every folder and location I thought it would look in, it still ain't working
  4. ya the weather is the ticket. should be as simple as writing a script using a distance function to trigger the cell (if it can be walked to) if you can only teleport there then you have other way better options like onload or onplayerteleport events and just set the weather alias to one of the night weather alias. but you may have to keep it that way, so the easiest way i could imagine is do some kinda timer for when the player is in the cell no doubt, using gametime every couple hours or whatever set it back to night. using a loop and waitgametime(float) should work
  5. edit... ummm where do these other npcs that you'r talking about comefrom? are they already spawned? are they unique? did you create spawn them? or are they like drag and dropped in? You could definitly tie a sitting event script to the npcs that would make them read. wouldn't really need a marker. Or you could just turn marowski into his own class? or duplicate him and make a couple random npc's with mainly his traits you wouldn't want to keep everything tho. Heres somethin i found Under the ai packages. theres and idles tab. basicly he has a sitidlepackage or something like that. If you use that package keyword it might work but if you go to the npcs you want to read and sit ect. If you double click on their sit package under the idles tab click the checkbox that says use specific idles. find marowski in the actor list and find his book reading idles. add those keywords to the list of the actors you want to read. You may want to add the animations, and the marowski sit package id and make sure load on furniture is ticked in the flags tab. I can't imagine how it wouldn't work if you did all that. also remove any other sit associated package and or animations keywords ect for whatever your target npc is
  6. ^THIS fully qualified explicit statements makes code so much easier to maintain for self and others. If you run some compiled PEX though Champollion to extract PSC you will see that the interpreter expands all the clever shorthand into fully declared statements with bodmass brackets and function variables fully expanded, so no parsing or compute saving there. I am always so happy I first learned to code in C / C++ and that the instructors pushed us to to make our statements fully explicit. I can go back and look at old code and figure it out much more easily than if I was doing fancy shorthand. lol you guys... don't point the finger at me i just copied the example. Obviously i was slightly confused or i wouldn't have asked. They can't make the examples like idiot proof.... that would be to easy. They don't want mediocre coders playing with this stuff. I did however sign up for the wiki bc i am going to change some things as im learning bc it is truly ridiculous. I encourage you all to do the same. If your looking at something on there and its total crap, explain it so a moron could understand. Probably be 3x as many modders in this game if the language was explained better. I literally spent like 5 hours trying to get notepad++ up and running with the papyrus compiler bc the wiki had errors in it ect. most people would have quite and just called it broken.... I fixed it and i edited the wiki. I figured after all that effort i would help someone else out. Got a crash course in .bat files and cmd prompts while i was at it.... anyone need a bat file? im your guy
  7. Thanks for the response, that is essentially what i was doing i must of been really tired when i read your reply i was like duh whats an esp.... essentially what you said is what i have been doing. I think i do need to start from scratch tho bc ive been messing with the robot workbench and that thing is like a whole nother animal. I want to build a custom robot workbench but i think im going to have to use a chem workbench and just put the robot workbench nif on it. Heres something that is annoying. Can i only build certain items on the .....aaaaa nm i just had an epiphany. I can build whatever i want i just need to attach a script to some other item being built... like i could write a recipe for psycho and set an event to spawn whatever i want.... hmmm ya bc i tried "building" a robot from the chem workbench and it doesn't work but I can surely build a "sweetroll" that is labled "robot" and just whenever that sweetroll labeled robot is build just spawn the robot .... ya i like that. Probably be alot easier that way as well...
  8. No, that's not quite what is happening. Think of "<Alias=RescueLocation>" as a pointer to an existing alias within the same quest. What is happening here is that each NPC generated by the quest stores the "<Alias=RescueLocation>" data somewhere local to them outside the quest itself, so that even when the quest is stopped and restarted, generating new NPCs with new names, the old NPCs still have the old "<Alias=RescueLocation>" information attached to them. At least, that is what it seems SKK is discussing here - behavior that wasn't well documented before. o ok i think i got it figured out. It still has to do with a parent.child situation. Its just not something i don't think many people think about. ok so the "name" is attached to a stored list of location refs on a message form. that message form is the parent of all the other instances of that message. so essentially all the other npcs that have a unique id associated with that form expressed like ParentForm.ChildForm.GetReference() when the ParentForm object reference changes it has to trickle down to the child. Im assuming the way the game know that is bc the parent probaby has an ID that it shares with the kids and when the form changed so did the parent ID, the children looked at their ID's and saw they didn't match and it caused everything to refresh. Now if you changed the Stored Data pool nothing would probably happen. If you went from location alias to Tom, BOB and fred the old npcs would keep their original names and the new ones would get the new names. I don't think the quest has to do with any of this if you delete the quest the npcs won't just disappear. If the npcs even had ties to the quest by some kinda quest alias that would be a child trait to the parent actor.
  9. shoud be located in \documents\My Games\Fallout 4 folder. Trust me i hear ya. it takes a lil getting used to fo4 having files in 3 different locations... just put it all in one folder!!! lol wait until you go searching for \appdata folder... that ones fun. Hint its hidden
  10. You might have to take the script out of the user folder and drop it in the base folder. I had a similar issue but now that I'm thinking about it the circumstances were probably completely different than yours. Shouldn't need to point at the file it should load automatically. But ya you need to attach it to some type of event. Just adding the script to an object wont automatically run it.
  11. I understand how boolean variables operate and are applied in conditional statements, how they're evaluated ect. Thanks for the reply. I'm asking about the logic of that particular function isnearplayer(). The example shows using the ! Operator b4 a variable in the function call I'm wondering if If( !ref.isnearplayer() )== true ;if ref not near player If ref.isnearplayee() ==true ; if ref is near player
  12. Well basically you changed the parent of the npc's and it automatically trickled down and changed all the children. Ya that's the way this format is designed to work right? Any values of a parent are supposed to override the children. I'm sure there's an exception. But if like you made those changes and never ran the quest again it probably wouldn't have updated them as long as the script didn't run again.
  13. You are absolutely correct, the man knows his stuff. Ok so let's talk about the while loop. If I remove the ! In front of the array linkedrefs will it reverse the logic? Like as it stands that line. If (!linkedrefs.isnearplayer()) returns true if the reference is not near the player. If I remove the ! Will it return true if the ref is near the player?
  14. Ya I watched some videos but as I'm going I'm even finding things that the video authors even don't understand or just overlook. I like to use that information as a base but I actually want comprehension of what I'm doing, I don't want to to a specific thing and just do it that way bc it works. I want to understand why it works. I've definitely spent time looking at the base scripts really just back tracking where information comes from. I realize I can't see everything bc some of it is hidden. It would be nice if we had access to the Source code just to see how certain things function. An example of that is I'm trying to determine where the initial menu for the robot workbench originates from and I find everything up (working backwards) up to the main menu or toplist, but b4 that a message pops up with the name of robot companions and an option for a new automatron. I can't find where that comes from. I've found the function that figures out which robot companions you have but that's as far as I've been able to trace it. I'd assume the rest is hidden. I'm probably wrong but I've spent hours looking for it
  15. Dont you just love it when a plan comes together. Nice job. So you did have to update the existing npc's that already had the name or it just did it automatically?
  16. @skk50 I definitely appreciate the response. I was a little confused as to what onload() meant exactly. Does unload basically mean that the 3d object is in the players LOS? Or newly built. As far as the iBenchRef only finding one instance, I was aware of that flaw but I was trying to get something working and then add stuff later to handle all scenarios. This language is really a pain. I'm just going to start putting everything into functions bc these rules where certain things have to be in events or functions is pretty annoying. I realize that the example shows it that way but the description doesn't say so and when I see that I dont automatically assume its required (but I guess I better start) I would just assume they're doing the example that way just for kicks or w/e. The other thing on the topic of the example is that the distance wasn't even meantioned as far as what the unit of measure was, that definitely crossed my mind. Also the distance variable in the registration example is missing. You put all those things together and it kinda points to the wikis being incomplete and having errors of there own. Literally if it said "must be in a function" I would have done so and a problem that I messed with for hours would have been fixed in minutes. That was what started the whole thing off. After that I out it in a function anyways bc I thought maybe iBenchRefs wasn't able to be passed for some reason. Idk, I e said it b4 but this language is crazy formal. I've studied some c++ and autoit and I've never come across rules like this.
  17. Lol, that function call, ya that's called being tired and a symptom of the built in editor being utter trash. As far as the 3rd parameter, that's exactly how it shows it on the reference page.... I thought the exact same thing. Idk thanks for the input.
  18. its driving me nuts. everything seems to be fine until it gets to the registerlessthandistance event. It compiles when i hit the compile button but wont save. Ive stared at it ive changed these couple lines at least 50 times... losing it honestly Scriptname RobotRemix:aRemix extends ObjectReference Const {activate furniture} Message Property jMessage Auto Const Furniture Property iBench Auto Const {RobotWorkbench} MiscObject Property stim Auto Const FormList Property menu Auto Const FormList Property topList Auto Const {topList} Keyword Property aKeyword Auto Const ObjectReference iBenchRef Event OnInit() ObjectReference[] LinkedRefs = GetLinkedRefChildren(aKeyword) int i = 0 while (i < LinkedRefs.length) ;this should give an arrary of refs of robot benches.... if (!LinkedRefs[i].IsNearPlayer()) else iBenchRef = LinkedRefs[i] endif i += 1 function(iBenchRef) endwhile EndEvent function iBench1(iBenchRef) RegisterForDistanceLessThanEvent(Game.GetPlayer(), iBenchRef) endfunction Event OnDistanceLessThan(Game.GetPlayer(), iBenchRef, 5.0) Debug.Trace("Player is now " + afDistance + " units away from the bird - fly away!") endEvent UnregisterForDistanceEvents(Game.GetPlayer(), iBenchRef) this is a last resort, no matter what i do it won't work. anyhelp is much appreciated thanks
  19. When you say esp structures, what does that mean exactly?
  20. I wanted to just figure out that specific concept b4 I worried about "stuff". Honestly I want it to show a menu and then create custom objects from menus and submenus but I'm just taking it one step at a time
  21. Ok I'm carefully reading though the reference literature and I think the issue I'm have is that I need to set the property of the script to point at the specific object that I created...omg I'm so dumb. I have no idea how I overlooked that. I was even using that some last night. Me personally I'd rather just type in the ID of the object inside the script, it would be less confusing for me. But whatever.
  22. I have a pretty good understanding of how other languages operate. The reason this bothers me is bc of the way the variable is defined. The only way I can describe it in every language I've used it is usually clear where a variable definition comes from. You can literally track a variable from the moment its defined to the moment its deleted. I guess the part that was/is confusing is the fact that it's not possible for the variable to be defined until runtime. Even in a situation like that the data would be coming from a user input or a iniread, something that you could physically see in the script.
  23. I have a workbench, I want to open the menu...have it do stuff. Does the registerforremote event basically define the reference. Like Objectreference ref Auto registerforremoteevent(ref,"event") ;this like essentially defines ref as the unique object reference associated with the object the script is attached to? Am I correct in saying this?
  24. Event OnInit() ; Register for Activate event from the secret door RegisterForRemoteEvent(SecretDoor, "OnActivate") EndEvent  ; Special event to receive when the door is activated ; Note the type in the event name matches the type of the first parameter, and is also the script where the ; event is originally defined. Event ObjectReference.OnActivate(ObjectReference akSender, ObjectReference akActionRef) Debug.Trace(akSender + " was activated by " + akActionRef) EndEvent Ok so in the above example anyone would assume SecretDoor was previously declared as objectreference property SecretDoor Auto. Where does the value for SecretDoor come from? I'm assuming that this script would be on the form of the SecretDoor. Does the game automatically assume that the item that the script is attached to is the SecretDoor?
×
×
  • Create New...