Enable and fix minibosses: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
Fox (talk | contribs)
No edit summary
Revert. Reason: Numerous Mistakes Made. I have made a backup on my HD.
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.
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.
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]]


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.
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 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 46: Line 24:
  define BOSS4STRENGTH            6000
  define BOSS4STRENGTH            6000


Change to:
Change it to this:


  define BOSS1STRENGTH            4500
  define BOSS1STRENGTH            4500
  define BOSS1PALSTRENGTH        1000
  define BOSS1PALSTRENGTH        1000
  define BOSS2STRENGTH            4500
  define BOSS2STRENGTH            4500
  define BOSS2PALSTRENGTH        <b>1000</b>
  define BOSS2PALSTRENGTH        1000
  define BOSS3STRENGTH            4500
  define BOSS3STRENGTH            4500
  define BOSS3PALSTRENGTH        <b>1000</b>
  define BOSS3PALSTRENGTH        1000
  define BOSS4STRENGTH            6000
  define BOSS4STRENGTH            6000
  define BOSS4PALSTRENGTH        <b>1333</b>
  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.
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:


 
   ifai 0
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
     ifspritepal 0
      break
      ai AIBOSS2RUNENEMY
    ifrespawn
      ifcount RESPAWNACTORTIME
    {
      spawn TRANSPORTERSTAR
      cstat 257
      strength PIGCOPSTRENGTH
      state checkboss2seekstate
    }
     else
     else
     {
     {
       strength 0
       strength 1
       ifhitweapon
       sound BOS2_ATTACK ai AIBOSS2SHOOTENEMY
        ifwasweapon RADIUSEXPLOSION
      {
        sound SQUISHED
        state standard_jibs
        killit
      }
      break
     }
     }
   }
   }
  ifactioncount 8
 
  {
Change it to this:
    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
   {
   {
Line 355: Line 58:
     else
     else
     {
     {
      strength BOSS2PALSTRENGTH
      clipdist 8 // This is here so that the RPGs fired from the bosses do not explode in their faces.
      sound BOS2_ATTACK ai AIBOSS2SHOOTENEMY
      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
     }
     }
   }
   }
  else
 
    ifaction BOSS2FLINTCH
3. Search for "state boss3code" in GAME.CON. Scroll down to this:
  {
 
    ifactioncount 3
  ifai 0
      ai AIBOSS2SEEKENEMY
  {
  }
    ifspritepal 0
  else
       ai AIBOSS3RUNENEMY
    ifai AIBOSS2SEEKENEMY
    else
      state boss2seekenemystate
    {
  else
      strength 1
    ifai AIBOSS2RUNENEMY
      ai AIBOSS3LOBENEMY
      state boss2runenemystate
    }
  else
  }
    ifai AIBOSS2SHOOTENEMY
 
      state boss2shootenemy
Change it to this:
  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
   ifai 0
   {
   {
Line 691: Line 86:
     else
     else
     {
     {
      strength BOSS3PALSTRENGTH
      clipdist 8 // This is here so that the RPGs fired from the bosses do not explode in their faces.
      ai AIBOSS3LOBENEMY
      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
     }
     }
   }
   }
  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
  actor BOSS4 BOSS4STRENGTH
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
   
   
  fall
move BOSS4WALKVELS 128
  cactor BOSS4
move BOSS4STOPPED
  spritepal 6
  state boss4code
  getlastpal
   
   
  enda
  ai AIBOSS4LAYEGGS ABOSS4WALK BOSS4WALKVELS randomangle geth
ai AIBOSS4SHOOT ABOSS4ABOUTTOSHOOT BOSS4STOPPED faceplayer
ai AIBOSS4DYING ABOSS4DYING BOSS4STOPPED faceplayer


Select all and change to:
Change it to this:


  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 805: Line 120:
  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 boss4shootstate
  state boss4palshrunkstate
   ifaction ABOSS4ABOUTTOSHOOT
      ifcount SHRUNKDONECOUNT { cstat 257 ai AIBOSS4SEEKENEMY }
     ifactioncount 3
  else ifcount SHRUNKCOUNT { sizeto 40 40 }
      action ABOSS4SHOOT
  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
   
   
   ifaction ABOSS4SHOOT
   ifdead
   {
   {
     ifcount 48
     globalsound DUKE_TALKTOBOSSFALL
    {
      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
    addkills 1
    ai AIBOSS4DYING
   
   
state boss4layeggs
     sound BOS4_DYING
  ifrnd 2
     sound BOSS4_DEADSPEECH
     sound BOS4_ROAM
  ifaction ABOSS4LAYIT
  {
     ifactioncount 3
      ifcount 32
    {
      ai AIBOSS4LAYEGGS
      ifrnd 32
        move BOSS4WALKVELS furthestdir geth
      spawn NEWBEASTHANG
    }
   }
   }
   else
   else
    ifcount 64
      ifrnd 4
   {
   {
     move 0
     soundonce BOS4_PAIN
    debris SCRAP1 1
    guts JIBS6 1
   
   
     ifrnd 88
    ifaction ABOSS4LAYIT
      break
     ifrnd 16
     {
     {
       action ABOSS4LAYIT
       action BOSS4FLINTCH
       sound BOS4_LAY
       move 0
    }
    else
      ifp palive
        ifcansee
    {
      ai AIBOSS4SHOOT
      sound BOS4_ATTACK
     }
     }
 
   }
   }
  ends
  ends
 
state boss4dyingstate
Change it to this:
  ifaction ABOSS4DEAD
 
    break
  else
    ifactioncount 9
  {
    iffloordistl 8
      sound THUD
    endofgame 52
    action ABOSS4DEAD
    cstat 0
  }
ends
  state checkboss4hitstate
  state checkboss4hitstate
   ifrnd 2
   ifrnd 2
Line 904: Line 182:
   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 922: Line 211:
   
   
     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 961: Line 261:
   }
   }
  ends
  ends
 
state checkpalboss4seekstate
Change it to this:
  ai AIBOSS4SEEKENEMY
 
    move PALBOSS4WALKVELS seekplayer
  state boss4code
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 AIBOSS4SEEKENEMY
       ai AIBOSS4SHOOT
       spritepal <b>3</b>
       getlastpal
     }
     }
     else
     else
