by frag.machine » Thu Mar 15, 2007 11:25 pm
My 0.02$ (put your currency here)
I understand that the goal here is to add some replay value to maps. And monster roaming is not the only solution, and not even the easiest to achieve. There's another simple but powerful way to give new life to old maps: randomness.
Some time ago I wrote some QC code to create a func_remove entity to standard progs.dat. Basically, you add a .removename field to the entities, and one (or more) func_remove to the end of the map. When this func_remove spawns it removes (or not) any entity which .removename = target (a variant func_remove I wrote later had two string fields - remove1 and remove2 - and randomly removed either one of the entities group). Thus, every time the map is loaded a different scenario is brought to the player: for example, you could spawn in a room with one, two, or no ogres at all. The same being applied to items, health, func_walls - any entity. Later I will dig my dusty .qc test files and post it here, maybe as a complete tutorial with a sample .map (no batteries included though).
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC 
(LordHavoc)