README

PATCH FOR MAPEDIT 1.21 OUWB by NoOne [baitd@yandex.ru]
-----------------------------------------
Jul 02 2020

This patch unlocks several features, such as hidden commands, add new types 
or unlock hidden ones, and allows to apply palettes on monsters and things.

The patch changes several bytes in AutoAdjustSprites() function that called by
MAPEDIT every time you change something in map (for example if you put tagged 
sprite or decoration sprite using one of reserved picnums that uses for ammo
or monsters). The function works as database; it contains pre-defined info such as
statnum, size, type, picnum and palette for each tagged sprite. Once sprite from
database inserted in map, function will set all necessary info for it.

Most of new types (lo-tags) working just like their named counterparts, so you probably 
you will be not messed up with setting them properly. You basically only need to 
know Types and  Status number lists. See them in end of this file. New types also fully 
accessible for RX\TX system - this means you can send and get commands.

If you apply palette to monsters, that palette will be inherited in burning and 
electrocuting animations. Let's say you apply palette 5 to axe zombie to make it 
look like stone, when zombie will burn, you will got grey flame. To fix it you have
to edit SEQ files of monsters (you will need to set neutral palette such as 3 or 13).

To have ability to make enemies that have different sizes you also need edit it's 
sequence files using SEQEDIT: you will need set XR and YR to 0. Use numpad 
4,6,2 and 8. Don't forget rest XR and YR in each frame of sequence.

The unlocked commands between 12 and 64 mostly useless in map, tough you can force 
some items to being picked up remotely.

Any suggestions and comments are welcome to Blood related Discord channel:
https://discord.gg/a84k4wQ


=======================================
CHANGELOG
=======================================

 Jul 02 2020
---------------------------
 - Added optional 320p resolution patch which includes:
   - Make speed of textures panning slower as much
     as possible to fit game's speed.
   - Smaller mouse crosshair in 3D Mode.
 - Decrease delay for beep sounds which leads to
   less input lag. Note that if you don't hear the
   beeps, the delay still there anyway. To disable
   it completely, use key F12 in 3D Mode.
 - There is one more frame rate digit now could be
   visible in 3D Mode. Previously it was hidden behind
   the screen.
 - System messages in 3D Mode now disappears a bit faster.

 May 24 2020
---------------------------
 - New modern sprite type (501) "IF" has been added!
 - New modern sprite type (502) "!IF" has been added!
 - Make height of player's camera in Gravity mode 
   a bit more so it fits the game.
 - Added a caption in 2D Mode for type 0: Decoration
   when it have xsprite inserted, so you can delete
   it and replace by non-xsprite version. This allows
   to spend xsprites on more important things like
   scripts or effects.
 - Removed auto xsprite inserting for all item sprites.
 - There is no more CRC check when loading the map.


 Feb 22 2020
---------------------------
 - Way less radius of player's camera which allows
   you to move in very tight places without getting
   stuck in white walls.
 - The following types was receive shorter names:
    - Normal -> NML (sectors and walls)
    - Toggle Switch -> TG Swc
    - 1-way Switch -> 1W Swc
    - Combination Switch -> CB Swc
 - Removed patch that adds enemies in Alt+S menu
   because it works unstable. I'm working on better
   version for future releases.
 - Fixed potential crash that may occur on resolutions
   higher than 320x200.
 - Show tilenum in up right corner instead of tilenum
   usage. This makes small sprites clearly visible
   on low resolutions without need to hold Caps Lock
   key. 

 Jan 14 2020
---------------------------
 - Fix: there was a problem with using feature binded to
   key "C" (the one that allows to draw circles) when
   using increased board size.
 - Transparent tilenum and tile usage in tile selection
   screen.
 - Tile selection screen now displays 5 tiles by default
   instead of 4. This makes it more usable on 320p resolution.


 Dec 10 2019
---------------------------
 - Fixed crash when saving the map with version 7.1.
 - New modern sprite type (500) Player Ctrl has been added.
 - Modern type Custom Dude (254): removed predefined picture
   and sprite size.
 - Modern type Custom Dude Spawn (24): removed predefined
   sprite size.
 - Gib Object received shorter name "G-obj".
 - Explode Object received shorter name "E-obj".
   I decide to do it because there is a lot 
   such objects used in the maps and names takes too
   much place on the screen. Besides, it gives little
   performance boost.


 Oct 20 2019
