Die4Ever / deus-ex-randomizer

Randomizer for Deus Ex
https://mods4ever.com
GNU General Public License v3.0
105 stars 12 forks source link

DXRMutators/external DXRModules #448

Open Die4Ever opened 1 year ago

Die4Ever commented 1 year ago

addon devs should not be expected to use our python compiler, just plain UCC make sure to do this on a separate branch

or maybe they should just subclass our DXRBase (rename it to DXRModuleBase), it's a proven interface that's already stable, and the mutator interface doesn't give us much to work with

Die4Ever commented 1 year ago

we can use int files like how HX does it

function PopulateClassChoices()
{
    local string GameInfoClassString, GameInfoDescription;
    local Texture Portrait;
    local int iCandidate, iEnum;

    for ( iCandidate=0; iEnum<ArrayCount(EnumText); iCandidate++ )
    {
        GetRootWindow().ParentPawn.GetNextIntDesc( "HX.HXGameInfo", iCandidate, GameInfoClassString, GameInfoDescription );
        if ( GameInfoClassString=="" )
            break;

        GameInfoClasses[iEnum] = class<HXGameInfo>(DynamicLoadObject(GameInfoClassString,class'Class'));
        if ( GameInfoClasses[iEnum]==None )
            continue;

        // Work around missing description if needed.
        if ( GameInfoDescription=="" )
            EnumText[iEnum] = string(GameInfoClasses[iEnum].Name);
        else
            EnumText[iEnum] = GameInfoDescription;

        iEnum++;
    }

    // Some debug warnings.
    if ( iEnum==0 )
    {
        Warn( "Failed to load any GameInfo." );
    }
    else if ( iEnum==ArrayCount(GameInfoClasses) )
    {
        Warn( "Too many GameInfos." );
    }
}

HXRandomizer.int:

[Public]
Object=(Name=HXRandomizer.HXRandoGameInfo,Class=Class,MetaClass=HX.HXGameInfo,Description="Deus Ex Randomizer HX",GameName="HX Randomized Coop Game")
Die4Ever commented 1 year ago

the compiler doesn't seem as strict as I thought, but I think there's no way to directly access stuff like HXPlayerPawn without seriously abusing ConsoleCommand, SetPropertyText, and GetPropertyText

image

Die4Ever commented 1 year ago

https://github.com/Die4Ever/deus-ex-randomizer/compare/develop...DXRMutators?expand=1

Die4Ever commented 9 months ago

could do a mutator for InstaStomp, stomps do much more damage