Replacing playerpawns

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

arcanex

teh grinning totem
Sep 28, 2001
123
0
0
Is there any way of replacing the playerpawns with my own subclasses without making new gametypes (i.e. just one mutator that works in all the default UT gametypes)?
 

Hunz

...aka [A|K]Leviathan, mkay?
Jan 7, 2002
302
0
0
Jail
www.arschkeKse.de.vu
Hell yeah!

I want to do the same right now (and tried it in the past, too), buti think it doesnt work without it...
I got used to mutators and now ive got massive problems with the setup/initialization of gametypes...

...tried superrelevant-function of the mutator? This really made it interesting. Dont try it...
 

MecaNitroPenguin

Errrr...
Dec 24, 2001
44
0
0
Visit site
OK you can't replace the playerpawns but you can make a subclass of say tournament player called myplayer then put your code in that. You would then add stuff to your int file so you could select your new playertype on the player select screen. You would have to use your new player type for anyone functions you put in it to work
 

Papapishu

我是康
Jun 18, 2001
2,043
0
0
43
void
www.vovoid.com
I have thought of somthing like a mutator that spawns a spawnnotify that when a tournamentplayer class is spawned, it replaces it with your own, but the subclasses is a problem...
You'd have to subclass all the standard playerclasses and make your own versions...
I have had in mind to try to make a super-duper-tournamentplayer class, one that can replace the other ones and that you can configure to look like female, male, robot, custom, and with any voicepack e.t.c. thus replacing all known subclasses with clones that is the same type of class...
This technique would solve a multitude of problems, yet I'm to lazy to figure out how to do... ;)
 

arcanex

teh grinning totem
Sep 28, 2001
123
0
0
I checked out MatrixMoves, and they did some code within ModifyLogin() that replaces playerpawns. It was pretty simple actually, but yes you'd need to subclass all the playerpawns and it won't work with non-standard ones (MM has that plugin system they use to support more models). It works for me, but maybe that's because I only changed one function in the subclass I replaced it with. So if anyone else wants to do this, look in the code of MatrixMoves.
 

Shiit

Shiit
Dec 19, 2000
168
0
0
Papapishu's idea wouldn't be so hard, would it? All class-based mods have one single playerclass that can take all models and sounds... If you just set your model to be the one the original used, it should even work with new (bonuspacked/downloaded) playermodels.
Anyway, Arcanex, you should only do this if it's REALLY necessary. Even Gametype shouldn't really change playerclasses, unless it's the only way. It can cause problems with the playersetup and it's very untidy and a sure way to make your mutator incompatible with MM, RA-UT and all class-based mods.
 

EasyRaider

Crazy coder
Sep 21, 2001
74
0
0
43
Norway
It doesn't take much to figure out how to use ModifyLogin(). I am already doing that. Replacing bots, however, can be a real pain.

I don't have a clue about how to realize papapishu's idea without ending up with a complete mess, but the basic idea sounds good to me. I'll have to investigate further.

As for changing playerclasses being untidy, it's sometimes cleaner and simpler than the alternatives.
 

Papapishu

我是康
Jun 18, 2001
2,043
0
0
43
void
www.vovoid.com
I hope they think just a bit more scalable for U2.
If all I hope for comes true (it's pretty much, so I won't bother you) that would be one kickass environment... :)