DieHard Wolfers Forum Index DieHard Wolfers
A Wolfenstein 3d Fan Community


  Hosted by: MCS & Areyep.com - Designed by: BrotherTank

Original Yahoo Forum - Die Hard Archives

AReyeP HomepageAreyep Homepage DieHard Wolfenstein BunkerDieHard Wolfenstein Bunker Log inLog in RegisterRegister Banlist FAQFAQ Search ForumsSearch

  Username:    Password:      Remember me       

[Tutorial] Adding Special Difficulty
Page 1 of 1
DieHard Wolfers Forum Index -> SDL Code Crackers View Previous TopicRefresh this PageAdd Topic to your Browser FavoritesSearch ForumsPrint this TopicE-mail TopicGoto Page BottomView Next Topic
Post new topicReply to topic
Author Message
Ipank7000
Bring 'em On
Bring 'em On


Joined: 03 Sep 2011
Last Visit: 18 Sep 2016

Topics: 16
Posts: 100
Location: Depok, Indonesia
indonesia.gif

PostPosted: Sun Jan 01, 2012 11:17 pm
   Subject: [Tutorial] Adding Special Difficulty
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Next PostGoto Bottom of Posts

Hello,
This is my very first tutorial and i hope you enjoy it.
Adding special difficulty isn't hard.
In this case the special difficulty is there aren't healing object (except blood)
and if you going to next level your health reset to 100.

First, open WL_DEF.H search for "gd_baby" (no quote) and change the code like this :
::: CODE :::

enum
{
    gd_baby,
    gd_easy,
    gd_medium,
    gd_hard,
    gd_special
};


next, open WL_GAME.CPP and search for "ex_completed" (again no quote) and you should find:
::: CODE :::

