EXE Mod problem

Status
Not open for further replies.
Okay, so I made a EXE mod that has slopes and OpenGL enabled, plus with my WADs automatically added. I tried running it, but it said that 'sonic.plr' was corrupted or modified. I redownloaded SRB2 v2.0.5 into another folder, and I moved it back into my main folder. Tried it again, and still the same error!

Help would be appreciated.
 
Last edited:
As a question, how do you enable slopes or use them?

About the sonic.plr: This happened to me once before; I have a copy of SRB2 on my flash drive and copied the file from there and then replaced the erroring one. If you don't have a copy, though...
 
I know it's possible to render slopes in OpenGL but with NO collision. If you DO know how to make them with collision, you DO deserve an award.

Besides, if you just want to start up SRB2 with OpenGL and with your wad, create a txt file, write a command line (http://wiki.srb2.org/wiki/Command_Line), save, and replace the file extension .txt with .bat. And then, double-click the bat file.
 
Oh, so OpenGL is implemented into SRB2 now?

=D I know how to make a batch file.

IDEA FOR CODERS: I have no knowledge of coding, so here is a rough English idea to make slopes work--

Have the engine render the collision in the slope as a bunch of 1-fracunit-wide sectors with heights proportioned to be the average of the slope height in that fracunit. Then the engine just steps up and down from there. Might cause some lag, though... I don't know... But if you want to, use this idea.
 
Have the engine render the collision in the slope as a bunch of 1-fracunit-wide sectors with heights proportioned to be the average of the slope height in that fracunit. Then the engine just steps up and down from there. Might cause some lag, though... I don't know... But if you want to, use this idea.

I tried that, but I didn't get very far with that plan :(
 
Well, it says this now.
Code:
I_Error(): File is corrupt or has been modified: [I](yadamyfolder)[/I]\music.dta (found md5: c96a3293d27aba292c975caa7e79cf51, wanted: 331b9f1e04b8112648fc45b854362422)
And here is what the MD5 code IS.
Code:
// Check MD5s of autoloaded files
    W_VerifyFileMD5(0, "f699d4702b9b505db621e5ad5af4f352"); // srb2.srb
    W_VerifyFileMD5(1, "dfbbc38080485c70a84a57bb734ceee9"); // sonic.plr
    W_VerifyFileMD5(2, "1ea958e2aee87b6995226a120ba3eaac"); // tails.plr
    W_VerifyFileMD5(3, "331b9f1e04b8112648fc45b854362422"); // knux.plr
    W_VerifyFileMD5(4, "8f702416c15060cd3c53c71b91116914"); // rings.wpn
    W_VerifyFileMD5(5, "6b1cf9b41e41a46ac58606dc6e7c9e05"); // drill.dta
    W_VerifyFileMD5(6, "8d080c050ecf03691562aa7b60156fec"); // soar.dta
    
    // don't check music.dta because people like to modify it, and it doesn't matter if they do
    // ...except it does if they slip maps in there, and that's what W_VerifyNMUSlumps is for.
All I did right now is I enabled OpenGL and also made it where it would also exec an extra file with autoexec. Here is the code I added right below the autoexec COM_BufAddText thing.
Code:
COM_BufAddText(va("exec \"%s"PATHSEP"skyservexec.cfg\" -noerror\n", srb2home));
Help would be extremely appreciated now.
 
Okay, Sky.

"I_Error(): File is corrupt or has been modified: (yadamyfolder)\music.dta (found md5: c96a3293d27aba292c975caa7e79cf51, wanted: 331b9f1e04b8112648fc45b854362422)"

This suggests that, for some very odd reason, music.dta is the 4th WAD to be loaded.

Please show me the contents of the IdentifyVersion function.
 
What file is that in? I tried to search all files and it returned 0 results. Oh by the way when I started it up it IS the 4th file that is loaded in the DOS Command thing.
 
Last edited:
It's in D_Main.c. It's got the AddFile commands for the core WADfiles (Sonic.plr, srb2.srb, etc).
 
Okay, I found 2 places with IdentifyVersion.
#1
Code:
static void IdentifyVersion(void)
{
    char *srb2wad1, *srb2wad2;
    const char *srb2waddir = NULL;
#2
Code:
// identify the main IWAD file to use
    IdentifyVersion();
 
Quote the rest of the first one, down until the next header begins ( that says "Just print the nice red titlebar like the original SRB2 for DOS.")
 
Code:
// ==========================================================================
// Identify the SRB2 version, and IWAD file to use.
// ==========================================================================

static void IdentifyVersion(void)
{
    char *srb2wad1, *srb2wad2;
    const char *srb2waddir = NULL;

#if defined (__unix__) || defined (UNIXCOMMON) || defined (SDL)
    // change to the directory where 'srb2.srb' is found
    srb2waddir = I_LocateWad();
#endif

    // get the current directory (possible problem on NT with "." as current dir)
    if (srb2waddir)
    {
        strlcpy(srb2path,srb2waddir,sizeof (srb2path));
    }
    else
    {
#ifndef _WIN32_WCE
        if (getcwd(srb2path, 256) != NULL)
            srb2waddir = srb2path;
        else
#endif
        {
#ifdef _arch_dreamcast
            srb2waddir = "/cd";
#else
            srb2waddir = ".";
#endif
        }
    }

#if defined (macintosh) && !defined (SDL)
    // cwd is always "/" when app is dbl-clicked
    if (!stricmp(srb2waddir, "/"))
        srb2waddir = I_GetWadDir();
#endif
    // Commercial.
    srb2wad1 = malloc(strlen(srb2waddir)+1+8+1);
    srb2wad2 = malloc(strlen(srb2waddir)+1+8+1);
    if (srb2wad1 == NULL && srb2wad2 == NULL)
        I_Error("No more free memory to look in %s", srb2waddir);
    if (srb2wad1 != NULL)
        sprintf(srb2wad1, pandf, srb2waddir, text[SRB2SRB]);
    if (srb2wad2 != NULL)
        sprintf(srb2wad2, pandf, srb2waddir, text[SRB2WAD]);

    // will be overwritten in case of -cdrom or unix/win home
    snprintf(configfile, sizeof configfile, "%s" PATHSEP CONFIGFILENAME, srb2waddir);
    configfile[sizeof configfile - 1] = '\0';

    // Load the IWAD
    if (srb2wad2 != NULL && FIL_ReadFileOK(srb2wad2))
        D_AddFile(srb2wad2);
    else if (srb2wad1 != NULL && FIL_ReadFileOK(srb2wad1))
        D_AddFile(srb2wad1);
    else
        I_Error("SRB2.SRB/SRB2.WAD not found! Expected in %s, ss files: %s and %s\n", srb2waddir, srb2wad1, srb2wad2);

    if (srb2wad1)
        free(srb2wad1);
    if (srb2wad2)
        free(srb2wad2);

    // if you change the ordering of this or add/remove a file, be sure to update the md5
    // checking in D_SRB2Main

    // Add the players
    D_AddFile(va(pandf,srb2waddir,text[SONICPLR])); //sonic.plr
    D_AddFile(va(pandf,srb2waddir,text[TAILSPLR])); //tails.plr
    D_AddFile(va(pandf,srb2waddir,text[KNUXPLR])); //knux.plr

#ifndef _PSP // PSPDEV's CRT haves a limit of 16 files opened at a time
    // Add the weapons
    D_AddFile(va(pandf,srb2waddir,"rings.wpn")); //rings.wpn
#endif

    // Add... nights?
    D_AddFile(va(pandf,srb2waddir,"drill.dta")); //drill.dta
    D_AddFile(va(pandf,srb2waddir,"soar.dta")); //soar.dta

#if !defined (SDL) || defined (HAVE_MIXER)
    {
#if defined (DC) && 0
        const char *musicfile = "music_dc.dta";
#else
        const char *musicfile = text[MUSICWAD];
#endif
        const char *musicpath = va(pandf,srb2waddir,musicfile);
        int ms = W_VerifyNMUSlumps(musicpath); // Don't forget the music!
        if (ms == 1)
            D_AddFile(musicpath);
        else if (ms == 0)
            I_Error("File %s has been modified with non-music lumps",musicfile);
    }
#endif
}

/* ======================================================================== */
// Just print the nice red titlebar like the original SRB2 for DOS.
/* ======================================================================== */
There.
 
And when 2.0.6 comes you'll have to download another EXE again, because it being included in the first place was yet another gaffe on our part.

On to the topic at hand: Have you been tinkering with Dstrings.c/Dstrings.h at all, Sky?
 
Either put the quit message(s) that you deleted back in, or remove the appropriate definitions from Dstrings.h to match.

Removing something from Dstrings.c without removing it from Dstrings.h makes all the strings below that point point to incorrect places, obviously.
 
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top