Page 1 of 1

Question about Custom Shields OXP

Posted: Sun Jul 15, 2018 12:24 pm
by gsagostinho
Hi all,

I would like to ask for some advice customizing the Custom Shields OXP. Here is the background: I use a couple of different OXPs that make the game a bit harder for the player, namely Skilled NPCs, Deepspace Pirates and all those OXPs that simulate hull damage, leaks and equipment failures. Some days ago I was trying to accomplish a mission from Random Hits and even though I have a quite iron assed ship this mission was extremely difficult and took me way too many attempts to get it done, with the successful tactic being a nearly suicidal one. It was then that I realized that Custom Shields is not only a cosmetic OXP but also alters the game mechanics, simulating shields to NPCs. I would really like to disable this OXP, except that I love the visual effects it adds to the game, in particular the effects when the player gets hit by a laser (in vanilla you can only tell it by the diminishing shield or energy bank gauges). So here are my questions:

* I'm having difficulties finding my way around the code of Custom Shields OXP. Is there an easy way to only have the visual effect applied when the player gets hit, disabling all mechanics of this OXP?
* also, can anyone quantify how much does Custom Shields affect the gameplay? Will disabling it make a big difference in the sort of situations I described above?

Many thanks!

Re: Question about Custom Shields OXP

Posted: Sun Jul 15, 2018 1:51 pm
by another_commander
1. Yes there is an easy way. Open customshields.js, right at the start there are a group of variables that can be changed. Find the this.customshieldsshieldtype and change it from "advanced" to "basic".
2. In its default state, Customshields makes the game more difficult. NPCs get shields and become much harder to kill. Applying the above change will balance it out again and maintain the cool effects.

Re: Question about Custom Shields OXP

Posted: Sun Jul 15, 2018 2:06 pm
by gsagostinho
@another_commander Great, really appreciate the reply! I had found those variables in the main script but I wasn't sure what was meant by basic and advanced. I will give that a shot later today!

About the game difficulty, I hope you don't mind if I follow up with a couple more questions/comments:

* even with the Skilled NPCs OXP, there is a behaviour from some NPCs that I find extremely unrealistic. Some NPC ships will fly head on towards or radially away from you without trying to dodge lasers. This makes them easy prey with military lasers at far away distances. I do understand that they don't fire back possibly due to having weaker lasers but I believe NPCs should try dodging a bit more in those situations.
* on the other hand, some NPCs will have nearly 100% accuracy at super long distances (Thargoids don't seem to miss shots and some really experient NPCs neither).
* these same NPCs will often not fire at all even when they are pointing directly to your ship in a dogfight (for instance, if they are circling around and suddenly find themselves head on towards you at very short distance)

Would you happen to know if any/some/all of these behaviours caused by the Skilled NPCs or other expansions?

Re: Question about Custom Shields OXP

Posted: Sun Jul 15, 2018 2:23 pm
by another_commander
gsagostinho wrote: Sun Jul 15, 2018 2:06 pm
* even with the Skilled NPCs OXP, there is a behaviour from some NPCs that I find extremely unrealistic. Some NPC ships will fly head on towards or radially away from you without trying to dodge lasers. This makes them easy prey with military lasers at far away distances. I do understand that they don't fire back possibly due to having weaker lasers but I believe NPCs should try dodging a bit more in those situations.
* on the other hand, some NPCs will have nearly 100% accuracy at super long distances (Thargoids don't seem to miss shots and some really experient NPCs neither).
* these same NPCs will often not fire at all even when they are pointing directly to your ship in a dogfight (for instance, if they are circling around and suddenly find themselves head on towards you at very short distance)

Would you happen to know if any/some/all of these behaviours caused by the Skilled NPCs or other expansions?
All these observations are probably not due to SkilledNPCs and they should be simply points with room for AI improvements.

Re: Question about Custom Shields OXP

Posted: Sun Jul 15, 2018 2:36 pm
by gsagostinho
Thanks for all the information, another_commander, really appreciate it.

Re: Question about Custom Shields OXP

Posted: Sun Jul 15, 2018 4:04 pm
by another_commander
I looked at the flee AI a bit and it seems like an accuracy of 6 or greater is required for the more advanced avoidance routines to kick in. Try setting accuracy to 6 manually on any NPC showcasing dumb flee behaviour during combat and see if this helps. It did in my tests. If this is it, then maybe we could adjust the code a bit to smarten up everyone regardless of accuracy, so a more normal behaviour is exhibited when fleeing.

Re: Question about Custom Shields OXP

Posted: Sun Jul 15, 2018 5:22 pm
by Norby
another_commander wrote: Sun Jul 15, 2018 4:04 pm
maybe we could adjust the code a bit to smarten up everyone regardless of accuracy, so a more normal behaviour is exhibited when fleeing.
Good idea imho. The wiki show that a weak AI "when fleeing, will flee in a highly predictable straight line", but a start at the next level would be better: "some attempts to dodge while fleeing will be made".
gsagostinho wrote:
Thargoids don't seem to miss shots
The Thargoid Laser is the only turreted one in the game, this is why so effective.

Re: Question about Custom Shields OXP

Posted: Sun Jul 15, 2018 8:09 pm
by gsagostinho
Yeah, I just took a look and ships with higher accuracy behave far better when evading shots head on or when fleeing. Perhaps the lowest AI values could be set to do at least some attempts to dodge, as Norby suggested -- nothing that would dramatically change the difficulty but something that would at least make their behaviour feel less 'dumb'. I will also start paying attention to my next dogfights to see whether a high accuracy NPC ship which is not on my 6 o'clock but which still has a clear shot at me will fire or not.
The Thargoid Laser is the only turreted one in the game, this is why so effective.
I see, thanks for the info!