Deocorate Value Extension

Moderator: GZDoom Developers

User avatar
Amuscaria
Posts: 6634
Joined: Mon Jul 26, 2004 12:59 pm
Location: Growing from mycelium near you.

Deocorate Value Extension

Post by Amuscaria »

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.
Last edited by Amuscaria on Wed Sep 24, 2008 3:04 pm, edited 2 times in total.
User avatar
Nash
 
 
Posts: 17501
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: DamageProperty Extension

Post by Nash »

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...
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: DamageProperty Extension

Post by Graf Zahl »

The syntax you suggest makes me wince. :(
User avatar
Amuscaria
Posts: 6634
Joined: Mon Jul 26, 2004 12:59 pm
Location: Growing from mycelium near you.

Re: DamageProperty Extension

Post by Amuscaria »

Graf Zahl wrote:The syntax you suggest makes me wince. :(
But it has survived the "WFDS" so far. So a slight chance this is doable? :D Would make Zdoom-based ports infinitely more dynamic then probably all other ports with something like this. :D
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: DamageProperty Extension

Post by Graf Zahl »

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.
User avatar
Nash
 
 
Posts: 17501
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: DamageProperty Extension

Post by Nash »

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.
Please please please please please... :D

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"))

... when the ball hits whatever actor (regardless whether it was the intended target or not), the engine will check the victim's inventory.

(I have a feeling my second suggestion will be WFSD'ed though :/)
User avatar
Amuscaria
Posts: 6634
Joined: Mon Jul 26, 2004 12:59 pm
Location: Growing from mycelium near you.

Re: DamageProperty Extension

Post by Amuscaria »

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.
Yes. :) Now if only this can be added to the "Inventory.MaxAmount" or "Ammo.BackpackMaxAmount" s 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? :D
User avatar
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

Post by Project Shadowcat »

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? :D
This portion is already doable in ACS... [wiki]SetAmmoCapacity[/wiki]
User avatar
Amuscaria
Posts: 6634
Joined: Mon Jul 26, 2004 12:59 pm
Location: Growing from mycelium near you.

Re: DamageProperty Extension

Post by Amuscaria »

Project Dark Fox wrote:
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? :D
This portion is already doable in ACS... [wiki]SetAmmoCapacity[/wiki]
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.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: DamageProperty Extension

Post by Graf Zahl »

Properly coded you don't need multiple scripts and yes, of course you can do inventory checks in ACS before making any change.
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Re: DamageProperty Extension

Post by HotWax »

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);
User avatar
Amuscaria
Posts: 6634
Joined: Mon Jul 26, 2004 12:59 pm
Location: Growing from mycelium near you.

Re: DamageProperty Extension

Post by Amuscaria »

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);
So, based on what you had here. If I wrote something like this:

Code: Select all

int NewAmmoCapacity = Level*5 + Intellegence*10;
SetAmmoCapacity ("Mana", NewCapacity);
Woul it be +5 mana per level and +10 mana per intelligence? Or am I writing bad syntax here?
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Re: DamageProperty Extension

Post by HotWax »

Your code looks good to me. (Even though Intelligence is spelled wrong. ;))
User avatar
Amuscaria
Posts: 6634
Joined: Mon Jul 26, 2004 12:59 pm
Location: Growing from mycelium near you.

Re: DamageProperty Extension

Post by Amuscaria »

Hopefully this is extended to projectiles being able to check the player who fired the parent projectile that fired the child projectile.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: DamageProperty Extension

Post by Gez »

Project Dark Fox wrote:This portion is already doable in ACS... [wiki]SetAmmoCapacity[/wiki]
A purely DECORATE way of doing this would be nice, though.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”