Strife weapon replacement help

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.
Locked
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Strife weapon replacement help

Post by wildweasel »

Okay. I'm doing something with Strife weapons - I've gotten as far as having the weapons be completely usable in Strife, as well as dropped by enemies and lying on the ground - but one aspect has puzzled me: the weapons you get from conversations, i.e. Rowan in the beginning or any of the merchants. Even the Decorate "replaces" keyword doesn't affect conversations, so talking to Rowan in the beginning still gets you a crossbow and 8 bolts instead of my intended replacement.

What can I do to get around this?
User avatar
TheDarkArchon
Posts: 7656
Joined: Sat Aug 07, 2004 5:14 am
Location: Some cold place

Post by TheDarkArchon »

You need to overwrite the ConversationIDs, IIRC. Have no idea what the Strife ones are, though.
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Post by wildweasel »

I don't suppose anybody has a list of conversation ID's, do they?
User avatar
TheDarkArchon
Posts: 7656
Joined: Sat Aug 07, 2004 5:14 am
Location: Some cold place

Post by TheDarkArchon »

They'll be in the source code. I'll check it.

EDIT: Yep, g_strife/a_strifeweapons.cpp for weapons

Ammo is in GZDoom.pk3 in 1.0.24 under actors/strife/strifeammo.txt. Use the first number for ConversationID as the other two are for the two versions of the Strife demo.
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Post by wildweasel »

I've reached another stumbling block: getting the weapons to actually be selectable.

The way I have it set up right now is like so:

Code: Select all

ACTOR StrifeMarteba : Marteba replaces StrifeCrossbow2
{
   game Strife
}
This does work for the weapon pickups, and the weapon does auto-switch to the Marteba. However, the only way to allow the player to manually switch to the marteba after switching away is to make a grotesque and bloated KEYCONF lump like so:

Code: Select all

setslot 1 MartialArts
setslot 2 Colt1911 Marteba StrifeMarteba
setslot 3 MiniShotgun StrifeMiniShotgun MauserRifle StrifeMauser
setslot 4 SMG37 StrifeSMG Skorpion StrifeSkorpion
setslot 5 RPDHMG StrifeRPK
setslot 6 HandGrenade StrifeHandGrenade RPG7 StrifeRPG
setslot 7 Neutralizer StrifeNeutralizer
And why am I doing this? Well, the mod is intended to work in both Doom and Strife (and heretic as well, providing I can get this stuff straightened out). Can I inherit from the Doom version of the weapon and not have to bloat my KEYCONF lump like this to have it selectable?
User avatar
TheDarkArchon
Posts: 7656
Joined: Sat Aug 07, 2004 5:14 am
Location: Some cold place

Post by TheDarkArchon »

The only other way I can see that being done is using CustomInventory pickups but that will also become messy, just in a different place. Also, I'm pretty sure that the Game Strife thing is unnecessary since you're using replaces and not using DoomEdNums.
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Post by wildweasel »

So it'd probably be better to use the KEYCONF method then, hmm? I already know how I'm going to remedy the issue of assault guns versus standing assault guns (the aforementioned CustomInventory pickup should work, since I'm only going to use it once).
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Post by Gez »

The custom inventory is this, right?

Code: Select all

ACTOR StrifeMarteba : CustomInventory replaces StrifeCrossbow2
{
   game Strife
	inventory.pickupmessage "$TXT_STRIFECROSSBOW"
	inventory.pickupsound "misc/w_pkup"
	states
	{
	spawn:
		CBOW A -1
		stop
	pickup:
		TNT1 A 0 A_GiveInventory ("Marteba", 1)
		stop
	}

}
It should work at least in single player mode, and on servers without the "weapon stay" flag.

The thing is, if they're weapons rather than pickups, here's what your KEYCONF lump will look after adding Heretic support:

Code: Select all

setslot 1 MartialArts
setslot 2 Colt1911 Marteba StrifeMarteba HereticMarteba
setslot 3 MiniShotgun StrifeMiniShotgun HereticMiniShotgun MauserRifle StrifeMauser HereticMauser
setslot 4 SMG37 StrifeSMG HereticSMG Skorpion StrifeSkorpion HereticSkorpion
setslot 5 RPDHMG StrifeRPK HereticRPK
setslot 6 HandGrenade StrifeHandGrenade HereticHandGrenade RPG7 StrifeRPG HereticRPG
setslot 7 Neutralizer StrifeNeutralizer HereticNeutralizer
And then, what about Hexen support too?

Code: Select all

setslot 1 MartialArts
setslot 2 Colt1911 Marteba StrifeMarteba HereticMarteba HexenMarteba 
setslot 3 MiniShotgun StrifeMiniShotgun HereticMiniShotgun HexenMiniShotgun MauserRifle StrifeMauser HereticMauser HexenMauser
etc.
Two weapons become eight weapons, so let's hope you won't want to add a third to that slot...
Graf Zahl wrote:If you inherit from a weapon you create a second weapon. If you pick up one item of both you will have the weapon in your inventory twice.
There's that too. Though it should mostly affect people using a cheat such as "give weapons", but if you also replace some monsters and that some of them drop weapons...
Last edited by Gez on Thu Sep 06, 2007 2:32 am, edited 2 times in total.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

If you inherit from a weapon you create a second weapon. If you pick up one item of both you will have the weapon in your inventory twice.
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Post by wildweasel »

I don't plan on doing Hexen support. That's just too crazy, even for me.
Locked

Return to “Editing (Archive)”