|
Post by marscaleb on Jul 2, 2021 21:39:00 GMT -5
It's hard to find good Quake 2 map/mod tutorials these days. Half of what I find in searches just leads to a dead link, and most of the rest depends on programs that don't run anymore and/or also are "found" through dead links.
The only legitimate things I have found are centered entirely on making multiplayer maps. And that's a fine way to start to be sure, but the single-player maps have a lot more stuff going on that I have no idea how to handle.
How do you set up inter-connected maps, or hub maps? How do I set up things to require keys? Can I create custom keys? Set up monsters to appear after an event? These are all things that one would want in a Quake 2 single player level.
Also, I'm really curious what the limits of a single-player hub map is. How many levels could I connect into a single "world"? What elements pose limits to how big and complex of a single "world" can be? What has to be consistent across an entire world? Like, can I change skyboxes between maps or does that have to remain consistent?
|
|
|
Post by grieve[Q2C] on Jul 3, 2021 11:19:41 GMT -5
Sorry, I am not aware of specialized SP - tutorials for Q2. All I can offer are the Rust tutorials, which explain all entities, SP as well as DM.
And maybe this one is of interest for you too:
|
|
|
Post by knightmare on Jul 3, 2021 15:07:34 GMT -5
I can answer most of your questions on Q2 SP map making.
The best reference on how things are done is a working, finished single player source .map. You should look at the example base1.map (included with GTKRadiant and the original Q2 game code release) in the editor of your choice. You can also decompile bsps to get a source .map using BSPC.
You interconnect maps using a target_changelevel targeted by a trigger_multiple for each level transition. The "map" key of trigger_changelevel is set to "mapname$startname" where mapname is the filename of the map/bsp, and startname is the targetname of the info_player_start and the 4 info_player_coop entities at the corresponding map entry point. If you want the level transition to be one-way (e.g. a hub/unit exit) you add a '*' in front of the map name. This tells Q2 to clear the crosslevel trigger bits and discard the savegame data from previous maps, otherwise it retains everything from every map loaded in that savegame slot.
With the Lazarus mod (built into KMQ2), you can also use the trigger_transition entity for seamless map changes that keep the player's exact position and carry over nearby entities.
Keys are used with a trigger_key entity linked between a larger, outer trigger_multiple and another, inner trigger_multiple with the triggered spawnflag that targets the door you want to have unlock with the key. You can also have the trigger_key target any other entity you want to activate with a key, such as a bridge or machinery. You can't create custom keys without programming changes- they must be added to the item table in g_items.c in the game DLL source, and the DLL must be recompiled.
Monsters can be triggered to appear using the trigger_spawn spawnflag.
There technically isn't a limit to how many maps can form a hub/unit. The only limiting factor is that there are only 8 crosslevel trigger bits implemented in the game DLL (using the spawnflags key for target_crosslevel_trigger and target_crosslevel_target), so you can only make 8 crosslevel triggered events. Note that this does not include "find the key and return" level objectives. Also note that the more maps in a unit, the larger in file size the save slot will get (and take correspondingly longer to save/load a game).
The game code could be extended to support more trigger bits, but you would also need to manually set the spawnflags by adding bits and typing them in the editor (most map editors don't have spawnflags checkboxes for the higher bits). You would also have to skip over the 5 reserved spawnflags bits (NOT_EASY, NOT_MEDIUM, NOT_HARD, NOT_DM, NOT_COOP) used to inhibit entities.
Yes, you can change skyboxes across the maps of a unit- see the Comm Satellite map that's part of Q2's hangar unit.
|
|
|
Post by marscaleb on Jul 4, 2021 10:47:18 GMT -5
Just as I said, most of the links I find are dead. Both of those links you posted give 404's. I can answer most of your questions on Q2 SP map making. This was SUPER helpful! More than anything else, now I know what I'm up against. This is what I really wanted to know. You can't create custom keys without programming changes- they must be added to the item table in g_items.c in the game DLL source, and the DLL must be recompiled. Hmm, but that's a DLL file, so in theory I could still make a mod with new keys that could be placed on top of an existing Q2 install; that is, someone could still play the original game and mods and stuff after installing such a custom map. Oh but wait, since it is replacing that file, if other people had made mods that likewise added new keys they would have incompatible DLL files, so running a mod for that would still require someone to backup their original files, or at least use a special exe or bat that renames files just for use with the mod. Dang. Okay, so what about using the same keys but making them look different? I could swap out the in-game models and the HUD icons with new graphics. Do I have user-level access to the text for what they are called in-game? Come to think of it, do I have user-level access to the in-game text for things like mission objectives? And then again, I should make sure: Does Quake 2 support the same kind of user-overriding of files that Doom has? Where a custom mod can just have a file with the same name as an OG file and the game just loads the new version instead? The only limiting factor is that there are only 8 crosslevel trigger bits implemented in the game DLL (using the spawnflags key for target_crosslevel_trigger and target_crosslevel_target), so you can only make 8 crosslevel triggered events. Note that this does not include "find the key and return" level objectives. So I'm guessing that would cover... anything that impacts another map, beyond what the player is carrying? Anything from opening a door to spawning in extra enemies. But I guess to keep down on crosslevel events I could have one map provide access to a start position in another map, putting the player in a spot one could not conventionally reach, which serves only to allow the player hit a switch within that map. I vaguely recall seeing that done in the original game at some point. Dang, no more than eight without re-writing the source. But that's eight per hub/unit, so I guess there's that. With the Lazarus mod (built into KMQ2), you can also use the trigger_transition entity for seamless map changes that keep the player's exact position and carry over nearby entities. You have my attention. But I suppose this also requires the level geometry to be built in the same position in worldspace? Or does it just require to place something to be used as an anchor point? Basically, would I be able to fudge the distances between two transition points (so they are not actually the same distance apart in both maps), or reposition entire map sections for editing convenience? Or would each map in a hub/unit need to be built as if the entire thing were one immense map if I wanted to use this feature?
|
|
|
Post by knightmare on Jul 4, 2021 18:15:12 GMT -5
Just as I said, most of the links I find are dead. Both of those links you posted give 404's. That's odd, both of the links Grieve posted work for me. And they're from the file server he recently set up. Hmm, but that's a DLL file, so in theory I could still make a mod with new keys that could be placed on top of an existing Q2 install; that is, someone could still play the original game and mods and stuff after installing such a custom map. Oh but wait, since it is replacing that file, if other people had made mods that likewise added new keys they would have incompatible DLL files, so running a mod for that would still require someone to backup their original files, or at least use a special exe or bat that renames files just for use with the mod. You got that wrong- the game DLL is part of a mod's files that go in the mod's subfolder- it seamlessly load/unloads and won't overwrite/replace anything! Also, the text for items is part of the game DLL. The mission objectives are set in the maps themselves using the target_help entity. Dang, no more than eight without re-writing the source. But that's eight per hub/unit, so I guess there's that. The code change required to increase it (18 or maybe 19 more) is quite minor. The real difficulty is in setting the spawnflags correctly in both corresponding crosslevel_trigger and crosslevel_target entities in the editor. Also, the Lazarus mod built into KMQ2 also allows use of a silent trigger_key entity that lets the player keep the key item. So when the player returns from the other map with the key, triggers can be conditionally activated that cause changes such as spawning in monsters, placing or removing barriers, etc. But I suppose this also requires the level geometry to be built in the same position in worldspace? Or does it just require to place something to be used as an anchor point? Basically, would I be able to fudge the distances between two transition points (so they are not actually the same distance apart in both maps), or reposition entire map sections for editing convenience? Or would each map in a hub/unit need to be built as if the entire thing were one immense map if I wanted to use this feature? Nope, trigger_transition handles translation to another position in the next map. You just have to use a target_changelevel with the landmark spawnflag as the anchor point and position it exactly relative to the origin of the info_player_start it transitions to. Also, you wouldn't want to try to position the maps in a hub/unit if they were one giant map, as stock Q2 limits map size to +/-4096 units from the origin on all 3 axis. KMQ2 enables the use of 4x that range, but only when compiling the map with kmqbsp3.
|
|
|
Post by marscaleb on Jul 7, 2021 22:31:54 GMT -5
That's odd, both of the links Grieve posted work for me. And they're from the file server he recently set up. I guess you have to be logged in to that server or something? All I can say is I get a "Not Found" page. You got that wrong- the game DLL is part of a mod's files that go in the mod's subfolder- it seamlessly load/unloads and won't overwrite/replace anything! Well that's good to know! Perhaps I should ask: what is there that I can't edit without overwriting the original data? Apart from changes to the source code of course. The code change required to increase it (18 or maybe 19 more) is quite minor. The real difficulty is in setting the spawnflags correctly in both corresponding crosslevel_trigger and crosslevel_target entities in the editor. That's good to know, but it still changes the project from being a pure mod to being a standalone. Either way I still have to decide just how far I want to take this. Thank you for all this information; it's exactly what I need to figure out what of my plans are feasible. Also, you wouldn't want to try to position the maps in a hub/unit if they were one giant map, as stock Q2 limits map size to +/-4096 units from the origin on all 3 axis. KMQ2 enables the use of 4x that range, but only when compiling the map with kmqbsp3. I am not at all surprised.
|
|
|
Post by knightmare on Jul 7, 2021 23:12:26 GMT -5
Perhaps I should ask: what is there that I can't edit without overwriting the original data? Apart from changes to the source code of course. Nothing! All of Q2's content can be overidden in a mod. That's good to know, but it still changes the project from being a pure mod to being a standalone. No, it doesn't. The code changes required to increase crosslevel triggers are all in the game DLL that goes in the mod folder, not the Q2 .exe. Also, I found a way to increase the number of crosslevel triggers to 32 by using a different field to set them.
|
|
|
Post by grieve[Q2C] on Jul 8, 2021 2:49:24 GMT -5
|
|