Page 1 of 1
Morph and Inventory matters
Posted: Wed Aug 19, 2015 8:04 pm
by Hornetzero
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.
RE: Morph and Inventory matters
Posted: Wed Aug 19, 2015 8:16 pm
by Ænima
RE: Morph and Inventory matters
Posted: Wed Aug 19, 2015 11:03 pm
by Hornetzero
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?
RE: Morph and Inventory matters
Posted: Wed Aug 19, 2015 11:31 pm
by PREPPER
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).
RE: Morph and Inventory matters
Posted: Thu Aug 20, 2015 12:22 am
by Ænima
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.
RE: Morph and Inventory matters
Posted: Thu Aug 20, 2015 2:45 am
by Kaminsky
Æ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.
RE: Morph and Inventory matters
Posted: Fri Aug 21, 2015 7:09 pm
by Vincent(PDP)
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
}
RE: Morph and Inventory matters
Posted: Sat Aug 22, 2015 7:02 pm
by Hornetzero
@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?
RE: Morph and Inventory matters
Posted: Sat Aug 22, 2015 11:59 pm
by Ænima
Make an ACS script that gives the weapon, does SetWeapon() to change to it, then takes it away after whatever duration you want.
RE: Morph and Inventory matters
Posted: Sun Aug 23, 2015 1:52 am
by Hornetzero
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?
RE: Morph and Inventory matters
Posted: Sun Aug 23, 2015 1:54 am
by Ænima
RE: Morph and Inventory matters
Posted: Sun Aug 23, 2015 2:02 am
by Hornetzero
Thanks Aenima. You have been a great help.