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

    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 3 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...