Rev 20 | Blame | Compare with Previous | Last modification | View Log | RSS feed
/*
VERY IMPORTANT!
This file is designed to convert any user maps you have made to combatibility with NW+
This will move the numbers of certain sounds and change the tile numbers of certain sprites.
It has already been run on the maps included with NW+ (Nuclear Winter, Demo, Zoo).
Before use, follow the instructions about uncommenting code below.
To use, open the console in Mapster32 and type:
include nwfix
enableevent all
Then change to 3D mode and back to 2D mode. Wait for about five seconds for the script to run through all the sprites and sectors.
Save your map. Open your next map, switch to 3D mode, etc. Repeat. You do not have to type the commands again.
Then follow the instructions abuot uncommenting code and repeat the procedure for your maps.
Notes about replacing the actors: (see "Fixing actors.")
You must only uncomment one step at a time (the same step in both allsprites and the RESPAWN cases).
You must run Step 1 before Step 2 and Step 2 after Step 1.
Do not run Step 1 ever again after running Step 2.
Not following these directions will fuck up your maps.
ALWAYS MAKE BACKUPS OF YOUR MAPS!
*/
include DEFS.CON
include NWDefs.con
gamevar i 0 0
gamevar k 0 0
gamevar l 0 0
onevent EVENT_DRAW2DSCREEN
// Fixing sounds.
for i allsprites, ifactor MUSICANDSFX
{
// fixing ambient sounds
switch .lotag
case 91
case 308
set .lotag 426
break
case 244
set .lotag 438
break
endswitch
}
// fixing one-time sector sounds
for k allsectors
{
switch sector[k].lotag
case 10091
case 10308
set sector[k].lotag 10426
break
case 10244
set sector[k].lotag 10438
break
endswitch
/*
ifvarg sector[k].lotag 9999
ifvarl sector[k].lotag 20000
{
al k
al sector[k].lotag
}
*/
// texture replacements:
switch sector[k].floorpicnum
case 198
ifvare sector[k].floorpal 1
{
al k
set sector[k].floorpicnum 3670
set sector[k].floorpal 0
}
break
endswitch
switch sector[k].ceilingpicnum
case 198
ifvare sector[k].ceilingpal 1
{
al k
set sector[k].ceilingpicnum 3670
set sector[k].ceilingpal 0
}
break
endswitch
}
for k allwalls
{
ifvare wall[k].pal 1
{
switch wall[k].picnum
case 198
al k
set wall[k].picnum 3670
set wall[k].pal 0
break
endswitch
switch wall[k].overpicnum
case 198
al k
set wall[k].overpicnum 3670
set wall[k].pal 0
break
endswitch
}
}
// Fixing actors.
// fixing actors already in the map
for i allsprites
{
switch .picnum
/*
// Step 1: Santa
case 2000 set .picnum 3900 break
case 2045 set .picnum 3905 break
*/
/*
// Step 2: Pig Cops
case 2002 set .picnum 2000 break
case 2003 set .picnum 2001 break
case 2047 set .picnum 2045 break
*/
endswitch
}
// fixing actors which spawn on triggers
for i allsprites, ifactor RESPAWN
{
switch .hitag
/*
// Step 1: Santa
case 2000 set .hitag 3900 addlogvar .x addlogvar .y break
case 2045 set .hitag 3905 addlogvar .x addlogvar .y break
*/
/*
// Step 2: Pig Cops
case 2002 set .hitag 2000 addlogvar .x addlogvar .y break
case 2003 set .hitag 2001 addlogvar .x addlogvar .y break
case 2047 set .hitag 2045 addlogvar .x addlogvar .y break
*/
endswitch
}
endevent