User Tag List

Results 1 to 3 of 3

Thread: Allow Setting the .sav FIlename in ag.cfg?

  1. #1
    ZC Contirbutor ZoriaRPG's Avatar
    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,029
    Mentioned
    95 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    3,585
    Level
    19
    vBActivity - Bars
    Lv. Percent
    17.45%
    Daily Activity
    197.63%
    Weekly Activity
    29.38%
    Monthly Activity
    9.36%

    Allow Setting the .sav FIlename in ag.cfg?

    I have considered adding a string to ag.cfg for the save file filename, and doing something like this (pseudocode):

    Code:
    char savefile[255];
    if ( GetSaveFIlename() != NULL ) { //store the filename from ag.cfg and use that. }
    else { //set the savefile to zc.sav }
    
    //Reference savefile instead of hardcoded zc.sav.
    That would make it easier say, to have the launcher set the save file, and to keep multiple save files around. It would also make some standalone stuff easier in the future.

    I was also going to add a field in ZLaunch for the executable names, so that the user can set the filenames used by Zelda.exe, ZQuest.exe, ROmView.exe, or whatever; and similarly for Linux, and store them in ag.cfg. THus, you could easily rename zelda-w.exe to zelda.exe without ZLaunch breaking. Likewise, if you wanted to make a standalone player, and a customised ZLaumch, all you would need to do is rename the window title element, and change the icons and othe text elements, and you could leave the paths stuff alone, (e.g. if you want to make a standalone game using the ZC engine).


    Featured Scripts & Headers: RPG.zh ( v. a0.97.1 ) ( RPG.zh Thread ) | Zelda 3 Thief's Town Treasure Chest Minigame (ffc) | Bobomb (enemy)
    ZScript & ZC-Related Pastebin | Quests and ZScript Repository | ZC Dev & Betas | Latest ZC 2.54 Beta | YouTube Channel
    All of the code that I create and publish here is free for use, modification and distribution under the GPL v2.0, or v3.0 where applicable..

  2. #2
    Administrator DarkDragon's Avatar
    Join Date
    Oct 2001
    Posts
    6,236
    Mentioned
    68 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    10,793
    Level
    30
    vBActivity - Bars
    Lv. Percent
    80.21%
    Daily Activity
    0%
    Weekly Activity
    1.13%
    Monthly Activity
    2.77%
    I don't see anything wrong with this (other than that you should use a std::string or other dynamic buffer, *not* a hard-coded buffer that will crash ZC when someone happens to place it nested deep in the file system), but what's the need for changing the save name?

  3. #3
    ZC Contirbutor ZoriaRPG's Avatar
    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,029
    Mentioned
    95 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    3,585
    Level
    19
    vBActivity - Bars
    Lv. Percent
    17.45%
    Daily Activity
    197.63%
    Weekly Activity
    29.38%
    Monthly Activity
    9.36%
    Quote Originally Posted by DarkDragon View Post
    I don't see anything wrong with this (other than that you should use a std::string or other dynamic buffer, *not* a hard-coded buffer that will crash ZC when someone happens to place it nested deep in the file system), but what's the need for changing the save name?

    True, on the srd::string point, for dynamic allocation. I was not going to allow it to be in another path though. Just a filename in the same path as ZC, so nesting it/buying it is not something that should be a problem, as it would always need to be relative to the ZC binary.

    As to why: Users frequently request that ZLaunch or whatever can use multiple save files. The way that the other launcher that Matthew made worked, was that it renamed save files and moved them around on the filesystem, which I think is a horrible idea. Apart from allowing a programme to muck about with filesystem data, this would need multiple implementations for each OS. I would much rather allow a user to choose a save file in the launcher, than to give the launcher the ability to manipulate files (other than its config file), if for no better reason than that copying the file and moving it around, could lead to damage, which would not occur by choosing a named save file (as this is read-only, not r/w/e).

    Further, moving files around, might not work on some OSes these days, based on user permissions. This again, makes multiple files, and selecting their names, a better choice.

    Last, for standalone projects, being able to name the save file to 'gamename.sav' would probably be useful, although this is a minority case of impact. For example, if someone wanted to make a custom adventure game, and hide the engine, then they ,ight want to rename the savename. I was planning to do something similar for the assets, which will come into play for module systems, later; so that stuff such as zelda.dat is specified from the config file, rather than hardcoded; making it easier to change out the datafiles for us, too.


    Featured Scripts & Headers: RPG.zh ( v. a0.97.1 ) ( RPG.zh Thread ) | Zelda 3 Thief's Town Treasure Chest Minigame (ffc) | Bobomb (enemy)
    ZScript & ZC-Related Pastebin | Quests and ZScript Repository | ZC Dev & Betas | Latest ZC 2.54 Beta | YouTube Channel
    All of the code that I create and publish here is free for use, modification and distribution under the GPL v2.0, or v3.0 where applicable..

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social