Spawning Anomalies, the Bane of My Existance

User avatar
DoctorX
Trespasser
Posts: 52
Joined: 10 Mar 2016, 00:36

Spawning Anomalies, the Bane of My Existance

Postby DoctorX » 14 Aug 2017, 21:06

Still trying to get my Dynamic Anomalies addon to actually randomly spawn and delete anomalies with each blowout, and still keep running into a random crash situation which corrupts the save.

I'm starting to think every now and then one of the anomalies that is spawned is invalid, and the crash comes when I try to delete the invalid obbject.

My question is what is the best way to test for an invalid object, specifically with an anomaly? Right now I do check for a nil return on creation, but is there a "magic number" object id range I should be testing for or anything like that?

User avatar
Alundaio
S.T.A.L.K.E.R.
Posts: 1368
Joined: 26 May 2012, 22:26

Re: Spawning Anomalies, the Bane of My Existance

Postby Alundaio » 14 Aug 2017, 21:19

Not really a way to check it.

The usual technique that other people are using for dynamic anomalies, is already using all the existing ones in the level, but just changing their position. You can try that approach if you feel you have reached a dead end.

Might want to litter the anomaly binders (and server entity class binders) with print statments. Make sure each function starts and ends. Sometimes undefined errors in engine cause script to just quit executing, that is why I have alun_utils.debug_write everywhere marking start and end. This particular error is especially bad if it happens to a script function bound to engine, such as the action planner, because it will call script over and over causing a stack overflow. Then you can just either manually look in log to inspect it's correct or use a clever regex in NPP or write a custom parser to detect such a thing in the log.

Place to start would definitely be anomaly save/load. If load is silently failing then object will be broken for sure. If there is no update, object is broken. etc.
"I have a dream that one day this community will rise up and live out the true meaning of its creed: "We hold these truths to be self-evident; that all mods are created equal."

User avatar
DoctorX
Trespasser
Posts: 52
Joined: 10 Mar 2016, 00:36

Re: Spawning Anomalies, the Bane of My Existance

Postby DoctorX » 15 Aug 2017, 05:34

Awesome. Thanks Alundaio!


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 2 guests