Enable and fix minibosses: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
m Smilies!
Fox (talk | contribs)
No edit summary
Line 8: Line 8:
*BOSS4 - Ep. 4 - Alien Queen
*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.
The Battlelord is programmed sufficently enough to allow its placement in maps, and the official levels do contain some mini Battlelords.
If you have already played Duke Nukem 64, will probably have related that in the levels Hotel Hell and Freeway there are mini Overlords instead of some mini Battlelords.


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! [[Image:Wink.gif]]


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.
Remember that the minibosses here will have an new actor tile, in order to remove Duke talk and replace with a left-over unusued scream from them, that was supposed to be used insted of Duke talks.


Ready to begin?
1. Open DEFS.CON. Scroll down to:


1. Open USER.CON. Scroll down to here:
define BOSS2 2710
define BOSS3 2760
 
define BOSS4 4740
define BOSS4STAYPUT 4741
 
Change to:
 
define BOSS2 2710
define PALBOSS2 2711
define PALBOSS2STAYPUT 2712
define BOSS3 2760
define PALBOSS3 2761
define PALBOSS3STAYPUT 2762
 
define BOSS4 4740
define BOSS4STAYPUT 4741
define PALBOSS4 4742
define PALBOSS4STAYPUT 4743
 
2. Open USER.CON. Scroll down to:


  define BOSS1STRENGTH            4500
  define BOSS1STRENGTH            4500
Line 24: Line 44:
  define BOSS4STRENGTH            6000
  define BOSS4STRENGTH            6000


Change it to this:
Change to:


  define BOSS1STRENGTH            4500
  define BOSS1STRENGTH            4500
  define BOSS1PALSTRENGTH        1000
  define BOSS1PALSTRENGTH        1000
  define BOSS2STRENGTH            4500
  define BOSS2STRENGTH            4500
  define BOSS2PALSTRENGTH        1000
  define BOSS2PALSTRENGTH        <b>1000</b>
  define BOSS3STRENGTH            4500
  define BOSS3STRENGTH            4500
  define BOSS3PALSTRENGTH        1000
  define BOSS3PALSTRENGTH        <b>1000</b>
  define BOSS4STRENGTH            6000
  define BOSS4STRENGTH            6000
  define BOSS4PALSTRENGTH        1333
  define BOSS4PALSTRENGTH        <b>1333</b>
 
Note that the strengths from mini BOSS2 and BOSS3 was put the same as BOSS1, oblivious because the big versions are the same. BOSS4 is proportional as 4500 - 1000 to 6000 - 1333.


Note that the strengths do not have to be what is described here. All that matters is that these eight [[define|defines]] exist.
You can change it to whatever you want, anyelse.


2. Search for "state boss2code" in GAME.CON. Scroll down to this:
3. Search for BOSS2 and BOSS3 in GAME.CON, while should start and ends with:


action ABOSS2WALK        0  4  5  1  30
actor BOSS3 BOSS3STRENGTH fall state boss3code enda
Select all and change to:
action ABOSS2WALK        0  4  5  1  30
action ABOSS2FROZEN        0  1  5
action ABOSS2RUN        0  4  5  1  15
action ABOSS2SHOOT        20 2  5  1  15
action ABOSS2LOB        30 2  5  1  105
action ABOSS2DYING        40 8  1  1  35
action BOSS2FLINTCH      40 1  1  1  1
action ABOSS2DEAD        48
move PALBOSS2SHRUNKRUNVELS 32
move PALBOSS2RUNVELS 84
move BOSS2WALKVELS 192
move BOSS2RUNVELS 256
move BOSS2STOPPED
ai AIBOSS2SEEKENEMY ABOSS2WALK BOSS2WALKVELS seekplayer
ai AIBOSS2RUNENEMY ABOSS2RUN BOSS2RUNVELS faceplayer
ai AIBOSS2SHOOTENEMY ABOSS2SHOOT BOSS2STOPPED faceplayer
ai AIBOSS2LOBBED ABOSS2LOB BOSS2STOPPED faceplayer
ai AIBOSS2DYING ABOSS2DYING BOSS2STOPPED faceplayer
ai AIBOSS2PALSHRINK ABOSS2WALK PALBOSS2SHRUNKRUNVELS furthestdir
state boss2palshrunkstate
  ifcount SHRUNKDONECOUNT
  {
    cstat 257
    ai AITROOPSEEKENEMY
  }
  else
    ifcount SHRUNKCOUNT
      sizeto 40 40
  else
    state genericshrunkcode
ends
state checkboss2seekstate
  ai AIBOSS2SEEKENEMY
  ifspritepal 0 nullop
  else  // a fake way of doing a ifspritepal NOT.
    move PALBOSS2RUNVELS seekplayer
ends
state boss2runenemystate
  ifcansee
  {
    ifactioncount 3
    {
      ifcanshoottarget
      {
        resetactioncount
        sound BOS1_WALK
      }
      else
        ai AIBOSS2SEEKENEMY
    }
    ifcount 48
      ifrnd 2
    {
      ifp palive
      {
        sound BOS2_ATTACK
        ai AIBOSS2SHOOTENEMY
      }
      break
    }
  }
  else
    ai AIBOSS2SEEKENEMY
ends
state boss2seekenemystate
  ifrnd 2
    soundonce BOS2_ROAM
  else
    ifactioncount 3
  {
    resetactioncount
    sound BOS1_WALK
  }
  ifcansee
    ifcount 32
      ifp palive
        ifrnd 48
          ifcanshoottarget
  {
    ifrnd 64
      ifpdistg 4096
    {
      ai AIBOSS2RUNENEMY
      ifspritepal 0 nullop
      else
        move PALBOSS2RUNVELS seekplayer
      break
    }
    ifpdistl 10240
    {
      ifrnd 128
      {
        sound BOS2_ATTACK
        ai AIBOSS2LOBBED
      }
    }
    else
    {
      sound BOS2_ATTACK
      ai AIBOSS2SHOOTENEMY
    }
  }
ends
state boss2dyingstate
  ifaction ABOSS2DEAD
  {
    ifspritepal 0
      break
    ifrespawn
      ifcount RESPAWNACTORTIME
    {
      spawn TRANSPORTERSTAR
      cstat 257
      strength PIGCOPSTRENGTH
      state checkboss2seekstate
    }
    else
    {
      strength 0
      ifhitweapon
        ifwasweapon RADIUSEXPLOSION
      {
        sound SQUISHED
        state standard_jibs
        killit
      }
      break
    }
  }
  ifactioncount 8
  {
    iffloordistl 8
      sound THUD
    action ABOSS2DEAD
    cstat 0
    ifspritepal 0
      endofgame 52
  }
ends
state boss2lobbedstate
  ifcansee
  {
    ifactioncount 2
      resetactioncount
    else
      ifactioncount 1
    {
      ifrnd 128
        shoot COOLEXPLOSION1
    }
    else
      ifcount 64
        ifrnd 16
          state checkboss2seekstate
  }
  else
    state checkboss2seekstate
