bonusShield is dead! Long live flankingBonus! - Page 2

bonusShield is dead! Long live flankingBonus!

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply

Did you know about this?

Yes.
6
7%
No.
86
93%
 
Total votes: 92

Pwnedbyryan
Posts: 32
Joined: 16 Aug 2006, 19:25

Post by Pwnedbyryan »

Whatever the case i think it needs to be adjusted. It doesn't make complete sense in most scenarios.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Just give us a tag to change the modifier (default to 0, i.e. no bonus. It won't break mods because none were aware of this) and a tag to fix the direction to a vector relative to the unit (e.g. make it always face forward).
MelTraX
Posts: 470
Joined: 02 Jan 2007, 16:18

Post by MelTraX »

Defaulting it to 0 would still affect the balance of mods.. For example brawlers would make less damage without it (if I understand it correctly) while "normal" tanks wouldn't.. The modders may not have known why brawlers made more damage but they adjusted their damage to fit the rest of the units..
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

It'd make a lot more sense if the relative difference between the vector and Dir was taken into account, frankly. And we need to be able to adjust this in the FBIs. Then we get true flanking effects, not psuedo flanking.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Post by lurker »

Dragon45 wrote:Does the angle 'swung' around depend on the damage dealt? judging from a quick scan of the code snippet it does...
No, it doesn't. It's based on how long the units have been unattacked.

Edit: Oops, I saw it wrong. Attacking your own units will end up slowing it down by breaking up the updates, and it's not set to a small value where I thought it was (dodamage). It's set to that value in update. :oops:
Argh wrote:It'd make a lot more sense if the relative difference between the vector and Dir was taken into account, frankly. And we need to be able to adjust this in the FBIs. Then we get true flanking effects, not psuedo flanking.
I'm working on a patch that adds tags to this and adds full flanking zones. Do you think that in addition to the flanking zones there should be two bonusshields, one locked to the unit, and one like this, or would a tag to set how much it can move, settable to 0, be enough?
Last edited by lurker on 08 Jul 2007, 11:44, edited 1 time in total.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

I would vote that the second option is good enough, so long as it allows us to set the values for the flanks (default should be the previous values, so that most existing game designs aren't affected much). For smaller models, it simply doesn't make much sense to make flanking do a lot more damage, whereas on larger targets where armor values may not be the same on all facings, it could become a major part of the game designs. Control over this, and having it obey true Dir, is a must, imo.

BTW, I must say good job, for finding this code! I wasn't aware of how this worked, and I haven't looked at that code in months. This could be very, very useful stuff!
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Post by 1v0ry_k1ng »

so s44 dosnt need directional damage at least
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Post by lurker »

Everything I know is wrong! :evil: :? :cry: :oops: :|
Apparently it's not relative to the unit at all. If you attack the shield side of the unit when it's facing right, it does normal damage, and if the unit turns around, and you attack the same side, now it does double damage.
Anyway, it will be relative to the unit now with this patch.
I'm still working out the armorzones, but here is the patch of everything I have finished so far. It enables negative damage to units, enables edgeeffectiveness greater than 1, and adds the following tags:
bonusShieldMode; //0=no bonus shield; 1=global coords, mobile; 2=unit coords, mobile (calculation heavy); 3=unit coords, locked;
bonusShieldDir; //units takes less damage when attacked from this dir (encourage flanking fire)
bonusShieldSavedAdd; //how much bonusShieldSaved builds up each frame
bonusShieldMaxDamage; //maximum factor to multiply damage by
bonusShieldMinDamage; //minimum factor to multiply damage by

And they can be GET/SET by cob.
#define BONUS_SHIELD_MODE 95 // set or get
#define BONUS_SHIELD_DIR 96 // set or get through get, for multiple args
#define BONUS_SHIELD_SAVED_ADD 97 // set or get
#define BONUS_SHIELD_MAX_DAMAGE 98 // set or get
#define BONUS_SHIELD_MIN_DAMAGE 99 // set or get

Older version:
http://pastebin.ca/609328

For now, it defaults to the old behavior, but this can easily be changed in weapondefhandler. I would be glad if someone could look over the mode 2 code, but I'm pretty confident in the rest, and I don't forsee mode 2 being used nearly as much as mode 3.

Edit: 8) almost done with real armorzones
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

negative damage to units, enables edgeeffectiveness greater than 1

LOL, finally negative damage (i.e., healing)... only, what, about 10 months later? Cool! Just make sure it can't take Units over their max hitpoints.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

lurker wrote:Edit: 8) almost done with real armorzones
Will we be able to determine which zone was hit in HitByWeaponId? I don't want a hit to the left side be able to destroy the right arm and vice versa.
User avatar
Pendrokar
Posts: 658
Joined: 30 May 2007, 10:45

Post by Pendrokar »

Does it work against immobile units like LLT's or a factory???
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Pendrokar wrote:Does it work against immobile units like LLT's or a factory???
EVERYTHING. Well, until 75b1 comes out and mods disable it.
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Post by 1v0ry_k1ng »

disable? NEVER!
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Post by lurker »

Argh wrote:negative damage to units, enables edgeeffectiveness greater than 1

LOL, finally negative damage (i.e., healing)... only, what, about 10 months later? Cool! Just make sure it can't take Units over their max hitpoints.
I did. There are also checks for no experience when the unit is at full health.


What makes a unit able to target friendlies? I didn't think it was possible, but you can order a unit such as the Simbase Rocket Artillery to attack one of your units, and it will track it and the rockets even guide toward it.
Does it have comething to to with command-fire?


*currently working on KDR's suggestion and this: http://spring.clan-sy.com/phpbb/viewtopic.php?t=10362*
Would it be better to do the norm thing, or just pass the distance seperately? Either one is very simple. I think passing the distance would be better, as then the angle wouldn't lose resolution at low distances. But then should the factor be left at 500 or changed to 400 to be compatible? Would the extra args cause crashes in older units, or be ignored?
Last edited by lurker on 17 Jul 2007, 06:35, edited 1 time in total.
SJ
Posts: 618
Joined: 13 Aug 2004, 17:13

Post by SJ »

Yes its from before the current springs time. I tried to discuss it a bit early in Springs development but none seemed to care much so I just left it there. Mostly it was meant to make headlong rushing in a big clump less good and to make single super units a bad idea while still allowing higher level units to have competive armor/cost.
User avatar
BigSteve
Posts: 911
Joined: 25 Sep 2005, 12:56

Post by BigSteve »

Dragon45 wrote:JESUS TITTY FUCKING CHRIST

:OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO


how the FUCK did anyone not notice this!!
LOL at this whole situation and double LOL because that was the EXACT phrase that popped into my head after dave sent me the link to this thread. :lol:
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Post by lurker »

I'm off to college orientation for 2 days, but the patch is almost done. I'll submit it to mantis Friday. A list of features:
edgeeffectiveness>1
negative damage
bonusshield is very flexible, with tags and GET/SET
armorzones! woo!
armorzone GET/SET
HitByWeapon and HitByWeaponID use unit coords
HitByWeaponID passes distance
HitByWeaponID passes the armorzone that is hit
HitByWeaponID passes the theta and phi of the attackdir*

should HitByWeaponID also pass the global coords of the attack? what about the location of the attacker?

*I did some testing, and unused variables passed to cob functions didn't cause any problems, but I didn't test for a limit in number. If I'm wrong or there is a limit, please tell me.
Archangel of Death
Posts: 854
Joined: 28 Jan 2005, 18:15

Post by Archangel of Death »

Could you give a bit of detail on the armorzones and how they work?
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Post by Neddie »

SJ wrote:Yes its from before the current springs time. I tried to discuss it a bit early in Springs development but none seemed to care much so I just left it there. Mostly it was meant to make headlong rushing in a big clump less good and to make single super units a bad idea while still allowing higher level units to have competive armor/cost.
Well, it did do that, though we were unaware of the effects, and thus many people still used and use clumps of units. Rather cool, regardless.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

I don't think it'll do much vs. clumps since you'll attack the outer units of a clump first and when you flank both attackign groups will hit different targets.
Post Reply

Return to “Engine”