New Music

impaktor
Posts: 749
Joined: Fri Dec 20, 2013 9:54 am
Location: Tellus
Contact:

Re: New Music

Post by impaktor » Sat Aug 18, 2018 7:38 pm

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.

WKFO
Posts: 100
Joined: Wed Jun 14, 2017 12:37 pm
Location: Turkey
Contact:

Re: New Music

Post by WKFO » Sun Aug 19, 2018 12:27 pm

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.

impaktor
Posts: 749
Joined: Fri Dec 20, 2013 9:54 am
Location: Tellus
Contact:

Re: New Music

Post by impaktor » Sun Aug 19, 2018 5:52 pm

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.

WKFO
Posts: 100
Joined: Wed Jun 14, 2017 12:37 pm
Location: Turkey
Contact:

Re: New Music

Post by WKFO » Sun Aug 19, 2018 6:20 pm

Yeah, I found a way to make it work.
I sometimes forget we have a codedoc. I even had it bookmarked.

WKFO
Posts: 100
Joined: Wed Jun 14, 2017 12:37 pm
Location: Turkey
Contact:

Re: New Music

Post by WKFO » Mon Oct 29, 2018 12:37 pm

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.

nozmajner
Posts: 936
Joined: Mon Jul 01, 2013 3:25 pm
Location: Budapest HU

Re: New Music

Post by nozmajner » Mon Oct 29, 2018 4:10 pm

I like them. They kinda have a Final Fantasy 7 slash Star Control vibe.

FluffyFreak
Posts: 1235
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: New Music

Post by FluffyFreak » Wed Oct 31, 2018 1:28 pm

impaktor, if somethings not in the documentation then that usually just means that the documentation is out of date!

Spiffor
Posts: 36
Joined: Tue Aug 07, 2018 9:13 pm

Re: New Music

Post by Spiffor » Sun Nov 04, 2018 4:28 pm

I like it, especially the standoff.ogg. Thanks! :+1:

WKFO
Posts: 100
Joined: Wed Jun 14, 2017 12:37 pm
Location: Turkey
Contact:

Re: New Music

Post by WKFO » Sun Nov 04, 2018 7:54 pm

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.

nozmajner
Posts: 936
Joined: Mon Jul 01, 2013 3:25 pm
Location: Budapest HU

Re: New Music

Post by nozmajner » Sun Nov 04, 2018 8:44 pm


Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest