#Allow negative resource bonus (handicap) in multiplayer

1 messages · Page 1 of 1 (latest)

jade sun
#

Edit see below for a workaround for vs barbs gameplay #1461547834128990249 message

In singleplayer you can give yourself a negative resource bonus but in MP for some reason this is not allowed. I want to give myself -50% resources then use cheats to increase overall resource income +100 and fight +100 barbs to effectively fight +200 barbs. This is not possible. Can we please allow negative resource bonus for multiplayer as well? And / or open up the bonus cap to allow more than +100 bonus?

warped flint
#

Chobby in maintanaince mode. Unlikely to get improvements like this but hey @deft zephyr does this pique your unique interest

bronze wharf
#

I do remember deliberatly setting up different values for singleplayer for bonus but don't recall why exactly

#

I don't recall trying bonus over 100 in any context

warped flint
#

In the meantime

  • use modoption metal income and energy income multipliers * 0.5
  • give +100% to players you want to have net normal resource income
  • give normal % to those you want with net -50%
#

Adjust maths as necessary.

bronze wharf
#

Ah yes, I asked yaribz about this in the past

#

#⛓️|teiserver-spads message

#

(Grab a development role from id:customize to access the above link)

jade sun
bronze wharf
jade sun
#

oh damn

bronze wharf
#

See the explanation from yaribz I linked above, and ask any more questions in #🏚️|chobby or #⛓️|teiserver-spads because the slowmode here is annoying

jade sun
bronze wharf
#

Perhaps bonus above 100 will just work in singleplayer

jade sun
#

I figured out how to do this at a faction level with TweakDefs so if I put (for example) all the bots on legion and all the players on not legion, I can increase all the resources of the bots by any multiplier.

Example: Legion +200%

local targetFaction = "leg"
local resourceMult = 3.0

local UnitDefs = UnitDefs or {} 
for i, unit in pairs(UnitDefs) do
    local faction = string.sub(i, 1, 3)
    if faction == targetFaction then
       if unit.extractsmetal then
            unit.extractsmetal = unit.extractsmetal * resourceMult
        end
        if unit.energymake then
            unit.energymake = unit.energymake * resourceMult
        end
        if unit.energyupkeep and unit.energyupkeep < 0 then
            unit.energyupkeep = unit.energyupkeep * resourceMult
        end
    else
    end
end
UnitDefs[targetFaction.."win"].customparams.energymultiplier = resourceMult
if targetFaction == "leg" then
    UnitDefs["legeconv"].customparams.energyconv_efficiency = 0.01429 * resourceMult
    UnitDefs["legadveconv"].customparams.energyconv_efficiency = 0.01724 * resourceMult
else
    UnitDefs[targetFaction.."makr"].customparams.energyconv_efficiency = 0.01429 * resourceMult
    UnitDefs[targetFaction.."mmkr"].customparams.energyconv_efficiency = 0.01724 * resourceMult
end    
#

To use:

!bset tweakdefs bG9jYWwgdGFyZ2V0RmFjdGlvbiA9ICJsZWciCmxvY2FsIHJlc291cmNlTXVsdCA9IDMuMAoKbG9jYWwgVW5pdERlZnMgPSBVbml0RGVmcyBvciB7fSAKZm9yIGksIHVuaXQgaW4gcGFpcnMoVW5pdERlZnMpIGRvCiAgICBsb2NhbCBmYWN0aW9uID0gc3RyaW5nLnN1YihpLCAxLCAzKQogICAgaWYgZmFjdGlvbiA9PSB0YXJnZXRGYWN0aW9uIHRoZW4KICAgICAgIGlmIHVuaXQuZXh0cmFjdHNtZXRhbCB0aGVuCiAgICAgICAgICAgIHVuaXQuZXh0cmFjdHNtZXRhbCA9IHVuaXQuZXh0cmFjdHNtZXRhbCAqIHJlc291cmNlTXVsdAogICAgICAgIGVuZAogICAgICAgIGlmIHVuaXQuZW5lcmd5bWFrZSB0aGVuCiAgICAgICAgICAgIHVuaXQuZW5lcmd5bWFrZSA9IHVuaXQuZW5lcmd5bWFrZSAqIHJlc291cmNlTXVsdAogICAgICAgIGVuZAogICAgICAgIGlmIHVuaXQuZW5lcmd5dXBrZWVwIGFuZCB1bml0LmVuZXJneXVwa2VlcCA8IDAgdGhlbgogICAgICAgICAgICB1bml0LmVuZXJneXVwa2VlcCA9IHVuaXQuZW5lcmd5dXBrZWVwICogcmVzb3VyY2VNdWx0CiAgICAgICAgZW5kCiAgICBlbHNlCiAgICBlbmQKZW5kCi0tVW5pdERlZnNbdGFyZ2V0RmFjdGlvbi4uIndpbiJdLmN1c3RvbXBhcmFtcy5lbmVyZ3ltdWx0aXBsaWVyID0gcmVzb3VyY2VNdWx0CmlmIHRhcmdldEZhY3Rpb24gPT0gImxlZyIgdGhlbgogICAgVW5pdERlZnNbImxlZ2Vjb252Il0uY3VzdG9tcGFyYW1zLmVuZXJneWNvbnZfZWZmaWNpZW5jeSA9IDAuMDE0MjkgKiByZXNvdXJjZU11bHQKICAgIFVuaXREZWZzWyJsZWdhZHZlY29udiJdLmN1c3RvbXBhcmFtcy5lbmVyZ3ljb252X2VmZmljaWVuY3kgPSAwLjAxNzI0ICogcmVzb3VyY2VNdWx0CmVsc2UKICAgIFVuaXREZWZzW3RhcmdldEZhY3Rpb24uLiJtYWtyIl0uY3VzdG9tcGFyYW1zLmVuZXJneWNvbnZfZWZmaWNpZW5jeSA9IDAuMDE0MjkgKiByZXNvdXJjZU11bHQKICAgIFVuaXREZWZzW3RhcmdldEZhY3Rpb24uLiJtbWtyIl0uY3VzdG9tcGFyYW1zLmVuZXJneWNvbnZfZWZmaWNpZW5jeSA9IDAuMDE3MjQgKiByZXNvdXJjZU11bHQKZW5kCiAgICA
warped flint
vale dagger
#

Okay it looks like this requires a chobby + teiserver SPADS change?

ill send a PR soon

warped flint
#

No waaaaaay!

vale dagger
#

TrollDespair I am a little bit lost with editing the spad config