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       

Disabling Certain Episodes
Page 1 of 1
DieHard Wolfers Forum Index -> 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
Rywolf85
Don't Hurt Me
Don't Hurt Me


Joined: 07 Oct 2007
Last Visit: 02 Jul 2013

Topics: 4
Posts: 53

usa.gif

PostPosted: Sat May 25, 2013 10:48 pm
   Subject: Disabling Certain Episodes
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Next PostGoto Bottom of Posts

In the shareware version of Wolfenstein 3d, only Episode 1 is available. If you tried selecting episodes 2-6 a message would popup asking you to purchase the registered version. I would like to enable this function in my own project (with my own message of course).

I remember doing this years ago and as I recall it was a minor modification. Looking at WL_MENU.C it appears the code is already there to tell the game what to do when you select an episode that is not available. I just need to tell the program which episodes I want to make unavailable so this message appears.

I have searched the forums but did not find an answer on how to do this. The closest thing I found was on Areyep's website but the instructions given were to completely remove episodes from the selection screen - which I do not want to do.

Thank you in advance for your help!

_________________
Ryan
stroup85@gmail.com


By stroup85
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 22:12 ago.

Topics: 164
Posts: 8227
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Sun May 26, 2013 4:44 pm
   Subject: Re: Disabling Certain Episodes
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Don't know how compatible this is with the 16-bit code, but in the Wolf4SDL source, if you look in WL_MENU.C, you should see something like this below the "WL6" extension:

::: CODE :::
            EpisodeSelect[1] = EpisodeSelect[2] = EpisodeSelect[3] = EpisodeSelect[4] = EpisodeSelect[5] = 1;
Regarding "EpisodeSelect", the number in brackets is the episode number, minus 1. If you wanted this episode *not* to be available, you'd just remove it from the list. If you only want Episode 1 to be available (which is always the case in the Wolf3D code), just remove this line entirely.

Note that there's a similar line for the "WJ6" extension, so make sure you're not altering that section by mistake. Smile
Rywolf85
Don't Hurt Me
Don't Hurt Me


Joined: 07 Oct 2007
Last Visit: 02 Jul 2013

Topics: 4
Posts: 53

usa.gif

PostPosted: Sun May 26, 2013 8:07 pm
   Subject: Re: Disabling Certain Episodes
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Thanks Tricob! You steered me in the right direction. Wow I really feel silly now. I overlooked the code a hundred times. Now I remember!

I'll post this for anyone else who might benefit from it.

In WL_MENU.C you'll want to locate this section of code.

::: CODE :::

#ifndef UPLOAD
#ifndef SPEAR
   if (!findfirst("*.WL6",&f,FA_ARCH))
   {
      strcpy(extension,"WL6");
      NewEmenu[2].active =   
      NewEmenu[4].active = 
      NewEmenu[6].active = 
      NewEmenu[8].active = 
      NewEmenu[10].active =
      EpisodeSelect[1] =   
      EpisodeSelect[2] =   
      EpisodeSelect[3] =     
      EpisodeSelect[4] =   
      EpisodeSelect[5] = 1; 
   }


Remove or comment out any of the NewEmenu[#].active = strings. [2] is Episode 2, [4] is Episode 3 and so on. This will tell the game to use the inactive text color (I believe you can change the inactive color in WL_MENU.H).

You also have to remove or comment out any of the EpisodeSelect[#] = strings. By removing these lines from the code, this will tell the program to draw a popup message that the episode is not available.

For example, say you wanted only episodes 1 and 2 to be available to play but any other selection would cause a message to pop up on the screen, here's what your code would need to look like.

::: CODE :::

#ifndef UPLOAD
#ifndef SPEAR
   if (!findfirst("*.WL6",&f,FA_ARCH))
   {
      strcpy(extension,"WL6");
      NewEmenu[2].active =   
      EpisodeSelect[1] =   
 
   }


Episode 1 is not apart of this code so only the code for Episode 2 would remain.

That's it! Hopefully someone will find this information helpful. I'm not very good at writing tutorials - especially when it comes to this kind of thing.

_________________
Ryan
stroup85@gmail.com


By stroup85
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 22:12 ago.

Topics: 164
Posts: 8227
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Mon May 27, 2013 7:25 am
   Subject: Re: Disabling Certain Episodes
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Bottom of Posts

Rywolf85 wrote:
I'm not very good at writing tutorials - especially when it comes to this kind of thing.
At first, I wasn't, either. I had to take an Assertiveness course before I even knew where to begin. Smile
Display posts from previous:   
Post new topicReply to topic Time synchronized with the forum server time
DieHard Wolfers Forum Index -> 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: [Info] Help for newbie coders! C++ Tutorial
Author: Dugtrio17
20 9604 Sun Jan 10, 2010 12:26 pm
Fragstein3D View latest post
No new posts [Help] Setting RocketLauncher: Explosive Range...?
Author: KyleRTCW
17 5607 Thu Jun 03, 2004 3:21 am
Codetech84 View latest post
No new posts [Help] Berserk mode
Author: wolf3dbreaker
2 2074 Tue Feb 03, 2004 11:01 pm
Xarkon View latest post
No new posts [Info] How to Animate a Title Screen?
Author: Guest
5 259 Mon Jul 14, 2003 11:41 am
Guest View latest post
No new posts [Info] Alarm Sounding in game?? WSJ...??
Author: Guest
7 309 Tue Jun 17, 2003 10:04 pm
Reivax44 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