Balance issues

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Balance issues

Postby Dan_The_Noob » Tue Sep 10, 2019 9:50 pm

So...
I'm fiddling with the same old mod, and recently upped all the enemy health and stuff but it makes infighting redundant...

is there a way to make infighting damage higher or should i just crush everything down to size?
User avatar
Dan_The_Noob
 
Joined: 07 May 2019
Twitch ID: Dan_The_Noob
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: nVidia with Vulkan support

Re: Balance issues

Postby Boondorl » Wed Sep 11, 2019 12:21 am

With ZScript you can use an event handler to give every monster an Inventory item that makes use of the ModifyDamage function. When passive is true you can check to see if the source is a monster and if it is, increase the damage by however much you feel is necessary. Don't know if there's any way to do it in Decorate or ACS without exploiting the engine to hell and back. If compatibility with Zandronum or very old versions of GZDoom isn't an issue, I'd recommend using ZScript. You can use it in conjunction with Decorate so you don't have to worry about rewriting everything.

ZScript code:
Code: Select allExpand view
class InfightBooster : Inventory
{
    override void ModifyDamage(int damage, Name damageType, out int newdamage, bool passive, Actor inflictor, Actor source, int flags)
    {
        if (passive)
        {
            if (source && source.bIsMonster)
                newdamage *= 1.1; // You can use whatever modifier you want here - this one will increase damage by 10%
        }
    }
}

class InfightHandler : EventHandler
{
    override void WorldThingSpawned(WorldEvent e)
    {
        if (e.thing.bIsMonster)
            e.thing.A_GiveInventory("InfightBooster");
    }
}


Mapinfo:
Code: Select allExpand view
GameInfo
{
    AddEventHandlers = "InfightHandler"
}
User avatar
Boondorl
 
Joined: 11 Jul 2018

Re: Balance issues

Postby Dan_The_Noob » Wed Sep 11, 2019 12:56 am

oh... it needs to be Zandronum compatible.
User avatar
Dan_The_Noob
 
Joined: 07 May 2019
Twitch ID: Dan_The_Noob
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: nVidia with Vulkan support

Re: Balance issues

Postby Tartlman » Wed Sep 11, 2019 8:16 am

Dan_The_Noob wrote:oh... it needs to be Zandronum compatible.


In that case, i think the only way to do it is to add a damage type and make monsters weaker to it than the player is.

My suggestion? Just don't do it, and crush down the numbers.
User avatar
Tartlman
 
Joined: 11 Oct 2018
Discord: Tartlman#2947

Re: Balance issues

Postby Dan_The_Noob » Wed Sep 11, 2019 9:50 am

Tartlman wrote:
Dan_The_Noob wrote:oh... it needs to be Zandronum compatible.


In that case, i think the only way to do it is to add a damage type and make monsters weaker to it than the player is.

My suggestion? Just don't do it, and crush down the numbers.


yeah, I might just crush the numbers down a little to help them along... right now it's actually better than i thought, but they're still a bit slow to murder eachother
User avatar
Dan_The_Noob
 
Joined: 07 May 2019
Twitch ID: Dan_The_Noob
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: nVidia with Vulkan support


Return to Scripting

Who is online

Users browsing this forum: No registered users and 1 guest

cron