Jump to content

[REQ]: Galaxy Search Feature! Shows closest things you search with filter option


Kane Hart

Recommended Posts

I have been looking into this but as far as I can tell there is no way to know what's in a specific sector. Therefore we can just do a linear search through the systems.

My other thought is add to a list of all stations as players enter a region. However that would only work if you had the mod from the beginning. I am also unclear how to save that data to persist between sessions.

Link to comment
Share on other sites

I have been looking into this but as far as I can tell there is no way to know what's in a specific sector. Therefore we can just do a linear search through the systems.

My other thought is add to a list of all stations as players enter a region. However that would only work if you had the mod from the beginning. I am also unclear how to save that data to persist between sessions.

 

u can view ur discovered systems with stations in it all the time in ur galaxy map... so its maybe possible

Link to comment
Share on other sites

u can view ur discovered systems with stations in it all the time in ur galaxy map... so its maybe possible

 

I agree it should be possible but I haven't found the necessary hooks in the documentation. They are incomplete so our only recourse is to look through the game scripts. A much slower approach.

 

Creators are aware that it is lacking: See this thread. So if we are lucky we will see it in a near future update.

 

Link to comment
Share on other sites

... I am also unclear how to save that data to persist between sessions.

 

This is where I got stuck... I'm trying to make a mod that records what goods are for sale/purchase in each sector the player enters. But... I couldn't see if I could save data to the players inner db, or whatever.

 

I did try lua's command:

function makeFiles()
    os.execute( "mkdir season\\week1" )
    newFile = io.open( "season\\week1\\game.txt", "w+" )
    newFile:write( funcThatReturnsAString() )
    newFile:close()
end

 

and it creates a folder in the base game data folder (or somewhere close - can't recall) but it opens a little console window and minimizes the game. That's as far as I got.

Link to comment
Share on other sites

  • 3 weeks later...

Using git-bash or cygwin under windows, or under any *nix system you can use this workaround until it's possible to mod this:

 

1. Switch to the directory for your galaxy:

cd ~/AppData/Roaming/Avorion/galaxies/defaultgalaxy/sectors

 

2. Search for "Robot" in station/goods name:

find . -name "*v" | xargs grep "Robot"

 

3. Output:

./222_-79v:                     <arg key="plural">Mining Robots</arg>
./222_-79v:                     <arg key="good">Mining Robot</arg>
./222_-79v:                     <arg key="prefix">Mining Robot /* prefix */</arg>
./356_-36v:                     <arg key="good">War Robot</arg>
./356_-36v:                     <arg key="plural">War Robots</arg>
./356_-36v:                     <arg key="prefix">War Robot /* prefix */</arg>
./428_-44v:                     <arg key="prefix">Mining Robot /* prefix */</arg>
./428_-44v:                     <arg key="plural">Mining Robots</arg>
./428_-44v:                     <arg key="good">Mining Robot</arg>

 

It is a bit verbose and you have to consider the context of the results (might be a station name or just a type of goods that is sold). Coords are inside the file name to the left. Have fun :)

 

Download links:

  * Git for windows (including git-bash) https://git-for-windows.github.io/

  * Cygwin https://cygwin.com/install.html

 

Link to comment
Share on other sites

... I am also unclear how to save that data to persist between sessions.

 

This is where I got stuck... I'm trying to make a mod that records what goods are for sale/purchase in each sector the player enters. But... I couldn't see if I could save data to the players inner db, or whatever.

 

...

 

You could try the secure() and restore() functions of entity scripts (like described here in the wiki), they seem to be the built-in hooks for easy persistence...

Link to comment
Share on other sites

That looks very promising!

Too bad it's such a big toll on performance in this state, even when the galaxy map becomes more of use an in-game command specifically for finding stations can never hurt in a game that's already a lot less tedious due to the hard work of the modding developers :)

 

I am more than willing to try it out on our server once it becomes usable so I'll be looking forward to that!

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...