Line 1,110: Line 279:
         spawn WATERDRIP
         spawn WATERDRIP
         resetactioncount
         resetactioncount
      }
      }
     }
     }
   
   
Line 1,121: Line 290:
       }
       }
       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 1,135: Line 303:
   ifai 0
   ifai 0
   {
   {
     strength BOSS4PALSTRENGTH
     ifspritepal 0
    sound BOS4_ATTACK
      ai AIBOSS4LAYEGGS
     ai AIBOSS4SHOOT
    else
    {
      strength BOSS4PALSTRENGTH
      ai AIBOSS4LAYEGGS
     }
   }
   }
  else
  else
     ifaction BOSS4FLINTCH
     ifaction BOSS4FLINTCH
     {
     {
       ifactioncount 3
       ifactioncount 3
         ai AIBOSS4SEEKENEMY
         ai AIBOSS4LAYEGGS
     }
     }
   else
   else
     ifai AIBOSS4SEEKENEMY
     ifai AIBOSS4LAYEGGS
       state palboss4seekenemystate
       state boss4layeggs
   else
   else
     ifai AIBOSS4SHOOT
     ifai AIBOSS4SHOOT
       state palboss4shootstate
       state boss4shootstate
  else
    ifai AIBOSS4PALSHRINK
      state boss4palshrunkstate
   
   
   ifai AIBOSS4DYING
   ifai AIBOSS4DYING
     state palboss4dyingstate
     state boss4dyingstate
   else
   else
   {
   {
     ifhitweapon
     ifhitweapon
       state checkpalboss4hitstate
       state checkboss4hitstate
    else
      ifp palive
        ifspritepal 0
        ifpdistl 1280
      {
        addphealth -1000
        sound SQUISHED
        palfrom 64 64
        break
      }
   }
   }
  ends
  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).
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]]


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

Revision as of 18:25, 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. 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.