Issues with your account? Bug us in the Discord!

Save / Load problem

Well, saving and loading didn't work the way I hoped. :( It seems to save the game just fine, BUT then it attempts to return the player to the main base screen - that is the EOC base screen. This results in a crash to desktop. The same thing occurs in loading and saving.

However, there is a workaround that might work. The game file is actually saved, and while there is no way to read the data within (that I know of) there is a way to get the name of the file as a string. We can store the necessary globals into the filename and then use string manipulation functions to get them out again. Its not pretty, but it might just work.

The downside is that every time the player saves the game, it crashes. It crashes so hard that it even messes up directx and you'll need to restart to play again.

One other possibility that I can think of is to find the package and the function it tries to use and then replace it with our own package which does nothing. It might be a pain to find the package used. Alternatively, have our campaign GUI working on the same level as the player base screen.

Comments

  • IndieIndie Moderator
    Mmmkay...

    A jury-rigged Buda5 loader is now operational. It iterprets the savegame name and uses it to determine which globals are changed. The save name is determined in the program so the player can't incluence that. For now, it only reads one variable - the current mission. More can be added, although savegame names will then become strange: Explorer_Mission01_B2_C57_D22...

    Cons:
    -It crahes to desktop [B]every time[/B] you save.

    Pros:
    -Its not pretty but it works.

    I take it there are no better ideas?
  • [QUOTE][i]Originally posted by Indie [/i]
    [B]I take it there are no better ideas? [/B][/QUOTE]
    Whats about the idea I mentioned long before (last year) with the save information in the flux.ini? We can simply add keys ... a key for a mission, for the player name and for the points and so on.

    That are two functions then in the Campaign Handler.

    Save function -> write the keys
    Load function -> save the keys

    If you want me to do that I can focus on that tomorrow. It isn't difficult
  • IndieIndie Moderator
    Hmmm... yeah. That sounds very interesting. VERY interesting, in fact... What happens if non-modded EOC uses this new flux.ini? It ignores those lines?
  • No, I think we can add these lines In Game with POG. I will try this this evening.
    In general, they won't disturb the normal game.

    Disadvantage: An adept user can edit the "Saves" easily ... or we use a special "key".
  • [COLOR=sienna]-->Before continue reading read the bottom of the post plz![/color]

    I think we create a "Save.ini".
    Due to that fact that the player shouldn't find the file at the first sight in the Packet, I propose the following

    [size=4]INI File Location:[/size] [COLOR=red]ini:/text/general/save.ini[/color]

    [size=4]INI File Sections & Keys:[/size]
    [list][*][player]
    [list=a][*]pl_name[*]pl_rank[*]pl_score[*]... ?[/list]
    [*][mission][list=a][*]mi_code = [i]Code/Number/Name(?) of the current mission[/i][*]mi_behaviour = [i]The key expresses how the player behaved. (For the little story changes we've spoken from.)[/i][*]... ?[/list][/list]
    Comment: Another way is to give every mission a numbered integer key and set them 0 or 1.

    [size=4]FUNCTIONS:[/size]
    [b]Initialising the INIFile[/b]
    [code]INIFile_Create()
    {
    hinifile = Save;
    Save = INIFile.Create( "ini:/text/general/save" );
    }
    [/code]
    Heck, I just realized that in the SDK Help is no explanation how to write in an INI File. But that must be possible b/c at least in the Challenge Course V2 the POG file writes information in the flux.ini. I continue writing here when I know how to do.

    [COLOR=sienna][b]EDIT: We have to do it with Flux.ini! It only works with the [i]CONFIG Package[/i]![/b] Unforntunately I have spare time, so I will update this post later.[/color]
Sign In or Register to comment.