ACS read/write to file
Moderator: GZDoom Developers
-
- Posts: 2271
- Joined: Mon May 24, 2004 8:25 am
- Location: Ålesund, Norway
ACS read/write to file
Just sharing a thought..
Wouldn't it be cool to have ACS able to read and write variables, strings etc. to files for later use? Say if you do some stuff in a map, then quit ZDoom, then start the same map the next day, and the map responds to what you did the last time?
Examples could be:
Like HL2's main menu; the background is where you left the game the last time,
A high-score list, so that you can keep track of your previous scores,
etc.
Thoughts?
Wouldn't it be cool to have ACS able to read and write variables, strings etc. to files for later use? Say if you do some stuff in a map, then quit ZDoom, then start the same map the next day, and the map responds to what you did the last time?
Examples could be:
Like HL2's main menu; the background is where you left the game the last time,
A high-score list, so that you can keep track of your previous scores,
etc.
Thoughts?
-
- Lead GZDoom+Raze Developer
- Posts: 49193
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
-
- Posts: 113
- Joined: Mon Aug 30, 2004 1:52 pm
- Location: Still hell... Somewhere
Actully this would be quite nice for some effects (like the HL2 thing)
You could maybie make a code an episode system, where when you reach that eppisode you can now play it directly from the 'New Game', or make it so behind the menu is a different titlemap depending on how far you are in the game, and many othber things (that i cant think of)
I agree that starting a map from new should make the map back to normal, but other things could be done!
You could maybie make a code an episode system, where when you reach that eppisode you can now play it directly from the 'New Game', or make it so behind the menu is a different titlemap depending on how far you are in the game, and many othber things (that i cant think of)
I agree that starting a map from new should make the map back to normal, but other things could be done!
-
- Lead GZDoom+Raze Developer
- Posts: 49193
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
-
- Posts: 4019
- Joined: Fri Aug 15, 2003 8:15 pm
- Location: ferret ~/C/ZDL $
-
-
- Posts: 10773
- Joined: Sun Jul 20, 2003 12:15 pm
-
- Posts: 13549
- Joined: Wed Jul 16, 2003 3:52 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Germany
Re: ACS read/write to file
Think about the possibilitesjallamann wrote:Just sharing a thought..
A high-score list, so that you can keep track of your previous scores,
etc.

-
- Posts: 802
- Joined: Sun Oct 31, 2004 5:06 pm
- Location: Raleigh, NC
-
- Posts: 2271
- Joined: Mon May 24, 2004 8:25 am
- Location: Ålesund, Norway
Re: ACS read/write to file
And without having to load a specific savegame too...Tormentor667 wrote:Think about the possibilitesLet's say - without the usage of savegames, you have to get a good highscore which unlocks new features of the game permanently without using the savegameslots!
Of course, I can see why Graf doesn't like the idea, but I think there are more possibilites than bugging the player...
-
- Posts: 456
- Joined: Sun Dec 28, 2003 7:40 pm
- Location: Netherlands
-
- Posts: 7656
- Joined: Sat Aug 07, 2004 5:14 am
- Location: Some cold place
-
- Lead GZDoom+Raze Developer
- Posts: 49193
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
CodeImp wrote:If ACS could read and write files, people could write viruses, spyware and trojans of any kind with it. You'd be reading my passwords and personal files while im playing your map. This is a very bad idea.
Don't tell me. Guess why I think it's a bad idea. Doom maps should be self contained without any access to the outside. At most they should be allowed to write variables to ZDoom's config but nothing more under any circumstances!
(You can copy this to the HTTP access thread as well! The same logic applies.)
-
- Posts: 2271
- Joined: Mon May 24, 2004 8:25 am
- Location: Ålesund, Norway
Tell me how you'd write a virus/trojan/whatever if the script would read and write plain text files (that means not password files and such, also the editor wouldn't know where your personal text files would be stored anyway) and the only new commands would be something like
Code: Select all
file_read(str filename; str location, int var1, int var2, int var3 [...])
file_write(str filename; str location, int var1, int var2, int var3 [...])
-
- Posts: 1325
- Joined: Thu Dec 11, 2003 5:03 pm
What about a new type of lump file? An entry that ACS can write and read to, and after the game is done, anything in it still remains. It would be just a file that contains variable data dumps. I have no idea on if this would even be possible though as I am not really a programmer of any kind.
Limiting the size the file can get would need to be done, so someone doesn't create a loop that constantly increases a file's size. Creating an external file may be something some people don't want, especially if the location can be chosen by whomever created the map.
Limiting the size the file can get would need to be done, so someone doesn't create a loop that constantly increases a file's size. Creating an external file may be something some people don't want, especially if the location can be chosen by whomever created the map.
-
- Posts: 2529
- Joined: Mon Mar 22, 2004 7:00 pm
- Preferred Pronouns: He/Him
- Location: California, USA. Previously known as "Agent ME".