[WIP] N-Shields

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

Moderators: winston, another_commander

User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2543
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: [WIP] N-Shields

Post by Norby » Wed Jun 15, 2016 11:12 am

Need two positions:
ship.script.NShields_cloaked_attacker[b].position[/b].distanceTo(ship[b].position[/b]) < 25600)

User avatar
phkb
Commodore
Commodore
Posts: 2343
Joined: Tue Jan 21, 2014 10:37 pm
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...

Re: [WIP] N-Shields

Post by phkb » Wed Jun 15, 2016 12:27 pm

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 » Thu Jun 23, 2016 3:17 pm

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 » Sat Jul 16, 2016 2:14 pm

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
Commodore
Commodore
Posts: 2343
Joined: Tue Jan 21, 2014 10:37 pm
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...

Re: [WIP] N-Shields

Post by phkb » Wed Aug 24, 2016 10:49 pm

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 » Sun Sep 04, 2016 12:55 pm

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
Commodore
Commodore
Posts: 2343
Joined: Tue Jan 21, 2014 10:37 pm
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...

Re: [WIP] N-Shields

Post by phkb » Mon Dec 05, 2016 10:45 am

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 » Mon Feb 05, 2018 1:26 pm

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 » Tue Nov 20, 2018 12:49 pm

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.

Post Reply