Jump to content
The Dark Mod Forums

Link Maps


Capela

Recommended Posts

hey, i remember we talk about that in the past and because i was way for so long dont know if you guys get a way to do this feauture.

 

Im thinking to do a city like in TDS but biger so even with doom engine i think i will need like 4 or 5 maps to do it.

The idea is to make a huge city and realese it for anyone who wanna make their missions in there. im thinking call it Ravens City..and thats it.

Link to comment
Share on other sites

hey, i remember we talk about that in the past and because i was way for so long dont know if you guys get a way to do this feauture.

 

Im thinking to do a city like in TDS but biger so even with doom engine i think i will need like 4 or 5 maps to do it.

The idea is to make a huge city and realese it for anyone who wanna make their missions in there. im thinking call it Ravens City..and thats it.

 

It's easy to link maps (eg, player goes to a 'doorway' etc and the next map is loaded - and back again via a similar portal) but transfer of inventory is not supported at the moment. Also game progress is not saved so going back to a previous map would be like starting again or else quickload. I'm not sure without looking if there is a gameload entity - if so, that is taken care of so all that remains is the inventory not transferred. This might be done I guess with a script that stores it in a file and a script in the next map loads it.

Link to comment
Share on other sites

It's easy to link maps (eg, player goes to a 'doorway' etc and the next map is loaded - and back again via a similar portal) but transfer of inventory is not supported at the moment. Also game progress is not saved so going back to a previous map would be like starting again or else quickload. I'm not sure without looking if there is a gameload entity - if so, that is taken care of so all that remains is the inventory not transferred. This might be done I guess with a script that stores it in a file and a script in the next map loads it.

 

 

Well thats good news Fidcal :-)..i think with some work and time we can get it.

Link to comment
Share on other sites

How actualliy does the modder make hubs, there's only one player start point, if you travel from one map to another then back to the original map you appear at the start of the map where the player spawn point is and not at the hub transfer point, source uses a info_landmark point to specify where the player appears in a map after a map to map transfer doom3 doesn't have this object, the original game uses two or more identical maps to get around the hub problem.

 

You can make long linear map, cos you'll always start at the player start point for the new map.

 

using $player1.setWorldOrigin('x y z'); as an easy way to teleport the player around the map works but only in the current map, making it auto run at the start by using the trigger from the previous map doesn't seam to want to work.

 

According to the doom3 forums someone did write some hub code to work with a doom3 mod, but when question the person making the mod wouldn't tell who wrote the code, or what the code was, even thou in the end they didn't use the code in their mod. Apparently it allowed for a hub of 16 exits.

Link to comment
Share on other sites

It is relatively easy to move between maps but the inventory & weapons are not carried over nor is the game position saved (ie, where you left a crate last time and who got KO'd.) I believe the gamesave can be done with a script but as said, the inventory is lost. You'd have to have a portal where you surrender your weapons and loot to go over. :)

Link to comment
Share on other sites

Yes, exactly. But if you're interested in exploring this now and want to build a fun test setup or to be ready for future support, here is a start:

 

Create suitable portal areas. These might be doorways into corridors for instance.

In the corridor you put a target_endlevel entity:

 

classname : target_endlevel

name <map name to load>

endOfGame : 0

nextMap : <gui> [i think this is a gui that is shown while loading, eg, you might have a full screen or just simple text 'Loading Old Section of the City']

 

Create a trigger brush or any trigger you like, eg, lever:

target : <name of first entity above>

 

To get back to the hub you have a similar doorway/corridor in the other map. Either these doorways are in separate places or if in the same place then you need to switch off the one you arrive at by some means or you will just flip back and forth.

 

Second time around you need to gamesave/load. Not explored this. Search around for a script instruction that performs a console command. Then look for a console command that does a gamesave/load.

Link to comment
Share on other sites

worked out a hub script, you need a trigger brush on your start position and player teleports where you actually want to enter the map and relays pointing to teleports then you set a sys.setPersistantArg when you leave the previous map with a value for that exit say 0 for default off, 1 for north exit, 2 for east exit, 3 for south exit, 4 for west exit, then on the trigger under your start position you call a script like this...

 

void hub_test()

{

float num1 = sys.getPersistantFloat("hub1");

float num2 = sys.getPersistantFloat("hub3");

 

sys.print(num1);

sys.print(num2);

 

if ( num1 == 2 )

{

$from_map_2.activate($player1);

sys.setPersistantArg("hub1", 0);

}

if ( num2 == 3 )

{

$from_map_3.activate($player1);

sys.setPersistantArg("hub3", 0);

}

 

}

 

eg from_map_2 being the name of the relay trigger that points to the teleport near the west exit if you've come from the east, the script checks where you came from and teleports you to the exit you came through, then you zero the value cos you're no longer on the previous map.

You could use the PersistantArg to store you're inventory items that are not permantly saved with the player in the info_player_start def like they did in doom3, so that they come with you.

 

the script on the previous map that you call from the trigger that triggers the change level is

 

void leave_east()

{

sys.setPersistantArg("hub1", 2);

sys.print("hub1 set to 2.\n");

}

 

