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.)
External data
Moderator: GZDoom Developers
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.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
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.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
-
- Posts: 4988
- Joined: Sun Nov 14, 2010 12:59 am
Re: External data
There's this, but you can only read things from a loaded lump.
-
-
- Posts: 17454
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: External data
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...
I can imagine Things Blowing Up (especially concerning the deterministic playsim stuff Doom relies on) if things were any other way...
-
-
- Posts: 266
- Joined: Mon Dec 28, 2015 6:22 pm
Re: External data
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.