Jump to content
  • 0

HEXEN style hub that remembers progress


Cacodoomonic

Question

I really need some help here. I'm working with DOOM II in UDMF Format. 

This is what I have: 

 

MAP00 = Hub map. This map is one large room with five doors. Each door leads to a different chapter (Each chapter contains 10 maps. Map 1-10, 11-20, ETC. ETC.)

 

I'm trying to make it so that the player can choose a chapter from the hub, open that door, and begin the chapter of their choice. However, I need the game to REMEMBER everything that has been done between each chapter.

 

For example. Once the player completes chapter 1, they are returned to the hub and the Chapter 1 door becomes sealed off. Then they can choose from any of the next four chapters and repeat. I also need it to remember when everything has been killed. So the bodies (if any are left in the hub world for example) remain dead on the floor. 

 

Hexen was able to do this, but I'm not sure how to do the same with my mod. Please, can anyone help advise me on this?

Share this post


Link to post

12 answers to this question

Recommended Posts

  • 0

Have you not already learned to use MAPINFO? It's the way Hexen achieved it, but if you are targeting GZDoom you should use ZMAPINFO. Specifically using the cluster definition provided by it.

 

The wiki page contains better indepth information:
https://zdoom.org/wiki/MAPINFO

Share this post


Link to post
  • 0
Posted (edited)
On 3/16/2024 at 12:26 AM, elf-alchemist said:

Have you not already learned to use MAPINFO? It's the way Hexen achieved it, but if you are targeting GZDoom you should use ZMAPINFO. Specifically using the cluster definition provided by it.

 

The wiki page contains better indepth information:
https://zdoom.org/wiki/MAPINFO

I have been using MAPINFO for about 8 years and using clusters in the same way that DOOM uses them: To add intermission text and clump chunks of levels together into "episodes" or "sections" to break the game apart. But I cannot seem to figure out how to make each level remember what was done. By this I mean that lets just say then was an IMP in the hub at the start. I shoot it and kill it. Then I decided to enter the door that takes me to "EPISODE 1". I go through the entire episode (10 levels) and then return to the hub. Upon returning, the door to episode one becomes sealed off (maybe by bars or something) and the dead imp is still lying on the floor where I killed it at the very start. Then repeat for the next episodes. 

 

If I use MAPINFO/ZMAPINFO, surely, if HEXEN did it, then this is definitely possible. But I cannot figure out exactly how. I just re-read the page you linked me too and although it does clearly state that HEXEN uses this, I cannot seem to figure out exactly how. The clusters, possibly my own issue, I'm only used to using in DOOM style formats... to play a text screen for example after a set of levels.

 

Also, how would this work with the second chapter and so on? I could clump levels of 10 together as separate clusters but the hub is outside of that, and is supposed to be the hub to ALL chapters. 

Edited by Cacodoomonic

Share this post


Link to post
  • 0

Im' still having hell setting up this. Please, if anyone can help, please contact me. I have a central hub with four doors each leading to a chapter. Each one has a teleporter with linedefs "walkover" that "TELEPORT TO MAP". These do not even work at all, let alone anything else. I really need help from someone who has the time and knowledge on how to pull this off. Please help.

Share this post


Link to post
  • 0

So, when I create a hub, I have following definition in zmapinfo:

////////////////////////////////////////////////////////////////////////////////
// Cluster definition //////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
cluster 1 {
	hub
}
////////////////////////////////////////////////////////////////////////////////

And every map is connected to this cluster:

// zakladna rangeru ////////////////////////////////////////////////////////////
map MAP1001 lookup MAP1001_NAME {
	//skybox = "Skybox4"
	sky1 = "SKYD10"
	sky2 = "SKYD10"
	cluster = 1
	music = "08DSRT1"
	outsidefogdensity = 128
	skyfog = 128
	lightmode = 2
	StrifeFallingDamage
	MonsterFallingDamage
	AllowJump
	AllowCrouch
	AllowFreelook
	ActivateOwnDeathSpecials
	//pixelratio = 1.0
}
////////////////////////////////////////////////////////////////////////////////

Then, in maps I use special ChangeLevel to change level. Basing on that I cannot even find any special called "teleport to map", I assume you're using vanilla or mbf, which doesnt work this way.

Share this post


Link to post
  • 0
Posted (edited)
12 hours ago, fekete said:

So, when I create a hub, I have following definition in zmapinfo:


////////////////////////////////////////////////////////////////////////////////
// Cluster definition //////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
cluster 1 {
	hub
}
////////////////////////////////////////////////////////////////////////////////

And every map is connected to this cluster:

// zakladna rangeru ////////////////////////////////////////////////////////////
map MAP1001 lookup MAP1001_NAME {
	//skybox = "Skybox4"
	sky1 = "SKYD10"
	sky2 = "SKYD10"
	cluster = 1
	music = "08DSRT1"
	outsidefogdensity = 128
	skyfog = 128
	lightmode = 2
	StrifeFallingDamage
	MonsterFallingDamage
	AllowJump
	AllowCrouch
	AllowFreelook
	ActivateOwnDeathSpecials
	//pixelratio = 1.0
}
////////////////////////////////////////////////////////////////////////////////

Then, in maps I use special ChangeLevel to change level. Basing on that I cannot even find any special called "teleport to map", I assume you're using vanilla or mbf, which doesnt work this way.

