MTrop / DoomTools

Doom-related tools for Java. Home of DECOHack and lots of other utilities. Build WAD projects (and soon, other kinds) with ease!
https://mtrop.github.io/DoomTools/
MIT License
42 stars 5 forks source link

[DECOHack] Free Things and Weapons #31

Closed MTrop closed 2 years ago

MTrop commented 3 years ago

Okay - people are going to want to share actors and snippets of code with each other, now that cool things (and weapons) are being made for MBF21. States can be freed and auto-filled, why not things and weapons that are known to be unused (especially with the advent of DEHEXTRA)?

Proposal: A set of clauses that work like freeing states, but for things and weapons. For weapons, it is less useful due to weapon slotting (maybe a later "MBF" revision will change this?), but for monsters/projectiles, this could be very useful!

thing free <INTEGER>
things free <INTEGER> to <INTEGER>
weapon free <INTEGER>
weapons free <INTEGER> to <INTEGER>

A thing or weapon is filled/"un-freed" when it is directly edited (will have to do the same for states, I think, for consistency), or filled in via the following:

auto thing <IDENTIFIER> [ ":" ( auto thing <IDENTIFIER> | thing <INTEGER>) ] [<STRING>]
{
    // ..... code
}

auto weapon <IDENTIFIER> [ ":" ( auto weapon <IDENTIFIER> | weapon <INTEGER>) ] [<STRING>]
{
    // ..... code
}

For example:

auto thing superimp : thing MTF_IMP "Super Imp"
{
    EdNum 5000
    Health 2000
    // ... other insane stuff ...
}

Now, of course, you will not know exactly which slot it will end up in (a bit of a hazard when Vanilla/Boom editing, as some thing slots are special), so how will you refer to things later when you need to reference a specific thing or weapon or its states? These clauses:

auto thing superimp
auto thing superimp spawn
auto weapon bfg10k
auto weapon bfg10k refire

"Auto" objects will need to have a registrar in the context that will allow them to be referred to later, and so that namespace needs to be special when locating where those sorts of objects end up. Identifiers are better here, since using integers would be confusing, as that should be for specific slots, and this also keeps declaration and references lingustically distinct.

MTrop commented 2 years ago

This issue is now obsolete and split into two enhancements: #50 and #51.

Closing issue.