Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making the funnelweb a heavy shield support strider #3247

Merged
merged 55 commits into from
Mar 15, 2019

Conversation

danfireman
Copy link
Contributor

@danfireman danfireman commented Sep 21, 2018

Initial WIP MR to get feedback on this: http://zero-k.info/Forum/Post/190307#190307
Mostly I'm wanting feedback on what I've done wrong code-wise, thoughts on this from a gameplay perspective and any tips for how to fix the outstanding issues (at the bottom). Even if this never merges I'd be quite grateful for any feedback given. :)

Unit role:
This new Funnelweb is a genuine support strider. Weaponless, it is intended to protect fragile units on attacks on heavy porc and as a means of quickly taking advantage of the resulting victory in battle.

Unit abilities:
A large and strong shield of 28000hp that regenerates at a modest 200hp/s rate allows regeneration in 2 mins+20 secs, but requires 15 seconds after being hit before it will start to regenerate.
Additionally, it has 40bp with good range, intended for primarily for battlefield repair and reclaim.
Spider movement is slightly faster than the Funnelweb 45->54.
HP at 6000 (so it's vulnerable to widows, amongst other things).
Costs 3500, the usual price for a strider.

Unit analysis and impact on battlefield:

  • Its very high energy consumption and high cost make it a late game unit.
  • It requires a large army to prevent enemy units getting under its shields, but has enough hp that assassinations are less likely.
  • There are two main ways of using it: Protection or negating attrition.
    It can either protect an assault force for a quick and devastating strike OR it can hang around after an attack, repairing units and reclaiming, thus mitigating attrition. Doing the latter is likely to deplete its shield and render it useless for unit protection.

Comparison with existing units with similar roles:
Its shield has more hp per unit of metal than the Aspis (equivalent to 4666 metal of Aspis), but it's regeneration is weaker (equivalent to 2400 metal worth) and it is much more vulnerable to sustained bombardment due to its regeneration delay.
Its cost and lack of regen on being attacked make it a worse choice for maintaining a continual presence at the front and it's lack of shield linking mean it can't supply shield power for felons.
Its large shield size make it worse at defending smaller forces against attack.

Its battlefield reclaim, repair and construction is equivalent to 1150 worth of welders.
Its higher cost, lesser speed and inability to be in multiple places at once mean it is mildly worse at battlefield repair and reclaim than the welder.

Initial playtesting thoughts:
Fairly large micro requirements at present, but does it's job well. Likely to be far more useful in Campaign, FFA and 16v16 matches than 1v1 or 2v2s.

Thoughts on balance:
I am considering removing the resurrection entirely due to its snowballing effect. (it depends whether people consider snowballing good or bad, I've heard arguments either way for RTSs) Now removed at the advice of people in the thread. (may return depending on people's thoughts)
Its high hp makes assassinations hard and allowing that could add interesting gameplay. Considering reducing hp to a fragile 6000. Done.

Known TODO/issues:

  • Shield links (it shouldn't transfer shield strength or at least should stop regenerating when it does) Now doesn't link.
  • Shield should take energy (aprox 72) to charge (currently doesn't charge at all if it's a builder and has shieldPowerRegenEnergy set :( ) Now works.
  • It should do automatic rez/repair/reclaim with a prioritization setting allowing a user to pick what it should prioritize (to reduce micro burden). DeinFreund thinks this unwise
  • Should be able to move and rez/repair/reclaim simultaneously (so it can reclaim without slowing down the assault). DeinFreund thinks this unwise
  • Fix rez and reclaim graphics (currently getting two styles of nano fog). The nano-related code is all cargo culted (copy pasted frankenstien) and probably partially nonsense. Now only one fog style!
  • Regen delay needs to work with energy prioritization. Done!
  • Shield becomes invisible when the Funnelweb is turned off. This is apparently also a problem in Master... Should now be fixed
  • Shield and nano seem to be centered in the wrong place in the model, this is also a problem in Master.
  • Reduce weight Done
  • Funnelweb should have a round number of BP Made 40
  • The nanospray should emanate from somewhere on the surface, not just somewhere internal. Perhaps its face could be used. Now coming from the eye.
  • The wobbly purple shield stuff is clipping. Perhaps this stuff could emit from the gap that held its guns. A different type of effect could be used. A different type would be preferable (iteration 2), but for now commented out
  • There is no visual indicator that the shield is blocked from charging after being damaged. Perhaps the wobble could reflect this, as well as the colour or transparency of the shield. Indicator now present
  • Smooth the shield sphere. Done
  • Shield texture is ugly. Made prettier
  • Shield color unpleasant. Made prettier
  • Indicator of shield recharging not very clear. Now noticeable

Issues for iteration 2:
I don't want to do a ton of polishing on a concept that we don't even know works yet!

  • There should be some sort of emanation from the Funnelweb to help indicate that the Funnelweb is the source of the shield.
  • The model needs changing to be more obviously a heavy shield strider.
  • The Funnelweb needs some (heavy duty!) nanospray emitters.
  • Needs a new map icon.

@danfireman
Copy link
Contributor Author

danfireman commented Sep 22, 2018

I've removed the rez, standardized buildpower and the shield now consumes energy to charge.

@@ -825,21 +825,22 @@ local function printAbilities(ud, unitID)
cells[#cells+1] = ''
cells[#cells+1] = ' - Buildpower: '
cells[#cells+1] = numformat(buildSpeed)
local buildpower_mult = (unitID and Spring.GetUnitRulesParam(unitID, "buildpower_mult") or 1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You missed one (up a few lines)

@ShadowWolfTJC
Copy link

Although I've got a few critical bones to pick about the unit's gameplay concept, for the time, I'll focus on the unit's balance.

For starters, I'm worried about how OP a 4500-cost unit with more shield health than a Paladin would be, even if the shield couldn't self-repair at all. I mean, the Aspis's shield has 3600 HP, and it costs as much as a Jack, which has 6000 HP, but unlike the Jack, it can use that shield health to help protect other, more fragile units, such as a few Rogues, from harm. Imagine needing to bring enough firepower to bring down a freaking Paladin, just to bring down such an OP shield, from a unit that costs less than half of a Paladin!

@Licho1
Copy link
Member

Licho1 commented Sep 24, 2018

I wanted to make proper weapon-less trider - the tunneler.
It was meant to be a strider that will terraform its way slowly through everything, with a shield in front (might just be high hp/armor plate) that could defend units behind it. Armed only with nano turrets.

Abilities like ress or repair would fit this tunneler much better. As a bonus it would be useful against terraformed megaporc (mostly seen in FFA)

@GoogleFrog GoogleFrog added this to the Housekeeping milestone Oct 4, 2018
@GoogleFrog
Copy link
Contributor

This sounds like a bit of a nightmare for consistency. How do you show people that this shield has 10x the HP of other large shields? How do you deal with linking?

@GoogleFrog
Copy link
Contributor

Is the intention that it can only reclaim and repair? There is also an inconsistency there, as all other sources of BP can do everything. This sounds bad for the UI.

@Licho1
Copy link
Member

Licho1 commented Oct 5, 2018

I meant physical shield. Basically the unit itself would be shield. Having huge hitbox and high HP.
The nanos would be able to do anything (a fewl nano-turret BP basically)

@GoogleFrog
Copy link
Contributor

@Licho1 I am talking about the PR, not your off-topic terraformer. I am aware of the idea of the ramp-tank from discussions over some years. I wonder if we ever made a ticket, or if such a ticket was made on this particular repository.

@Licho1
Copy link
Member

Licho1 commented Oct 5, 2018

Well personally I don't want to change funnel

@danfireman
Copy link
Contributor Author

@GoogleFrog : Thanks for taking the time to look at this! :)
In order:
The shield has a different look (SmokeDragon has stated he may be able to improve on the current placeholder big green shield) and has now been made to not link with other shields.
As per recommendations from @DeinFreund and others it now has fairly standard buildpower, though, like the Reef, it cannot terraform (happy enough to change this if you think it's important).

I'll be updating the top post to actually describe current state...

@DeinFreund
Copy link
Member

In order to make such a mostly shield-based strider viable, the shield has to function differently from existing shields. Otherwise you'd either just be making an upscaled aspis or an effective anti-artillery defense. The modified recharge mechanics implemented here allow for the shield to temporarily push against artillery, while still losing to it during prolonged defense. In order to allow for such different recharging behavior, the shield has to be clearly (visually) distinguishable from other shields either way. At that point I think it's justifiable for linking to behave differently as well (not share).

@danfireman
Copy link
Contributor Author

danfireman commented Oct 10, 2018

One possible solution to the shield regen issue is to use Spring's shield regen delay system and have the unit_shield_charge code monitor how much regeneration actually happened last frame and set an energy cost accordingly, reducing the shield strength according to the energy deficit.
This will technically mean that it won't charge quite as much energy as it should in the frame following a hit when it's recharging, but due to the regen delay such situations can only occur at most once every 60 seconds (and likely a lot less) and should have no noticeable effects on gameplay or UI.

Thoughts?

@GoogleFrog
Copy link
Contributor

You should not use any shield charging provided by Spring if this shield costs energy to change, since it needs to be handled by the shield gadget to implement priorities. Adding a shield charge delay is fairly easy with the shield hit callin.

@danfireman
Copy link
Contributor Author

danfireman commented Oct 15, 2018

@GoogleFrog : I didn't know there was a "shield hit call-in", my previous attempt to find such a thing failed.
I was planning on using the prioritization code in Zero K to determine energy expenditure (shieldpowerregenenergy itself would be 0) and reduce shield hp by the amount charged last frame if that frame didn't manage to use any energy.
Your idea sounds much less hacky though, so I've done some poking and implemented it. :)

The only things left are making the Funnelweb not emit two types of nano fog and making it so the shield doesn't turn invisible when the Funnelweb is turned off.

@@ -319,9 +319,11 @@ for _, weaponDef in pairs(WeaponDefs) do

weaponDef.customparams.shield_rate = weaponDef.shieldpowerregen
weaponDef.customparams.shield_drain = weaponDef.shieldpowerregenenergy
weaponDef.customparams.shield_recharge_delay = (weaponDef.shieldrechargedelay or 0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shield_recharge_delay should never be set to 0. The gadget and widget code should first check whether shield_recharge_delay exists, and it if does, then do the additional checks based on it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback GoogleFrog :)
Changed so shield_recharge_delay can now be nil.

@danfireman
Copy link
Contributor Author

I've made a number of tweaks after trying out the campaign mission with some starting unit tweaks:
Build range 550 -> 450 (guards at proper distance, the 550 wasn't necessary anyway)
Can now terraform (rather than just assist terraforming started by a random con)
Movement speed 45 -> 54 (can now keep up with Dante)
Hitpoints 11000 -> 6000 (can now be Widowed)

@danfireman
Copy link
Contributor Author

I think this is basically ready barring feedback...
I also have modifications to the campaign mission to have it work with the new Funnelweb, I'll make an MR for that too.

@danfireman danfireman changed the title WIP: Making the funnelweb a utility/support strider Making the funnelweb a utility/support strider Nov 1, 2018
@danfireman danfireman changed the title Making the funnelweb a utility/support strider Making the funnelweb a heavy shield support strider Nov 5, 2018
@GoogleFrog
Copy link
Contributor

I like the idea of a big shield because it may make small units more useful. The inconsistencies required seem a bit steep though.

  • The shield has more HP than a nuke, so it should intercept nukes. Currently it does not.
  • The nanospray should emanate from somewhere on the surface, not just somewhere internal. Perhaps its face could be used.
    image
  • The wobbly purple shield stuff is clipping. Perhaps this stuff could emit from the gap that held its guns. A different type of effect could be used.
    image
  • There is no visual indicator that the shield is blocked from charging after being damaged. Perhaps the wobble could reflect this, as well as the colour or transparency of the shield.
  • The shield texture has a very low resolution. Using a large version of the usual texture messes with the sense of scale.
    image
  • 35 BP is a weird number, why not 30 or 40?
  • The health colour progression is not consistent with smaller shields, I think it is probably better to retain consistency. Perhaps it could be consistent at low levels and then go to bright green.
  • I don't really like a lack of link. Perhaps another link rank could be added.

@danfireman danfireman changed the title Making the funnelweb a heavy shield support strider WIP: Making the funnelweb a heavy shield support strider Nov 25, 2018
@danfireman
Copy link
Contributor Author

Thanks @GoogleFrog !
A few questions:

  1. What do you mean by nuke interception? A nuke will hit the shield, but the blast wave will go through, doing 60-90% of its normal damage to things under the shield.
  2. You thinking red/yellow -> blue/green -> green/X for color? I worry that looking too much like other shields will make its different linking behavior less obvious (though see below).
    Should the blue/green be around where it currently is for Aspis (eg. ~4000hp)?
  3. I'm not too sure what you have in mind. But I think it's important to note that any extra behaviors are added complexity. Admittedly shield linking is already too complex for anyone who hasn't read the wiki/code to understand and even then having a good model for in-game use is difficult, so it might not make too much difference.
    Were you thinking something like shield transfer going at 1/10th the normal rate? That would still result in some rather fast (150hp/s) transfer to normal sized shields, but not the Felon-breaking amount it might otherwise get.
    Or were you thinking something like any shield charge over 4000hp is treated like 4000 for linking purposes?

@springraaar
Copy link
Contributor

In my opinion, it could be just a bigger shield on a tougher chassis that also does other stuff, but it should keep the same mechanics as the other big shields, just bigger and stronger (but with less shield/cost).

The end result of this may be more people realizing that aspis are crazy good if they have very high energy income and making groups of them more often, which still have pretty good shield/cost while having no such restrictions and inherent vulnerability single units have.

@danfireman
Copy link
Contributor Author

@springraaar
Same mechanics is bad for two reasons:

  1. Linking is proportional to the hp difference between shields, leading to a high hp shield being quite OP for a short time and then spending the rest of the game hovering at 10%.
  2. Why get Funnelweb when you can Aspis? They need to be distinct in important ways.

@GoogleFrog
Copy link
Contributor

Linking consistency is problematic. On balance I think we're better off without Funnelweb linking but I don't like the inconsistency involved.

The biggest issue for me is that a Funnelweb at the back deletes Missile Silo. Shockley only deals 10k damage and this Funnelweb has 24k charge so not even Shockley is particularly effective. The only answer I can see is sustained Bertha bombardment to keep the shield down.

@danfireman
Copy link
Contributor Author

So, to confirm, you'd rather no linking than a linking cap (at around 4000hp) or linking scaling?

As I mentioned in the thread, the Missile Silo interaction is a concern.
I am unsure whether the extra layer of defence the Funnelweb adds is a good thing or a bad thing. It's still possible to cost effectively penetrate with missile silo (e.g. 2 shockleys will bring the shield down enough the 3rd can go through) and Bertha is indeed a hard counter if you try and have your Funnelweb defend your base (and naturally Funnelweb does nothing against air attacks).
I considered giving Shockley shield penetration.
Though I will also note that the fact missile silo is pretty much uncounterable currently, and this has troubled me in the past. On mid-large maps things can get very porcy, with the silos preventing the setting up of defences (and other silos) within its range. With Funnelweb you could actually porc creep (or even better, launch a proper assault), rather than being stuck in an indefinite stalemate.

@GoogleFrog
Copy link
Contributor

I don't know about linking as all the options seem bad. If it links there should be a new link rank added to reduce the drain rate. Should linking disrupt charging? With multiple Funnelwebs you could hold some in the back to charge the damage-receiving shield in front. Bad links will be hard to avoid which such a large radius.

On balance I think I want to avoid linking.

@danfireman
Copy link
Contributor Author

@GoogleFrog : Can we defer the majority of the visual improvements to a later date?
I don't want to do a large amount of work I have little aptitude for (visual things) when we don't even know if the concept works. Once the players have decided whether the idea has merit it can have polish added.
What do you think? Are there visual things that are Must Have before trialing it?

Unrelated: It didn't make sense to have an expensive, high buildpower, mobile unit that needed another unit to start building near it, it just added extra tedious micro. So I made it able to build like a normal constructor.

@GoogleFrog
Copy link
Contributor

Two remaining issues that I'm aware of:

@GoogleFrog
Copy link
Contributor

Sling impact wobble appears to work now.

@GoogleFrog
Copy link
Contributor

I was mistaken, single Sling impacts do not work, as they are barely visible, but multiple Slings can add up to a visible impact.

@GoogleFrog
Copy link
Contributor

GoogleFrog commented Feb 27, 2019

The sphere of the graphics does not match the sphere of the collision volume for the shield. Both should be centered on the midpoint of the unit.

@GoogleFrog
Copy link
Contributor

image

@danfireman
Copy link
Contributor Author

The collision volume and shield graphics mismatch is puzzling. Investigation has just made me more confused as to how shield centre positions are calculated, particularly as the centre seems to orbit depending on the orientation of the unit if the origin of the shield is not the unit's centre.

@sprunk
Copy link
Member

sprunk commented Feb 28, 2019

@danfireman
Copy link
Contributor Author

@sprunk
The initial position of the physical centre is indeed defined there, but it doesn't stay there and moves about depending on the orientation of the Funnelweb (as if the angle from the centre of the unit model (which is NOT the same as the origin for the shield graphic) is being doublecounted somehow).
The visual centre is defined here as far as I can tell: https://github.com/danfireman/Zero-K/blob/bigShieldFunnelweb/LuaRules/Configs/lups_shield_fxs.lua#L107

@GoogleFrog
Copy link
Contributor

I think that the shield should emit and draw from (0,0,0). If (0,0,0) is on the ground, unfortunately the case for some models, then it should be vertically moved to be closer to the models center of mass.

@danfireman
Copy link
Contributor Author

As far as I can tell the main shield visual/hitbox mismatch issue goes away with 104.0.1-1060-g7f3541f.
I've now adjusted the aimpoint to give as close a match as I can.

Regarding slings and hits, it looks like the damage output of a sling bullet is so low compared to the shield's hp that it rounds to 0 most of the time. This is similar to glaive bullets not always triggering a wave in an Aspis.
I'm struggling to think of a solution to this that doesn't have annoying implications...
Ideas?

@lhog
Copy link
Contributor

lhog commented Mar 9, 2019

The gadget works in a way that hits get accumulated over time, so the visual feedback is eventually drawn even for low burst, but high DPS units. Since the new shield has crazy maximum charge value, my previous handcrafted constants might work in such way that damage is written off faster than it's accumulated.

I think the most reliable way be to retune the common constants so they work for all range of units. For example you might want to introduce tiered or progressive damage decay, so it's slow at low damage values and is getting higher the higher the accrued damage values becomes.
If this is not possible then it's likely that some special path/unique constants should be used for high HP shields.

@lhog
Copy link
Contributor

lhog commented Mar 9, 2019

Also ideally ZK should update the gadget code as the previous one was a bit redundant and partly wrong.
Also @GoogleFrog wanted to include the terrain/units outline I put together for other game.

Let me know if you feel like you can take that. "No" is the perfectly valid answer ofc :)

@GoogleFrog
Copy link
Contributor

The new engine seems to work, which fixes some of the shield issues that I feel would destroy a Funnelweb which is so focused on its shield. I'll look into changing the shield damage constant and merging.

@GoogleFrog
Copy link
Contributor

The shield effect occasionally looks laggy https://youtu.be/vGSn9G4jxqo

@GoogleFrog
Copy link
Contributor

It appears to be related to unitID seeding. 30276 reproduces the lag.

@GoogleFrog GoogleFrog merged commit 95440ee into ZeroK-RTS:master Mar 15, 2019
@Licho1
Copy link
Member

Licho1 commented Mar 15, 2019

nooo not without repair drones

@lhog
Copy link
Contributor

lhog commented Mar 15, 2019

@Licho1 my man 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.