Page 5 of 6

Re: New Music

Posted: Sat Aug 18, 2018 7:38 pm
by impaktor
500-700 ly are mixed. everything above 700 ly is unexplored. (shift + arrow = fast scroll in sector view map)

We (I?) have talked about reducing this quite a bit. But then ships need to not be able to jump very long distances as now (i think?).

Either way, don't hard-code 500ly, instead use the "explored" attribute.
https://pioneerspacesim.net/codedoc/fil ... m.explored

If you have some minimum not-working exampel that would help. Like some lines with variables you want to fetch, that crashes for you, that you could post. Or variables you want to convert.

The smaller and clearer the example, the easier / faster someone can help.

Disclaimer: i've never even opened any of the code that controls audio, so you probably know more than me. Plus I'm shit at coding, but I assume what you want to do is already done somewhere else (e.g. docking music close to docking stations), so should be code to copy-modify-paste.

Re: New Music

Posted: Sun Aug 19, 2018 12:27 pm
by WKFO
Thanks, but I don't think this is a very good idea since systems get explored once you enter them; doesn't that tick the "explored" flag?
I have a minimum absolutely-not-working exampel.

We have this function thing in the hyperjump planner module that can give the distance between two systems, but I don't know how I should implement it to the MusicPlayer:

Code: Select all

-- start and jump variables are type Game.system
local status, distance, fuel, duration = player:GetHyperspaceDetails(start, jump)
I am also unsure if this really gives the player's current system or not:

Code: Select all

local current_system = Game.system
There's also this code:

Code: Select all

Engine.GetSectorMapCurrentSystemPath()
but this is obviously meant for the sector map and I don't know if it is suitable.

Also there's this line of code:

Code: Select all

local distance = Engine.GetSectorMapCenterDistance()
but it crashes Pioneer.

Re: New Music

Posted: Sun Aug 19, 2018 5:52 pm
by impaktor
I am also unsure if this really gives the player's current system or not:

Code: Select all

local current_system = Game.system
It does. Documentation says it's a StarSystem, so it has a "name" attribute:

Code: Select all

Game.system.name
So you can check using the in-game Lua-terminal that it is the current system you're in. Also, the print-function is very useful to debug scripts.
Also there's this line of code:

Code: Select all

local distance = Engine.GetSectorMapCenterDistance()
but it crashes Pioneer.
That's not documented in the API, so I assume it's not meant to be used by scripters. I suspect it only has meaning if the player has the map open, i.e. UI-related, and if they don't then nothing in the map is selected which triggers a crash. But that's just me guessing.

You can check DeliverPackage module, where there's code for getting distance to mission places
Thanks, but I don't think this is a very good idea since systems get explored once you enter them; doesn't that tick the "explored" flag?
Yes, right. I still think it should be parameterized some how, so not hard coded. However, I can't find where in our code we actually set the 700ly range. Should be somewhere in src/galaxy, but I'm not having much luck today it seems.

Re: New Music

Posted: Sun Aug 19, 2018 6:20 pm
by WKFO
Yeah, I found a way to make it work.
I sometimes forget we have a codedoc. I even had it bookmarked.

Re: New Music

Posted: Mon Oct 29, 2018 12:37 pm
by WKFO
https://www.dropbox.com/sh/f6cds7xygr1q ... TBZFa?dl=0

One electronic combat track and one orchestral track for deep space encounters.
Speaking of which...

I think the music should NOT change mood to suspense when a ship is nearby but the player is nearby starport, unless someone is firing.

Re: New Music

Posted: Mon Oct 29, 2018 4:10 pm
by nozmajner
I like them. They kinda have a Final Fantasy 7 slash Star Control vibe.

Re: New Music

Posted: Wed Oct 31, 2018 1:28 pm
by FluffyFreak
impaktor, if somethings not in the documentation then that usually just means that the documentation is out of date!

Re: New Music

Posted: Sun Nov 04, 2018 4:28 pm
by Spiffor
I like it, especially the standoff.ogg. Thanks! :+1:

Re: New Music

Posted: Sun Nov 04, 2018 7:54 pm
by WKFO
Thanks for the feedback.
On the subject of situational music, I can't help but admire some other space games.

X-Wing had situational music for every single event and excellent transitions between them:
https://www.youtube.com/playlist?list=P ... REkomMJSGH

Star Trek Bridge Commander has something I can refer to as "modular soundtrack" which the game can randomly play one after another and it feels like the part of a very long single track:
https://www.youtube.com/watch?v=0OmAtVD ... 804CEC9235

Well, I suppose it is much easier for combat themed games. But still, I find these nice.

Re: New Music

Posted: Sun Nov 04, 2018 8:44 pm
by nozmajner