ends
state boss2shootenemy
  ifcount 72
    state checkboss2seekstate
  else
    ifaction ABOSS2SHOOT
      ifactioncount 2
  {
    shoot RPG
    resetactioncount
  }
ends
state checkboss2hitstate
  ifrnd 2
    spawn BLOODPOOL
  ifdead
  {
    ifspritepal 0
      globalsound DUKE_TALKTOBOSSFALL
    else
    {
      ifrnd 64
        globalsound DUKE_TALKTOBOSSFALL
      ifwasweapon FREEZEBLAST
      {
        sound SOMETHINGFROZE
        spritepal 1
        move 0
        action ABOSS2FROZEN
        strength 0
        break
      }
    }
    sound BOS2_DYING
    addkills 1
    ai AIBOSS2DYING
  }
  else
  {
    ifrnd 144
    {
      ifrnd 32
      {
        action BOSS2FLINTCH
        move 0
      }
      else
      {
        sound BOS2_ATTACK
        ai AIBOSS2SHOOTENEMY
      }
    }
    ifspritepal 0 nullop
    else
      ifwasweapon SHRINKSPARK
    {
      sound ACTOR_SHRINKING
      ai AIBOSS2PALSHRINK
      break
    }
    soundonce BOS2_PAIN
    debris SCRAP1 1
    guts JIBS6 1
  }