---------------------------
 - There is no more auto-loading of NEWBOARD.MAP.
 - It's possible to remap Alt+Enter key sequence which used
   to paste xobject properties (or clear it) to PAD5+Enter.
 - Trigger flag "Reserved" was renamed to "Touch" in the wall dialog.
 - Tchernobog enemy type can now be resized without size patch.
 - Black spider enemy type now spawns with correct size.
 - Mother spider enemy type now spawns with correct size.
 - The following enemy types now can be painted without palette patch:
    - Rat (i forget to make it paintable in previous version)
    - Black spider
    - Mother spider

 Sep 19 2019
---------------------------
 - Reset function was added in PMAPED.BAT, so you can press [R] in main screen
   to restore default MAPEDIT.EXE and MAPEDIT.INI files.
 - Fix for non-marker teleport target: it can be used as normal sprite again.
 - There is auto-hitscan removed for the following types:
    - Toggle Switch
    - 1-Way Switch
    - Combination Switch
 - New modern type (37) Inc-Dec has been added.
 - New modern type (150) Level Map has been added.
 - The following enemy types now can be painted using just "basic patch":
    - Cultist with shotgun
    - Flesh Gargoyle
    - Hand
    - Rat
    - Bat
    - Hound
    - Eel
    - Fat zombie
    - Axe zombie
    - Phantasm
    - Green pod
    - Green tentacle
    - Flesh Gargoyle Statue
    - Axe zombie (ground)
    - Axe zombie (sleeping)
    - Cultist with shotgun (prone)
    - Innocent
    - Gill Beast
    - Tiny Caleb
    - The Beast
    - Tchernobog
    - Cerberus
	
 Mar 25 2019
---------------------------
  - All of modern types are now officially supported by NBLOOD port.
  - Auto-save text string was changed to became shorter.

  - Most of vanilla compatible types from PMAPEDIT BETA7 is returning back
    and it's possible to use modern types with vanilla together or separately!
	Just press [3] in the main menu and choose your way.
  
  
  - New modern type (254) Custom Dude has been added.
  - New modern type (24) Custom Dude Spawn has been added.
    
	To learn more about GDX features for mappers, 
    please visit http://cruo.bloodgame.ru/xxsystem.
	
  - Vanilla type (225) Fake Dude has been re-added.
  - Vanilla type (228) 1 Head Cerberus has been re-added.
  - Vanilla type (418) Armed TNT Stick has been re-added.
  - Vanilla type (420) Armed Spray has been re-added.
  - Vanilla type (426) Falling Gib has been re-added.
  - Vanilla type (428) Napalm Trap has been re-added.
  - Vanilla type (431) Leech Turret has been re-added.
  - Vanilla type (430) Acid Trap has been re-added.

 Feb 04 2019
---------------------------
  - New 12 GDX types can be added in 2D Mode list:
  - RandomTX (Type 25)
  - SequentialTX (Type 26)
  - SEQ Spawner  (Type 27)
  - PropertiesChanger (Type 28)
  - Picture Changer (Type 29)
  - Re-sizer (Type 31)
  - Enemy Target Changer (Type 33)
  - Sector Lighting Changer (Type 34)
  - DataChanger (Type 35)
  - Damager (Type 36)
  - Effect Gen (Type 38)
  - Wind Gen (Type 39)
   
   Select [2] in main menu if you want add them.
   
   To learn more about GDX features for mappers, 
   please visit http://cruo.bloodgame.ru/xgdx.
   
  - You can now enter negative values in all *sprite* data fields 
    except data4 one. The negative values is used by new GDX types.
  - "Unlock Hidden Types" patch has been removed from main menu and
    now comes with "Basic MAPEDIT Patch" by default. Option to add
    names for gdx types in 2d mode list has been added instead.
  - Vanilla hidden types that was previously able to be added in 2D 
    mode list is temporary unavailable as they not compatible with 
    GDX types yet. I will try make 'em compatible in next PMAPEDIT 
    update, so stay tuned.
   
Jan 23 2019
---------------------------
- Fix for "Different sky for each sector". Freezes and hangs now should 
  be solved. Please, let me know if you have any problems.
   
Nov 28 2018
---------------------------
- Hot-fix for latest update. 

Nov 27 2018
---------------------------
- Enemy sprites has been added in 3d sprites menu (Alt+S):
	- Tile 3390 = SCultist Prone.
	- Tile 2830 = Cultist w/ Dynamite.
	- Tile 2870 = Cultist w/ Tesla.
	- Tile 1535 = Flesh Statue.
	- Tile 2875 = Beast Cultist.
	- Tile 1530 = Stone Statue.
	- Tile 2595 = Stone Gargoyle.
