Jump to content

ChaosWarrior

Members
  • Content Count

    14
  • Joined

  • Last visited

About ChaosWarrior

  • Rank
    Clanfriend

Recent Profile Visitors

372 profile views
  1. As in the title the issue is that when I register NPC for animation event, then player is loosing ability to attack or block (or both). Is there way to somehow make it work? At first I noticed this while I was experimenting with a spell effect that makes you fire things like with bloodskaal blade, and now I was registering things to detect if NPC was doing some ranged attacks or just standing. So the code is in magic effect, I apply spell with console command "cast", notifications show that events firing as expected. actor trg int i = 0 Event OnEffectStart(Actor akTarget, Actor akCaster) i = 0 trg = akTarget registerforsingleupdate(5) if (RegisterForAnimationEvent(trg as ObjectReference, "MRh_SpellFire_Event") && RegisterForAnimationEvent(trg as ObjectReference, "MLh_SpellFire_Event")) Debug.Notification("registered") endif endevent Event OnUpdate() registerforsingleupdate(5) i = 0 endevent Event OnAnimationEvent(ObjectReference akSource, string asEventName) if (akSource == trg as ObjectReference) && (asEventName == "MRh_SpellFire_Event") i+=1 Debug.Notification(i+"# MRh_SpellFire_Event event sent!") endIf if (akSource == trg as ObjectReference) && (asEventName == "MLh_SpellFire_Event") i+=1 Debug.Notification(i+"# MLh_SpellFire_Event event sent!") endIf endEvent Event OnEffectFinish(Actor akTarget, Actor akCaster) UnregisterForAnimationEvent(trg as ObjectReference,"MRh_SpellFire_Event") UnregisterForAnimationEvent(trg as ObjectReference,"MLh_SpellFire_Event") unregisterforupdate() endevent UPD it seems to affect player's controls when PC is one who casting, like ">player.cast 1413069f 0005054a left" when doing like ">cast 1413069f 0005054a left" it works using selected reference as caster. But still weird bug.
  2. Hi everyone! I am making a mod (actually still same that I was making in 2019) that have few quests with lots of scripts and aliases and many lines of code. And so it happened it has lot of variables too, and while I am aware about Skyrim's bug related to save corruption due to too many variables/properties, I want to know for sure how to do it the best way. Is it any safer if I use arrays for storing data? My mod requires a lots of nodes, which arent ton of persistent objectreferences but instead arrays of float with coordinates (I have chosen math magic!). Those arent too many, but each referencealias has their array of last few "tail points" and stuff like distances/iterators for some stuff, watchdog counters for unstucking etc. It is not excessive but considering all instances of scripts may contribute close to 1000 vars or something. So are vars any better than properties? And what about arrays? And I do use fix by Meh321, but nevertheless I need to do mod right.
  3. Thanks I guess) That is interesting, as I found that they move much slower when in unloaded area, in loaded are they cover like 1000-1500 units in one quest onupdate() interval, while in unloaded after enablenowait() it is more like 250-500 units per interval, so long distance placement is probably poor thing to do and unfortunately I have to place more spawnpoints. That unloaded movement is also can be influenced by StartCombat() StopCombat() thing, as I attached them to a *Debug Dagger* I could call those on demand, and see red things on compas plus notifications form script.. so when I do this the squad making leaps that sometimes 10-50k units per click, highly unpredictable yes, and squad can spread thin during this (that is not a big problem thou as "unstuck part" have special approach to those who got stuck in uloaded area while their squadmates are not - they send like reinforcements, not implemented yet, but the reinforcements already are) About persistance thing: if moveto works on it then it is persistent? It is also referenced by property and touched(moved) in a non-esm plugin, I heard all those things are making things persistant, but there are many levels of persistance and may be there is "not enough persistance" thing. And by the way the later is a good reason to worry less about persistance consuming memory as most of mods are not master files and still users can load pretty many of those. Actually I tested it with said barrel - set its coordnates to 0,0 in TESEdit and when mod is not master it can be seen at all times near Bleakwind Basin or something, and while plugin is a master - it cant. PS IMPORTANT UPD Did some research: it seems that after doing moveto() Enablenowait() thing they move for 218 or 436 units per onupdate(), which happens every 4 seconds, those are fancy numbers as 436 is double 218 and it is obvious that "movement simulation" occurs 1 times per one interval and two per another, like once every 3s or something, so speed is 654 units per 8s or rougly 82 units/per second, rather slow. But that is not the only thing I did. I added another debug dagger that teleports squad to loaded area and back and numbers had changed alot: 1000 to 2000 per onupdate! Also for some reason that notification begin to pop more frequently, not yet understood why as I use RegisterForSingleUpdate(4.0) and cant think of reason why I can see 4 lines of text in notification area at the same time. So I kinda go back to the beginning with this - I still would prefer to move them in enabled state to loaded area and back as it is the only thing that works satisfying. PPS was experimenting and got even more wonderful stuff! To be short I just put up facts: -Bandit boss in heavy armor sprinting towards player in loaded cell on flat terrain about 2000u per 4s. -They move pathing while Disabled! That was unexpected! If I disable them for 2seconds(which does one of my experimental functions) and then enable they skip 10k to 14k units in their path, that is while they move at 218 units per tick... it quicly rises to 40k+ when they path at 1000 per tick. -If they jumped in their path like above they still arrive simultaneously. PPPS If someone wants to share more intel like this feel free to contact me or invite to some chat. I enjoy scripting for bethesda games and got almost nobody to talk about it.
  4. Short answer - problem solved as I can spawn disabled npc even on the player head and then moveto them anywhere. But I still wonder: do placeatme or placeactoratme always spawn actors in loaded area? Because I was near Whiterun and reference was a barrel near Riverside Shack, getdistance attached to debug.notification showed like 110k units between squad leader and destination (that activator which stalking player) when I wasnt using PlaceAtMe, well it shows the same after moveto. And now I chose playerref instead of barrel to observe is there any blinking. But the question is in the first sentence of this block of text, because without "initialy disabled" and without moveto "barrel.placeatme()" places them in distance 8-17k from player. It even does not matter where player is! Barrel is 110k from whiterun. If you interested in things what I am doing: it is not about bandits, but I use them for testing. It is kinda horror/survival/sneak/escape thing. There are few things that stalk player but shortly: a grid of start points, worldspace anchors - used to run getdistance upon and see if it is less then few millions, stalking markers which do not leave corresponding worldspace, stalking markers that follow player anywhere, the system of intercepting running player and of calling reinforcements, and the most complicated one - system of bypassing any kind of stuckness xD Also there is parent quest that manages starting of this based on conditions and holding data, so it is most likely that reference upon which the things spawn will not be in loaded area, once conditions are met its choice based upon on coordinates in worldspace. I am avoiding SM for now, want to do it hardcore. It heavily relies on coding and I am unsure if I finish it, but I trying to make it before my 30 birthday.
  5. Thanks for the Enable/Disable hint - it really works (problem #1)!) Sorry for long delay - I was busy. Its not that I was ignorant or something, I've got your clue, but the problem is whenever I use PlaceActorAtMe() or PlaceAtMe() (they proved similiar in this matter) the package is running already... well because it places actors not on a reference upon which it was called, but into loaded area instead. It really strange thing and am I the only one getting such or it just some lucky mix of conditions? It is not just any place in loaded area thou - it seems to prefer place where calculated NPC path enters loaded area. Tested this also with interior and bandit swarm got spawned right near main entrance, instead of reference which was near Riverside Shack like 140k units from oustide entrance. So in order to test Enable/Disable thing I had to revert from placeatme() to previous system where quest makes placement of npc. If this behavior of PlaceAtMe() is reliable it could be used for sending reinforcements. However this works, thanks again: About patrol thing - in my case it is follow package as it works well for dynamically moving destination, also if set large radius (distance between "close enough" destination and target reference) it helps against being stuck due to target use jumping to traverse imposible terrain, outplacing my old backtracking system. Target of package is activator type marker which gets moved towards player or something else on some conditions. There are few types of such markers and conditions for different worldspaces, for interiors etc, and getdistance() used to check where two are in the same WS and some calculations. Also I wonder if this part of PlaceAtMe() has been reversed by SKSE team. Probably a function that finds and returns pathnode or something that matches conditions would be one good to have.
  6. I'll write more extended post later, but the first problem is that package seems not working until they are loaded or player wait, I mean: I load save, type in console "bat dev" which enables tgm, sets speedmult, adds debug dagger, which on equip starts quest. And debug notification says they stand still. If I wait they teleport and then work, but that is not as I want them to. They also work just fine if I move them into loaded area and back. PS I will look onto OBIS, seems like very cool mod from what I saw.
  7. So I ran into another issues which are undocumented: First one is that when actors spawn by quest somewhere like 50000-100000 units from player (and even right outside the cave I just entered, doesnt matter as long as cell is unloaded from begining) they just stay, despite having package to run to some activator. Package itself works flawlessly as long as quest starts in a loaded cell (from onload() event like random encouners). I tried EvaluatePackage(), StartCombat(Player), MoveToPackageLocation() on different package and switching and for now the only satisfying way is MoveTo to loaded area with alpha 0.1 aggression 0 etc and back. Is there any conventional way to make them move on their own before player hit "wait" ? Second problem is with PlaceActorAtMe. I reworked entire system so now aliases do not spawn at filling, but they instead optional and spawn when calling function(it happens onupdate every 4 seconds as long as deployed == false). Kinda thought that may help with first part, as placeactoratme make them special in terms of persistance, as well as forcerefto() and it can help with package starting. Here is version of function with return after one spawn, first version threw all of them into world at one loop, however this makes no difference. It gets same result: they dont spawn at obj1, instead they spawn somewhere between obj1 and player, on a distance varying from 8000 (like 2 cells) to 17000. And if if happens to be uloaded they get stuck. Obj1 is a barrel 100000 units away from player position on save, which I use for testing. It is okay for sure as I made function within same script that teleports player there and it is still that obj1. function DeployAllByOne(objectreference drop) ;;;((ccccBanditTypes.GetAt(0) as ActorBase), 1) if drop == none return endif actor spawn int ida = 0 while ida < refaliasarray.length if refaliasarray[ida] != none if (refaliasarray[ida] as ccccwealiasscript) != none && (refaliasarray[ida] as ccccwealiasscript).reinforcement == false if refaliasarray[ida].GetReference() == none spawn = drop.PlaceActorAtMe((ccccBanditTypes.GetAt((refaliasarray[ida] as ccccwealiasscript).flistID) as ActorBase),1) refaliasarray[ida].ForceRefTo(spawn) (refaliasarray[ida] as ccccwealiasscript).SpecialInit() debug.Notification("Deployed: " + ida) return endif endif endif ida +=1 if ida > 12 deployed = true endif endwhile endfunction Has anyone dealt with these?
  8. Thanks! I wasnt aware about double OnInit() with quests, thought about it as of some bug like double perks with unreliable behavior. About second part and "if refaliasarray[inam] != none" I figured it out shorlty after posting, final line was about it. Aliases get into this array during their OnInit() so there are only two variant what is inside array - either none or alias with ccccwealiasscript, as only it can call function that adds it. Also interesting part that all aliases get OnInit() as game starts as well. When quest wasnt running but script was - then I already had full array of aliases. So while alias has no ref like objectref it is already have aliasref that can be put into array or variable. In my quest script OnUpdate() was a debug function that counted aliases total, aliases with ref and alias that are for recycle. If this is how it works in a game then considering all the quests and all the aliases it makes quite the impact on preformance. Also in my quest aliases have randomized part in the first RegisterForSingleUpdate time, so they better distribute load.
  9. Sorry for epic topic name but I cant say it more short So I was making a mod and was testing it on a nonclean save and all was OK, I did it for a reason - I could not fix thing I am about now so I moved to old good save to spend time developing and testing game mechanics, but now I am finishing it and it comes to this. There are two problems: First one - it kinda runs immediatly as I start game(because of Debug.notification I put into OnUpdate) at first I thought that Quest that supposed to be launched on a script event somehow launched so I broke all ways of it by commenting stuff or adding return - does not helped. That wasnt happening before and I dont know why. Its also have all its aliases empty, even those that not relied on SM Event Data. I figured out that quest is not running _ isRunning() == false isStopped() == true isStarting()==false _and it is a script that is alive for some reason. None of that were happening on dirty save. Funny thing thou - its parent quest script was working too, but I forgot to set is as Start Game Enabled. Also it creates alot of text in Papyrus log, to which I get in a second. I kinda minimized this stuff by first adding condition into OnInit event on quest that returns if quest "isStopped", it reduced log size a little but not much. Second I added another state which scripts locks on to if condition is met, there I declered another oninit. So now it works, but poops int log alot and can produce lagspikes. Fact that script does well all I wanted it to do makes me little more happy but it is still something weird and a problem. Interesting thing is that most of errors in logs happen before quest is launched, but this mess not accompanied by lagspikes. Lagspikes begin to manifest when I kill about 12-15 NPCs from quest and can go away if I run around and return to battle and pile of corpses. But I was testing while have opened editor and browser (they take alot of RAM). Second one is a continuation of first: in Papyrus Log it says that functions are called on none: [12/10/2019 - 07:17:31PM] Error: Cannot call reinforcement() on a None object, aborting function call stack: [ccccWETESTWEWEWEWEW (14014C0D)].ccccwescript.placereinforcements() - "ccccWEScript.psc" Line 273 [alias ImperialScout1 on quest ccccWETESTWEWEWEWEW (14014C0D)].ccccwealiasscript.OnUpdate() - "ccccwealiasscript.psc" Line 154 Also warnings many warnings: [12/10/2019 - 07:21:34PM] warning: Assigning None to a non-object variable named "::temp22" stack: [ccccWETESTWEWEWEWEW (14014C0D)].ccccwescript.placereinforcements() - "ccccWEScript.psc" Line 273 [alias reinforcement1000 on quest ccccWETESTWEWEWEWEW (14014C0D)].ccccwealiasscript.OnUpdate() - "ccccwealiasscript.psc" Line 154 The thing is - now I made it work good on clean save but it is creating huge Papyrus Log and now I think it is freezing VM sometimes - because of lag spikes somtimes and because it clearly displayed in the log. Mod basically makes some NPCs to stalk player and they have some helping scripts(which manage packages and unstuck them) and one of them is "leader" also has registered for LOS Event for player and can drop tail of markers (which are activator and can be moved and recycled). At beginning I was used modified Wildernes Encounters scripts but the now its almost nothing from them left here. So there is no complicated stuff, but still too many lines of code. It is made like Wildernes Enconter same principles but also optional aliases which can be recycled, corpses are stored into array and cleaned all at once after some time when quest stops. Non-optional aliases scripts unregister for updates and anything as they die. Optional are doing same, but can be brought back by function call. What can cause problem? That function placereinforcements() returns int for debug purposes and has no arguments. Here is part of its code. Line 273 is one where I read 'reinforcement' property on ccccwealasscript. It is bool property that distinguishes recycling alias from nonrecycling. Isfree() is a bool function that checks whether is is not in use. Arrays are all of 32 size, and there is 12 aliases. int inam = 0 int freereinforcementid = 200 if reinforcementsnum >= reinforcementsmax return 210 ; reinforcements are at max endif inam = 0 while inam < refaliasarray.length ;searching for alias for new bandit ;;;reinforcement if (refaliasarray[inam] as ccccwealiasscript).reinforcement == true if (refaliasarray[inam] as ccccwealiasscript).isFree() freereinforcementid = inam endif endif inam+=1 endwhile inam = 0 if freereinforcementid == 200 return 220 ;no free alias endif PS now forum said I cant post because I am not logged That was very scary as English is not my native language and I thought all text is lost.. UPD just realized that some elements in array are empty Errors are gone, but the first part is still mysterious.
  10. by the way it is not retroactive if used as plugin.... which is weird... may be something else is setting this global and it would explain high chance. You can check it in console using "help DLC01RE 3" line and set with "set DLC01REPercentChance to 33" line. I was thinking about what value I should use and stopped at 33 because those RE are action packed in contrast with "gassy settler" so 25 may be not enough. 1/3 seems fair.
  11. Well that RE with mirelurks truly do contain number randomizer, sorry that asked you before looked onto it myself. It is REsceneRJ01 and also very often happening RE, but it seens okay now. About object RE, about dead bodies and kill script - I know all this, I am noob but not that much and I also read all this topic and remembered it (about Object RE I knew even before it as I digged into this myself). And I talk about random encounters only as it is right place for it. By the way that dead settler with note from RE disappeared and RE spot come alive after I took that 10mm from HaluciGen it was pointing to. Or may be it is becaut another 2 hours of gameplay passed by the moment I visist it, so it works probably. Howewer I still get confused when I see lots of corpses from more than one RE quest at one spot. Also there is that RE most likely ReChockepointSC03 (from now on I will be like this) , when Raiders demand money from settlers and if you kill raiders and settlers are alive you can send them to your settlement. And ofcourse they are not vanish when unloaded. Their dead bodies (if you wasn quick enough to kill raiders or if grenades was used by raiders) howewer too. But spot is working, I just dont know if there is some way to know if they are held by quest or something so I may want to terminate it or can I just disable + markfordelete them. Also not quite understand why you mention OnLocationChange. If it is about my mod then I dont use that function anyway as I want it to be reliable as kalashnikov, there is OnTimer event and GetLocation function. And well... another reason is that OnLocationChange function should be called on actor - player in this case, but I just could not do it for some reason as script wasnt attached to player and as I have really strong hate for "registerforupdate" just like to "oninit" event and anything basically that not look 100% reliably. Also a question - as I not against "fixes" that are used like tools (like that fix for respawn) - is it safe to make a tool (may be even txt file for running with console command bat) that will set stages to all RE quests and to use it in case of problems? About screens attached - RE spot near Sanctuary - you see bodies of "Junkie + 3 Bloatflies" RE and fresh corpses of "Pack of wild wongrel" RE. So trigger got rearmed and made new RE, but those bodies from old one are still there. Not sure how it will be in few hours thou. Another one is at the dam near Sunshine - there is corpses of settlers from ReChockepointSC03, as said above and a thirsty guy (as I remember it is Object type so I can say Goodbye to this spot). How do I know if I should stop some quest or do something to make things right? You see - one of settlers was alive and I sent him to Sanctuary. It probably not going to be unloaded, howewer in another playtrough raiders killed all three settlers and spot was disabled for some reason and corpses remained. And screen showing that I should not worry about number of mirelurks.
  12. 1) there passed 2 ingame hours(real life hours but spent in game) and I cleared in meantime ArcJet, and few places beyond, but that Body in Sunshine Tidings is still there and nothing new spawns. The only mods I run is UFO4P, CBBE, console enabler for survival - changes one GMST, and my mod to fix item/container reset bug. It only contains two simple scripts - one detects location change and other teleport player into interior cell and back. 2) I know the difference, I talk about random encounter with 3 Mirelurks. It often spawns 2 and rarely one, but there is always 3 piles of dirt and I remember that when I played after game release there was always 3 Mirelurks. And it is begining of game so none of cell yet reset. Is it normal behavior(when RE missing some npc)? 3) okay I look onto that more carefully, may be it is a matter of place, but I just tried to move my ton of items from my stash near the place when you first see BOS (that square with ghouls) to Jallbert's Brother Disposal and has to do more than 6 runs back and forth and there was 3 RE zones(one in building where always fights going, near Corvega-Lexington, one one road near bridge to Beantown Brewery, and one near broken building that leads to square) nearby and they all spawned robots and rust devils... each time, I just tired of looting it and it was always back there and always robots. Well 6 times x 3 RE zones gives 18 times 50/50 for robots to win, that is still possible but it may be some jam in scripts. 4) I can get you screenshot of that safe and red box in midair and a savegame, initialy it was on top of dirtpile. And about something happening in front of me - and I not talk about landscape as it never happens, I tals about RE assets - can this be connected to cooldown timer from UFO4P expiring this moment or is it because of overloaded script engine that you tried to save by adding this timer? (that is not about RE on screenshot, it is about others, camp type mostly). I just lack info so I dont know what should I do with it.
  13. Hello, good people! I am not yet good with papyrus and quests system, just wrote two scripts to do something with item respawn in exterior cells, but I read all topic with attention. I am using last version of UFO4P and there is still a problems with random encounters. If you save game when cell with RE bodies is still loaded and then load it (I play on survival and the only way to save there is by sleep and ususally RE near Sanctuary Hills or 2 to 4 RE near Sunshine Tidings are close enough ) than bodies will remain and not disappear. I guss it means that quest is still holds them and running. But next there could be two ways of how things behave: On some games that RE stops to spawn anything, on other it spawns, but old dead body is still there (which means quest is running). Sometimes there may be lots of corpses like dead settler, 3 ghouls, 3 raiders with pickman's message and a dead gunner - and there spawns raiders for some reason but I dont thing they are part of RE, but thats result in many corpses. Another thing is that sometimes not everything spawns - like 1 or 2 mirelurks instead ot 3, or 3 raiders trying to get money from 2 settlers instead of 3 (and usually kill them too fast). The next time there may be only 1 Mirelurk or so (is he one that didnt spawn last time?). And another thing is that object encounter sometimes despawn what they placed. Well what would I do with master-locked safe on level 2? Funny thing thou - its contents are already determined according to level 2 character. And later it is usually still there, but sometimes not, or sometims pile of earth under it is missing and it floating in air. In my first attempt to play FO4 on april there was radioactive barrels(without radroach) that disappeared (but zone left disabled forever like it should). And another one - I noticed that on some ocasions objects form RE like container or beds get disabled or enabled in my sight - can it be because of overloaded script engine or it is result of new cooldown system? Well first time I saw that I just loaded previous save that was a hour ago, and other time green long bag disappeared while I was looking at it (there was no RE at the moment I got there). And there is that problem when RE from robot DLC outplace any other as soon as I found Ada. No more child of atom or supermutants. Why this happening? Sorry for bad english, I just want to help and to better understand things so may be I can fix something myself and do it right away. It is horrible how I hate bugs and imperfection while I want to play in this game from day of release bugfree.
  14. I think he is talking more about final result of fixing such not-a-bugs. Like what will be done to it. And if it is just changing count from 7 to 1 or adding next level LL with random count from 1 to 7 - it can be called "correct". But if there would be less chances of "none" it would be subjective and wrong and such changes probably better come in separate file. If I was one responsible - I personally not want such small thing to be changed as part of one big project. Especially while there is many things need that fixing like those for talking about I came here. Just my opinion. PS Sorry for bad English.

Support us on Patreon!

Patreon
×
×
  • Create New...