ends
state boss2code
  ifaction ABOSS2FROZEN
  {
    ifcount THAWTIME
    {
      ai AIBOSS2SEEKENEMY
        spritepal 21
    }
    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
   ifai 0
   {
   {
     ifspritepal 0
     ifspritepal 0
      ai AIBOSS2RUNENEMY
      ai AIBOSS2RUNENEMY
     else
     else
     {
     {
       strength 1
       strength BOSS2PALSTRENGTH
       sound BOS2_ATTACK ai AIBOSS2SHOOTENEMY
       sound BOS2_ATTACK ai AIBOSS2SHOOTENEMY
     }
     }
   }
   }
 
  else
Change it to this:
    ifaction BOSS2FLINTCH
 
  {
   ifai 0
    ifactioncount 3
      ai AIBOSS2SEEKENEMY
  }
  else
    ifai AIBOSS2SEEKENEMY
      state boss2seekenemystate
  else
    ifai AIBOSS2RUNENEMY
      state boss2runenemystate
  else
    ifai AIBOSS2SHOOTENEMY
      state boss2shootenemy
  else
    ifai AIBOSS2LOBBED
      state boss2lobbedstate
   else
    ifai AIBOSS2PALSHRINK
      state boss2palshrunkstate
  ifai AIBOSS2DYING
    state boss2dyingstate
  else
  {
    ifhitweapon state checkboss2hitstate
    else
      ifp palive
        ifspritepal 0 ifpdistl
          1280
    {
      addphealth -1000
      palfrom 63 63
    }
  }
ends
useractor enemy PALBOSS2 BOSS2STRENGTH
  cactor BOSS2
  ifaction 0
  {
    ifspritepal 0
      sizeat 80 80
    else
    {
      sizeat 40 40
      clipdist 16
    }
    cstator 257
    sound BOS2_RECOG
    clipdist 16
    action ANULLACTION
  }
enda
useractor enemystayput PALBOSS2STAYPUT BOSS2STRENGTH
  cactor BOSS2
  ifaction 0
  {
    ifspritepal 0
      sizeat 80 80
    else
    {
      sizeat 40 40
      clipdist 16
    }
    cstator 257
    sound BOS2_RECOG
    action ANULLACTION
  }
enda
actor BOSS2 BOSS2STRENGTH fall state boss2code
  ifspritepal 0
    nullop
  else
  {
    ifaction 0
    {
      clipdist 16
      action ANULLACTION
    }
  }
enda
action ABOSS3WALK        0 4  5  1  30
action ABOSS3FROZEN        0  1  5
action ABOSS3RUN        0  4  5  1  15
action ABOSS3LOB        20 4  5  1  50
action ABOSS3LOBBING      30 2  5  1  15
action ABOSS3DYING        40 8  1  1  20
action BOSS3FLINTCH      40 1  1  1  1
action ABOSS3DEAD        48
move PALBOSS3SHRUNKRUNVELS 32
move PALBOSS3RUNVELS 84
move BOSS3WALKVELS 208
move BOSS3RUNVELS 270
move BOSS3STOPPED
ai AIBOSS3SEEKENEMY ABOSS3WALK BOSS3WALKVELS seekplayer
ai AIBOSS3RUNENEMY ABOSS3RUN BOSS3RUNVELS faceplayerslow
ai AIBOSS3LOBENEMY ABOSS3LOB BOSS3STOPPED faceplayer
ai AIBOSS3DYING ABOSS3DYING BOSS3STOPPED faceplayer
ai AIBOSS3PALSHRINK ABOSS3WALK PALBOSS3SHRUNKRUNVELS faceplayer
state boss3palshrunkstate
  ifcount SHRUNKDONECOUNT
    ai AITROOPSEEKENEMY
  else
    ifcount SHRUNKCOUNT
      sizeto 40 40
  else
    state genericshrunkcode
ends
state checkboss3seekstate
  ai AIBOSS3SEEKENEMY
  ifspritepal 0 nullop
  else  // a fake way of doing a ifspritepal NOT.
    move PALBOSS3RUNVELS seekplayer
ends
state boss3runenemystate
  ifcansee
  {
    ifactioncount 3
    {
      ifcanshoottarget
      {
        resetactioncount
        sound BOS1_WALK
      }
      else
        ai AIBOSS3SEEKENEMY
    }
  }
  else
    ai AIBOSS3SEEKENEMY
ends
state boss3seekenemystate
  ifrnd 2
    soundonce BOS3_ROAM
  else
    ifactioncount 3
    {
      resetactioncount
      sound BOS1_WALK
    }
  ifcansee
    ifcount 32
      ifrnd 48
        ifcanshoottarget
  {
    ifrnd 64
      ifpdistg 4096
      {
        ai AIBOSS3RUNENEMY
        ifspritepal 0
          break
        move PALBOSS3RUNVELS seekplayer
        break
      }
    ifp palive
      ai AIBOSS3LOBENEMY
  }
ends
state boss3dyingstate
  ifaction ABOSS3DEAD
  {
    ifspritepal 0
      break
    ifrespawn
      ifcount RESPAWNACTORTIME
    {
      spawn TRANSPORTERSTAR
      cstat 257
      strength PIGCOPSTRENGTH
      state checkboss3seekstate
    }
    else
    {
      strength 0
      ifhitweapon
        ifwasweapon RADIUSEXPLOSION
      {
        sound SQUISHED
        state standard_jibs
        killit
      }
      break
    }
  }
  ifactioncount 8
  {
    iffloordistl 8
      sound THUD
    action ABOSS3DEAD
    cstat 0
    ifspritepal 0
    endofgame 52
  }
ends
state boss3lobbedstate
  ifcansee
  {
    ifaction ABOSS3LOBBING
      ifactioncount 2
    {
      shoot RPG
      resetactioncount
      ifrnd 8
        ai AIBOSS3SEEKENEMY
    }
    ifactioncount 3
    {
      action ABOSS3LOBBING
      resetcount
    }
  }
  else
    state checkboss3seekstate
ends
state checkboss3hitstate
  ifrnd 2
    spawn BLOODPOOL
  ifdead
   {
   {
     ifspritepal 0
     ifspritepal 0
       ai AIBOSS2RUNENEMY
       globalsound DUKE_TALKTOBOSSFALL
    else
    {
      ifrnd 64
        globalsound DUKE_TALKTOBOSSFALL
      ifwasweapon FREEZEBLAST
      {
        sound SOMETHINGFROZE
        spritepal 1
        move 0
        action ABOSS3FROZEN
        strength 0
        break
      }
    }
    addkills 1
    ai AIBOSS3DYING
    sound BOS3_DYING
    sound JIBBED_ACTOR9
  }
  else
  {
    ifrnd 32
    {
      action BOSS3FLINTCH
      move 0
    }
    ifspritepal 0 nullop
     else
     else
      ifwasweapon SHRINKSPARK
     {
     {
      clipdist 8 // This is here so that the RPGs fired from the bosses do not explode in their faces.
      sound ACTOR_SHRINKING
      strength BOSS2PALSTRENGTH // This is the main bug fix. If you do not change this, the mini-bosses will only have 1 health.
      ai AIBOSS3PALSHRINK
      sound BOS2_ATTACK
      break
      ai AIBOSS2SHOOTENEMY
     }
     }
    soundonce BOS3_PAIN
    debris SCRAP1 1
    guts JIBS6 1
  }
ends
state boss3code
  ifaction ABOSS3FROZEN
  {
    ifcount THAWTIME
    {
      ai AIBOSS3SEEKENEMY
      spritepal 21
    }
    else
      ifcount FROZENDRIPTIME
    {
      ifactioncount 26
      {
        spawn WATERDRIP
        resetactioncount
      }
    }
    ifhitweapon
    {
      ifwasweapon FREEZEBLAST
      {
        strength 0
        break
      }
      addkills 1
      lotsofglass 30
      ifrnd 84
        spawn BLOODPOOL
      sound GLASS_BREAKING
      killit
    }
    ifp pfacing
      ifpdistl FROZENQUICKKICKDIST
        pkick
    break
   }
   }
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
   ifai 0
   {
   {
Line 86: Line 688:
     else
     else
     {
     {
      clipdist 8 // This is here so that the RPGs fired from the bosses do not explode in their faces.
      strength BOSS3PALSTRENGTH
      strength BOSS3PALSTRENGTH // This is the main bug fix. If you do not change this, the mini-bosses will only have 1 health.
      ai AIBOSS3LOBENEMY
      sound BOS3_ATTACK1
      ai AIBOSS3LOBENEMY
     }
     }
   }
   }
  else
    ifaction BOSS3FLINTCH
    {
      ifactioncount 3
      ai AIBOSS3SEEKENEMY
    }
  else
    ifai AIBOSS3SEEKENEMY
      state boss3seekenemystate
  else
    ifai AIBOSS3RUNENEMY
      state boss3runenemystate
  else
    ifai AIBOSS3LOBENEMY
      state boss3lobbedstate
  else
    ifai AIBOSS3PALSHRINK
      state boss3palshrunkstate
  ifai AIBOSS3DYING
    state boss3dyingstate
  else
  {
    ifhitweapon
      state checkboss3hitstate
    else
      ifp palive
        ifspritepal 0
          ifpdistl 1280
      {
        addphealth -1000
        palfrom 63 63
      }
  }
ends
useractor enemy PALBOSS3 BOSS3STRENGTH
  cactor BOSS3
  ifaction 0
  {
    ifspritepal 0
      sizeat 80 80
    else
    {
      sizeat 40 40
      clipdist 16
    }
    cstator 257
    sound BOS3_RECOG
    clipdist 16
    action ANULLACTION
  }
enda
useractor enemystayput PALBOSS3STAYPUT BOSS3STRENGTH
  cactor BOSS3
  ifaction 0
  {
    ifspritepal 0
      sizeat 80 80
    else
    {
      sizeat 40 40
      clipdist 16
    }
    cstator 257
    sound BOS3_RECOG
    clipdist 16
    action ANULLACTION
  }
enda
actor BOSS3 BOSS3STRENGTH fall state boss3code
  ifspritepal 0
    nullop
  else
  {
    ifaction 0
    {
      clipdist 16
      action ANULLACTION
    }
  }
enda


4. BOSS4 is a bit more complicated because there is no programming at all for it to be a miniboss.<br />
4. Search for BOSS2 and BOSS3 in GAME.CON, while should start and ends with:
4A. First, go to where it says:


  action ABOSS4WALK          0 4  5  1  30
  action ABOSS4WALK          0 4  5  1  30
action ABOSS4DYING        40 9  1  1  20
 
action ABOSS4ABOUTTOSHOOT 20 1  5  1  40
  actor BOSS4 BOSS4STRENGTH
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
  fall
move BOSS4STOPPED
  cactor BOSS4
  spritepal 6
  state boss4code
  getlastpal
   
   
  ai AIBOSS4LAYEGGS ABOSS4WALK BOSS4WALKVELS randomangle geth
  enda
ai AIBOSS4SHOOT ABOSS4ABOUTTOSHOOT BOSS4STOPPED faceplayer
ai AIBOSS4DYING ABOSS4DYING BOSS4STOPPED faceplayer


Change it to this:
Select all and change to:


  action ABOSS4WALK          0 4  5  1  30
  action ABOSS4WALK          0 4  5  1  30
action ABOSS4FROZEN        0 1  5
  action ABOSS4DYING        40 9  1  1  20
  action ABOSS4DYING        40 9  1  1  20
  action ABOSS4ABOUTTOSHOOT 20 1  5  1  40
  action ABOSS4ABOUTTOSHOOT 20 1  5  1  40
Line 120: Line 801:
  action BOSS4FLINTCH      40 1  1  1  1
  action BOSS4FLINTCH      40 1  1  1  1
  action ABOSS4DEAD        49
  action ABOSS4DEAD        49
action ABOSS4FROZEN      0  1  5
   
   
move PALBOSS4WALKVELS 48
  move BOSS4WALKVELS 128
  move BOSS4WALKVELS 128
  move BOSS4STOPPED
  move BOSS4STOPPED
move PALBOSS4SHRUNKRUNVELS 72
   
   
ai AIBOSS4SEEKENEMY ABOSS4WALK BOSS4WALKVELS seekplayer
  ai AIBOSS4LAYEGGS ABOSS4WALK BOSS4WALKVELS randomangle geth
  ai AIBOSS4LAYEGGS ABOSS4WALK BOSS4WALKVELS randomangle geth
  ai AIBOSS4SHOOT ABOSS4ABOUTTOSHOOT BOSS4STOPPED faceplayer
  ai AIBOSS4SHOOT ABOSS4ABOUTTOSHOOT BOSS4STOPPED faceplayer
  ai AIBOSS4DYING ABOSS4DYING BOSS4STOPPED faceplayer
  ai AIBOSS4DYING ABOSS4DYING BOSS4STOPPED faceplayer
ai AIBOSS4PALSHRINK ABOSS4WALK PALBOSS4SHRUNKRUNVELS furthestdir
ai AIBOSS4SEEKENEMY ABOSS4WALK PALBOSS4SHRUNKRUNVELS seekplayer
   
   
  state boss4palshrunkstate
  state boss4shootstate
       ifcount SHRUNKDONECOUNT { cstat 257 ai AIBOSS4SEEKENEMY }
  ifaction ABOSS4ABOUTTOSHOOT
  else ifcount SHRUNKCOUNT { sizeto 40 40 }
    ifactioncount 3
  else { state genericshrunkcode }
       action ABOSS4SHOOT
  ifaction ABOSS4SHOOT
  {
    ifcount 48
    {
      ifrnd 4
        ai AIBOSS4LAYEGGS
    }
    ifcount 26
      ifrnd 32
    {
      ifrnd 128
      {
        sound SHORT_CIRCUIT
        addphealth -2
      }
      else
      {
        sound DUKE_GRUNT
        addphealth -1
      }
      palfrom 32 32 0 0
    }
  }
  ends
  ends
 
Note that "state boss4palshrunkstate" is supposed to be there. You should put it there because that is a very convenient space for it.
  state boss4layeggs
 
4B. Next, go to this:
 
  state checkboss4hitstate
   ifrnd 2
   ifrnd 2
     spawn BLOODPOOL
     sound BOS4_ROAM
   
   
   ifdead
   ifaction ABOSS4LAYIT
   {
   {
     globalsound DUKE_TALKTOBOSSFALL
     ifactioncount 3
      ifcount 32
     addkills 1
     {
    ai AIBOSS4DYING
      ai AIBOSS4LAYEGGS
      ifrnd 32
    sound BOS4_DYING
        move BOSS4WALKVELS furthestdir geth
     sound BOSS4_DEADSPEECH
      spawn NEWBEASTHANG
     }
   }
   }
   else
   else
    ifcount 64
      ifrnd 4
   {
   {
     soundonce BOS4_PAIN
     move 0
    debris SCRAP1 1
    guts JIBS6 1
   
   
     ifaction ABOSS4LAYIT
     ifrnd 88
       break
    {
      action ABOSS4LAYIT
     ifrnd 16
       sound BOS4_LAY
    }
     else
      ifp palive
        ifcansee
     {
     {
       action BOSS4FLINTCH
       ai AIBOSS4SHOOT
       move 0
       sound BOS4_ATTACK
     }
     }
    
   }
ends
state boss4dyingstate
  ifaction ABOSS4DEAD
    break
  else
    ifactioncount 9
  {
    iffloordistl 8
      sound THUD
    endofgame 52
    action ABOSS4DEAD
    cstat 0
   }
   }
  ends
  ends
 
Change it to this:
 
  state checkboss4hitstate
  state checkboss4hitstate
   ifrnd 2
   ifrnd 2
Line 182: Line 900:
   ifdead
   ifdead
   {
   {
    ifspritepal 0 nullop else
      ifwasweapon FREEZEBLAST
      {
        sound SOMETHINGFROZE
        spritepal 1
        move 0
        action ABOSS4FROZEN
        strength 0
        break
      }
     globalsound DUKE_TALKTOBOSSFALL
     globalsound DUKE_TALKTOBOSSFALL
   
   
    addkills 1
    addkills 1
     ai AIBOSS4DYING
     ai AIBOSS4DYING
   
   
Line 211: Line 918:
   
   
     ifrnd 16
     ifrnd 16
    {
    {
       action BOSS4FLINTCH
       action BOSS4FLINTCH
       move 0
       move 0
     }
     }
 
    ifspritepal 0 nullop else
      ifwasweapon SHRINKSPARK
      {
        sound ACTOR_SHRINKING
        ai AIBOSS4PALSHRINK
        cstat 0
        break
      }
   }
   }
  ends
  ends
 
4C. After that, go to:
 
  state boss4code
  state boss4code
   
   
Line 261: Line 957:
   }
   }
  ends
  ends
 
