Page 1 of 2
Deocorate Value Extension
Posted: Sun Aug 24, 2008 8:44 pm
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.
Re: DamageProperty Extension
Posted: Sun Aug 24, 2008 11:15 pm
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...
Re: DamageProperty Extension
Posted: Mon Aug 25, 2008 12:57 am
by Graf Zahl
The syntax you suggest makes me wince.

Re: DamageProperty Extension
Posted: Mon Aug 25, 2008 9:34 am
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?

Would make Zdoom-based ports infinitely more dynamic then probably all other ports with something like this.

Re: DamageProperty Extension
Posted: Mon Aug 25, 2008 10:26 am
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.
Re: DamageProperty Extension
Posted: Mon Aug 25, 2008 10:34 am
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 :/)
Re: DamageProperty Extension
Posted: Mon Aug 25, 2008 4:51 pm
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?

Re: DamageProperty Extension
Posted: Mon Aug 25, 2008 4:57 pm
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?

This portion is already doable in ACS... [wiki]SetAmmoCapacity[/wiki]
Re: DamageProperty Extension
Posted: Mon Aug 25, 2008 7:39 pm
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?

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.
Re: DamageProperty Extension
Posted: Tue Aug 26, 2008 1:10 am
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.
Re: DamageProperty Extension
Posted: Tue Aug 26, 2008 8:20 am
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);
Re: DamageProperty Extension
Posted: Tue Aug 26, 2008 4:06 pm
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?
Re: DamageProperty Extension
Posted: Tue Aug 26, 2008 4:29 pm
by HotWax
Your code looks good to me. (Even though Intelligence is spelled wrong.

)
Re: DamageProperty Extension
Posted: Tue Sep 02, 2008 3:54 pm
by Amuscaria
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
Posted: Wed Sep 03, 2008 4:38 am
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.