Enable and fix minibosses

From EDukeWiki
Revision as of 21:17, 3 November 2006 by Hendricks266 (talk | contribs) (Smilies!)
Jump to navigation Jump to search

This tutorial is for how to enable the actors BOSS2, BOSS3, and BOSS4 become their miniboss counterparts without any bugs so you can put them in user maps and\or CON hacks.

From now on I wil refer to them as follows:

  • BOSS1 - Ep. 1 - Battlelord
  • BOSS2 - Ep. 3 - Cycloid Emperor
  • BOSS3 - Ep. 2 - Overlord (Yes, these two are mixed up. Do not try to switch them to what they should be.)
  • BOSS4 - Ep. 4 - Alien Queen

The Battlelord is programmed sufficently enough to allow its placement in maps, and the official levels do contain some mini Battlelords. In order to successfully perform the actions described in this tutorial, you will need to understand that while the Overlord and Cycloid Emperor are already enabled and just require an easy bug fix or two, the Alien Queen will require some CON coding skill for reasons described below.

When I say "Change it to this:", I want you to copy the text below it in the box and overwrite the text in the box above by pasting it when the old text is completely selected, but in your .CON files of course. There's not much point in changing the web page!

Also, when I say "Open <insert name of .CON file here>.", I want to open whatever .CON file the text in the box below is in. I am just stating the defaults.

Ready to begin?

1. Open USER.CON. Scroll down to here:

define BOSS1STRENGTH            4500
define BOSS1PALSTRENGTH         1000
define BOSS2STRENGTH            4500
define BOSS3STRENGTH            4500
define BOSS4STRENGTH            6000

Change it to this:

define BOSS1STRENGTH            4500
define BOSS1PALSTRENGTH         1000
define BOSS2STRENGTH            4500
define BOSS2PALSTRENGTH         1000
define BOSS3STRENGTH            4500
define BOSS3PALSTRENGTH         1000
define BOSS4STRENGTH            6000
define BOSS4PALSTRENGTH         1333

Note that the strengths do not have to be what is described here. All that matters is that these eight defines exist.

2. Search for "state boss2code" in GAME.CON. Scroll down to this:

  ifai 0
  {
    ifspritepal 0
     ai AIBOSS2RUNENEMY
    else
    {
      strength 1
      sound BOS2_ATTACK ai AIBOSS2SHOOTENEMY
    }
  }

Change it to this:

  ifai 0
  {
    ifspritepal 0
      ai AIBOSS2RUNENEMY
    else
    {
     clipdist 8 // This is here so that the RPGs fired from the bosses do not explode in their faces.
     strength BOSS2PALSTRENGTH // This is the main bug fix. If you do not change this, the mini-bosses will only have 1 health.
     sound BOS2_ATTACK
     ai AIBOSS2SHOOTENEMY
    }
  }

3. Search for "state boss3code" in GAME.CON. Scroll down to this:

 ifai 0
 {
   ifspritepal 0
     ai AIBOSS3RUNENEMY
   else
   {
     strength 1
     ai AIBOSS3LOBENEMY
   }
 }

Change it to this:

  ifai 0
  {
    ifspritepal 0
      ai AIBOSS3RUNENEMY
    else
    {
     clipdist 8 // This is here so that the RPGs fired from the bosses do not explode in their faces.
     strength BOSS3PALSTRENGTH // This is the main bug fix. If you do not change this, the mini-bosses will only have 1 health.
     sound BOS3_ATTACK1
     ai AIBOSS3LOBENEMY
    }
  }

4. BOSS4 is a bit more complicated because there is no programming at all for it to be a miniboss.
4A. First, go to where it says:

action ABOSS4WALK          0 4  5  1  30
action ABOSS4DYING        40 9  1  1  20
action ABOSS4ABOUTTOSHOOT 20 1  5  1  40
action ABOSS4SHOOT        25 2  5  1  10
action ABOSS4LAYIT        50 3  5  1  120
action BOSS4FLINTCH       40 1  1  1  1
action ABOSS4DEAD         49

move BOSS4WALKVELS 128
move BOSS4STOPPED

ai AIBOSS4LAYEGGS ABOSS4WALK BOSS4WALKVELS randomangle geth
ai AIBOSS4SHOOT ABOSS4ABOUTTOSHOOT BOSS4STOPPED faceplayer
ai AIBOSS4DYING ABOSS4DYING BOSS4STOPPED faceplayer

Change it to this:

action ABOSS4WALK          0 4  5  1  30
action ABOSS4DYING        40 9  1  1  20
action ABOSS4ABOUTTOSHOOT 20 1  5  1  40
action ABOSS4SHOOT        25 2  5  1  10
action ABOSS4LAYIT        50 3  5  1  120
action BOSS4FLINTCH       40 1  1  1  1
action ABOSS4DEAD         49
action ABOSS4FROZEN       0  1  5

move BOSS4WALKVELS 128
move BOSS4STOPPED
move PALBOSS4SHRUNKRUNVELS 72