Change it to this:
state checkpalboss4seekstate
 
  ai AIBOSS4SEEKENEMY
  state boss4code
    move PALBOSS4WALKVELS seekplayer
ends
state palboss4seekenemystate
  ifrnd 2
    sound BOS4_ROAM
    ifcount 64
      ifrnd 4
  {
    move 0
      ifp palive
        ifcansee
    {
      ai AIBOSS4SHOOT
      sound BOS4_ATTACK
    }
  }
ends
state palboss4shootstate
  ifaction ABOSS4ABOUTTOSHOOT
    ifactioncount 3
      action ABOSS4SHOOT
  ifaction ABOSS4SHOOT
  {
    ifcount 48
    {
      ifrnd 4
      {
        state checkpalboss4seekstate
      }
    }
    ifcount 26
      ifrnd 32
    {
      ifrnd 128
      {
        sound SHORT_CIRCUIT
        addphealth -2
      }
      else
      {
        sound DUKE_GRUNT
        addphealth -1
      }
      palfrom 32 32 0 0
    }
  }
ends
  state palboss4dyingstate
  ifaction ABOSS4DEAD
  {
    ifrespawn
      ifcount RESPAWNACTORTIME
    {
      spawn TRANSPORTERSTAR
      cstat 257
      strength PIGCOPSTRENGTH
      state checkpalboss4seekstate
    }
    else
    {
      strength 0
      ifhitweapon
        ifwasweapon RADIUSEXPLOSION
      {
        sound SQUISHED
        state standard_jibs
        killit
      }
      break
    }
  }
    ifactioncount 9
  {
    iffloordistl 8
      sound THUD
    action ABOSS4DEAD
    cstat 0
  }
ends
state checkpalboss4hitstate
  ifrnd 2
    spawn BLOODPOOL
  ifdead
  {
    ifrnd 64
      globalsound DUKE_TALKTOBOSSFALL
    ifwasweapon FREEZEBLAST
    {
      sound SOMETHINGFROZE
      spritepal 1
      move 0
      action ABOSS4FROZEN
      strength 0
      break
    }
    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
state palboss4code
   ifaction ABOSS4FROZEN
   ifaction ABOSS4FROZEN
   {
   {
     ifcount THAWTIME
     ifcount THAWTIME
     {
     {
       ai AIBOSS4SHOOT
       ai AIBOSS4SEEKENEMY
       getlastpal
       spritepal <b>3</b>
     }
     }
     else
     else
Line 279: Line 1,106:
         spawn WATERDRIP
         spawn WATERDRIP
         resetactioncount
         resetactioncount
      }
      }
     }
     }
   
   
