Page 1 of 2

WIP: witchdrive/Torus gameplay "fix"

Posted: Wed Feb 26, 2014 10:35 pm
by Astrobe
We have bad news.

In the last decades, combats and mining have been increasing steadily and have been the source of a growing number of debris floating in and outside the lanes.
Up to recently, those debris simply disintegrated on the shields of passing ships. But the newer alloys used in the construction of newer ships form much more resistant debris. The mining industry is more and more subject to profit pressures, leading miners to use methods that leave behind more and bigger rock debris.

As a result, debris that hit ships travelling at high speed do more and more often noticeable damage. The energy of the impact easily absorbed by the forward shield, but by the end of this decade, if activity on the lanes continues to increase in the current exponential way, impacts from debris are expected to wear down very quickly shields. Worse, should the shield go down, the debris may be able to pierce through the hull and cause internal damage to the ship.

As a consequence, commanders are strongly advised to keep an eye on their shields when using either their Witchdrive injectors or their Torus drive, and are strongly discouraged to use them without the protection of a shield.

---

This OXP attempts to correct the relative absence of downsides for Witchdrive injectors and Torus drive, which provide easy ways to escape compromised situations, by weakening the forward shield when the player use either of them.
This is directly inspired from the Q-charger OXP, that I try to tweak in parallel in order to achieve similar gameplay changes. But it requires serious work, so I wanted to prototype and submit those ideas with a script as simple as possible.

Here it is:

Code: Select all

this.name           = "speed-fix.js"; 
this.author         = "Astrobe"; 
this.copyright      = "This script is hereby placed in the public domain."; 
this.version        = "0.1"; 
this.description    = "High speed damages shield."; 
this.licence = "see copyright";

"use strict";

this.startUp = function()
{
  	log(this.name, "Started correctly");
	this.speedCheckTimer= new Timer(this, speedCheck, 0, 1.0);
}


this.speedCheck=function()
{
 	var speed=player.ship.speed;
	var damage=10*Vector3D.random().magnitude();
 	if(damage<3) damage=0;

	if(speed > 8*player.ship.maxSpeed)
	{
 		damage*=2;
 		// player.ship.fuel-=0.1;
	}

	if(speed > 2*player.ship.maxSpeed)
 	{
 		if(player.ship.forwardShield>=damage) player.ship.forwardShield-=damage;
	 	else
		{
			player.ship.takeInternalDamage();
 			player.ship.energy-=damage;
 		}
	 }
}
It can be improved by factoring the alertStatus in the probability of damage, in order to simulate a lesser debris density on secondary lanes (WP-sun etc.): a player in green status has relatively good chances to be off the main lane, whereas a player in red status is more likely to be in combat (=> more debris floating around).

I would also like to charge a fuel cost for Torus drive, but I have yet to find a way to disengage or disable the Torus drive when the tanks are empty.

Re: WIP: witchdrive/Torus gameplay "fix"

Posted: Thu Feb 27, 2014 1:19 am
by Bugbear
Hi Astrobe,
I quite like this idea of yours. Why should we be getting a free lunch when using injectors or torus.

Would you be able to make this applicable to NPCs also? I think it would be quite cool to see a fleeing NPC's shields intermittently glow red as the shields absorb space junk impacts.

Cheers,

Re: WIP: witchdrive/Torus gameplay "fix"

Posted: Thu Feb 27, 2014 3:25 pm
by Zireael
Bugbear wrote:
Hi Astrobe,
I quite like this idea of yours. Why should we be getting a free lunch when using injectors or torus.

Would you be able to make this applicable to NPCs also? I think it would be quite cool to see a fleeing NPC's shields intermittently glow red as the shields absorb space junk impacts.

Cheers,
This is a cool idea!

Re: WIP: witchdrive/Torus gameplay "fix"

Posted: Fri Feb 28, 2014 6:10 pm
by Bazabaza
It would also affect those NPC pirates who seem to fly continuously using in jectors

Re: WIP: witchdrive/Torus gameplay "fix"

Posted: Sat Mar 01, 2014 12:31 am
by Diogenese Senna
How about a simple, easy to use OXP that I can insert in the AddOns folder ...

Re: WIP: witchdrive/Torus gameplay "fix"

Posted: Sat Mar 01, 2014 8:38 am
by Astrobe
How about a simple, easy to use OXP that I can insert in the AddOns folder ...
The reason I didn't do this is that it's quite experimental, and I don't have yet a box account. At the moment I'm more interested in feedback on the general idea and on the code.
Would you be able to make this applicable to NPCs also? I think it would be quite cool to see a fleeing NPC's shields intermittently glow red as the shields absorb space junk impacts.
Unfortunately the effect doesn't trigger at all, even for the player's ship. Also if you bring down your shields and energy to zero by Torus-driving like no tomorrow, the ship isn't destroyed (but most of your equipment will probably be out of order because of the internal damage you'll take). Even when you take "internal damage" you only get a message, no sound played.

Another problem with applying it to NPCs is that I'm not sure the standard AI is clever enough not to use injectors when it shouldn't.