ai AIBOSS4LAYEGGS ABOSS4WALK BOSS4WALKVELS randomangle geth
ai AIBOSS4SHOOT ABOSS4ABOUTTOSHOOT BOSS4STOPPED faceplayer
ai AIBOSS4DYING ABOSS4DYING BOSS4STOPPED faceplayer
ai AIBOSS4PALSHRINK ABOSS4WALK PALBOSS4SHRUNKRUNVELS furthestdir
ai AIBOSS4SEEKENEMY ABOSS4WALK PALBOSS4SHRUNKRUNVELS seekplayer

state boss4palshrunkstate
      ifcount SHRUNKDONECOUNT { cstat 257 ai AIBOSS4SEEKENEMY }
 else ifcount SHRUNKCOUNT { sizeto 40 40 }
 else { state genericshrunkcode }
ends

Note that "state boss4palshrunkstate" is supposed to be there. You should put it there because that is a very convenient space for it.

4B. Next, go to this:

state checkboss4hitstate
  ifrnd 2
    spawn BLOODPOOL

  ifdead
  {
    globalsound DUKE_TALKTOBOSSFALL

    addkills 1
    ai AIBOSS4DYING

    sound BOS4_DYING
    sound BOSS4_DEADSPEECH
  }
  else
  {
    soundonce BOS4_PAIN
    debris SCRAP1 1
    guts JIBS6 1

    ifaction ABOSS4LAYIT
      break

    ifrnd 16
    {
      action BOSS4FLINTCH
      move 0
    }
  
  }
ends

Change it to this:

state checkboss4hitstate
  ifrnd 2
    spawn BLOODPOOL

  ifdead
  {
    ifspritepal 0 nullop else
      ifwasweapon FREEZEBLAST
      {
        sound SOMETHINGFROZE
        spritepal 1
        move 0
        action ABOSS4FROZEN
        strength 0
        break
      }

    globalsound DUKE_TALKTOBOSSFALL

   addkills 1
    ai AIBOSS4DYING

    sound BOS4_DYING
    sound BOSS4_DEADSPEECH
  }
  else
  {
    soundonce BOS4_PAIN
    debris SCRAP1 1
    guts JIBS6 1

    ifaction ABOSS4LAYIT
      break

    ifrnd 16
   {
      action BOSS4FLINTCH
      move 0
    }
  
    ifspritepal 0 nullop else
      ifwasweapon SHRINKSPARK
      {
        sound ACTOR_SHRINKING
        ai AIBOSS4PALSHRINK
        cstat 0
        break
      }
  }
ends

4C. After that, go to:

state boss4code

  ifai 0
    ai AIBOSS4LAYEGGS
  else
    ifaction BOSS4FLINTCH
    {
      ifactioncount 3
        ai AIBOSS4LAYEGGS
    }
  else
    ifai AIBOSS4LAYEGGS
      state boss4layeggs
  else
    ifai AIBOSS4SHOOT
      state boss4shootstate

  ifai AIBOSS4DYING
    state boss4dyingstate
  else
  {
    ifhitweapon
      state checkboss4hitstate
    else
      ifp palive
        ifpdistl 1280
      {
        addphealth -1000
        palfrom 63 63
      }
  }
ends

Change it to this:

state boss4code
  ifaction ABOSS4FROZEN
  {
    ifcount THAWTIME
    {
      ai AIBOSS4SHOOT
      getlastpal
    }
    else
      ifcount FROZENDRIPTIME
    {
      ifactioncount 26
      {
        spawn WATERDRIP
        resetactioncount
     }
    }

    ifhitweapon
    {
      ifwasweapon FREEZEBLAST
      {
        strength 0
        break
      }
      addkills 1

      lotsofglass 30
      sound GLASS_BREAKING
      ifrnd 84 spawn BLOODPOOL
      killit
   }
    ifp pfacing
      ifpdistl FROZENQUICKKICKDIST
        pkick
    break
  }
  ifai 0
  {
    ifspritepal 0
      ai AIBOSS4LAYEGGS
    else
    {
      strength BOSS4PALSTRENGTH
      ai AIBOSS4LAYEGGS
    }
  }
 else
    ifaction BOSS4FLINTCH
    {
      ifactioncount 3
        ai AIBOSS4LAYEGGS
    }
  else
    ifai AIBOSS4LAYEGGS
      state boss4layeggs
  else
    ifai AIBOSS4SHOOT
      state boss4shootstate
  else
    ifai AIBOSS4PALSHRINK
      state boss4palshrunkstate

  ifai AIBOSS4DYING
    state boss4dyingstate
  else
  {
    ifhitweapon
      state checkboss4hitstate
    else
      ifp palive
       ifspritepal 0
        ifpdistl 1280
      {
        addphealth -1000
        sound SQUISHED
        palfrom 64 64
        break
      }
  }
ends

After that, you should be all set!

To insert a miniboss in a user map, create the boss sprite you want, and then give it a palette of something other than 0. I recommend pal 3 or pal 26+ because pal 21 makes some minor changes to the first three boss' sprites, while the Alien Queen looks red with pal 21. In the end, all that matters is that the spritepal is not 0.