Wolf3d Haven Forum

Please log in or register. Smile
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

    Share

    Dark_wizzie
    I am Death Incarnate!
    I am Death Incarnate!

    Male
    Number of posts : 5090
    Age : 22
    Location : USA or Tawain
    Job : Student, Part time Cactuar fanatic
    Hobbie : Planting Cactuars.
    Message : I made this forum when I was 13 High on Drugs
    Registration date : 2007-03-24

    changing max ammo and hp

    Post by Dark_wizzie on 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 Thu Dec 08, 2016 10:07 am