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.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
Dan_The_Noob
Posts: 872
Joined: Tue May 07, 2019 12:24 pm
Graphics Processor: nVidia with Vulkan support
Contact:

Balance issues

Post by Dan_The_Noob »

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
Boondorl
Posts: 138
Joined: Wed Jul 11, 2018 10:57 pm

Re: Balance issues

Post by Boondorl »

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 all

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 all

GameInfo
{
    AddEventHandlers = "InfightHandler"
}
User avatar
Dan_The_Noob
Posts: 872
Joined: Tue May 07, 2019 12:24 pm
Graphics Processor: nVidia with Vulkan support
Contact:

Re: Balance issues

Post by Dan_The_Noob »

oh... it needs to be Zandronum compatible.
User avatar
Tartlman
Posts: 226
Joined: Thu Oct 11, 2018 5:24 am
Location: meme hell
Contact:

Re: Balance issues

Post by Tartlman »

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
Dan_The_Noob
Posts: 872
Joined: Tue May 07, 2019 12:24 pm
Graphics Processor: nVidia with Vulkan support
Contact:

Re: Balance issues

Post by Dan_The_Noob »

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
Post Reply

Return to “Scripting”