Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

PSO Concepts


Recommended Posts

I had the pleasure to find out that PSO's music is multi-streamed (the map musics anyhow) and in some cases, split into parts. I'm basically trying to figure out how to have a exploration to battle transition (and vise versa) phase that will connect seamlessly. I did it in construct, but there's half second pause in between is file. I don't know if there's any extension that can read cue files, but I think that would very helpful. I was thinking about an Array or ini list, but I been out of touch with MMF2 and Construct.

Link to comment
Share on other sites

Phantasy Star Online basically had 2 different compositions for each song, with specific transition points for seamless change, and in PSO2 every song is composed in small chunks and layers, and then combined in real-time.

I would guess this requires some kind of pre determined loading into memory for seamless transitioning. I remember trying this a longggg time ago, but since the effect is specific, yeah I'd guess you'd need some sort of extension.

Construct 2 has audio-specific features like "Preload" and "On Preload" which clearly say "ensure immediate playback". So I assume this would be easymode to implement there. It doesn't like MP3s though, nor does it mention .cue files.

Link to comment
Share on other sites

For a seamless sound transition, you could try having each song in a different channel, and when the trigger is activated, gradually silence Ch.1 while raising Ch.2.

As for the cuesheet files, even though they are plaintext... I don't think it's going to be simple to read them in MMF2. I tried checking if there is any extension for that, but the fusionwiki site seems to be down.

Link to comment
Share on other sites

Assuming the tracks are the same length and synched, you could just keep track of the current time of one of them with a dedicated object, and then read that time when you start playing the second track, so you can skip to that time on the second track before the volume is high enough for the player to hear. All this would involve is a very large value in one object, and two audio layers.

EDIT: Oh, and don't reset the value unless one/both of the tracks loop. That way you can switch back, ya' know.

Link to comment
Share on other sites

The problem with that approach is that buffering the music isn't exactly an instantaneous action. I don't know if there is a way to know when the song is actually ready for playback in MMF, but if there is you could basically queue up your transition and then wait for that event to fire before initiating the cross-fade.

It also doesn't touch on how Sereph described how PSO's music works... not that I'm 100% sure how accurate that is from a technical standpoint. I do think he's right though, transitions didn't occur immediately based on events, instead they happened when it was convenient from a musical standpoint. You could possibly map timestamps in a song like that to an array though.

Creating something like this seems like it could be a fun weekend project.

Link to comment
Share on other sites

Yeah, I can see this being somewhat difficult in MMF2. You'll have to do some experiments to find out how it handles audio.

Sena's method is probably the easiest to implement, although i'd personally never rely on it out of some fear of it causing an issue at some later point, idunno. You may be able to bypass the buffering issue by spacing the transitions and retracking the song in a way that gives you enough "slack" to change the volume and have it already playing where you need it.

As for how it technically worked, I'm not sure how PSO did, but PSO2 uses a procedural music system, so transitions always happen instantaneously. It also changes depending on gameplay factors (low health, lots of enemies, ect). I just remember it caused dataminers trouble because there were so many files, and BGM recorders trouble because you could record the song 5 times and get a different composition every time.

http://www.slideshare.net/gamebizjp/sympathy-phantasy-star-online-2-bgm-by In japanese, but the concept really isnt complicated.

I personally think it kills the amount of melody they can effectively use in the music though, so non-boss tracks are pretty unmemorable. And when it glitches it is extremely annoying. But the system has that awesome oldschool "technical Sega" feel to it. Wish the whole game was like that.

Link to comment
Share on other sites

Here's something I cooked up with multiple files.

https://dl.dropbox.com/u/32409323/Examples/PSOSTEST.7z

If drag PSOBB's OGGs into FooBar, you'll see this.

pso_forest_f00.png

Another idea I had was some type of playlist.

The information I got was for the transitions was found here.

http://schtserv.com/forum/viewtopic.php?f=40&t=377

For example:

Forest

-Filename: slbgm_forest

-62 Tracks

-Stream Breakdown:

@#= Transition track plays the following # track.

Exploring 1-25

1=Intro

2-25=Exploring Loop

Transition #26 from 1,2,3,4 and 25 to transition 36

Transition #27 from 5-8 to transition 40

Transition #28 from 9-12 to transition 44

Transition #29 from 13-16 to transition 48

Transition #30 from 17-20 to transition 52

Transition #31 from 21-24 to transition 56

Fighting

32= Fighting Intro (hardly if ever used)

33-56= Fighting Loop

Transition #57 from 32,33,34,35 and 56 to transition 5

Transition #58 from 36-39 to transition 9

Transition #59 from 40-43 to transition 13

Transition #60 from 44-47 to transition 17

Transition #61 from 48-51 to transition 21

Transition #62 from 52-55 to transition 25

There's a guide on making some for PSOBB, here.

http://schtserv.com/forum/viewtopic.php?f=40&t=85419

Link to comment
Share on other sites

Wow...so PSO split its music into chunks the same way?

Never would have guessed. That's an interesting find. If im reading it correctly.

Edit:

That's pretty much it, damn awesome job Asuma. Pauses aside, it works pretty well. Only issue now is a workaround for the buffer pauses.

