Morph and Inventory matters

Discuss all aspects related to modding Zandronum here.
Post Reply
Hornetzero
 
Posts: 46
Joined: Sun Oct 26, 2014 5:28 pm

Morph and Inventory matters

#1

Post by Hornetzero » Wed Aug 19, 2015 8:04 pm

Hey all,
I'm making this thread to discuss about limitations of the zdoom engine on implementing some inventory based items (specifically for Doom).

After reading the documentation and older threads on the matter, here are my questions;

1, The Morph function is broken. When used, it can only allow one weapon to be used and assuming that the player can even use all his inventories from his original state, he will lose the morph capacity if he activates a powerup in any form. Has anyone managed to find a workable solution around this?

2, I wish to find out how one can make it so, that activating the inventory item gives the player a temporary fourth weapon for the duration of this item is used (as an inventory item). For any idea on how to make a weapon appear and be usable while you have a powerup running, there would most likely be a requirement of some hacky ACS.

3, I was pondering on how one would make a system in which normal health items give health all the way to the maximum health, but a peculiar special item, increases the player's overall maximum health, much like experience boosts on health for an RPG mod. That is literally breaking the max health setting for health.

This means more hacky ACS.

4, Would anyone know of a way to increase the damage percentage on all of the player's weapons, while an item is running?

Would appreciate any feedback.

User avatar
Ænima
Addicted to Zandronum
Posts: 3583
Joined: Tue Jun 05, 2012 6:12 pm

RE: Morph and Inventory matters

#2

Post by Ænima » Wed Aug 19, 2015 8:16 pm

Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)
Image

Hornetzero
 
Posts: 46
Joined: Sun Oct 26, 2014 5:28 pm

RE: Morph and Inventory matters

#3

Post by Hornetzero » Wed Aug 19, 2015 11:03 pm

So Aenima, you wrote at the end of that topic that you found a suitable workaround for working with Morphing, but you didn't mention what it is. I take it that you would be generous enough to share it here?
Last edited by Hornetzero on Wed Aug 19, 2015 11:03 pm, edited 1 time in total.

PREPPER
 
Posts: 46
Joined: Fri Oct 26, 2012 9:02 pm

RE: Morph and Inventory matters

#4

Post by PREPPER » Wed Aug 19, 2015 11:31 pm

I know a solution but its hard to explain here, morph players has some limitations like switch weapons and crouch morphed players as you know it, but you can create a pseudo button to create a new switchweapon using a new key or alias (KEYCONF).
Last edited by PREPPER on Wed Aug 19, 2015 11:35 pm, edited 1 time in total.

User avatar
Ænima
Addicted to Zandronum
Posts: 3583
Joined: Tue Jun 05, 2012 6:12 pm

RE: Morph and Inventory matters

#5

Post by Ænima » Thu Aug 20, 2015 12:22 am

Hornetzero wrote: So Aenima, you wrote at the end of that topic that you found a suitable workaround for working with Morphing, but you didn't mention what it is. I take it that you would be generous enough to share it here?
Well, it was a "workaround" which pertained to my conditions and goals at the time, which was to make a morphed class be able to use more than weapon. It was actually a very hacky method of coding all of that class's "weapons" into one actual weapon actor in DECORATE and basically doing this
PREPPER wrote: you can create a pseudo button to create a new switchweapon using a new key or alias (KEYCONF).
Basically you just do A_JumpIfInventory's constantly in the Ready state of your morph class's only weapon and make a pukable ACS script (that can be bound via KEYCONF) that gives you a checker item that will cause the weapon to cycle. Or just use altfire to switch between weapon types like AOW2's mechs do.

It's not a workaround for all of the other problems though. Morphed classes still can't crouch or pickup pickups the hardcoded way (you might be able to do something hacky like turning all pickups into monsters that do a_givetotarget to a player when they get close enough to pick them up, but that requires much work for little gain).


Unfortunately, modders are still in limbo when it comes to morph classes.
Last edited by Ænima on Thu Aug 20, 2015 12:25 am, edited 1 time in total.
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)
Image

User avatar
Kaminsky
Developer
Posts: 204
Joined: Sun Apr 14, 2013 7:17 pm
Location: Canada

RE: Morph and Inventory matters

#6

Post by Kaminsky » Thu Aug 20, 2015 2:45 am

Ænima wrote: It's not a workaround for all of the other problems though. Morphed classes still can't crouch or pickup pickups the hardcoded way (you might be able to do something hacky like turning all pickups into monsters that do a_givetotarget to a player when they get close enough to pick them up, but that requires much work for little gain).


Unfortunately, modders are still in limbo when it comes to morph classes.
I find that my morphed classes are able to pick up any inventory item without issues (no additional hack required). I'm not too sure how this doesn't work in some cases unless it has something to do with the DECORATE code.

