|
That's actually how the thief chase at Christian's Shop was made, but that required having 3 dormant NPCs in every level which isn't really an elegant solution to apply for every quest level.
|
An elegant way would be to write a simple preprocessor. You can either base the preprocessor's evaluation of levels on a database that contains certain attributes for levels. You could also base the evaluation on scanning the level for some type of indicator. You can either do a src -> dst architecture or have the preprocessor flag its own scripts so that it cleans up after itself if it's reprocessing the level.
A preprocessor could also be useful for other things like generating underwater levels that reflect changes in above-water levels. So it wouldn't need to be just a one-off hack to make it easier to preload clientside bombs in quest levels.
Com013 had built something like this at one point, although he was trying to mass-convert scripts for NPC-Server compatibility rather than adding more powerful features to levels.
Edit: I imagine you could even do it on the server without having to deviate from GScript, since online level editing became a bit of a push ~v4 of the client. The loadlines, savelines and maybe copylevel functions look like they could potentially be used for preprocessing functionality.
Edit 2: Now that I think about it, you could also use it to be a clean substitute for the built-in baddies and built-in chests that the level editor currently provides.
Edit 3: And the gajillion signs, bushes, swamp tiles (if those are NPCs now) that a lot of places have.