Odamex Message Boards

Community Discussion => Technical Support => Topic started by: Ant P. on August 18, 2013, 17:06:43

Title: Is there any equivalent to sv_curmap/sv_nextmap for wad names?
Post by: Ant P. on August 18, 2013, 17:06:43
Or can we have one added?

My main reason being, I want to do this in a multi-wad rotation (for the extra sounds in brit11):
Code: [Select]
sv_nomonsters 1
if sv_nextwad "doom2.wad brit11.wad" sv_nomonsters 0
Title: Re: Is there any equivalent to sv_curmap/sv_nextmap for wad names?
Post by: Hekksy on August 21, 2013, 07:39:07
Hi Ant,

There are some map scripts that you might find helpful. They were implemented a long time ago and I have never tried them myself, so I have no clue if they actually work or how they work. The best information I can give you is the page for them on the wiki.

http://www.odamex.net/wiki/Sv_startmapscript
Title: Re: Is there any equivalent to sv_curmap/sv_nextmap for wad names?
Post by: Ant P. on September 02, 2013, 18:47:50
Okay I *think* I've given this enough testing and it looks like it works, so here's what I ended up with:
Code: [Select]
addmap map01 dwango5.wad
addmap map02
addmap map06
addmap map07
addmap map12
addmap map13
addmap map19
addmap map01 brit10.wad
addmap map02
addmap map03
addmap map04
addmap map05
addmap map06
addmap map01 brit11.wad
addmap map02
addmap map03
addmap map04
addmap map05
addmap map06
addmap map07
sv_endmapscript "exec config/inc/brit11sfx.cfg"
// ↓
Code: [Select]
if sv_nextmap eq "map01" sv_nomonsters 0
if sv_curmap eq "map19" sv_nomonsters 1
if sv_curmap eq "map06" sv_nomonsters 1

It gets me what I wanted, but it relies on the exact maplist order, so things like map vote and shufflemaplist are right out.