At least morphed classes are able to crouch without additional ACS scripting using a flag supported in ZDoom 2.7.1. It should be available for Zandronum 3.0.
Last edited by Kaminsky on Thu Aug 20, 2015 2:47 am, edited 1 time in total.

User avatar
Vincent(PDP)
Forum Regular
Posts: 527
Joined: Thu Mar 14, 2013 7:35 pm
Location: Sweden
Clan: My DOOM site
Clan Tag: <MDS>
Contact:

RE: Morph and Inventory matters

#7

Post by Vincent(PDP) » Fri Aug 21, 2015 7:09 pm

Hornetzero wrote: Hey all,
3, I was pondering on how one would make a system in which normal health items give health all the way to the maximum health

Code: Select all

ACTOR NewStimpack : Stimpack replaces Stimpack
{
  Inventory.MaxAmount 200
}

ACTOR NewMedikit : Medikit replaces Medikit
{
  Inventory.MaxAmount 200
}
Last edited by Vincent(PDP) on Fri Aug 21, 2015 7:09 pm, edited 1 time in total.
//Visual Vincent ( Vincent (PDP) )
- My DOOM site Team

My projects:
Spoiler: (Open)
Doom Writer
Escape From The Laboratory - Done
Escape From The Laboratory Part 2
Parkskolan Zombie Horde Map (ZM10) - Done
In game Admin Commands for Zandronum.
Achievement Mod for Zandronum
Stats mod

Hornetzero
 
Posts: 46
Joined: Sun Oct 26, 2014 5:28 pm

RE: Morph and Inventory matters

#8

Post by Hornetzero » Sat Aug 22, 2015 7:02 pm

@Vincent(PDP): Thanks

@Aenima; That's a great workaround for that. I'll see if I can come up with something from my end to do more for the weapons limitation.

Now, for what I have done so far.

This is for Issue number 2:

Code: Select all

actor Ikari : CustomInventory replaces Berserk
{
  Inventory.PickupMessage "You have picked up a raging spirit!!"
  Inventory.Amount 1
  Inventory.MaxAmount 1
  //Inventory.InterHubAmount 2
  //Inventory.PickupSound "items/RAGEpick"
  //Inventory.UseSound "items/RAGEuse"
  //Inventory.Icon ARTIRAGE
  +INVENTORY.FANCYPICKUPSOUND
  +INVBAR
  -COUNTITEM
  Scale 0.9
  states
  {
  Spawn:
       RAGE A -1
       Stop
  Use:
       RAGE A 0 A_GiveInventory("SpecialWeapon")
       Stop
  }
}


ACTOR SpecialWeapon : PowerupGiver
{
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
	+INVENTORY.NOTELEPORTFREEZE
	powerup.duration -40
	powerup.color None 0.00
}
The code defines a custom inventory object that works like a temporary berserk powerup. The issue is how would I make it so that "SpecialWeapon" gives the player a new weapon on the fourth slot (My game only has three weapons, and the fourth one is for the special one) temporarily until the powerup.duration runs out?
Last edited by Hornetzero on Sat Aug 22, 2015 8:28 pm, edited 1 time in total.

User avatar
Ænima
Addicted to Zandronum
Posts: 3583
Joined: Tue Jun 05, 2012 6:12 pm

RE: Morph and Inventory matters

#9

Post by Ænima » Sat Aug 22, 2015 11:59 pm

Make an ACS script that gives the weapon, does SetWeapon() to change to it, then takes it away after whatever duration you want.
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)
Image

Hornetzero
 
Posts: 46
Joined: Sun Oct 26, 2014 5:28 pm

RE: Morph and Inventory matters

#10

Post by Hornetzero » Sun Aug 23, 2015 1:52 am

Make an ACS script that gives the weapon, does SetWeapon() to change to it, then takes it away after whatever duration you want.
Sorry I didn't mention in my previous post, but would you happen to know how one can implement that kind of script with custom weapons for different classes?

I mean, I know GiveWeapon will provide me a specific weapon, but what if I want it to be variable depending on the class?
Last edited by Hornetzero on Sun Aug 23, 2015 1:52 am, edited 1 time in total.

User avatar
Ænima
Addicted to Zandronum
Posts: 3583
Joined: Tue Jun 05, 2012 6:12 pm

RE: Morph and Inventory matters

#11

Post by Ænima » Sun Aug 23, 2015 1:54 am

Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)
Image

Hornetzero
 
Posts: 46
Joined: Sun Oct 26, 2014 5:28 pm

RE: Morph and Inventory matters

#12

Post by Hornetzero » Sun Aug 23, 2015 2:02 am

Thanks Aenima. You have been a great help.

Post Reply