you could leave the sys.print out of the scripts, they're only there for debugging.

 

tried it out with two simple maps, on map2 the player start was in a blue room, sitting on a trigger to the script, so if you just load map2 you start in the blue room cos the hub values aren't set, if you start in map1 and go through the trigger to change level that also sets the hub value you start in map2 at the teleport location that is set for that hub value, you don't even notice that the actual start is in a blue room.

Link to comment
Share on other sites

  • 5 months later...

Are there plans to add full inventory/weapon support with automatic gamesave/load when changing maps?

 

Due to map size/complexity, I'm facing a split into 2 maps, but it will require going back and forth between the split maps, since the flow is not linear. Keeping inventory and weapons is essential, as well as restoring game state from a previous visit.

 

I wrote some code a long time ago for a Doom 2 mod where any entities w/in a bounding box were also carried over to the next map. I.e. if something was chasing you and you crossed maps, you wanted the thing to be there on the other side to continue the chase. This is prolly not essential for TDM, but it was for the project we were working on.

 

So I'm willing to dive into scripts, etc. to create what I need to change maps properly, but I don't want to do that if this functionality is going to be available in the near future.

 

Thanks.

Link to comment
Share on other sites

I've been meaning to look into proper campaign/multi-map support for TDM 1.03 or TDM 1.05, somewhere along this timeline. But I'm struggling with a lot of things at the same time, so I can't really make any promises at this point. All I can say is that TDM will indeed have proper support for this, including the ability of saving AI state and carrying over things between map transitions, configurable by the mapper and all that fireworks.

Link to comment
Share on other sites

Second time around you need to gamesave/load. Not explored this. Search around for a script instruction that performs a console command. Then look for a console command that does a gamesave/load.

 

I'm getting back and forth between 2 maps just fine.

 

However, I'm stuck on doing the save/load game bit.

 

There are no savegame or loadgame entities.

 

There are no script commands to do this.

 

The only support for this is in the gui feature.

 

I'm experimenting with triggering a func_static that has a gui assigned to it (gui->guis/switch1_exit.gui).

 

According to what I've found, the following should work when the func_static is triggered:

 

guis/switch1_exit.gui contents:

 

 

windowDef Desktop

{

rect 0, 0, 640, 640

backcolor 0, 0, 0, 0

 

onTrigger

{

set "cmd" "log 'Save Game called.'";

set "cmd" "saveGame test1";

}

}

 

But the onTrigger section isn't getting called. At least I'm not getting 'Save Game called.' printed to the console.

 

Any hints?

 

If I can get the save/load game stuff working, then I can move on to the player's inventory and weapons.

 

 

Link to comment
Share on other sites

Since I can't figure out how to execute the GUI save/load game commands, and there's no script save/load commands, and there are no save/load entities, I've decided to wait for the official enhancement by the dev team.

 

I've split my map and am continuing on. I'll release after the map-switching enhancements are available.

 

My problem stems from needing to move back and forth between the maps. An item needed to satisfy an objective is in map 1, but you can't retrieve it until you've been to map 2. So the gameplay will be map1->map2->map1->map2.

 

A nice benefit from splitting the map is that, with 2 half-size maps, I'm no longer hitting id's memory alloc problem in dmap, so it's not crashing.

 

Now I just need to restrain myself and not let either map grow too big again.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • The Black Arrow

      Hey @nbohr1morehow come the zombies in The Dark Mod don't have a "resurrection" mechanic to it, similar to how Thief has it?
      They're quite a weak creature as of right now, it's merely a walking corpse that slashes you, making attacking them to kill them an actual strategy.
      Would be better if they had some cool mechanism to it that truly makes them a danger, such as the resurrection idea itself.
      · 2 replies
    • Ansome

      Query: when was the last time a zombie in a video game was unnerving or scary to you? I'm chipping away at my anniversary submission and I've been trying to gather opinions on the subject. I'm perfectly capable of lighting them well, changing their sfx, and creating effective ambience, but I'm worried that zombies at their core are just too overdone to be an effective payoff to the tension I'm creating.
      · 4 replies
    • nbohr1more

      The Lieutenant 3 is out! Congrats Frost_Salamander! ( raising awareness )
      · 2 replies
    • OrbWeaver

      Has anyone had any luck with textures from Polyhaven? Their OpenEXR normal maps seem too washed out and give incorrect shading in the engine.
      · 5 replies
    • datiswous

      I tried to upscale the TDM logo video. First try:

      briefing_video.mp4 You can test it ingame by making a copy of the core tdm_gui.mtr and place it in your-tdm-root/materials/ , then edit line 249 of that file into the location where you placed the new briefing.mp4 file.
      What I did was I extracted all the image files, then used Upscayl to upscale the images using General photo (Real-Esrgan) upscale setting and then turn it back into a video.
      I might have to crop it a bit, the logo looks smaller on screen (or maybe it's actually better this way?). My video editor turned it into a 16:9 video, which I think overal looks better than 1:1 video of original.
      · 1 reply
×
×
  • Create New...