Script Dump

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Script Dump

Re: Script Dump

by Drake Raider » Wed Dec 26, 2018 8:47 pm

I don't know ZScript, so ACS or Decorate would be my target area. It would be really helpful, for instance, in a script I'm fighting with right now where I'm trying to adjust a global string variable but I can't tell what the value is upfront.
However, it would be particularly useful when transitioning to ZScript as well, to help buffer the learning curve.

Perhaps a filter could be used in the dump, that holds all builtin actors in decorate, say, and automatically deletes any functions from the dump log that are created by builtin classes?
In case that made no sense, instead of trying to filter which things get reported by the engine, have the printout itself filter things afterwards. Like, say, format the output this way:
ACTOR <NAME> TNT1A A_FunctionDemonstration(x,y,b,c) when an action function is called, or
ACTOR <NAME> <StateLabel> <Pointer> when a pointer is called.

Then have the dump check for any actors in the dump that share classes with builtin ones, like ACTOR DoomImp, and delete those entries.
This doesn't fix the performance of course, but would fix the readability problem. (As long as people aren't hacking GZDoom.pk3 itself, but that's really on them.)
For the performance you could have a toggle where it only checks the information if a CVar is active perhaps?

Re: Script Dump

by Graf Zahl » Wed Dec 26, 2018 1:40 am

The main problem here is not the VM but how the JIT compiler deals with it. On the plain VM this could be easily added but I'm not sure it makes sense to do it in the JIT compiled code, so anyone using such tracing features would have to disable it.

Re: Script Dump

by Rachael » Wed Dec 26, 2018 1:24 am

Graf Zahl wrote: While this could certainly be done, don't forget that it comes with a performance penalty even if the feature won't be used!
Couldn't this be alleviated by the use of function templates? Or are the VM's too complicated for that?

Re: Script Dump

by Graf Zahl » Wed Dec 26, 2018 1:09 am

ACS or ZScript?
While this could certainly be done, don't forget that it comes with a performance penalty even if the feature won't be used! In addition, I doubt it would give you any help. There' so much scripted code already that the little bit you are interested in would get drowned in the noise from all the internal things that are running.

Re: Script Dump

by Rachael » Tue Dec 25, 2018 10:24 pm

Drake Raider wrote:Also, Admins, if this is not in existence, could you move this to Feature Requests? I'm acting under the assumption that I just don't know what I'm doing currently. But if there is no such feature, it would be good for those circumstances where the game doesn't actually crash, just lags halfway to heck.
In the future, you can just make it here. It's better to have a dupe than nothing at all. And it is a useful feature, but if it gets implemented I doubt that will happen quickly.

Script Dump

by Drake Raider » Tue Dec 25, 2018 2:32 pm

I apologize if this has been asked before.
I'm curious, is there a way to dump the functions that are being used to a text file? So say, if I accidentally looped a script too much, and it hangs the engine, I could see which one was getting called too many times?

Also, Admins, if this is not in existence, could you move this to Feature Requests? I'm acting under the assumption that I just don't know what I'm doing currently. But if there is no such feature, it would be good for those circumstances where the game doesn't actually crash, just lags halfway to heck.

Top