Line 290: Line 1,117:
       }
       }
       addkills 1
       addkills 1
      lotsofglass 30
   
   
       lotsofglass 30
       ifrnd 84
        spawn BLOODPOOL
       sound GLASS_BREAKING
       sound GLASS_BREAKING
      ifrnd 84 spawn BLOODPOOL
       killit
       killit
    }
    }
     ifp pfacing
     ifp pfacing
       ifpdistl FROZENQUICKKICKDIST
       ifpdistl FROZENQUICKKICKDIST
Line 303: Line 1,131:
   ifai 0
   ifai 0
   {
   {
     ifspritepal 0
     strength BOSS4PALSTRENGTH
      ai AIBOSS4LAYEGGS
     sound BOS4_ATTACK
     else
     ai AIBOSS4SHOOT
     {
      strength BOSS4PALSTRENGTH
      ai AIBOSS4LAYEGGS
    }
   }
   }
  else
  else
     ifaction BOSS4FLINTCH
     ifaction BOSS4FLINTCH
     {
     {
       ifactioncount 3
       ifactioncount 3
         ai AIBOSS4LAYEGGS
         ai AIBOSS4SEEKENEMY
     }
     }
   else
   else
     ifai AIBOSS4LAYEGGS
     ifai AIBOSS4SEEKENEMY
       state boss4layeggs
       state palboss4seekenemystate
   else
   else
     ifai AIBOSS4SHOOT
     ifai AIBOSS4SHOOT
       state boss4shootstate
       state palboss4shootstate
  else
    ifai AIBOSS4PALSHRINK
      state boss4palshrunkstate
   
   
   ifai AIBOSS4DYING
   ifai AIBOSS4DYING
     state boss4dyingstate
     state palboss4dyingstate
   else
   else
   {
   {
     ifhitweapon
     ifhitweapon
       state checkboss4hitstate
       state checkpalboss4hitstate
  }
ends
actor BOSS4STAYPUT BOSS4STRENGTH
  fall
  cactor BOSS4
  ifspritepal 0
  {
    spritepal 6
    state boss4code
    getlastpal
  }
  else
  ifaction ABOSS4FROZEN
    state palboss4code
  else
  {
    spritepal 6
    state palboss4code
    ifaction ABOSS4FROZEN
      break
    getlastpal
  }
enda
useractor enemy PALBOSS4 BOSS4STRENGTH
  fall
  cactor BOSS4
  ifaction 0
  {
    ifspritepal 0
      sizeat 80 80
    else
      sizeat 40 40
    cstator 257
    sound BOS4_RECOG
    action ANULLACTION
  }
  ifspritepal 0
  {
    spritepal 6
    state boss4code
    getlastpal
  }
  else
  ifaction ABOSS4FROZEN
    state palboss4code
  else
  {
    spritepal 6
    state palboss4code
    ifaction ABOSS4FROZEN
      break
    getlastpal
  }
enda
useractor enemystayput PALBOSS4STAYPUT BOSS4STRENGTH
  fall
  cactor BOSS4
  ifaction 0
  {
    ifspritepal 0
      sizeat 80 80
     else
     else
       ifp palive
       sizeat 40 40
        ifspritepal 0
    cstator 257
        ifpdistl 1280
    sound BOS4_RECOG
       {
    action ANULLACTION
        addphealth -1000
  }
        sound SQUISHED
  ifspritepal 0
        palfrom 64 64
  {
        break
    spritepal 6
      }
    state boss4code
    getlastpal
  }
  else
  ifaction ABOSS4FROZEN
    state palboss4code
  else
  {
    spritepal 6
    state palboss4code
    ifaction ABOSS4FROZEN
       break
    getlastpal
  }
enda
actor BOSS4 BOSS4STRENGTH
  fall
  cactor BOSS4
  ifspritepal 0
  {
    spritepal 6
    state boss4code
    getlastpal
  }
  else
  ifaction ABOSS4FROZEN
    state palboss4code
  else
  {
    spritepal 6
    state palboss4code
    ifaction ABOSS4FROZEN
      break
    getlastpal
   }
   }
  ends
   
 
enda
After that, you should be all set! [[Image:Smile.gif]]


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. [[Image:Wink.gif]]
With this code, to insert a miniboss, use the correct tile PALBOSS (if you want, you still can use the normal, but there will be Duke talks when see the player) and insert BOSS2 and BOSS3 with pallete 21 and BOSS4 with pallete 3 (you can change the CON code of BOSS4 to change to another pallete like 15).


[[Category:Tutorials]]
[[Category:Tutorials]]

Revision as of 09:03, 7 November 2006

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. If you have already played Duke Nukem 64, will probably have related that in the levels Hotel Hell and Freeway there are mini Overlords instead of some mini Battlelords.


Remember that the minibosses here will have an new actor tile, in order to remove Duke talk and replace with a left-over unusued scream from them, that was supposed to be used insted of Duke talks.

1. Open DEFS.CON. Scroll down to:

define BOSS2 2710
define BOSS3 2760
define BOSS4 4740
define BOSS4STAYPUT 4741

Change to:

define BOSS2 2710
define PALBOSS2 2711
define PALBOSS2STAYPUT 2712
define BOSS3 2760
define PALBOSS3 2761
define PALBOSS3STAYPUT 2762
define BOSS4 4740
define BOSS4STAYPUT 4741
define PALBOSS4 4742
define PALBOSS4STAYPUT 4743

2. Open USER.CON. Scroll down to:

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

Change to:

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 from mini BOSS2 and BOSS3 was put the same as BOSS1, oblivious because the big versions are the same. BOSS4 is proportional as 4500 - 1000 to 6000 - 1333.

You can change it to whatever you want, anyelse.

3. Search for BOSS2 and BOSS3 in GAME.CON, while should start and ends with:

action ABOSS2WALK        0  4  5  1  30
actor BOSS3 BOSS3STRENGTH fall state boss3code enda

Select all and change to:

action ABOSS2WALK        0  4  5  1  30
action ABOSS2FROZEN        0  1  5
action ABOSS2RUN         0  4  5  1  15
action ABOSS2SHOOT         20 2  5  1  15
action ABOSS2LOB         30 2  5  1  105
action ABOSS2DYING        40 8  1  1  35
action BOSS2FLINTCH       40 1  1  1  1
action ABOSS2DEAD         48

move PALBOSS2SHRUNKRUNVELS 32
move PALBOSS2RUNVELS 84
move BOSS2WALKVELS 192
move BOSS2RUNVELS 256
move BOSS2STOPPED

ai AIBOSS2SEEKENEMY ABOSS2WALK BOSS2WALKVELS seekplayer
ai AIBOSS2RUNENEMY ABOSS2RUN BOSS2RUNVELS faceplayer
ai AIBOSS2SHOOTENEMY ABOSS2SHOOT BOSS2STOPPED faceplayer
ai AIBOSS2LOBBED ABOSS2LOB BOSS2STOPPED faceplayer
ai AIBOSS2DYING ABOSS2DYING BOSS2STOPPED faceplayer
ai AIBOSS2PALSHRINK ABOSS2WALK PALBOSS2SHRUNKRUNVELS furthestdir

