Wolf3d Haven Forum

Please log in or register. Smile

Join the forum, it's quick and easy

Wolf3d Haven Forum

Please log in or register. Smile

Wolf3d Haven Forum

Would you like to react to this message? Create an account in a few clicks or log in to continue.
Wolf3d Haven Forum

A friendly Wolfenstein 3D community, about Wolfenstein 3D, the game that gave birth to first person shooters...


    changing max ammo and hp

    Dark_wizzie
    Dark_wizzie
    I am Death Incarnate!
    I am Death Incarnate!


    Female
    Number of posts : 5120
    Age : 30
    Location : California, USA
    Job : Investor
    Hobbie : Computers, chess, computer chess, fashion, and philosophy
    Message : I made this forum when I was 13 High on Drugs
    Registration date : 2007-03-24

    changing max ammo and hp Empty changing max ammo and hp

    Post by Dark_wizzie Sun Apr 29, 2007 1:32 pm

    dome
    Code Editing Tutorials
    Changing the amount of Ammo & Health




    I see you want to have more ammo and health. I provide you all info, also how to correct the face display on the status bar(thanks to Martin Bonnet). OK, read on!

    FOR HEALTH:

    Step 1. Go to your source code directory and open the file WL_AGENT.C .

    Step 2. Do a search for “gamestate.health”(no quotes as usual).

    Step 3. Move to the lines saying:

    if (gamestate.health>100)

    gamestate.health = 100;

    Step 4. Replace that with :

    if (gamestate.health>200) // Or any other number, ofcourse!!!!

    gamestate.health = 200;

    Step 6. Save the file again. Now do a search for gamestate.health.

    The hits you get looking like this:

    if (gamestate.health == 100)

    have to be replaced with

    if (gamestate.health == 200)

    When there are no more hits, save the file. Now, get back on top of the file and do a search for “FACE1APIC”. Then you should find:

    (17,4,FACE1APIC+3*((100-gamestate.health)/16)+gamestate.faceframe);

    Step 7. Replace this line with:

    if (gamestate.health>100)

    StatusDrawPic (17,4,FACE1APIC+gamestate.faceframe);

    else

    StatusDrawPic(17,4,FACE1APIC+3*((100-gamestate.health)/16)+gamestate.faceframe);

    Save the file and compile. Now you have as maximum 200 health and a correct statusbar display.

    FOR AMMO:

    Step 1. Go to your source code directory and open the file WL_AGENT.C .

    Step 2. Do a search for "DrawAmmo"(no quotes as usual). The first hit should be on line 598.

    Step 3. Move to the line saying :

    LatchNumber (27,16,2,gamestate.ammo);

    Step 4. Replace that with :

    LatchNumber (26,16,3,gamestate.ammo);

    Step 5. Now do a search for GiveAmmo. The hit you need is on line 624.

    Step 6. Scroll to the lines saying:

    if (gamestate.ammo > 99)

    gamestate.ammo = 99;

    Replace that with(or any other 3-digit amount):

    if (gamestate.ammo > 200)

    gamestate.ammo = 200;

    Step 6. Save the file again. Now do a search for gamestate.ammo .

    The hits you get looking like this:

    if (gamestate.ammo == 99)

    have to be replaced with

    if (gamestate.ammo == 200)

    When there are no more hits, save the file and compile. Now you have

    as maximum 200 ammo and a correct statusbar display. Cool eh?




    Wolf3d Haven
    Minute Logic Blog

      Current date/time is Tue Mar 19, 2024 12:36 am