deus-ex-randomizer icon indicating copy to clipboard operation
deus-ex-randomizer copied to clipboard

DXRMutators/external DXRModules

Open Die4Ever opened this issue 1 year ago • 4 comments

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

  • [ ] look at UT mutators as examples for the interface since they have a strong community that already knows how to make them and lots of guides and examples available

  • [ ] split DXRando into multiple packages (but maybe the compiler isn't as strict as I think?)

    • [ ] make our python compiler work more nicely with this
    • [ ] package DXRCore for things that only depend on the Engine package, lots of abstract classes with undefined functions and properties to be access from mutators, no preprocessor definitions allowed because compilation needs to be stable?
    • [ ] package DXRMutatorsBaseV1 base classes and stuff that mutators depend on, versioned for compatibility
      • [ ] a subclass of Engine.Mutator that addon devs can inherit from (but we should also support plain Engine.Mutator subclasses to save an extra package file?), the classname should also follow suit with the version numbering
    • [ ] package DXRando/VMDRando/etc for the meat of the randomization features? or maybe we can unify to just DXRando especially if we're using an installer?
      • [ ] a DXRMutators module that loads and manages mutators from a config file
    • [ ] package DeusEx for vanilla modifications
    • [ ] installer program
  • [ ] hooks that call mutators

    • [ ] BindFlags
    • [ ] GUI stuff
  • [ ] functions to modify DXRMissions data, DXRLoadouts data?

  • [ ] remember we can call functions by string if we use mutator.ConsoleCommand, or parent.ConsoleCommand

  • [ ] functions to ask DXRando what game we're in (vanilla, VMD, Revision...) and what DXRando version number

  • [ ] telemetry output?

  • [ ] GUI for choosing mutators

  • [ ] we can give the mutator a variable for a var DXRHelper helper; or something, which would be an abstract class since it has to be compiled against the Engine package and not the DeusEx package, and we would fill it with a child class that has access to things like our rng functions, StringToName, the FlagBase with set/get bool/int flag functions

  • [ ] Wiki page for how to develop these mutators

  • [ ] it should be possible for our DXRModules to be cross-mod compatible without preprocessor definitions, by using if statements on the flavor name, and abstract functions from the main package

  • [ ] include loaded modules into the FlagsHash

  • [ ] some kind of hook for custom augmentations, maybe int files for them, would need to read the int file in DXRAugmentations and also AugmentationManager

  • [ ] because this is a large compatibility break, this would also be a good time to switch our rng to use floats internally, and maybe also use ScummVM's rng function, to improve the quality of rng

Die4Ever avatar May 18 '23 20:05 Die4Ever

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 avatar May 19 '23 05:05 Die4Ever

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 avatar May 21 '23 07:05 Die4Ever

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

Die4Ever avatar May 21 '23 07:05 Die4Ever

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

Die4Ever avatar Oct 22 '23 19:10 Die4Ever