Jump to content

SMB92

Premium Member
  • Posts

    2304
  • Joined

  • Last visited

Everything posted by SMB92

  1. Yeah I'm at a loss as to why I'm seeing this happen, but yeah I was headed to toward quest with states but I was of the thinking I needed the script to get a marker for me to act as the "spawnpoint". So many ways to skin a cat lol
  2. Sure, see below. This is the "random" type spawn (I'm making other types like Ambush that are controlled separately) The variables are only stored for the few milliseconds it takes to make the spawn, then the code is gone nothing is stored longer than that. Note that I haven't written the code to grab the closest patrol marker, I was just placing a property for testing. Also, you'll note the "reroll" code, that chance number is set to 0. The R1 in everything means Region 1. I have divided the map into 12 hypothetical regions. The sheer amount of globals is so the player can set them from a menu should they so wish to fine tune things (there are 3 presets and 4 difficulty levels however). EDIT: wow that looks so pretty in color. How can I get Notepad++ to look like that?
  3. ÃÃÃÃÃÃÂ Do I unerstanbd you correct? You want to make many copies of the same scriptÃÃÃÃÃÃÂ ? I`mÃÃÃÃÃÃÂ confused on why would you do that.So they dont interfere with each other if they load at the same time. Heres a nice example of what i mean by interfere with each - make a simple script with a timer that does something like placeactoratme ontimer and place it on 2 markers you put next to each other in the same cell. Use the oncellattach event. Walk into that cell. You should have only one NPC standing there. Same shiz happens with all variables set. So i make a rule, dont have object with "same" script in a 2 cell radius. The spawn code is very fast so it should be fired long before you load 2 cells even when sprinting. Hopefully that makes sense. I'd only need 5 or so copies for what I'd be doing. That's not how scripts work in Papyrus. Two objects with the same script attached to them will not interfere with each other unless you explicitly code that to happen. Your "rule" isn't necessary and is complicating your mod design.Then why do I keep seeing the contrary. Two markers with same script in cells side by side, the one that ran ever so slightly after the first seemingly changed the variables I am storing to the new ones it made. So for example 3 gunners out of 7 spawn at the first marker but then 11 forged spawn (4 at first marker). And I can see them coming from there because they are linking to different patrol markers on the forked road at Cocord past the RR and walking together. Tell my why that happens because initially I was of the same thinking until this shiz keeps happening?
  4. ÃÂ Do I unerstanbd you correct? You want to make many copies of the same scriptÃÂ ? I`mÃÂ confused on why would you do that.So they dont interfere with each other if they load at the same time. Heres a nice example of what i mean by interfere with each - make a simple script with a timer that does something like placeactoratme ontimer and place it on 2 markers you put next to each other in the same cell. Use the oncellattach event. Walk into that cell. You should have only one NPC standing there. Same shiz happens with all variables set. So i make a rule, dont have object with "same" script in a 2 cell radius. The spawn code is very fast so it should be fired long before you load 2 cells even when sprinting. Hopefully that makes sense. I'd only need 5 or so copies for what I'd be doing.
  5. You know it just occured to me, I can just make copies of said script and name them different (ASC-SP1, 2 etc) and place them on the objects, and place the objects strategically so that 2 the same never load simultaneously. Then there is no need for any of this Thanks all for the brainstorm, all info is good.
  6. Thats a f*****g great idea, nice find. I enjoyed that in NV myself, still have it installed in fact. I'll see if I can get permissions on it ;) If I can get it I'll make him into an optional feature.
  7. Thx. I figured what was going on with the persistence on that object. I continued from a save where the object was still loaded so the game was seemingly looking for it. Should have thought about that. Issue still remains on multi-instance script though. I'll look into whats been said about getting the forms from file. I just thought it couldn't be done on any file thats not guaranteed to be in the same load order like Fallout.esm, therefore I binned that idea.
  8. I'm not sure why the object my script was on became persistent when it wasn't ever referenced as a property, I know its not meant to happen, but I seen it in the papyrus log still being looked for by the savegame. I didn't think you could use a formid unless it was from Fallout.esm cos they change. Correct me if I'm wrong. Would be nice. I'm gonna have a look at how these "find" functions are drawn up in the main scripts and see if i can invent a FindRandomRefWithKeyword type of function for my script.
  9. Everything I am endeavouring to do is because of these things ;) I realise there is a degree of marring the save game, it's the extent I'm trying to limit.
  10. Thanks for the reply again. I'll explain the problems with persistence/multiple instance a bit better: If I place a marker and have my script on it, that marker becomes persistent. If I remove the mod the save game still has this script and marker. This can lead to CTDs when unloading that area from my experience (not so much loading it). SO for example I place a marker with my script in Concord. I test my script and then remove the mod from load order. I come back to Concord and as I am walking away from Concord (unloading the area) I could get a crash. I find in Papyrus log complaints of a missing object and my script still trying to run on it, even after I remove the files. This is the behaviour I have observed with that. So regarding that, I can't have markers with scripts on them unless the user never uninstalls the mod :/ But wait there's more: Regarding multiple instances of the same script, lets say I have 2 cells next to each other with one marker in each cell. As I walk into the area and those 2 cells start load at the same time, both receive the OnCellAttach. Despite each object being separate and having a different base marker property, the code interferes with itself. So if marker 1's script gets me a random number and then marker 2's script is running ever so slightly behind the first script, the second overrides the values the first collected, which is no good. I am able to observe this behaviour every time. Just to mention for relevance sake, I am going to assume that if I have a predefined formlist with every marker listed, and then having that formlist as a property, all of the markers in game will become persistent. Perhaps it doesn't matter/not as bad if the object itself becomes persistent, as long as a script is not attached to it directly. I'm not planning on having a great deal of markers per cell, just enough to cover most areas a spawn would be feasible. But they will be all over the Commonwealth. I haven't really looked at using an array to store said markers like in the example you give above however, I haven't really seen the need to study into making arrays or how they could work for me. I get the impression that in that code, a spawn would be placed at every marker in the array :O I am looking at that FindAllReferencesWithKeyword, that looks more reliable. I only want one marker at a time though, not all the markers at once. On a separate note though I kinda need to study arrays more, as I have thought about storing the actual NPCs spawned to run some extra code on them/monitor them for some future features that users have suggested.
  11. Yay 3000th post :) Had a bit of a revelation over a cigarette. Maybe what I can do is run the code as normal to get a marker and then go to an additional "check distance" state where I check if the marker is over and under the specified amount of units away and if not send it back to the find state and keep looping that until I get one. I sorta need to run a check at some stage anyway, because what I am doing is checking if the marker is disabled, as I have my own respawn timer etc independent of the games, so maybe I can move that check out of the spawn code as well. I think I mentioned this earlier but I wasn't seeing it as clearly as I am now.
  12. Thx for the reply. Say I made a property out of the base marker, which is a duplicated XmarkerHeading that I've named ASC_SPP. So the base form will be persistent, but perhaps the actual instances of it I place won't be. If you get what I mean. I'm not sure what that would translate to in terms of persistence for the actual placed markers of the same base object, but I am kinda assuming this would be the way around it (as I won't be able to reference the formID directly from my ESM?). Also If I go and get the regular xmarkerheading around the map, I might cause problems with other things, as well as god knows where spawns are actually ending up :D For my tests of the spawn code, I have markers placed with OnCellAttach events already, basically I want to avoid any placed objects with any code on them at all, seems they will end up in the savegame and effectively blow it up on uninstall. There doesn't seem to be any reliable or straight up code to find an object > or in between "N" units away from centre of search, so far all I can think to do is spawn a marker at the player and move it "N" units in front of the player and do the search around it, which I don't like the idea of for some obvious reasons including latency. If I get a marker too close to the player we'll have groups popping in out of nowhere which would be super immersive :sad: Idk atm, so much codes in my head lol. Just for fun here is a brief of what the code should look like ideally: State Find Find me a marker SP = marker GoToState Spawn EmdState State Spawn if SP = none gotostate wait else run spawncode on marker EndState State Wait StartTimer (definedtimer) timerrunning = true (this is security feature for other code) Event OnTimer timerrunning = false GoToState Find EndState Simple in theory :D
  13. Just crossed my mind too, I suppose I have to get the players position for these coordinates ObjectReference randomRef = Game.FindRandomReferenceOfType(Ref, 0.0, 0.0, 0.0, 5.0) EDIT: The above way would be if I couldn't do the following on something similar: Unless I can do this (Put a ">" sign in front of afRadius value or something similar): ObjectReference SPP = Game.FindRandomReferenceOfTypeFromRef(ASC_SPP_Base, Game.GetPlayer(), >5.0)
  14. Pretty much all the DLC04 errors in Papyrus are common, as in everyone has them. Particularly about the "startup" of the mod. I haven't seen the sign one above, but that could be caused by one of your settlement mods making a duplicate of that item for you to build, and having that script loosely loaded with it or packed in that mods bsa, which could be outdated/broken etc. Mostly if it is logged in the papyrus log, its rare that said thing crashed the game. Regarding these errors, you'd probably still have them in your current savegame even if say UFO4P fixed them, until you started a new game. PS> hkx file is the animation/havok file.
  15. When I first played NV, I didn't really care for the card game feature. It grew on me after a while and I started to like it. I still don't really play the holotapes, but I do think this is a missing aspect from F4. I did love the card games in RDR and San Andreas (namely poker and blackjack lol).
  16. I can either use a quest or an object in a persistent cell that loads at game start to receive the event, however I am preferring a quest so I can set stages to run other codes depending on the status of the mod (think uninstall stage etc). I believe the quest is also preferable for reliability in saving the state of the code, rather than forcing an OnLoad event everytime. Problem with adding scripts to markers is, 1. They are persistent in the save game and 2. Multiple instances of scripts firing close by modify each others values. Example for the latter, if I have a timer in the "generic" script each time one fires it resets the timer on all of them. I'm not sure this is suppose to happen but thats what I saw with that. It would be a tremendous amount of work to make individual points, which could amount to the thousands. Regarding the marker being invisible and load events, they seem to present even when not persistent, which would be required they not be persistent, or we could end up with spawns outside of loaded areas occasionally. The code you posted above is really good for "ambush" type spawns, because their markers are few and far between. So you've have indeed answered a question I haven't even asked myself yet :D
  17. Thats about where I'm at, not sure which method is the most effective and economical. I'll outline the plan a bit better: Every so many seconds (this value can be defined by the user) as the player walks around the world I want the script to grab an object randomly some distance away from the player, namely a spawnpoint, which is an xmarker. I've placed my same base marker all over the map. When it gets this xmarker it runs code to make a spawn. I am going to use states to organize the code, so in the "find" state we get the marker aka spawnpoint, then we go to "spawn" state to run my code on the object, if it got one. Then we go back to "timer" state which then goes back to "find" etc. Theres a few more things that go on in the code based on some variables but this is essentially all i need that get/find function to do, and do so reliably + economically ;)
  18. I have thought about this, as well as the "factional" idea mentioned above. I'm still not sure how I feel about it, technically any of the Nuka factions wandering into the commonwealth etc could be considered "deserters" etc as well. I think with the way I have set up all the variables though, tge doors are wide open to having "faction dominance" in regions based on some tracking script, matbe one day I'll look at that or someone can use my system to implement it. One thing I am implementing is a patrol marker network throughout the whole map. I imagine there'd be a few modders that appreciate tapping into that.
  19. I think I've confused myself lol. Instead of looking for how to set min/max value, i should offset the search and define the radius. I'll have a play with that.
  20. Nice list. How can I use the FindRandom options to look for an object between say 2000 and 4000 units away from the player? At least without having to check that after I have the object and potentially having to keep grabbing one until my distance spec returns true?
  21. Try using the pcb console command after you travel. Uf framw rate goes normal after that than the game is not unloading cells for you properly or you are just that low on vram.
  22. Hi folks, I'm wondering what the best way to get an object based on a distant check, dynamically in game. Namely we want to get a marker, that either has a keyword or is defined in a formlist. All the markers are the same. Basically I want to my script to pick out a loaded marker that is n units away from the player at least, set that as a the object to run my script on, I have every other part covered for now. I've tried a few things but no luck with this. I've had enough of playing with code for the weekend so reaching out for ideas on this one. Cheers.
  23. Build limit seems to be based on poly count. I use DDproductions patch that ups it to 999999999 or something. You can find and edit this limit in xEdit i think the limit is 10000 in vanilla. I believe DD doesnt have the patch up anymore.
  24. Delete all the folders in the Data folder. Delete all mod esps. Run Steam verify.
×
×
  • Create New...