Changing playerclass (midgame) through DECORATE

Moderator: GZDoom Developers

Post Reply
User avatar
InsaneFury
Posts: 105
Joined: Mon Nov 23, 2009 6:51 am

Changing playerclass (midgame) through DECORATE

Post by InsaneFury »

As it's been a while since 2005, and I've been wanting to change playerclass mid-game, I decided to open this feature request post to get the up-to-date lowdown (PowerMorph was added, after all).

The request
I'd like to be able to dynamically change playerclasses and/or playerskins in-game, preferably through DECORATE. Something like A_SetPlayerClass("ClassName"). Or (for versatility) possibly even something more generic like A_SetActorClass(), allowing any actor to be morphed in (or replaced by) another actor?

Current alternatives & their limitations
  • Morphing players. Unfortunately, the effect does not transfer to the next level and does not have the required support for pickups and using multiple weapons. A morphed player is a crippled one.
  • Use only one playerclass with massive ACS & Decorate (dummy Inventory items and A_JumpIfInventory). SetActorProperty can help a bit, but lacks changing (view)height/scale/radius/gravity/painchance/ForwardMove/SideMove etc, not to mention the mugshot, crouchsprite and playersounds. Also, this requires additional scripting to prevent classes from using/picking up 'wrong' weapons for their class.
The Implementation
  • Extending the Morph system, removing the limitation concerning the use of weapons and picking up items, etc and making it *permanent*.
  • Creating new code, which could (loosly) also be used for Hexen's shadowcaster-cheat?
Typing the console-command 'PlayerClass "PlayerClass DisplayName"' works, but the player needs to commit suicide or change level for this to work. And this only works from MAP01 (and is probaby limited to singleplayer mode). I'm wondering whether this 'MAP01 suicide classchange' behaviour can be modified to work with any map, along with automatically killing the player & resurrecting/respawning him at the point where he 'died'?
Klofkac
Posts: 44
Joined: Sat Feb 06, 2010 4:02 pm

Re: Changing playerclass (midgame) through DECORATE

Post by Klofkac »

I want it also trough ACS.
User avatar
Xaser
 
 
Posts: 10774
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Re: Changing playerclass (midgame) through DECORATE

Post by Xaser »

Kate (Pink Silver) and I were discussing an implementation for this not too long ago, and according to her, the way the code works makes it virtually impossible to implement playerclass changing as a DECORATE function, because it would have to change the actor calling the function before the function has finished executing -- or something similar. I'm likely distorting it with my layman's terms, but don't lose hope -- it's still theoretically possible via ACS, and changing an actor is as 'simple' as tossing an ACS_Execute in the definition.

Also, I feel I'm obliged to do my usual part and ask the obvious: why exactly isn't this in yet? :P
User avatar
XutaWoo
Posts: 4005
Joined: Sat Dec 30, 2006 4:25 pm
Location: beautiful hills of those who are friends
Contact:

Re: Changing playerclass (midgame) through DECORATE

Post by XutaWoo »

Custom actors, I presume.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”