- You can now set up to 32 players in Player Start's data field.
- Size of Dude Spawn sprite has been reduced.
- Size of Earthquake sprite has been reduced.
- Stone Gargoyle sprite is now have correct size.

Nov 20 2018
---------------------------
- It's possible now to set different sky for each sector.
- You can now set statnum 1 (effect) for any sprite.
- Caption for Ambient Sound has been removed in 2D mode.
- Added a lot new types in 2D mode:
	- Added new type 34: WindMovable.
	- Added new type 228: 1 Head Cerberus.
	- Added new type 225: Fake Dude.
	- Added new type 302: Missile 2.
	- Added new type 304: Missile 4.
	- Added new type 306: Missile 6.
	- Added new type 307: Missile 7.
	- Added new type 311: Missile 11.
	- Added new type 314: Missile 14.
	- Added new type 315: Missile 15.
	- Added new type 418: Armed TNT 1.
	- Added new type 419: Armed TNT 2.
	- Added new type 420: Armed Spray.
	- Added new type 425: Falling Gibs.
	- Added new type 428: Napalm Ball.
	- Added new type 429: Acid Ball.
	- Added new type 431: Leech Turret.
- Sprite size of SFX Gen, Sector SFX, Ambient Sound, and Player SFX has been decreased.
- Sprite palette SFX Gen, Sector SFX, has been changed:
	- SFX Gen pal: 6 (greyish).
	- Sector SFX pal: 9 (green).
- Fixed a small bug in vanilla compatible patch, when candle got wrong sprite.
- Hidden exploder can now be painted. Explosion will inherit palette in the game.

Nov 1 2018
---------------------------
- Max board space has been increased from -131 072,+131 072 to -196 608,+196 608.
- Max board zoom was decreased from 1024 to 900 to avoid BUILD bug related to grid drawning.
- Added data1 field for caption of Path Marker in 2D mode (just like it works for Dude Spawn, for example).
- You can now see sprites/markers in 2D mode with smaller zoom (original: 256, pmapedit: 160)
- You can now see highlighted wall points in any zoom. Try move cursor near walls on smaller zoom.
- Shape for On and Off markers (used by slide) in 2D Mode has been changed to square.
- Color for slide arrow in 2D Mode has been changed to light cyan.
- Shape for Ambient Sound in 2D Mode has been changed to circle.


Aug 28 2018
---------------------------
- Added patch that unbinds MAPEDIT.EXE from using BLOOD.CFG to get such settings as video mode 
  and sound. All settings now stored in MAPEDIT.INI. This allows to set different display/sound
  options for game and editor.
  
  After this patch, please don't forget to edit MAPEDIT.INI.

Aug 15 2018
---------------------------
- On, Off, Axis and Teleport markers in 2D mode now painted as light cyan.
- Invisible sprites in 2D Mode now painted as dark grey.
- Machine Gun Trap now spawning with correct sprite.
- Asbestos Armor now spawing with correct sprite.
- Teleport Target sprite now displaying as tile 3193 (small orange square) instead of default tile 0.
- FlameTrap will now spawn in game with correct closed state. In editor it displaying as closed with PAL8.
- Goo, Stack, Water and Link markers are now bigger and using different palette.
	Goo Palette: 5 (grey).
	Stack Palette: 2 (red).
	Link Palette: 6 (greyish).
	Water Palette: 0 (none, same as vanilla).

- Path Marker is now bigger and uses palette 1, so it can be more notable especially in dark places.
- BloodDrip Gen will now autoadjust to sprite 2028 (drip) with pal 2.
- WaterDrip Gen will now autoadjust to sprite 2028 (drip) with pal 10.


Changes in "Misc" menu in 3D Mode (ALT+S -> Misc):