switch (playstate)
{
    case ex_completed:
    case ex_secretlevel:
      if(viewsize == 21) DrawPlayScreen();
      gamestate.keys = 0;


now change the code above like this:
::: CODE :::

switch (playstate)
{
    case ex_completed:
    case ex_secretlevel:
         if(viewsize == 21) DrawPlayScreen();
         gamestate.keys = 0;
         if(gamestate.difficulty == gd_special)
         gamestate.health = 100;
           
         DrawKeys ();
         DrawHealth ();
         DrawFace();



now go to "static void ScanInfoPlane(void)",
scroll down until you find "case 23:"
and replace the original code:
::: CODE :::

   case 23:
   case 24:
   case 25:
   case 26:
   case 27:
   case 28:
   case 29: 
   case 30:

   case 31:
   case 32:
   case 33:
   case 34:
   case 35:
   case 36:
   case 37:
   case 38:

   case 39:
   case 40:
   case 41:
   case 42:
   case 43:
   case 44:
   case 45:
   case 46:

   case 47:                 
   case 48:   
   case 49:
   case 50:
   case 51:
   case 52:
   case 53:
   case 54:


with this code:
::: CODE :::

                case 23:
                case 24:
                case 25:
                case 26:
                case 27:
                case 28:

                SpawnStatic(x,y,tile-23);
                      break;
               
                case 29: // Dog food

                if(gamestate.difficulty<gd_special)
                SpawnStatic(x,y,tile-23);
                      break;
             
                case 30:

                case 31:
                case 32:
                case 33:
                case 34:
                case 35:
                case 36:
                case 37:
                case 38:

                case 39:
                case 40:
                case 41:
                case 42:
                case 43:
                case 44:
                case 45:
                case 46:

                  SpawnStatic(x,y,tile-23);
                        break;
           
                case 47:   // Food                  
                case 48:   // First Aid                 
                if (gamestate.difficulty < gd_special)

                  SpawnStatic(x,y,tile-23);
                    break;
               
                case 49:
                case 50:
                case 51:
                case 52:
                case 53:
                case 54:

then open WL_MENU.H:
change the #define NM_H 13*4+15
with #define NM_H 13*5+15

after that open WL_MENU.CPP and search "STR_DADDY" and add {1, "Special Difficulty" , 0},
and the code should like this:
::: CODE :::

CP_itemtype NewMenu[] = {

    {1, STR_DADDY, 0},
    {1, STR_HURTME, 0},
    {1, STR_BRINGEM, 0},
    {1, STR_DEATH, 0},
    {1, "Special difficulty" , 0},};


finally open WL_ACT2.CPP we add enemy hitpoints. Search for "death" the code should like this:
::: CODE :::

//
    // DEATH INCARNATE MODE
    //
    {
        25,   // guards
        50,   // officer
        100,  // SS
        1,    // dogs

        1200, // Hans
        2400, // Schabbs
        500,  // fake hitler
        1200, // mecha hitler

        65,   // mutants
        25,   // ghosts
        25,   // ghosts
        25,   // ghosts
        25,   // ghosts

        1200, // Gretel
        1200, // Gift
        1200, // Fat
        25,   // en_spectre,
        2000, // en_angel,
        1200, // en_trans,
        1400, // en_uber,
        1300, // en_will,
        1600  // en_death
    },   
   
    //
    // Special Challenge (You can change the value)
    //
    {
        25,   // guards
        50,   // officer
        100,  // SS
        1,    // dogs

        1200, // Hans
        2400, // Schabbs
        500,  // fake hitler
        1200, // mecha hitler

        65,   // mutants
        25,   // ghosts
        25,   // ghosts
        25,   // ghosts
        25,   // ghosts

        1200, // Gretel
        1200, // Gift
        1200, // Fat
        25,   // en_spectre,
        2000, // en_angel,
        1200, // en_trans,
        1400, // en_uber,
        1300, // en_will,
        1600  // en_death
    }

and then search for : short starthitpoints[4][NUMENEMIES] =
then change 4 with 5.

That's it.
I hope you enjoy it and this code should work.

Thanks,
Ipank7000

_________________
Schutzstaffel!


Last edited by Ipank7000 on Sat Jan 07, 2012 7:02 pm; edited 2 times in total
Ipank7000
Bring 'em On
Bring 'em On


Joined: 03 Sep 2011
Last Visit: 18 Sep 2016

Topics: 16
Posts: 100
Location: Depok, Indonesia
indonesia.gif

PostPosted: Tue Jan 03, 2012 2:41 pm
   Subject: Re: [Tutorial] Adding Special Difficulty
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Bottom of Posts

Oops Neutral , please do the code again due to some mistakes.

_________________
Schutzstaffel!
Display posts from previous:   
Post new topicReply to topic Time synchronized with the forum server time
DieHard Wolfers Forum Index -> SDL Code Crackers View Previous TopicRefresh this PageAdd Topic to your Browser FavoritesSearch ForumsPrint this TopicE-mail TopicGoto Page TopView Next Topic
Page 1 of 1
Jump to:  

Related topics
 Topics   Replies   Views   Last Post 
No new posts Sticky: [Tutorial] Compiling Wolf4SDL with Code::Blocks
Author: dcbasic
90 27517 Wed May 24, 2017 7:53 pm
Falcon*93 View latest post
No new posts [help] Adding teleporters in wolf4sdl
Author: Mortimer
35 11726 Fri May 26, 2017 8:19 am
Military View latest post
No new posts [IDEA] Introducing the new "Haasboy Engine"
Author: Haasboy
2 1373 Fri Aug 01, 2008 10:37 am
dcbasic View latest post
No new posts [CODE] Health Shown as a message with full screen view
Author: Raziel
13 3060 Thu Jul 31, 2008 8:07 pm
Raziel View latest post
No new posts [Help] Adding a weapon problem
Author: Zombie_Plan
10 2266 Thu Jul 24, 2008 4:26 pm
RichterBelmont12 View latest post
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
   You cannot delete your posts in this forum
You cannot vote in polls in this forum


Copyright ©2003-2008 DieHard Wolfers
A Modified subBunker Theme by BrotherTank
Powered by phpBB © 2001, 2005 phpBB Group