[WIP] N-Shields

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

Moderators: another_commander, winston

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: [WIP] N-Shields

Post by Norby »

Need two positions:
ship.script.NShields_cloaked_attacker[b].position[/b].distanceTo(ship[b].position[/b]) < 25600)
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4622
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: [WIP] N-Shields

Post by phkb »

Ah, yes, good catch, Norby!
Ngalo
Competent
Competent
Posts: 58
Joined: Mon Mar 02, 2015 2:08 pm
Location: drifting in remLock mask near Vezadi Station

Re: [WIP] N-Shields

Post by Ngalo »

Fixed in 0.6.4.

Advance warning about N-Shields 0.7:
I have felt for some time that the script is getting too big and complicated, and the least necessary contributor to this (and to the remaining to-do list before I can consider a stable release) is the code supporting many different shield types. This is therefore being removed: future versions will only give dorsal/ventral shields to Thargoids and fore/aft ones to all other NPCs; the NShields_config script_info key will be deprecated and replaced by keys like max_shield_forward and shield_recharge_aft.

Due to an unrelated change to VisualEffect entities for flashers, the NShields_colours key will also probably not be supported, although there will be replacements with slightly different functionality.
Equal Rights for NPCs!
Ngalo
Competent
Competent
Posts: 58
Joined: Mon Mar 02, 2015 2:08 pm
Location: drifting in remLock mask near Vezadi Station

Re: [WIP] N-Shields

Post by Ngalo »

Okay, N-Shields 0.7.1 is finally available, with the changes promised above, plus the config interface now works properly if you have Library OXP installed.
Other changes:
- tentative support for Shield Cyclers on NPCs (but this may contain unidentified bugs)
- interim Ship Configuration compatibility script removed (now incompatible with Ship Config 0.1.x but will work OK with 0.2.0 or later).

Version 0.6.4 remains available for anyone who wants it, but will not be maintained by me.

I think this is now somewhere near stable (he says, unaware of the menagerie of hideous bugs creeping up on him). The only things I want to add now are a few more colour options, perhaps some changes to the config interface and maybe shield effects for stations?
Equal Rights for NPCs!
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4622
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: [WIP] N-Shields

Post by phkb »

I'm not 100% sure, but in my play session today I was chasing down a Cobra MkIII-XT, shooting at him while he ran. This ship also has a rear laser, with which he was returning fire. But the weird thing was, whenever he landed a hit on me, I saw a flash appear on his ship, as if I had fired on him. The flash seemed to appear on his ship in the spot his laser landed on me.

Sorry for being so vague! I hope there's enough info there to track down what might be happening.
Ngalo
Competent
Competent
Posts: 58
Joined: Mon Mar 02, 2015 2:08 pm
Location: drifting in remLock mask near Vezadi Station

Re: [WIP] N-Shields

Post by Ngalo »

Hmm. No idea what might be wrong there, although I suspect it's not the only occasional bug left in this OXP. I won't be able to fix anything soon, but please post any further data you can get on remaining bugs.
Equal Rights for NPCs!
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4622
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: [WIP] N-Shields

Post by phkb »

OK, I think I found the main issue with the flare effect showing on the attacker, rather than on the player.

In the "N-Shields-player.js" file, add the following function to the end of the script:

Code: Select all

this.shipLaunchedFromStation = function(station) {
	player.ship.script.NShields_sqRadius = Math.pow((player.ship.collisionRadius * 1.2), 2);
}
I don't think this is everything (in my quick tests so far I wasn't seeing any shield flare effect on the player ship) but at least it isn't showing on the attacker.

Edit: OK, the flare effects are showing, it was just that the forward view on my Python ET is set pretty far forward to avoid showing the ship model, and the flare effects were taking place behind the view position.

So I'm experimenting with changing the "1.2" multiplier in the above equation to "1.3". That seems OK in most of the ships I've tried, except for the Cobra III-XT. I suspect that, again, the forward view might be set too far forward.
Rustem
Deadly
Deadly
Posts: 170
Joined: Mon May 25, 2015 5:23 pm
Location: Russia

Re: [WIP] N-Shields

Post by Rustem »

Ngalo wrote: Sun Sep 04, 2016 12:55 pm
...
After learning code from this OXP, i think may be developed this experimental pack: https://app.box.com/s/i2ut7sk7axxnxk0e0txlc3sucydxjqk9
Rustem
Deadly
Deadly
Posts: 170
Joined: Mon May 25, 2015 5:23 pm
Location: Russia

Re: [WIP] N-Shields

Post by Rustem »

New release: Military Shields Ships OXP

Main change: For NPCs has highest energy recharge rate (more 10, simulated NEU), this OXP will replaced usual shield boosters to NPC Shield Boosters and NPC Shield Enhancers in order to simulate correctly and avoid an overfitting of the recharge rate.

Changelog:

0.1.0
- Added the script for spawn of the military ships without N-Shields OXP.
- Added a recharge rate in the script info.

0.0.3
- Added a ships with with laser cannons : anaconda-pirate-lasercannon and anaconda-lasercannon(4 ships), boa-pirate-lasercannon2, boa-mk2-lasercannon(3 ships), python-lasercannon(3 ships).
- Reduced military shield vars : python-sg, python-battlecruiser.
- Renamed and resorted a some roles.
dybal
---- E L I T E ----
---- E L I T E ----
Posts: 499
Joined: Mon Feb 10, 2020 12:47 pm

[RELEASE] N-Shields v1.0

Post by dybal »

[EliteWiki] N-Shields OXP v1.0 is available on the Expansion Manager and here;

Changes
  • Drops support for Shield Cycler (and Shield Cycler Next) 1.x for NPCs.
  • Creates idempotent function for OXPs to call to configure a NPC's shields.
  • Encapsulates modifications of ship's energy to verify for NaN before assigning a value into ship.energy (to prevent "invulnerable ship" bug).
  • Adds delay to shipSpawned before setting up the ship to allow other OXPs' shipSpawned to award equipments.
  • Configures shield recharge rate with Energy Grid (civilian and naval) upgrades if the NPC has them installed.
  • Configures both Military Shield Enhancement and Shield Enhancer for NPCs.
  • Doesn't award Shield Cycler to NPCs that have Shield Equalizer.
  • Fixes bugs in handling of damage to subentities.
  • Standardizes script object properties names: functions references start with '$' (except event handlers), everything else starts with '_';
dybal
---- E L I T E ----
---- E L I T E ----
Posts: 499
Joined: Mon Feb 10, 2020 12:47 pm

[RELEASE] N-Shields v1.0.1

Post by dybal »

[EliteWiki] N-Shields OXP v1.0.1 is available on the Expansion Manager and here.

Changes
  • Doesn't add shields to scoopable "ships" (that includes all variations of escape capsules, even if their primary role happens to be different from escape-capsule).
  • Fixes bugs that broke idempotency of $configureShip (leading to infinite loops at damage handling if $configureShip was called twice on the same ship).
  • Fixes bug that led to "invulnerable ship" if the ship's script had its own shipTakingDamage event handler.
Post Reply