state boss2palshrunkstate
  ifcount SHRUNKDONECOUNT
  {
    cstat 257
    ai AITROOPSEEKENEMY
  }
  else
    ifcount SHRUNKCOUNT
      sizeto 40 40
  else
    state genericshrunkcode
ends

state checkboss2seekstate
  ai AIBOSS2SEEKENEMY
  ifspritepal 0 nullop
  else   // a fake way of doing a ifspritepal NOT.
    move PALBOSS2RUNVELS seekplayer
ends

state boss2runenemystate
  ifcansee
  {
    ifactioncount 3
    {
      ifcanshoottarget
      {
        resetactioncount
        sound BOS1_WALK
      }
      else
        ai AIBOSS2SEEKENEMY
    }
    ifcount 48
      ifrnd 2
    {
      ifp palive
      {
        sound BOS2_ATTACK
        ai AIBOSS2SHOOTENEMY
      }
      break
    }
  }
  else
    ai AIBOSS2SEEKENEMY
ends

state boss2seekenemystate
  ifrnd 2
    soundonce BOS2_ROAM
  else
    ifactioncount 3
  {
    resetactioncount
    sound BOS1_WALK
  }

  ifcansee
    ifcount 32
      ifp palive
        ifrnd 48
          ifcanshoottarget
  {
    ifrnd 64
      ifpdistg 4096
    {
      ai AIBOSS2RUNENEMY
      ifspritepal 0 nullop
      else
        move PALBOSS2RUNVELS seekplayer
      break
    }

    ifpdistl 10240
    {
      ifrnd 128
      {
        sound BOS2_ATTACK
        ai AIBOSS2LOBBED
      }
    }
    else
    {
      sound BOS2_ATTACK
      ai AIBOSS2SHOOTENEMY
    }
  }
ends

state boss2dyingstate
  ifaction ABOSS2DEAD
  {
    ifspritepal 0
      break
    ifrespawn
      ifcount RESPAWNACTORTIME
    {
      spawn TRANSPORTERSTAR
      cstat 257
      strength PIGCOPSTRENGTH
      state checkboss2seekstate
    }
    else
    {
      strength 0
      ifhitweapon
        ifwasweapon RADIUSEXPLOSION
      {
        sound SQUISHED
        state standard_jibs
        killit
      }
      break
    }
  }
  ifactioncount 8
  {
    iffloordistl 8
      sound THUD
    action ABOSS2DEAD
    cstat 0
    ifspritepal 0
      endofgame 52
  }
ends

state boss2lobbedstate
  ifcansee
  {
    ifactioncount 2
      resetactioncount
    else
      ifactioncount 1
    {
      ifrnd 128
        shoot COOLEXPLOSION1
    }
    else
      ifcount 64
        ifrnd 16
          state checkboss2seekstate
  }
  else
    state checkboss2seekstate
ends

state boss2shootenemy
  ifcount 72
    state checkboss2seekstate
  else
    ifaction ABOSS2SHOOT
      ifactioncount 2
  {
    shoot RPG
    resetactioncount
  }
ends

state checkboss2hitstate
  ifrnd 2
    spawn BLOODPOOL
  ifdead
  {
    ifspritepal 0
      globalsound DUKE_TALKTOBOSSFALL
    else
    {
      ifrnd 64
        globalsound DUKE_TALKTOBOSSFALL
      ifwasweapon FREEZEBLAST
      {
        sound SOMETHINGFROZE
        spritepal 1
        move 0
        action ABOSS2FROZEN
        strength 0
        break
      }
    }

    sound BOS2_DYING

    addkills 1

    ai AIBOSS2DYING
  }
  else
  {
    ifrnd 144
    {
      ifrnd 32
      {
        action BOSS2FLINTCH
        move 0
      }
      else
      {
        sound BOS2_ATTACK
        ai AIBOSS2SHOOTENEMY
      }
    }

    ifspritepal 0 nullop
    else
      ifwasweapon SHRINKSPARK
    {
      sound ACTOR_SHRINKING
      ai AIBOSS2PALSHRINK
      break
    }

    soundonce BOS2_PAIN

    debris SCRAP1 1
    guts JIBS6 1
  }
ends

state boss2code

  ifaction ABOSS2FROZEN
  {
    ifcount THAWTIME
    {
      ai AIBOSS2SEEKENEMY
        spritepal 21
    }
    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 AIBOSS2RUNENEMY
    else
    {
      strength BOSS2PALSTRENGTH
      sound BOS2_ATTACK ai AIBOSS2SHOOTENEMY
    }
  }
  else
    ifaction BOSS2FLINTCH
  {
    ifactioncount 3
      ai AIBOSS2SEEKENEMY
  }
  else
    ifai AIBOSS2SEEKENEMY
      state boss2seekenemystate
  else
    ifai AIBOSS2RUNENEMY
      state boss2runenemystate
  else
    ifai AIBOSS2SHOOTENEMY
      state boss2shootenemy
  else
    ifai AIBOSS2LOBBED
      state boss2lobbedstate
  else
    ifai AIBOSS2PALSHRINK
      state boss2palshrunkstate

  ifai AIBOSS2DYING
    state boss2dyingstate
  else
  {
    ifhitweapon state checkboss2hitstate
    else
      ifp palive
        ifspritepal 0 ifpdistl
          1280
    {
      addphealth -1000
      palfrom 63 63
    }
  }


ends

useractor enemy PALBOSS2 BOSS2STRENGTH
  cactor BOSS2
  ifaction 0
  {
    ifspritepal 0
      sizeat 80 80
    else
    {
      sizeat 40 40
      clipdist 16
    }
    cstator 257
    sound BOS2_RECOG
    clipdist 16
    action ANULLACTION
  }
enda

useractor enemystayput PALBOSS2STAYPUT BOSS2STRENGTH
  cactor BOSS2
  ifaction 0
  {
    ifspritepal 0
      sizeat 80 80
    else
    {
      sizeat 40 40
      clipdist 16
    }
    cstator 257
    sound BOS2_RECOG
    action ANULLACTION
  }
enda

actor BOSS2 BOSS2STRENGTH fall state boss2code 
  ifspritepal 0
    nullop
  else
  {
    ifaction 0
    {
      clipdist 16
      action ANULLACTION
    }
  }
enda

action ABOSS3WALK        0  4  5  1  30
action ABOSS3FROZEN        0  1  5
action ABOSS3RUN         0  4  5  1  15
action ABOSS3LOB        20 4  5  1  50
action ABOSS3LOBBING      30 2  5  1  15
action ABOSS3DYING        40 8  1  1  20
action BOSS3FLINTCH       40 1  1  1  1
action ABOSS3DEAD         48

move PALBOSS3SHRUNKRUNVELS 32
move PALBOSS3RUNVELS 84
move BOSS3WALKVELS 208
move BOSS3RUNVELS 270
move BOSS3STOPPED

