Deocorate Value Extension
Moderator: GZDoom Developers
Deocorate Value Extension
I've edited this to make it a bit more precise and clear of what I've suggested before. Basically, extend control of every property that has a integer value to inventory items. For example:
Damage: This would greatly expand the variability of custom damages. Say a monster has a "Damage 5" and has 10 inventory items called "STR". One would be possible to write a custom fomula that checks for how many STRs the monster has and adding a bonus to the damage: Something like "Damage 5*random(1,8) + (checkinventory("str"))*random(1,8)". This would add an addiotional 1-8 damage for every item of STR, the monster has. In this case, +10*random(1,8) damage.
Another example would be using health to determine damage, which makes a lot of sense. Same a monster has a default damage of 0 and has 400 HP. His damage formula could be "Damage ((checkinventory("Health"))/40)*random(1,8). The monster in this case would do 1d8 damage for every 40 HP it has. As his HP lowers, his damage lowers.
DamageFactor: Custom dmages can use the same method to check for resistences. Same a player has a "DamageFactor.Ice" 100. You can have a formula that checks for, say, "IceResist" in the inventory. A formula like "DamageFactor.Ice 1.0 - 0.01(checkinventory("IceResist")). This would subtract 1% of ice damage for every IceResist the player has.
these modifications would be extremely useful and would promote a lot more RPG-style doom mods. And probably a lot more Hexen and heretic mods.
Damage: This would greatly expand the variability of custom damages. Say a monster has a "Damage 5" and has 10 inventory items called "STR". One would be possible to write a custom fomula that checks for how many STRs the monster has and adding a bonus to the damage: Something like "Damage 5*random(1,8) + (checkinventory("str"))*random(1,8)". This would add an addiotional 1-8 damage for every item of STR, the monster has. In this case, +10*random(1,8) damage.
Another example would be using health to determine damage, which makes a lot of sense. Same a monster has a default damage of 0 and has 400 HP. His damage formula could be "Damage ((checkinventory("Health"))/40)*random(1,8). The monster in this case would do 1d8 damage for every 40 HP it has. As his HP lowers, his damage lowers.
DamageFactor: Custom dmages can use the same method to check for resistences. Same a player has a "DamageFactor.Ice" 100. You can have a formula that checks for, say, "IceResist" in the inventory. A formula like "DamageFactor.Ice 1.0 - 0.01(checkinventory("IceResist")). This would subtract 1% of ice damage for every IceResist the player has.
these modifications would be extremely useful and would promote a lot more RPG-style doom mods. And probably a lot more Hexen and heretic mods.
Last edited by Amuscaria on Wed Sep 24, 2008 3:04 pm, edited 2 times in total.
Re: DamageProperty Extension
This is something that had me pulling my hair for the longest of time. I have also attempted a Diablo-like RPG with GZDoom. No go. I think this is classic WFDS...
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49234
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: DamageProperty Extension
The syntax you suggest makes me wince. 

Re: DamageProperty Extension
But it has survived the "WFDS" so far. So a slight chance this is doable?Graf Zahl wrote:The syntax you suggest makes me wince.


- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49234
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: DamageProperty Extension
If I understand you correctly, what you asking for is a CheckInventory function for DECORATE, am I correct? If so, that should be doable without risking compatibility issues.
Re: DamageProperty Extension
Please please please please please... :DGraf Zahl wrote:If I understand you correctly, what you asking for is a CheckInventory function for DECORATE, am I correct? If so, that should be doable without risking compatibility issues.
I didn't dare to suggest this while I was developing my Diablo-like mod many months ago because I thought it'd be WFSD'ed. :(
EDIT: If this is going to be implemented, would you consider a way to retrieve the target's inventory also?
So an imp ball with property:
Code: Select all
damage (10 - TargetInventory("FireballDefenseValue"))
(I have a feeling my second suggestion will be WFSD'ed though :/)
Re: DamageProperty Extension
Yes.Graf Zahl wrote:If I understand you correctly, what you asking for is a CheckInventory function for DECORATE, am I correct? If so, that should be doable without risking compatibility issues.


- Project Shadowcat
- Posts: 9369
- Joined: Thu Jul 14, 2005 8:33 pm
- Preferred Pronouns: They/Them
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: Blacksburg, SC USA
- Contact:
Re: DamageProperty Extension
This portion is already doable in ACS... [wiki]SetAmmoCapacity[/wiki]Eriance wrote:... that the player carries more and more max-ammo as he levels up (kinda like Diablo2, how you gain mana as you level or based on what items you have). But thats probably asking too much?
Re: DamageProperty Extension
This doesn't work as I'm suggesting, as far as I can see it. And from what I can tell, i would need 1 script for ever level the player levels up to. Also, can it check for several items at once in the inventory before applying the changes? Of course, im not export on ACS.Project Dark Fox wrote:This portion is already doable in ACS... [wiki]SetAmmoCapacity[/wiki]Eriance wrote:... that the player carries more and more max-ammo as he levels up (kinda like Diablo2, how you gain mana as you level or based on what items you have). But thats probably asking too much?
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49234
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: DamageProperty Extension
Properly coded you don't need multiple scripts and yes, of course you can do inventory checks in ACS before making any change.
Re: DamageProperty Extension
Eriance wrote:This doesn't work as I'm suggesting, as far as I can see it. And from what I can tell, i would need 1 script for ever level the player levels up to. Also, can it check for several items at once in the inventory before applying the changes? Of course, im not export on ACS.
Code: Select all
int NewCapacity = Level * 50;
NewCapacity += 5 * (CheckInventory("ManaExtender"));
SetAmmoCapacity ("Mana", NewCapacity);
Re: DamageProperty Extension
So, based on what you had here. If I wrote something like this:HotWax wrote:Eriance wrote:This doesn't work as I'm suggesting, as far as I can see it. And from what I can tell, i would need 1 script for ever level the player levels up to. Also, can it check for several items at once in the inventory before applying the changes? Of course, im not export on ACS.Code: Select all
int NewCapacity = Level * 50; NewCapacity += 5 * (CheckInventory("ManaExtender")); SetAmmoCapacity ("Mana", NewCapacity);
Code: Select all
int NewAmmoCapacity = Level*5 + Intellegence*10;
SetAmmoCapacity ("Mana", NewCapacity);
Re: DamageProperty Extension
Your code looks good to me. (Even though Intelligence is spelled wrong.
)

Re: DamageProperty Extension
Hopefully this is extended to projectiles being able to check the player who fired the parent projectile that fired the child projectile.
Re: DamageProperty Extension
A purely DECORATE way of doing this would be nice, though.Project Dark Fox wrote:This portion is already doable in ACS... [wiki]SetAmmoCapacity[/wiki]