Jump to content

NPC attacking my ship when I leave the sector


CMDR Edu

Recommended Posts

Hi guys!

 

I have setup a Brazilian Avorion server because I love this game and I want to help in some way because I see enormous potential in this game. But I see some simple problems in this game that need to be fixed. I'm referring to the events of NPC attacks, they are very frequent and this bothers greatly who wants to "savor" the game.

 

I want an efficient hint on how to change the scripts so that the attacks get rarer as they happen from minutes to minutes pretty much. I have no time to give salvage in a wrackage and more NPC appears and so it goes on for hours until it becomes too uncomfortable. Instead of minutes I would like them to happen in hours, even if it offered more difficulty.

 

I've changed the eventstringer.lua file by

local pause = (5 * 60) * 20

 

Even so, the attacks happen very often. Is there another place I need to change?

 

And finally, something very annoying is when we are building an autonomous mining ship and we jump to another sector to look for crews or when it is already ready and we leave it with order to mine, anyway, when we leave the ship in a sector and we jump out, she is attacked next. Really!?

 

It happened many times with me and with friends. Sorry, but this is stupid! It's as if the NPCs were programmed to destroy the ship as soon as we left the sector. And most of the time you go back to the sector and there is no one there.

 

Lastly, I would like to know if I can disable torpedo NPC outside the center of the galaxy. I have some friends who gave up playing this game because they were frustrated by being torpedo attacked early in the game, in the first sectors and with an initial ship, with no defense chances. Sometimes you can escape but they follow us to another sector and it's game over!

 

We do not want an easy game, but the growth curve has to exist, with a good challenge but in a balanced way.

 

Please help me with this!

Thank you and sorry for my bad English!

Link to comment
Share on other sites

Even so, the attacks happen very often. Is there another place I need to change?

The data\scripts\player\eventscheduler.lua is indeed where it's at. The events seem spaced enough (like, one "pirateattackstarter" every 60 to 80 minutes) but all the events are activated at the beginning of the scheduling, so you can have events in rapid succession.

Since you increased the pause time to 20 minutes,  there is now an event every 20 minutes because they're all on queue, so you also may quadruple all the randoms' arguments to make the galaxy four times as tranquil.

It also seems the "to =" arguments refer to the maximum core distance, you may tweak for the two last alien attacks (i.e. to 300 and 200) to avoid the xsotan conflict getting too hectic too fast..

 

And finally, something very annoying is when we are building an autonomous mining ship and we jump to another sector to look for crews or when it is already ready and we leave it with order to mine, anyway, when we leave the ship in a sector and we jump out, she is attacked next. Really!?

 

It happened many times with me and with friends. Sorry, but this is stupid! It's as if the NPCs were programmed to destroy the ship as soon as we left the sector. And most of the time you go back to the sector and there is no one there.

It's exactly the case: it's called persecutor attacks. Nowadays the situation is extra annoying, since there is currently a bug about ships forgetting individual turret commands while mining so the mining ship cannot have point defense to take out torpedoes.

You'll have to drop the mining ships with a flak escort and a third ship set to attack all enemies. Pretty horrible crew-wise and needs a lot of resources in early game hell.

 

Lastly, I would like to know if I can disable torpedo NPC outside the center of the galaxy. I have some friends who gave up playing this game because they were frustrated by being torpedo attacked early in the game, in the first sectors and with an initial ship, with no defense chances. Sometimes you can escape but they follow us to another sector and it's game over!

The last sentence indicates those also are persecutors, though they aren't meant to attack the beginning sectors at all, though they may spawn if the distance to core of the beginning sector is less than 400.

 

Maybe you gotta tweak the data\scripts\lib\persecutorutility.lua to lower the thresholds in the sectorPersecutable functions from 400 to something like 300 (or, if you want 'em only in the Inner Sphere, 170).

For other torpedo NPCs, try simply shooting the torpedoes while closing the gap (most chainguns can fire all the time and torpedoes usually are at roughly the same bearing as the shooter unless you're getting near), a stray chaingun shot or two can kill a torpedo and some starter weapons have Independant Targeting so you can put them in Defensive Mode right away with predictable, often satisfying results.

 

The data\scripts\server\factions.lua script also defines player starting conditions: beginning by line 125 you'll see what the player receives in the beginning (the first argument is credits, the second is iron, and you can add up to avorion~), so changing the corresponding player:receive to

player:receive(240000, 40000, 12000)

may help to have a nice enough start to build the four ships :) (the 240 000 credits are there for the ships, but also the crew salaries and equipment as you'll need to buy the weapons, unless you also tweak with the turret additions).

Link to comment
Share on other sites

Wow

 

Fantastic!

 

I believe I found what was wrong because I was not changing the original files of the game. I had changed in server.ini the startUpScript parameter of:

data/scripts/server/server.lua

for:

data/scripts/server/myserver.lua

In the same way, the startSectorScript

 

Similarly, I had player: addScriptOnce ("myservereventscheduler.lua") in myserver.lua

 

I did this because I did not want the files being overwritten when I had to check the integrity of the server files because I have a msdos batch script checking for updates before starting the server.

 

So I realized by some logs that some players were running the original eventscheduler.lua still because the original events were running so it disconnected from the server. It looks like the scripts that are running are still saved in the player profile

 

Correct me if I'm wrong.

 

Now, I do not know if I keep it that way or if I change the original files and retreat the integrity check during startup.

 

What do you suggest me?

 

Thank you!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...