[CLOSED], see new thread]reduce shield damage

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
User avatar
Lone_Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 546
Joined: Wed Aug 08, 2007 10:59 pm
Location: Netherlands

[CLOSED], see new thread]reduce shield damage

Post by Lone_Wolf »

After noticing the huge difference between 1.76 and 1.80 in difficulty / pirate AI, I've been working at a way to reduce damage taken from hits in 1.80 a while now.

Code: Select all

this.shipTakingDamage = function (amount, whom, type)
  {
    // if amount != 0 , shields have failed to absorb the hit
    if ( amount !=0 ) { return; };
    // try to determine whether forward or aft shield is hit
    if( whom && whom.isValid && (whom.vectorForward.angleTo(whom.position.subtract(player.ship.position)) > 0.5 * Math.PI) ) 
      { 
	// forward shield hit
	player.ship.forwardShield += this._rsd_factor;
      }
    else
      {
	// aft hit
	player.ship.aftShield += this._rsd_factor;
      };
  };
I'm currently testing with a value of 8 for this._rsd_factor and that appears to be enough to make the game easier, without making the player indestructible.

My intent is to have this only act for laser hits, but i couldn't find a description of the damagetype parameter.

I'm not sure yet whether i'll make an oxp/oxz out of it, as it does feel like a cheat.
It would make life easier for new players though, giving them a better chance to have fun playing.

A possibility would be to check for player elite ranking and disable the functionality if player is above a certain level
(above average ?) .
Last edited by Lone_Wolf on Thu Oct 16, 2014 2:05 pm, edited 2 times in total.
OS : Arch Linux 64-bit - rolling release

OXPs : My user page

Retired, reachable at [email protected]
User avatar
Venator Dha
---- E L I T E ----
---- E L I T E ----
Posts: 329
Joined: Sun Feb 23, 2014 11:26 am
Location: Sweden

Re: reduce shield damage

Post by Venator Dha »

Nice Idea :)
Lone_Wolf wrote:
A possibility would be to check for player elite ranking and disable the functionality if player is above a certain level
(above average ?) .
Don't know if possible or how to but linking this._rsd_factor to the elite rankings, so:

Harmless = 8 (as per your example)
Mostly Harmless = 7
Poor = 6
...
Deadly = 1
Elite = 0

might work.
Taurus Driving through the galaxy since... .
User avatar
Lone_Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 546
Joined: Wed Aug 08, 2007 10:59 pm
Location: Netherlands

Re: reduce shield damage

Post by Lone_Wolf »

good suggestion, Venator Dha .

I can use player.score and calculate the factor on launch instead of startup.
OS : Arch Linux 64-bit - rolling release

OXPs : My user page

Retired, reachable at [email protected]
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: reduce shield damage

Post by Smivs »

I'm not sure I like this TBH.
Lone_Wolf wrote:

I'm not sure yet whether i'll make an oxp/oxz out of it, as it does feel like a cheat.
That's because it is a cheat :wink: NPCs do not have shields, so this would be a purely player-centric advantage.
This is distinct from the on-going laser balancing exercise which handles NPCs and players alike (and is therefore 'fair'), and with the AI and accuracy balancing that cim et al are working on likely to address these issues in the next release anyway I really don't see the need or the point.
Having said that, releasing an OXZ version for newbies with a max_version of 1.80 might be worth considering, just to help them out untill the core game is brought back into line.
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: reduce shield damage

Post by Norby »

Lone_Wolf wrote:

Code: Select all

whom.vectorForward.angleTo(whom.position.subtract(player.ship.position) > 0.5 * Math.PI
Your condition determine which side of the attacker facing to the player, but you need to know which shield of the player facing to the attacker:

Code: Select all

player.ship.vectorForward.angleTo(player.ship.position.subtract(whom.position)) > 0.5 * Math.PI
User avatar
Lone_Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 546
Joined: Wed Aug 08, 2007 10:59 pm
Location: Netherlands

Re: reduce shield damage

Post by Lone_Wolf »

Thanks, norby .
I decided to go with the dot product, but you were right about whom & player.ship being in wrong position.

Smivs,

imo oolite 1.76 had a broken balance that favored the player way to much.
NPCs needed improvement and they got that in 1.80, but the balance is now reversed putting the player at a big disadvantage.
I am leaning towards releasing this as OXZ in the near future, but will make clear it makes the game much easier in the description.

I'm now using the following values for damage reduction :
harmless 8
mostly harmless 7
poor 6
average 5
above average 4
competent 2
dangerous+ : ZERO

For those interested in testing it, i've uploaded a Quick & Dirty oxp version without readme, mainfest etc.
https://app.box.com/s/4elanuvphs9rbtktkc2i
OS : Arch Linux 64-bit - rolling release

OXPs : My user page

Retired, reachable at [email protected]
User avatar
Lone_Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 546
Joined: Wed Aug 08, 2007 10:59 pm
Location: Netherlands

Re: reduce shield damage

Post by Lone_Wolf »

Ignore this post please (can't find a strikethrough option)

10After thinking about this, this oxp is intended to mkae things easier for new pilots.
equipment should also matter for the damage reduction.

I'm currently thinking about giving a weight to kill count , laser, shield booster & mil. shields .


weight
0, 0-7 kills
1, 8-15 kills
2, 16-31 kills
4, 32-63 kills
6, 64-127 kills
8, 128 -255
10, more then 256 kills

fwd beam laser : +1
fwd mil laser: +2
shield booster +1
mil. shields +3

Total weights could then give these damage reductions :

wt 0 = 10
wt 1 = 8
wt 2 or 3 = 6
wt 4 or 5 = 5
wt 6 or 7 = 3
wt 8 or 9 = 1
wt 10 and above : 0

example :
pilot with 36 kills = wt 4, damage reduction of 5
has mil. laser + shield booster : adds +3, total wt = 7, damage reduction 3
Add mil. shields (+3) , total wt =10 , damage reduction = 0
OS : Arch Linux 64-bit - rolling release

OXPs : My user page

Retired, reachable at [email protected]
User avatar
Lone_Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 546
Joined: Wed Aug 08, 2007 10:59 pm
Location: Netherlands

Re: reduce shield damage

Post by Lone_Wolf »

During playing i noticed that when your kill count improves, your opponents tend to get harder also (atleast for assassins that attack player-couriers).
I now feel that a variable damage reduction brings little benefit, and makes the oxp needleslly complex.
Whether players want to remove this oxp when they get higher kill count / better ships is their decision, not mine.

I also thought about smivs' point that this oxp sofar is entirely player-centric.
While NPC ships don't have shields, ingame shields are simulated by increasing npc max energy.

Looking at wiki and several oxps I think i found a way to reduce damage for npc :

use shipdata-override.plist to attach rsd-script to templates for core ships

In shiptakingdamage handler, test for player or npc .

if npc, add rsd_factor to ship.energy

Note :
If core templates already use script key, another method will need to be used

Would this work or am i seeing things to simple ?

Edit : discussion continues here: https://bb.oolite.space/viewtopic.php?f=4&t=16947
OS : Arch Linux 64-bit - rolling release

OXPs : My user page

Retired, reachable at [email protected]
Post Reply