Die4Ever / deus-ex-randomizer

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

overwrite the player class for GMDX, Revision, and HX #187

Open Die4Ever opened 2 years ago

Die4Ever commented 2 years ago

I think we just need to subclass from JCDentonMale, and then edit the User.ini config file, in the [DefaultPlayer] section, change Class from Class=DeusEx.JCDentonMale to something like Class=GMDXRandomizer.JCDentonRando

this should allow us to do A LOT more, like DXRBacktracking, tons of balance changes, more crowd control stuff, telemetry in ClientMessage, DXRLoadouts modes like Stick With the Prod Plus, autosave-only mode, and do HasAnim checks for when we swap player models in DXRFashion

not entirely sure if this will work with HX

How to handle LDD? Maybe I just need to duplicate the LDD code into my own subclass?

Die4Ever commented 2 years ago

HX needs this to be able to show randomized passwords properly, ProcessInformationDevicesWindowTag

Die4Ever commented 2 years ago

in the GameInfo, can override here

event playerpawn Login
(
    string Portal,
    string Options,
    out string Error,
    class<playerpawn> SpawnClass
)
{
    local DeusExPlayer player;
    local NavigationPoint StartSpot;
    local byte InTeam;
    local DumpLocation dump;

   //DEUS_EX AMSD In non multiplayer games, force JCDenton.
   if (!ApproveClass(SpawnClass))
   {
      SpawnClass=class'JCDentonMale';
   }

need to make the Login function change out the spawn class, and make ApproveClass return true