Teleport To Map is a function 74, DOOM II in UDMF Format. I see you're handling everything using ACS? Is that the best way to do this? The guide ReX's Nexus seems to be doing the same. Am I following this right? I'm so useless at this kind of setup I'm trying to follow the best I can...

 

Okay I'm following along the best I can. I have used your CHANGEMAP method, but I'm getting a weird error now. When I enter the portal from the main hub it fails to load the first level saying "No Player 1 Start". Which is complete nonsense, there definitely is. Map01 works fine when testing but not when exiting from the hub. No Player 1 Start error every single time.

 

Also, I made a test teleport in MAP01 to see if I can get back to the hub. It doesn't even work here either. It then tells me "no player 1 start" when trying to go back to my hub also. This is once again, completely false. All my stuff works fine when I load up each indiviual map in the editor, but not when existing from map to map. Please help.

Edited by Cacodoomonic

Share this post


Link to post
  • 0

Dude, have you even tried opening the link I sent you? It literally tells you how to setup player starts when using "ChangeLevel" special (see, It's changelevel, not changemap...). You must specify the first argument of the desired player start to make it work. You know, the link contaisn valuable information, you just have to read it whole, not just parts of it.

Share this post


Link to post
  • 0
Posted (edited)

So, for example, when you go from map 1 to map 2, I'm using the parameter set as "102", so when I look at it, I see that it means "from 1 to 2" and for return from map 2 to 1 I just use the parameter set as "201", meaning "from 2 to 1". But this is not a hard requirement, you can literally use any number.

Edited by fekete

Share this post


Link to post
  • 0

Ah man I'm sorry I did read that I'm just like a brick wall when it comes to remembering details... sorry about that man, thank you for pointing it out though. I'll try this again remembering that detail this time. Thank you so much for the reply.

Share this post


Link to post
  • 0

I have been trying to get this to work all day and am still failing. I just cannot get this to work. I set argument 1 on player 1 start in the hub as 102 as a test, as you suggested, then in map01 I added the same argument to see if it would work. It will not even start the game now, and also seems to be trying to start at map 01 which is incorrect, since the hub is map 001. ##I know this is a problem with me. I'm just not getting it. I've been trying to understand hubs since 2020 and I have progressed exactly zero percent. 

 

All I wanted was the ability to travel from hub to an entire episode which is linear, but nope. It won't let me do it. Again, I know this is on me. But for some reason I cannot get my head around this one. Which is unfortunate, because my entire massive project is stuck in limbo as it is dependent on this hub working.

Share this post


Link to post
  • 0

So, again, think about what you're doing...

 

So, I assume player starts in the hub. Player start in hub, the one that starts the whole game, has the first larameter set as 0. 

Player start in map02, which is connected to the hub, has first parameter set as 102. Player start in hub, which serves as returning point from map02, has the first parameter set as 201.

The special from hub to map02 is to be set like Changelevel("map02", 102, 0)

The special from map02 to hub should be set ChangeLevel("map01", 201, 0)

 

You can surely make nonlinear hub, but I just requires some precise setting, otherwise it will not work. 

 

Does this makes sense to you? 

Share this post


Link to post
  • 0
On 3/16/2024 at 1:47 AM, Cacodoomonic said:

For example. Once the player completes chapter 1, they are returned to the hub and the Chapter 1 door becomes sealed off. Then they can choose from any of the next four chapters and repeat. I also need it to remember when everything has been killed. So the bodies (if any are left in the hub world for example) remain dead on the floor. 

 

Hexen was able to do this, but I'm not sure how to do the same with my mod. Please, can anyone help advise me on this?

I fear, that no matter how linear maps 1-50 are, that after beating some them the only way to travel back to a previously visited hub map is to include them all into a one single hub together. You'll have a 50 map hub. Hexen solved this with progression. After completing a map cluster (called a hub) you entered to a new hub and never returned to the old places again. Quake has the map order you are seeking? :P

 

Anyway as said both ChangeLevel and lineaction 74 Teleport_Newmap do the trick. The former is a more advanced ACS only function but the latter you can use directly on a linedef without ACS if that's a problem. There are two things that matter:

 

* Arguments for Player 1 Start thing. The first one of them is the "start position number".

 

In UDB things mode it's grayed out and named as "Argument 1".

UkYjW0h.jpg

 

In UDB linedefs mode it's referred as "Tgt Player Start Arg0"

WYhApqD.jpg

 

In Slade map editor it's "arg1".

 

* Arguments for Action type 74 Teleport_Newmap: TARGETMAP, STARTPOSITION, ANGLE, 0, 0

 

The target map is the map where you want to go (MAP02, MAP03, ...) and the start position is the Player 1 start thing with the first argument on the level where you are heading. You only need the keep track of:

 

1. That the 74 Teleport_Newmap action line's start position number match the player 1 thing's start position number on the target map. It's a good practise to have a player 1 start with start position 0 on each map. It's the one to use if you enter maps with idclev or warp.

 

2. That 74 Teleport_Newmap's target map number is correct.

This may help or not but here's a schematic drawing of a simple hub and the same as a test wad. :) The MAPINFO is a minimal barebone.

 

8XQsAwe.png

TestHub.zip

Share this post


Link to post

Join the conversation

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

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  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.

×
×
  • Create New...