======<<<<<< Jims Mini-FAQ on Duke3D Palette Version 1.0 >>>>>>====== AUTHOR: Jim Morley, ZTXJIN@ INTRODUCTION: Palettes refer to color groups indexed with a number between 0-25. While some of these numbers have special use in Duke3d, many are open for level-designers or code-writers. Well take a look at some. MISSING CODE IN GAME.CON / INTRODUCING "IFSPRITEPAL": The boss from the first episode shows up as a regular player in later episodes, but acts differently. However, they both use the same sprites, so how is this done? A close look at the code shows the secret: ifspritepal 0 { } else ... Its that "ifspritepal" that does the trick. A quick look at the MAP file shows that the first episode boss has a palette of "0" while the "minibosses" of later episodes are set to palette "21". Check out this code: ifcount THAWTIME { ai AIBOSS1SEEKENEMY spritepal 21 } else ifcount FROZENDRIPTIME { ifactioncount 26 { spawn WATERDRIP resetactioncount } } Yes, after the miniboss thaws out, and a quick check shows that only the miniboss can be frozen, hes set back to palette 21. In fact this same code shows up for BOSS2, look under "ifaction ABOSSxFROZEN". Now heres some homework, 3drealms has all the code for a "mini" BOSS3 to get frozen, but forgot to put in the thaw code, those two lines above. Your assignment is to copy those two lines to the correct position, you have two examples in the BOSS1 and BOSS2 code. Now you can add "mini" BOSS3s to your levels! ADDING NEW ACTORS THE EASY WAY: If this used anywhere else? Yes, the one other place this kind of code is used is in the TROOPER section. And once again its palette 21 thats used as a key to change actions. So what can we do with this? Lets add a bunch of actors! Heres how: Lets make it simple to start, lets give different weapons to different ranks. We can use code like this: ifspritepal 11 { shoot RPG } else ifspritepal 12 { shoot FIRELASER } else ifspritepal 13 { shoot SHOTSPARK1 } else ifspritepal 14 { shoot SHOTGUN ifrnd 128 shoot MORTER } else ifspritepal 15 { shoot COOLEXPLOSION1 } else { shoot SPIT } You get the idea. By the way, thats just about all you can have them shoot at you. You can come up with all kinds of mixes, though I would suggest experimenting with one weaker than normal and one strnger than normal. Say for Pigcops you have Rookie, Street Cop, Swat Team. PALETTE QUICK CHART: Just incase you dont have a handy palette chart heres one. Note that the color blue is used in the clothing and uniforms of chicks and some enimies, this blue turns different colors. Ill call this blue "key blue" so you know what Im talking about. Palette - Remarks 0 - the normal palette 1 - shades of blue, also used to indicate multiplayer weapons and switches 2 - shades of red 3 - no visible effects most of the time - turns off killer BIGORBIT sky (actuallly many colors do this) 4 - all black, great for shadows, or how about cloaked enimies? 5 - nothing visibile 6 - the night vision look, possible electric monsters? 7 - weird yellow cast, could be cool effect, like low pressure sodium lights 8 - shades of green 9 - not much 10 - key blue turns red 11 - key blue turns lt. green 12 - key blue turns white 13 - key blue turns grey 14 - key blue turns drk. green 15 - key blue turns brown 16 - key blue turns drk. blue 17 - blue skin on many actors 18 - key blue turns grey/white 19 - red skin on many actors 20 - blue skin on many actors 21 - key blue turns bri. red - used for red key/lock and to designate mini-boss and trooper 22 - key blue turns green 23 - key blue turns yellow - used for yellow key/lock 24 - often stange effects, more blood, etc ======<<<<<< End >>>>>>======