as to how its rendered within the editors environment.
My opinion is that the complex gameplay is much more important than how your maps are rendered.
Re: Converting HEXEN to UDMF maps (Heretic)?
Posted: Sun Dec 28, 2014 6:00 pm
by Graf Zahl
Trying to justify some stupid behavior (in this case refusing to use a more current version of an editor) doesn't take the stupidity out of that action. Have you even tried?
DoomBuilder 2 is a crappy old clunker compared to what MaxEd has achieved.
Re: Converting HEXEN to UDMF maps (Heretic)?
Posted: Sun Dec 28, 2014 6:26 pm
by cocka
Yes, I have tried. It really annoys me that there are so many options. All the stuff that I have on Custom tabs have been deleted and integrated into other control elements.
Re: Converting HEXEN to UDMF maps (Heretic)?
Posted: Mon Dec 29, 2014 3:35 am
by Graf Zahl
... where it should be. The custom tab is just a crutch to get around the lack of proper support for these features. Any normal mapper would expect to find those among similar properties on the other pages.
Re: Converting HEXEN to UDMF maps (Heretic)?
Posted: Mon Dec 29, 2014 3:35 am
by MaxED
New in R2155:
1. Added Hexen -> UDMF and UDMF -> Hexen action conversion as described in "Universal Doom Map Format ZDoom extensions" (udmf_zdoom.txt). It is used when changing map format form Hexen to UDMF and from UDMF to Hexen.
2. Game configurations, Line Identification action: added "Front side only" (128) flag to arg1. Also, why is this flag missing form the wiki article?
3. Game configurations, Line Identification action: renamed arg1 flags to match corresponding UDMF flag names.
Re: Converting HEXEN to UDMF maps (Heretic)?
Posted: Mon Dec 29, 2014 4:44 am
by Tormentor667
What have I done...
Re: Converting HEXEN to UDMF maps (Heretic)?
Posted: Mon Dec 29, 2014 5:48 am
by cocka
UDMF -> Hexen action conversion
And how would you like to do that? Let's say you have a linedef with an action special and a lineid. Would you set a Line_SetIdentification action special on that with the proper number? Well, so far so good, but then you'll also have to use setlinespecial in a script. Does your program automatically read the action special set in UDMF and rewrite it to a script with setlinespecial?
why is this flag missing form the wiki article?
As far as I know there is no native support for that in hexen format.
Re: Converting HEXEN to UDMF maps (Heretic)?
Posted: Mon Dec 29, 2014 6:32 am
by MaxED
cocka wrote:Does your program automatically read the action special set in UDMF and rewrite it to a script with setlinespecial?
No. When a linedef has a tag and no action, it converts it to Line_SetIdentification action. When a linedef has compatible action, it converts tag to action argument, in other cases it just adds a warning to Errors and Warnings window.
Spoiler: Teh gory details
This code is part of Linedef.TranslateFromUDMF method:
//mxd. UDMF -> Hexen action translation. Hardcoded for now...
if (General.Map.FormatInterface is HexenMapSetIO)
{
switch (action)
{
case 208: //TranslucentLine
//Convert tag to arg0
if (tag > 255)
{
General.ErrorLogger.Add(ErrorType.Warning, "Linedef " + Index + ": unable to convert Tag (" + tag + ") to LineID because it's greater than 255.");
}
else
{
args[0] = tag;
}
//Convert flags to arg3
ConvertFlagsToArg(oldfields, 3);
break;
case 1: ConvertTagToArg(3); break; //Polyobj_StartLine
case 5: ConvertTagToArg(4); break; //Polyobj_ExplicitLine
case 181: ConvertTagToArg(2); break; //Plane_Align
case 215: ConvertTagToArg(0); break; //Teleport_Line
case 222: ConvertTagToArg(0); break; //Scroll_Texture_Model
case 160: //Sector_3DFloor
if (args[0] > 255) // Split sector tag?
{
int hitag = args[0] / 256;
int lotag = args[0] - hitag;
args[0] = lotag;
args[4] = hitag;
if (tag > 0)
{
General.ErrorLogger.Add(ErrorType.Warning, "Linedef " + Index + ": unable to convert Tag (" + tag + ") to LineID, because target sector tag (arg0) is greater than 255.");
}
}
else if(tag > 0) // Convert to LineID?
{
if (tag > 255)
{
General.ErrorLogger.Add(ErrorType.Warning, "Linedef " + Index + ": unable to convert Tag (" + tag + ") to LineID, because linedef tag is greater than 255.");
}
else
{
args[4] = tag;
args[1] &= 8; // Add "Use arg4 as LineId" flag
}
}
break;
default: // Convert tag to Line_SetIdentification?
if (tag != 0)
{
if (action != 0)
{
General.ErrorLogger.Add(ErrorType.Warning, "Linedef " + Index + ": unable to convert Tag (" + tag + ") to LineID, because linedef already has an action.");
}
else // Convert to Line_SetIdentification
{
int hiid = tag / 256;
int loid = tag - hiid;
action = 121;
args[0] = loid;
args[4] = hiid;
ConvertFlagsToArg(oldfields, 1);
}
}
break;
}
// Clear tag
tag = 0;
}
cocka wrote:As far as I know there is no native support for that in hexen format.
There are loads of things on ZDoom wiki, which are not supported by vanilla Hexen.
Re: Converting HEXEN to UDMF maps (Heretic)?
Posted: Mon Dec 29, 2014 6:49 am
by Gez
I don't know when that flag was added to Line_SetId, probably after 2008 which was when the flag list on that article was last updated before today. It's not extremely important anyway.
Re: Converting HEXEN to UDMF maps (Heretic)?
Posted: Mon Dec 29, 2014 11:34 am
by cocka
When a linedef has compatible action
Then that compatible action has to be set in a script with setlinespecial. If this doesn't happen automatically, the user must write OPEN scripts with setlinespecials to have the same effect as if it were a line with action special and a lineid.
which are not supported by vanilla Hexen.
I meant the hexen format supported by ZDoom. Not the vanilla one. This option must have been recently added. It might have been added two or three years ago.
Re: Converting HEXEN to UDMF maps (Heretic)?
Posted: Mon Dec 29, 2014 12:24 pm
by MaxED
cocka wrote:Then that compatible action has to be set in a script with setlinespecial.
No it doesn't. By compatible action specials I mean those, which can set LineID themselves.
cocka wrote:This option must have been recently added. It might have been added two or three years ago.
Re: Converting HEXEN to UDMF maps (Heretic)?
Posted: Mon Dec 29, 2014 12:37 pm
by Graf Zahl
To make a long story short:
Since Hexen format is a rather limited subset of UDMF, any map that uses UDMF for its features will be quite drastically broken after downconversion. There's really no point investing more work than necessary here, it should convert what it can, and output a (long) log of what couldn't be done.
Why anyone would ever use such a feature is beyond me, though. The only thing I can imagine is having started with the incorrect settings, in which case it should be ok as it is.
Re: Converting HEXEN to UDMF maps (Heretic)?
Posted: Mon Dec 29, 2014 12:43 pm
by MaxED
DB2/GZDB copy-paste logic uses it. When you copy map elements, they are translated to UDMF, when you paste, they are translated from UDMF to current map format. This allows copy-pasting between maps, which use different map format without inventing some special copy-paste data format.
Re: Converting HEXEN to UDMF maps (Heretic)?
Posted: Mon Dec 29, 2014 1:29 pm
by Zanieon
Tormentor667 wrote:What have I done...
*Computer Voice On* Seed of the discord planted with success! Thank you for generate a great discussion *Computer Voice off*
Re: Converting HEXEN to UDMF maps (Heretic)?
Posted: Mon Dec 29, 2014 6:44 pm
by cocka
By compatible action specials I mean those, which can set LineID themselves.
So you are saying that [wiki]Line_SetIdentification[/wiki] is not a compatible action special.
No it doesn't
Then how would you assign an action special for such a line in hexen format? Wiki clearly says that [wiki]Polyobj_StartLine[/wiki] just defines a new polyobject without two-sided lines. Though the line won't have an event.. (just a definition for the polyobject)
No, I'm not an elf, but a moron.
It might have been added two or three years ago.
I talked about firstsideonly flag. It was not even mentioned for a long time on that wiki page either. It was only available here: