[Solved]Possible for player to use class from 2 diff wads?

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
malon3
Posts: 103
Joined: Fri Dec 26, 2008 4:41 pm

[Solved]Possible for player to use class from 2 diff wads?

Post by malon3 »

So I made two different wads.

Wad #1:
Increases max player health (a new player class must be defined to do this)

Wad #2:
Made a friendly marine and turned his damage factor to 0 against the player (so he can't hurt the player).

The basic actor definitions are (both wads use this code):

DECORATE

Code: Select all

actor MyPlayer : DoomPlayer
MAPINFO

Code: Select all

GameInfo
{
	PlayerClasses = "MyPlayer"
}
KEYCONF

Code: Select all

clearplayerclasses
addplayerclass MyPlayer


I tried changing one of the wads to use "MyPlayer2" but it seems that wad load order determines which player class is used. Is there a way to get both to play nice at the same time, without merging wads? I'd like them separate because sometimes I want to use one without the other.

Thanks!
Last edited by Anonymous on Wed Dec 18, 2013 4:42 pm, edited 1 time in total.
User avatar
Ed the Bat
Posts: 3060
Joined: Thu May 03, 2012 1:18 pm
Graphics Processor: nVidia with Vulkan support
Location: Maryland, US
Contact:

Re: [Unsolved]Possible for player to use class from 2 diff w

Post by Ed the Bat »

KEYCONF screws everything up, so if either mod uses it, it'll take precedent over others.
Other than that, you're using commands that delete existing player classes, so you'd have to stop using those in order to allow other classes.
malon3
Posts: 103
Joined: Fri Dec 26, 2008 4:41 pm

Re: [Unsolved]Possible for player to use class from 2 diff w

Post by malon3 »

Ed the Bat wrote:KEYCONF screws everything up, so if either mod uses it, it'll take precedent over others.
Other than that, you're using commands that delete existing player classes, so you'd have to stop using those in order to allow other classes.
Okay, I'll try removing the KEYCONF section.

The only problem I know with that is ports like Zandronum don't use MAPINFO, so it wouldn't be MP compatible. Any fix for this? Or would I just have to wait for Zandronum to catch up?

EDIT:
Removing the KEYCONF section had no effect.
Keeping both wads to use the same or different classnames also did not have any effect.
The last wad to load is the wad that chooses the player class.
I'm open to any more ideas!
User avatar
zrrion the insect
Posts: 2432
Joined: Thu Jun 25, 2009 1:58 pm
Location: Time Station 1: Moon of Glendale

Re: [Unsolved]Possible for player to use class from 2 diff w

Post by zrrion the insect »

Remove clearplayerclasses from keyconf. Load order may still have some æffect on things, but one order should work.
User avatar
Ed the Bat
Posts: 3060
Joined: Thu May 03, 2012 1:18 pm
Graphics Processor: nVidia with Vulkan support
Location: Maryland, US
Contact:

Re: [Unsolved]Possible for player to use class from 2 diff w

Post by Ed the Bat »

You're still using the PlayerClasses command, which removes all previous classes. This is why AddPlayerClasses exists.
malon3
Posts: 103
Joined: Fri Dec 26, 2008 4:41 pm

Re: [Unsolved]Possible for player to use class from 2 diff w

Post by malon3 »

zrrion the insect wrote:Remove clearplayerclasses from keyconf. Load order may still have some æffect on things, but one order should work.
Ed the Bat wrote:You're still using the PlayerClasses command, which removes all previous classes. This is why AddPlayerClasses exists.
I removed clearplayerclasses from keyconf from both wads. I tried leaving both player classes set to MyPlayer as well as changing one of them to MyPlayer2 (as well as the associated references in mapinfo and keyconf of course). Again, only the most recent wad loaded seems to choose which player class is selected. I'm guessing the only solution is to make a merged wad.

I'm still more than happy to try any solutions that someone may have!
Last edited by Anonymous on Wed Dec 18, 2013 1:55 pm, edited 1 time in total.
User avatar
Ed the Bat
Posts: 3060
Joined: Thu May 03, 2012 1:18 pm
Graphics Processor: nVidia with Vulkan support
Location: Maryland, US
Contact:

Re: [Unsolved]Possible for player to use class from 2 diff w

Post by Ed the Bat »

No, the solution is to use AddPlayerClasses instead of PlayerClasses. You even quoted me saying that, yet you didn't try it.
malon3
Posts: 103
Joined: Fri Dec 26, 2008 4:41 pm

Re: [Unsolved]Possible for player to use class from 2 diff w

Post by malon3 »

Ed the Bat wrote:No, the solution is to use AddPlayerClasses instead of PlayerClasses. You even quoted me saying that, yet you didn't try it.
AddPlayerClasses has always been in keyconf. I guess I'm not following. This is the Keyconf I've tried:

Code: Select all

addplayerclass MyPlayer
And I also tried:

Code: Select all

addplayerclass MyPlayer2
Is that not what you're saying?

EDIT: Are you saying to change MAPINFO?
Last edited by Anonymous on Wed Dec 18, 2013 1:59 pm, edited 1 time in total.
User avatar
Ed the Bat
Posts: 3060
Joined: Thu May 03, 2012 1:18 pm
Graphics Processor: nVidia with Vulkan support
Location: Maryland, US
Contact:

Re: [Unsolved]Possible for player to use class from 2 diff w

Post by Ed the Bat »

No, it is not. The first thing I said is not to use KEYCONF at all.

Your MAPINFO is using PlayerClasses, which clears any previously defined players, while AddPlayerClasses does not.
malon3
Posts: 103
Joined: Fri Dec 26, 2008 4:41 pm

Re: [Unsolved]Possible for player to use class from 2 diff w

Post by malon3 »

Both wad player actor definitions:

Code: Select all

actor MyPlayer : DoomPlayer
Both wad MAPINFO lumps:

Code: Select all

GameInfo
{
	AddPlayerClasses = "MyPlayer"
}
KEYCONF has been completely removed from both wads.

Should the wads have the same actor definition, or should I change one to MyPlayer2 (or whatever?) In the above mentioned state, it is not working.

EDIT: Even if one is changed, it still does not work. But I'd still like to know the recommended approach: Same or different player actor namespaces?
Last edited by Anonymous on Wed Dec 18, 2013 2:09 pm, edited 1 time in total.
User avatar
Ed the Bat
Posts: 3060
Joined: Thu May 03, 2012 1:18 pm
Graphics Processor: nVidia with Vulkan support
Location: Maryland, US
Contact:

Re: [Unsolved]Possible for player to use class from 2 diff w

Post by Ed the Bat »

Yes, if both classes have the same actor name, one of them should be changed. Having the same actor name will cause a conflict, which ZDoom should be telling you when you load it. You're also going to need to give them both different Player.DisplayName properties, which I can only assume you haven't done; I don't know what your classes look like, since you keep showing only the actor name and nothing else, when you quote your DECORATE.
malon3
Posts: 103
Joined: Fri Dec 26, 2008 4:41 pm

Re: [Unsolved]Possible for player to use class from 2 diff w

Post by malon3 »

Ed the Bat wrote:Yes, if both classes have the same actor name, one of them should be changed. Having the same actor name will cause a conflict, which ZDoom should be telling you when you load it. You're also going to need to give them both different Player.DisplayName properties, which I can only assume you haven't done; I don't know what your classes look like, since you keep showing only the actor name and nothing else, when you quote your DECORATE.
Alright, sorry. I will give my complete DECORATE definitions.

Friendly Marine DECORATE:
Spoiler:
MAPINFO for friendly marine:
Spoiler:
Increased Health DECORATE:
Spoiler:
MAPINFO for increased health
Spoiler:
User avatar
Ed the Bat
Posts: 3060
Joined: Thu May 03, 2012 1:18 pm
Graphics Processor: nVidia with Vulkan support
Location: Maryland, US
Contact:

Re: [Unsolved]Possible for player to use class from 2 diff w

Post by Ed the Bat »

Ok good. Now, in order for both of these player classes to be run together, you'll need to make sure they both have a different actor name, as well as a different Player.DisplayName. The rest of this looks good to go.
malon3
Posts: 103
Joined: Fri Dec 26, 2008 4:41 pm

Re: [Unsolved]Possible for player to use class from 2 diff w

Post by malon3 »

Ed the Bat wrote:Ok good. Now, in order for both of these player classes to be run together, you'll need to make sure they both have a different actor name, as well as a different Player.DisplayName. The rest of this looks good to go.
So based on what I think I understand as your instructions, I have changed the actor names to MyPlayer and MyPlayer2. The DisplayNames are set to Marine2 and Marine3. Here are my updated (yet still not working) definitions:

Friendly Marine DECORATE:
Spoiler:
MAPINFO for friendly marine:
Spoiler:
Increased Health DECORATE:
Spoiler:
MAPINFO for increased health
Spoiler:
User avatar
Ed the Bat
Posts: 3060
Joined: Thu May 03, 2012 1:18 pm
Graphics Processor: nVidia with Vulkan support
Location: Maryland, US
Contact:

Re: [Unsolved]Possible for player to use class from 2 diff w

Post by Ed the Bat »

This looks like it should work.

What version of ZDoom are you using for this?
Locked

Return to “Editing (Archive)”