Page 1 of 1

External data

Posted: Fri Dec 15, 2017 9:33 am
by DavidN
Hi everyone!

A thought on a whim - does ZScript have any capabilities for retrieving data from outside sources during runtime, not just during initialization? I'd like to read variables from a file and to use their results to affect the game world.

My actual goal is an experiment to get ZDoom to react to changing data that comes from a URL, but as having a feature do to that would be wide open to abuse, I imagine that I'd have to put a middleman in to poll that endpoint and dump it to a local file. (This isn't anything I'm planning on releasing - just something fun for an engineering day at work, creating a literal "troubleshooter" in ZDoom.)

Re: External data

Posted: Fri Dec 15, 2017 8:38 pm
by Blue Shadow
There's this, but you can only read things from a loaded lump.

Re: External data

Posted: Sat Dec 16, 2017 12:29 am
by Nash
Don't quote me on this but I don't think ZDoom ever reads anything at runtime... all data is built at startup (even the INI config stuff is only read on startup once I think, so if you change your INI outside during a running session, it won't affect the game).

I can imagine Things Blowing Up (especially concerning the deterministic playsim stuff Doom relies on) if things were any other way...

Re: External data

Posted: Sat Dec 16, 2017 9:25 am
by DavidN
Thanks for the thoughts - it makes perfect sense that this would not be officially supported :) I'll try my hand at the lump reading way.