External data

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

External data

Postby DavidN » Fri Dec 15, 2017 10:33 am

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.)
User avatar
DavidN
 
Joined: 28 Dec 2015

Re: External data

Postby Blue Shadow » Fri Dec 15, 2017 9:38 pm

There's this, but you can only read things from a loaded lump.
User avatar
Blue Shadow
 
Joined: 14 Nov 2010
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: ATI Radeon (Modern GZDoom)

Re: External data

Postby Nash » Sat Dec 16, 2017 1:29 am

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...
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: nVidia GTX or Quadro with Vulkan support

Re: External data

Postby DavidN » Sat Dec 16, 2017 10:25 am

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.
User avatar
DavidN
 
Joined: 28 Dec 2015


Return to Scripting

Who is online

Users browsing this forum: No registered users and 2 guests