I've created a LOCKDEFS to define a new key, and now Ultimate DB won't show a list of keys.
Normally it shows the list of all keys available to the game. Now that the lockdefs file exists, that list no longer shows, and the only option is my new key.
Is there a configuration I have to set?
I did not do anything drastic like clear existing keys, Here's my LOCKDEFS:
class VillageKey : HexenKey
{
Default
{
Inventory.Icon "KEYSLOTC";
Inventory.PickupMessage "$TXT_KEY_VILLAGE";
}
States
{
Spawn:
KEYC A -1;
Stop;
}
}
Here's the UDB configuration for the game definition for keys:
(This is the configuration file that starts with: "Doom Builder 2 Game Configuration for ZDoom-compatible port". I've copied the Hexen one to add configs for my game) so they show up in the editor.
thingtypes
{
// Basic game actors
include("Includes\\Hexen_things.cfg");
// Additional ZDoom actors for that game
include("Includes\\ZDoom_things.cfg", "hexen");
// Standard ZDoom actors
include("Includes\\ZDoom_things.cfg", "zdoom");
// Additional actors from the engine
include("Includes\\GZDoom_things.cfg", "gzdoom");
include("Includes\\GZDoom_things.cfg", "gzdoom_lights");
XRpgKeys
{
color = 7; // Light Grey
arrow = 1;
title = "XRpg Keys";
width = 8;
sort = 0;
blocking = 2;
error = 2;
11004
{
title = "Village Key";
sprite = "KEYCA0";
height = 20;
}
}
}
What I have found so far is that UDB overwrites the KEYS enum on the actual editor objects if LOCKDEFS is present. So even if I define a new keys enum, it manually replaces every single linedef's "keys" enum. https://github.com/jewalky/UltimateDoom ... r.cs#L2790
From what I can see unless there is a way to replace ZDoom_linedefs.cfg to make these linedefs point at an enum not named "keys", it will always just overwrite it.
Is there a way to redefine those "door" action parameters in a Game Configuration file?
I am not well versed with all the new fandangled scripting stuff, all I can tell you is that I have never seen anybody edit an editor config file as you have done. I always leave these config files as downloaded with the editor. The only time these should be edited is when making a new config for a yet nonexistant configuration, for example to differantiate between DOOM 2 and DOOM editing sessions.
To eliminate a lot of problems iy always advisable to include the gzdoom.pk3 file into resources, ticking the "Exclude ..." box
Spoiler:
Maybe this tutorial can help you,
or somebody who knows this stuff can give some further advice.
Yarp, I have created a few config files, but I create them as new files with their own names. Most of the time you can simply reference the default files within your own project without editing them. So all you need to do is create copies of the files where you will be changing/adding entries and use those in your own project alongside the unchanged originals.
The originals do occasionally get updated, so keeping your own files to a minimum makes sense otherwise you will miss the changes. In fact, I think if you have changed some of the original files, they will get overwritten when you update regardless of whether the update changes those files or not. So, it's best to write your own with unique names (or at least keep a backup).
I made a new file to define the game editor objects by copying the Hexen configuration. I didn't see another way to get the sprites to show up in the editor for new actors.
UDB is actually pretty good at reading resource files and auto-adding stuff to the menu.
For big projects, I prefer to write my own config files (and it really is just a personal choice to do that) but for smaller jobs I just let UDB handle it.
It sounds like Kappes Buur has the right answer. Excluding the resource would fix the problem.
The problem is that these LOCKDEFS are IN the map pack with other textures and actors. So I'll have to experiment to make sure it works right.
Thanks for all the help.
I ended up adding my key to the "keys" enum in my configuration copy, and removing the LOCKDEFS while working on the locked doors... then once that was done I added the LOCKDEFS back in. It saves fine without an issue, it just is hard to set keys when the enum breaks.
That the default locks are overridden when a LOCKDEFS is present is intended behavior. Otherwise you'd have duplicate entries if you load gzdoom.pk3. Or have entries you don't even want for your custom game.