ai AIBOSS3SEEKENEMY ABOSS3WALK BOSS3WALKVELS seekplayer
ai AIBOSS3RUNENEMY ABOSS3RUN BOSS3RUNVELS faceplayerslow
ai AIBOSS3LOBENEMY ABOSS3LOB BOSS3STOPPED faceplayer
ai AIBOSS3DYING ABOSS3DYING BOSS3STOPPED faceplayer
ai AIBOSS3PALSHRINK ABOSS3WALK PALBOSS3SHRUNKRUNVELS faceplayer

state boss3palshrunkstate
  ifcount SHRUNKDONECOUNT
    ai AITROOPSEEKENEMY
  else
    ifcount SHRUNKCOUNT
      sizeto 40 40
  else
    state genericshrunkcode
ends

state checkboss3seekstate
  ai AIBOSS3SEEKENEMY
  ifspritepal 0 nullop
  else   // a fake way of doing a ifspritepal NOT.
    move PALBOSS3RUNVELS seekplayer
ends

state boss3runenemystate
  ifcansee
  {
    ifactioncount 3
    {
      ifcanshoottarget
      {
        resetactioncount
        sound BOS1_WALK
      }
      else
        ai AIBOSS3SEEKENEMY
    }
  }
  else
    ai AIBOSS3SEEKENEMY
ends

state boss3seekenemystate
  ifrnd 2
    soundonce BOS3_ROAM
  else
    ifactioncount 3
    {
      resetactioncount
      sound BOS1_WALK
    }

  ifcansee
    ifcount 32
      ifrnd 48
        ifcanshoottarget
  {
    ifrnd 64
      ifpdistg 4096
      {
        ai AIBOSS3RUNENEMY
        ifspritepal 0
          break
        move PALBOSS3RUNVELS seekplayer
        break
      }

    ifp palive
      ai AIBOSS3LOBENEMY
  }
ends

state boss3dyingstate
  ifaction ABOSS3DEAD
  {
    ifspritepal 0
      break
    ifrespawn
      ifcount RESPAWNACTORTIME
    {
      spawn TRANSPORTERSTAR
      cstat 257
      strength PIGCOPSTRENGTH
      state checkboss3seekstate
    }
    else
    {
      strength 0
      ifhitweapon
        ifwasweapon RADIUSEXPLOSION
      {
        sound SQUISHED
        state standard_jibs
        killit
      }
      break
    }
  }
  ifactioncount 8
  {
    iffloordistl 8
      sound THUD
    action ABOSS3DEAD
    cstat 0
    ifspritepal 0
    endofgame 52
  }
ends

state boss3lobbedstate
  ifcansee
  {
    ifaction ABOSS3LOBBING
      ifactioncount 2
    {
      shoot RPG
      resetactioncount
      ifrnd 8
        ai AIBOSS3SEEKENEMY
    }

    ifactioncount 3
    {
      action ABOSS3LOBBING
      resetcount
    }
  }
  else
    state checkboss3seekstate
ends

state checkboss3hitstate
  ifrnd 2
    spawn BLOODPOOL
  ifdead
  {
    ifspritepal 0
      globalsound DUKE_TALKTOBOSSFALL
    else
    {
      ifrnd 64
        globalsound DUKE_TALKTOBOSSFALL
      ifwasweapon FREEZEBLAST
      {
        sound SOMETHINGFROZE
        spritepal 1
        move 0
        action ABOSS3FROZEN
        strength 0
        break
      }
    }

    addkills 1
    ai AIBOSS3DYING

    sound BOS3_DYING
    sound JIBBED_ACTOR9

  }
  else
  {
    ifrnd 32
    {
      action BOSS3FLINTCH
      move 0
    }

    ifspritepal 0 nullop
    else
      ifwasweapon SHRINKSPARK
    {
      sound ACTOR_SHRINKING
      ai AIBOSS3PALSHRINK
      break
    }

    soundonce BOS3_PAIN

    debris SCRAP1 1
    guts JIBS6 1
  }
ends

state boss3code

  ifaction ABOSS3FROZEN
  {
    ifcount THAWTIME
    {
      ai AIBOSS3SEEKENEMY
      spritepal 21
    }
    else
      ifcount FROZENDRIPTIME
    {
      ifactioncount 26
      {
        spawn WATERDRIP
        resetactioncount
      }
    }

    ifhitweapon
    {
      ifwasweapon FREEZEBLAST
      {
        strength 0
        break
      }

      addkills 1
      lotsofglass 30

      ifrnd 84
        spawn BLOODPOOL
      sound GLASS_BREAKING
      killit
    }
    ifp pfacing
      ifpdistl FROZENQUICKKICKDIST
        pkick
    break
  }
  ifai 0
  {
    ifspritepal 0
      ai AIBOSS3RUNENEMY
    else
    {
      strength BOSS3PALSTRENGTH
      ai AIBOSS3LOBENEMY
    }
  }
  else
    ifaction BOSS3FLINTCH
    {
      ifactioncount 3
      ai AIBOSS3SEEKENEMY
    }
  else
    ifai AIBOSS3SEEKENEMY
      state boss3seekenemystate
  else
    ifai AIBOSS3RUNENEMY
      state boss3runenemystate
  else
    ifai AIBOSS3LOBENEMY
      state boss3lobbedstate
  else
    ifai AIBOSS3PALSHRINK
      state boss3palshrunkstate

  ifai AIBOSS3DYING
    state boss3dyingstate
  else
  {
    ifhitweapon
      state checkboss3hitstate
    else
      ifp palive
        ifspritepal 0
          ifpdistl 1280
      {
        addphealth -1000
        palfrom 63 63
      }
  }
ends

useractor enemy PALBOSS3 BOSS3STRENGTH
  cactor BOSS3
  ifaction 0
  {
    ifspritepal 0
      sizeat 80 80
    else
    {
      sizeat 40 40
      clipdist 16
    }
    cstator 257
    sound BOS3_RECOG
    clipdist 16
    action ANULLACTION
  }
enda

useractor enemystayput PALBOSS3STAYPUT BOSS3STRENGTH
  cactor BOSS3
  ifaction 0
  {
    ifspritepal 0
      sizeat 80 80
    else
    {
      sizeat 40 40
      clipdist 16
    }
    cstator 257
    sound BOS3_RECOG
    clipdist 16
    action ANULLACTION
  }
enda

actor BOSS3 BOSS3STRENGTH fall state boss3code
  ifspritepal 0
    nullop
  else
  {
    ifaction 0
    {
      clipdist 16
      action ANULLACTION
    }
  }
enda

4. Search for BOSS2 and BOSS3 in GAME.CON, while should start and ends with:

action ABOSS4WALK          0 4  5  1  30
actor BOSS4 BOSS4STRENGTH

  fall
  cactor BOSS4
  spritepal 6
  state boss4code
  getlastpal

enda

Select all and change to:

action ABOSS4WALK          0 4  5  1  30
action ABOSS4FROZEN        0 1  5
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 PALBOSS4WALKVELS 48
move BOSS4WALKVELS 128
move BOSS4STOPPED

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

state boss4shootstate
  ifaction ABOSS4ABOUTTOSHOOT
    ifactioncount 3
      action ABOSS4SHOOT

  ifaction ABOSS4SHOOT
  {
    ifcount 48
    {
      ifrnd 4
        ai AIBOSS4LAYEGGS
    }
    ifcount 26
      ifrnd 32
    {
      ifrnd 128
      {
        sound SHORT_CIRCUIT
        addphealth -2
      }
      else
      {
        sound DUKE_GRUNT
        addphealth -1
      }
      palfrom 32 32 0 0
    }
  }

ends

state boss4layeggs
  ifrnd 2
    sound BOS4_ROAM

  ifaction ABOSS4LAYIT
  {
    ifactioncount 3
      ifcount 32
    {
      ai AIBOSS4LAYEGGS
      ifrnd 32
        move BOSS4WALKVELS furthestdir geth
      spawn NEWBEASTHANG
    }
  }
  else
    ifcount 64
      ifrnd 4
  {
    move 0

    ifrnd 88
    {
      action ABOSS4LAYIT
      sound BOS4_LAY
    }
    else
      ifp palive
        ifcansee
    {
      ai AIBOSS4SHOOT
      sound BOS4_ATTACK
    }
  }

ends

state boss4dyingstate
  ifaction ABOSS4DEAD
    break
  else
    ifactioncount 9
  {
    iffloordistl 8
      sound THUD

    endofgame 52
    action ABOSS4DEAD
    cstat 0
  }
ends

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

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

state checkpalboss4seekstate
  ai AIBOSS4SEEKENEMY
    move PALBOSS4WALKVELS seekplayer
ends

state palboss4seekenemystate
  ifrnd 2
    sound BOS4_ROAM

    ifcount 64
      ifrnd 4
  {
    move 0

      ifp palive
        ifcansee
    {
      ai AIBOSS4SHOOT
      sound BOS4_ATTACK
    }
  }

ends

state palboss4shootstate
  ifaction ABOSS4ABOUTTOSHOOT
    ifactioncount 3
      action ABOSS4SHOOT

  ifaction ABOSS4SHOOT
  {
    ifcount 48
    {
      ifrnd 4
      {
        state checkpalboss4seekstate
      }
    }
    ifcount 26
      ifrnd 32
    {
      ifrnd 128
      {
        sound SHORT_CIRCUIT
        addphealth -2
      }
      else
      {
        sound DUKE_GRUNT
        addphealth -1
      }
      palfrom 32 32 0 0
    }
  }

ends

state palboss4dyingstate
  ifaction ABOSS4DEAD
  {
    ifrespawn
      ifcount RESPAWNACTORTIME
    {
      spawn TRANSPORTERSTAR
      cstat 257
      strength PIGCOPSTRENGTH
      state checkpalboss4seekstate
    }
    else
    {
      strength 0
      ifhitweapon
        ifwasweapon RADIUSEXPLOSION
      {
        sound SQUISHED
        state standard_jibs
        killit
      }
      break
    }
  }
    ifactioncount 9
  {
    iffloordistl 8
      sound THUD

    action ABOSS4DEAD
    cstat 0
  }
ends

state checkpalboss4hitstate
  ifrnd 2
    spawn BLOODPOOL

  ifdead
  {
    ifrnd 64
      globalsound DUKE_TALKTOBOSSFALL
    ifwasweapon FREEZEBLAST
    {
      sound SOMETHINGFROZE
      spritepal 1
      move 0
      action ABOSS4FROZEN
      strength 0
      break
    }

    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

state palboss4code

  ifaction ABOSS4FROZEN
  {
    ifcount THAWTIME
    {
      ai AIBOSS4SEEKENEMY
      spritepal 3
    }
    else
      ifcount FROZENDRIPTIME
    {
      ifactioncount 26
      {
        spawn WATERDRIP
        resetactioncount
      }
    }

    ifhitweapon
    {
      ifwasweapon FREEZEBLAST
      {
        strength 0
        break
      }
      addkills 1
      lotsofglass 30

      ifrnd 84
        spawn BLOODPOOL
      sound GLASS_BREAKING
      killit
    }
    ifp pfacing
      ifpdistl FROZENQUICKKICKDIST
        pkick
    break
  }
  ifai 0
  {
    strength BOSS4PALSTRENGTH
    sound BOS4_ATTACK
    ai AIBOSS4SHOOT
  }
  else
    ifaction BOSS4FLINTCH
    {
      ifactioncount 3
        ai AIBOSS4SEEKENEMY
    }
  else
    ifai AIBOSS4SEEKENEMY
      state palboss4seekenemystate
  else
    ifai AIBOSS4SHOOT
      state palboss4shootstate

  ifai AIBOSS4DYING
    state palboss4dyingstate
  else
  {
    ifhitweapon
      state checkpalboss4hitstate
  }
ends

actor BOSS4STAYPUT BOSS4STRENGTH

  fall
  cactor BOSS4
  ifspritepal 0
  {
    spritepal 6
    state boss4code
    getlastpal
  }
  else
  ifaction ABOSS4FROZEN
    state palboss4code
  else
  {
    spritepal 6
    state palboss4code
    ifaction ABOSS4FROZEN
      break
    getlastpal
  }

enda

useractor enemy PALBOSS4 BOSS4STRENGTH
  fall
  cactor BOSS4
  ifaction 0
  {
    ifspritepal 0
      sizeat 80 80
    else
      sizeat 40 40
    cstator 257
    sound BOS4_RECOG
    action ANULLACTION
  }
  ifspritepal 0
  {
    spritepal 6
    state boss4code
    getlastpal
  }
  else
  ifaction ABOSS4FROZEN
    state palboss4code
  else
  {
    spritepal 6
    state palboss4code
    ifaction ABOSS4FROZEN
      break
    getlastpal
  }
enda

useractor enemystayput PALBOSS4STAYPUT BOSS4STRENGTH
  fall
  cactor BOSS4
  ifaction 0
  {
    ifspritepal 0
      sizeat 80 80
    else
      sizeat 40 40
    cstator 257
    sound BOS4_RECOG
    action ANULLACTION
  }
  ifspritepal 0
  {
    spritepal 6
    state boss4code
    getlastpal
  }
  else
  ifaction ABOSS4FROZEN
    state palboss4code
  else
  {
    spritepal 6
    state palboss4code
    ifaction ABOSS4FROZEN
      break
    getlastpal
  }
enda

actor BOSS4 BOSS4STRENGTH

  fall
  cactor BOSS4
  ifspritepal 0
  {
    spritepal 6
    state boss4code
    getlastpal
  }
  else
  ifaction ABOSS4FROZEN
    state palboss4code
  else
  {
    spritepal 6
    state palboss4code
    ifaction ABOSS4FROZEN
      break
    getlastpal
  }

enda

With this code, to insert a miniboss, use the correct tile PALBOSS (if you want, you still can use the normal, but there will be Duke talks when see the player) and insert BOSS2 and BOSS3 with pallete 21 and BOSS4 with pallete 3 (you can change the CON code of BOSS4 to change to another pallete like 15).