Also while you can make the switches at pretty much any moment here, in PSOBB the transitions took a bit longer to actually transpire. Could be anything, but a wild guess was it waited to make sure it wouldn't hiccup.

If you could do one for Abysmal Ball it would be so awesome

Link to comment
Share on other sites

Depends, but technically, it is split up. (Maybe DW can move this to the R&D). In the GC version(and I ssume the DC as well). The music is stored in AFS file. In the AFS are the split ADXs files. If I had to guess, for the PC version, Sega had it jump to a position in the song. That or they tapped into the multistream ogg.

Link to comment
Share on other sites

  • 2 weeks later...

So, think I figured out something about the skipping. It seems that the song's samples position is read by 10s in MMF2, so if a section is like 5751, it will skip over it and catch the next "10" 5780. Having a song and skipping to certain sections seems problematic as well and when you want to loop, you'll hear clips and beeps before it jumps to the the start loop position.

Link to comment
Share on other sites

  • 1 month later...

Of course I have an idea.

EDIT: I see you already have something with the audio in it. I'll see if I can't come up with something.

EDIT: I need you to finish the following lists:

PEACE TABLE: -- all first sides are files played that when in peace mode don't simply go to the next file

25 3

27 59

29 61

30 62

31 4

34 4

36 58

40 59

41 59

47 61

48 61

49 61

56 4

58 9

59 13

61 21

62 25

BATTLE TABLE: Same format, but when in battle mode doesn't simply go to the next file

Idea:

Modes shouldn't be handled as transitions, rather each mode should be able to specify tracks which lead somewhere different. At the start we have two arrays, each the length of the total number of song files. By default each value in them is zero which will be ignored. When sweeping through the drop table file these arrays are populated at the position on the left side and set to the position on the right.

When we are in peace mode and we know it's time for a transition, we check our current position against the peace time array and if there is a non-zero value there, you go to that song value.

When we are in war mode, same thing but use the war array

If the array value is zero go on to the next song value instead.

As for the clipping problem, it's tough because events are generally run at a 1/60th of a second clip while music frequencies tend to be much higher. I don't think there is a good event-driven way around it. You'd need to be able to cue music changes to the actual music system and I d'not think MMF2's music control is that advanced.

Link to comment
Share on other sites

Yea. For drop tables, I meant item drops. Something like https://docs.google.com/spreadsheet/ccc?key=0ArvPrrK5KMyvdHduUWxnVWVyZ3VrYjFvenlfLWtFWUE#gid=1'>this

However, I was thinking that maybe some, or all enemies have some type of random pool.

Link to comment
Share on other sites

Uh, I would think that would be kept with a more general data structure containing all of an enemy's statistics.

Like...

Booma (Hard Mode)

HP - int

ATP - int

DEF - int

Thunder Resist - int

Ice Resist - int

Fire Resist - int

status immunity flags - int

Color 1 Drop - string (or an identifier as the case may be)

Color 1 Drop Rate - int/float

Color 2 Drop - string

Color 2 Drop Rate - int/float

Color 3 Drop - string

Color 3 Drop Rate - int/float

Color 4 Drop - string

Color 4 Drop Rate - int/float

...

link you posted is broken btw.

And you can set up something similar for miscellaneous drops that aren't enemy specific. Just a random generator chart similar to what you find in D&D based on treasure grade and such.

Start by picking the treasure type dropped...

Forest (hard mode)

0 - 49 - none

50-90 - low grade

90-98 - middle grade

99 - high grade

low grade

0 - 10 monomate

11 - 20 dimate

21 - 28 monofluid

29 - 34 difluid

...

91 - 100 go to a random weapon generator instead

Middle grade

... ah, you get the idea.

Link you posted was broken btw.

Link to comment
Share on other sites

I guess whenever you kill an enemy, have some function for drops.

First, check which type of box will drop. Meseta, Green, Blue, Orange, Red. I'm guessing the rate for each will depend on both some level constant and a rate specific for each enemy.

Then, after you know which pool type to roll from, run dice rolls for all the items that can drop. I guess you can use DW's system for that. Put all the possible drops on a list, and generate a number. Drop the item that corresponds.

Im sure this is really too simplified.

Edit: reading through, yeah overall i think DW's method works better and with less checks.

Link to comment
Share on other sites

https://docs.google.com/spreadsheet/ccc?key=0ArvPrrK5KMyvdHduUWxnVWVyZ3VrYjFvenlfLWtFWUE#gid=3

This was the link. But yea. I was looking in the data files for the drops and it's something like this for rare drops.

# Booma/Bartle
209
000D01

Values range from 0 to 255. The higher, the more common. 000D01 is ID for The "Silence Claw".

Link to comment
Share on other sites

  • 1 year later...

So, I found this a while back.

https://sites.google.com/site/pso2db/home/drops

 

Made an example of a drop table.

 

=====================================================================

So it seems like it's a table, and I'm wondering if it would be better do this using straight up alternative Values, or using a array for a table. I actually wonder if you can load data from a xml or excel like table.

Edited by Asuma
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...