ACS read/write to file

Moderator: GZDoom Developers

User avatar
jallamann
Posts: 2271
Joined: Mon May 24, 2004 8:25 am
Location: Ålesund, Norway
Contact:

ACS read/write to file

Post by jallamann »

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?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49066
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

No.

That's what savegames are for. If a map is started fresh it should be independent of the last time it was played.
RabidZombie
Posts: 113
Joined: Mon Aug 30, 2004 1:52 pm
Location: Still hell... Somewhere

Post by RabidZombie »

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!
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49066
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Yes, you can do all kinds of annoying shit with it but everything I can think of would annoy me endlessly. I'm still against it.
User avatar
Bio Hazard
Posts: 4019
Joined: Fri Aug 15, 2003 8:15 pm
Location: ferret ~/C/ZDL $
Contact:

Post by Bio Hazard »

i would be nice to write to files in a sense that you could interpret the result with an external program, to make like, a spreadsheet or something
User avatar
Xaser
 
 
Posts: 10772
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Post by Xaser »

This would be useful for, like, a high score table of some sort. It could write the score to a file and then make it show up later and stuff.
User avatar
Tormentor667
Posts: 13533
Joined: Wed Jul 16, 2003 3:52 am
Contact:

Re: ACS read/write to file

Post by Tormentor667 »

jallamann wrote:Just sharing a thought..
A high-score list, so that you can keep track of your previous scores,
etc.
Think about the possibilites :) Let'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!
User avatar
Your Name Is
Posts: 802
Joined: Sun Oct 31, 2004 5:06 pm
Location: Raleigh, NC
Contact:

Post by Your Name Is »

I liked the titlemap.
User avatar
jallamann
Posts: 2271
Joined: Mon May 24, 2004 8:25 am
Location: Ålesund, Norway
Contact:

Re: ACS read/write to file

Post by jallamann »

Tormentor667 wrote:Think about the possibilites :) Let'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!
And without having to load a specific savegame too...
Of course, I can see why Graf doesn't like the idea, but I think there are more possibilites than bugging the player...
User avatar
CodeImp
Posts: 456
Joined: Sun Dec 28, 2003 7:40 pm
Location: Netherlands
Contact:

Post by CodeImp »

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.
User avatar
TheDarkArchon
Posts: 7656
Joined: Sat Aug 07, 2004 5:14 am
Location: Some cold place

Post by TheDarkArchon »

What if it is just plain text files?

That way you can't make viruses for it.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49066
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

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.)
User avatar
jallamann
Posts: 2271
Joined: Mon May 24, 2004 8:25 am
Location: Ålesund, Norway
Contact:

Post by jallamann »

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 [...])
User avatar
chopkinsca
Posts: 1325
Joined: Thu Dec 11, 2003 5:03 pm

Post by chopkinsca »

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.
User avatar
Macil
Posts: 2529
Joined: Mon Mar 22, 2004 7:00 pm
Preferred Pronouns: He/Him
Location: California, USA. Previously known as "Agent ME".
Contact:

Post by Macil »

Or how about it can only read and write files in WADINFO\ subdirectory or whatever the user sets in the config?
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”