- Blue vase has been replaced to WaterDrip Gen (tile 955).
- Brown vase has been replaced to BloodDrip Gen (tile 956).
- Toggle Switch (tile 1078) has been replaced to Combination Switch (tile 1161).
- Toggle Switch (tile 1048) has been replaced to FireBall Gen (tile 226).
- Fleurescent Light (tile 796) has been replaced to Key 7 (tile 2558).
- Glass Window (tile 266) has been replaced to SFX Gen (tile 2519).
- Crate Face (tile 462) has been replaced to Sector SFX (tile 2520).
- Candle (tile 650) has been replaced to Ambient Sound (tile 2521).
- Player Start 8 (tile 2559) has been replaced to EarthQuake (tile 2072).
- Player Start 7 (tile 2558) has been replaced to DudeSpawn (tile 2077).
- Player Start 6 (tile 2557) has been replaced to Flame Trap (tile 2183).
- Player Start 5 (tile 2556) has been replaced to MultiBubble Gen (tile 1131).
- Player Start 4 (tile 2555) has been replaced to Bubble Gen (tile 1128).
- Player Start 3 (tile 2554) has been replaced to Upper Water (tile 2332).
- Player Start 2 (tile 2553) has been replaced to Lower Water (tile 2331).

There is also changes in strings of loading process, so you can easy determine what MAPEDIT do you use.
Watch for loading and end screens.

May 25 2018
---------------------------
- Replaced Spike Trap in Hazard menu to Armed Spray Can
- Replaced Guilitine in Hazard menu to Armed Bundle Of Tnt
- Replaced Pendulum in Hazard menu to Armed Stick Of Tnt

Re-apply "Unlock hidden types" and select "Y" to add things
in hazard list. Press ALT+S in 3D Mode and select Hazard menu 
to use them.


=======================================
FEATURE EXAMPLES:
=======================================

---------------------------------------
Example 1:
1. Apply "Disable sprite palette auto-adjusting patch".
2. Insert enemy sprite (with no palette).
3. In 3D Mode add any palette you wish, save the map.

In Blood you will got monster with selected palette.
---------------------------------------


---------------------------------------
Example 2:
1. Apply basic patch.
2. Create decoration sprite.
3. In 2D mode press ALT+F6 on it and select type 228.
   Optionally you can fill "drop item" field and select key to drop.
   Apply palette, if you have palettes patch installed.

In Blood you will got painted 1-dead head cerberus that can drop
items and keys after death. To make him not ignore world, just set
his State in mapedit to 1, or enable him via remote control as he
fully accessible for RX\TX system.
---------------------------------------


---------------------------------------
Example 3:
1. Apply basic patch.
2. Create decoration sprite.
3. In 2D mode press ALT+F6 on it and select type 431.
4. Mark "Proximity" flag, optionally also "Push" and "DudeLockout" flags.
5. Add couple enemy sprites.

In game you will got dropped life leech turret that fires in monsters and
sometimes can even fire in you. If you marked "Push" flag it will able to
pickup via key press.
---------------------------------------


---------------------------------------
Example 4:
1. Apply basic patch.
2. Create decoration sprite.
3. In 2D mode press ALT+F6 on it and select type 420.

In game you will get armed spary can bomb. Once damaged it will explode.
If you want it explode via remote control, you probably want add RX\TX values.
You may also set "Proximity" flag and it will explode when you or monster get
close enough. Mark "Push" to make it explode via key press on it.
---------------------------------------

--------------------
Status List Numbers:
--------------------
kStatDefault	= 0,	// inactive items, like torches and stuff, but NOT dudes
kStatEffect     = 1,	// non-damaging ricochets, splashes, etc.
kStatExplosion	= 2,    // explosions
kStatItem		= 3,	// items that can be picked up
kStatThing		= 4,	// things that can be destroyed/moved
kStatMissile	= 5,	// player/enemy missiles that do damage
kStatDude		= 6,	// an active dude
kStatInactive	= 7,	// an inactive dude
kStatRespawn	= 8,    // respawned dude
kStatPurge		= 9,	// use these for purgeable sprites
kStatMarker		= 10,   // marker
kStatTraps		= 11,   // traps
kStatProximity	= 12,	// sprites triggered by proximity
kStatSpares     = 13,	// allocated invisible sprites
kStatFlare		= 14,	// flares that are stuck in dudes
kStatDebris		= 15,	// moving non-Thing debris

---------------------------
Projectile Types (lo-tags):
---------------------------
300 - ButcherKnife
301 - Flare (Regular)
302 - Tesla (Alt)
303 - Flare (Alt)
304 - Aerosol // can be dragged via wind
305 - Fireball (used by Fireball Gen in MAPEDIT)
306 - Tesla (Regular)
307 - EctoSkull (Phantasm projectile)
308 - HellHound / Cerberus Flame
309 - ButcherPuke
310 - 
311 - Stone Gargoyle projectile
312 - Napalm (Regular)
313 - Cerberus Fireball
314 - Tchernobog Blue Fireball
315 - Life Leech (Regular)
316 - Life Leech (Alt - when dropped and enough ammo)
317 - Life Leech (Alt - when dropped and zero ammo)

-----------------------
Things Types (lo-tags):
-----------------------
400 - TNT Barrel
401 - Armed Proxy Dynamite
402 - Armed Remote Dynamite
403 - Yellow Vase
404 - Yellow Vase 2
405 - Crate Face
406 - Glass Window
407 - Flourescent Light (can be broken)
408 - Wall Crack
409 - Wood Beam
410 - Spider's Web
411 - Metal Grate
412 - Flammable Tree (requires sprite to be visible)
413 - MachineGun Trap(can be destroyed)
414 - Falling Rock
415 - Kickable Pail
416 - Gib Object
417 - Explode Object
418 - Armed stick Of TNT
419 - Armed bundle Of TNT
420 - Armed aerosol
421 - Bone (Flesh Garg.)
422 - Some alpha stuff
423 - WaterDrip (used by WaterDrip Gen in MAPEDIT)
424 - BloodDrip (used by BloodDrip Gen in MAPEDIT)
425 - Blood chucks (used when exploding corpses)
426 - 
427 - Axe Zombie Head (can be kicked)
428 - Napalm's Alt Fire explosion
429 - Fire Pod Explosion
430 - Green Pod Explosion
431 - Life Leech (needs to be enabled by Proximity flag or via RX\TX system).
      Data3 = Ammo count, when no ammo it shots faster projectiles with less damage.
432 - Voodoo Head (probably from unused VDFIRE6.QAV)

-------------------
Commands Between 11 and 64 List:
-------------------
kCommandCounter = 12 // used by counter sector to check if something in area
kCommandCallback = 20;
kCommandRespawn = 21;
kCommandSpritePush = 30;
kCommandSpriteImpact = 31;
kCommandSpritePickup = 32;
kCommandSpriteTouch = 33;
kCommandSpriteSight = 34;
kCommandSpriteProximity = 35;
kCommandSpriteExplode = 36;
kCommandSectorPush = 40;
kCommandSectorImpact = 41;
kCommandSectorEnter = 42;
kCommandSectorExit = 43;
kCommandWallPush = 50;
kCommandWallImpact = 51;
kCommandWallCross = 52;


NoOne, baitd@yandex.ru

CONTACTS

Any suggestions and comments are welcome in Blood related Discord channel: https://discord.gg/a84k4wQ

You may also send e-mail to the author: baitd@yandex.ru

SIMPLE EXAMPLE #1

  1. Apply "Disable sprite palette auto-adjusting" patch.
  2. Insert enemy sprite (with no palette).
  3. In 3D Mode add any palette you wish, save the map.

In Blood you will got monster with selected palette.

SIMPLE EXAMPLE #2

  1. Apply "Unlock hidden types (lo-tags)" patch.
  2. Create decoration sprite.
  3. In 2D mode press ALT+F6 on it and select type 228.
  4. Optionally you can fill "drop item" field and select key to drop. Apply palette, if you have palettes patch installed.

In Blood you will got painted 1-dead head cerberus that can drop items and keys after death. To make it not ignore the world, just set it's State in mapedit to 1, or enable him via remote control as he fully accessible for RX\TX system.

SIMPLE EXAMPLE #3

  1. Apply "Unlock hidden types (lo-tags)" patch.
  2. Create decoration sprite.
  3. In 2D mode press ALT+F6 on it and select type 431.
  4. Mark "Proximity" flag, optionally also "Push" and "DudeLockout" flags.
  5. Add couple enemy sprites.

In game you will got dropped life leech turret that fires in monsters and sometimes can even fire in you. If you marked "Push" flag it will able to pickup via key press.

SIMPLE EXAMPLE #4

  1. Apply "Unlock hidden types (lo-tags) patch".
  2. Create decoration sprite.
  3. In 2D mode press ALT+F6 on it and select type 420.

In game you will get armed spary can bomb. Once damaged it will explode. If you want it explode via remote control, you probably want add RX\TX values. You may also set "Proximity" flag and it will explode when you or monster get close enough. Mark "Push" to make it explode via key press on it.

SOME SCREENSHOTS

Changed colors for invisible sprites and markers
Added unused active items to Items sprites menu
Reorganized Misc sprites menu
MAPEDIT patch by NoOne that unlocks new features such as: added unused active items in lists, hidden commands, hidden types