Other issues bug me at the moment: I don't like that much the randomness of the damage, and the OXP is difficult to tune with regard to ship equipment. Currently it is tuned according to the equipment of my ship (extra energy unit + shield boosters). Without this equipment, this OXP might make too dangerous to use injectors or Torus.

I'll try another idea: bring down both shield to zero and energy to half (or 2/3) when using the Torus drive. I expect I can't bring down energy to zero is that it would trigger red condition, which would disengage the Torus drive (this would be a bit too hardcore anyway). I have yet to test it.

This is actually not a new idea, I've seen it in an other game before (perhaps E:D or Vega Strike).

This, maybe combined with the bullet drive OXP (controls locked when using torus) could achieve the goal of making it a bit more dangerous to use the Torus drive.

Re: WIP: witchdrive/Torus gameplay "fix"

Posted: Sat Mar 01, 2014 9:30 am
by spara
How about a simple mechanics change: using torus slowly eats your energy? Would only affect the player and would be quite easy to script. Injectors already eat fuel, so there is a price for using them.

Re: WIP: witchdrive/Torus gameplay "fix"

Posted: Sat Mar 01, 2014 3:03 pm
by Astrobe
spara wrote:
How about a simple mechanics change: using torus slowly eats your energy? Would only affect the player and would be quite easy to script. Injectors already eat fuel, so there is a price for using them.
The visual result looks is a bit weird: the Energy bar is "pulsing" because it regenerates while the script subtracts energy.

Re: WIP: witchdrive/Torus gameplay "fix"

Posted: Sat Mar 01, 2014 4:34 pm
by spara
Astrobe wrote:
spara wrote:
How about a simple mechanics change: using torus slowly eats your energy? Would only affect the player and would be quite easy to script. Injectors already eat fuel, so there is a price for using them.
The visual result looks is a bit weird: the Energy bar is "pulsing" because it regenerates while the script subtracts energy.
Ah. True. Probably looks a bit weird.

One more idea to throw in. How about some energy cost when you start the torus? Would make some sense too. Let's say starting the torus drive would require 1/2 bank of energy. With an Adder that would be a serious limit.

Re: WIP: witchdrive/Torus gameplay "fix"

Posted: Sat Mar 01, 2014 4:48 pm
by Norby
Astrobe wrote:
Energy bar is "pulsing"
You can use FrameCallback instead of Timer and deduct delta*damage within to avoid pulsing.

I think fuel-consuming Torus is not a good idea: can cause many fustration if left far from stations, and internal damages are too often in your code imho.

Re: WIP: witchdrive/Torus gameplay "fix"

Posted: Sat Mar 01, 2014 6:01 pm
by Diogenese Senna
Any chance of Idiot Instructions on how to use this so that I can test it as well :)

Re: WIP: witchdrive/Torus gameplay "fix"

Posted: Sat Mar 01, 2014 6:34 pm
by Norby
Make a new folder within your AddOns folder with any name ending with .oxp (for example TorusFix.oxp). Then make a Config folder within, then create a new file into named to script.js (avoid notepad, use notepad++), paste into Astrobe's code above and start the game. You can turn it off by renaming the .oxp folder (in my practice to .oxp- ).

Re: WIP: witchdrive/Torus gameplay "fix"

Posted: Sat Mar 01, 2014 9:11 pm
by Diogenese Senna
Thank you muchly.

Will try it now.

Re: WIP: witchdrive/Torus gameplay "fix"

Posted: Sat Mar 01, 2014 9:27 pm
by Thargoid
@Astrobe - if you want an example of using frame callbacks, look in the scripting of my Cargo Spotter OXP (and several others, but that one is probably simplest and purest).

Re: WIP: witchdrive/Torus gameplay "fix"

Posted: Sun Mar 02, 2014 10:58 am
by Astrobe
Thanks for the pointers, Norby and Thargoid.

Meanwhile I tried the alternative I talked about. The modification this time could be posted in the OXP tweaking thread:

download and install the bullet drive OXP

Then in Config, scripts.js:
  • At lines 19 and 29, replace 7 by 30
  • After line 37 (between "else" and "}"), add:

    Code: Select all

    player.ship.forwardShield=0;
    player.ship.aftShield=0;
    
The Bullet Drive OXP locks your heading at Torus Drive speed. The main modification we make is to also bring down the shields when the Torus Drive is engaged.
The effect on gameplay is that you have to be even more looking for blinking lights ahead, because you might run into a pack of pirates with your pants down (no shields!). If that happens what you are likely to do is to disengage the Torus ASAP, turn around, witchdrive inject away and hope they don't notice you too soon and/or don't score a hit on your hull right away.

The first modification we made (7->30) is aimed at given us back the control of our ship a bit earlier when one disengages the Torus drive; shield regen happens a bit earlier as well.

The pros is that this modification is independent of the equipment of the ship, and it varies a bit the gameplay since it's not that often that you have to take a fight (or flee!) with both shields very low. Also, compared to the first submission we are not slowed down when nothing is going on (no need to disengage in order to regen the shields).

The cons is that with 1.79 improving the accuracy of NPCs, the risks of using the Torus Drive might become too high.


Report this post