AotI Offline (Unofficial) Expansion: Despair and Hope

Topics about modding PSU. The home of the offline project.

Re: AotI Offline (Unofficial) Expansion: Despair and Hope

Postby Agrajag » Mon Feb 05, 2018 3:08 am

Alright, coming off of a few weeks of crunch time at work (spoilers: it sucked!)...

I'm looking a bit deeper at the "porting PSP2i monsters" thing. So far:
1. I found a place I can stash all the monster data outside the .exe without requiring a bunch of extra work to make it load and stick around. It's a file that the game loads on startup and keeps around until shutdown. It's not the gigantic NBL that contains everything ever (I'd prefer not to add anything else to that one, if I can--you've that the mission packs are incompatible with any of the other item edits, this is why). It was the swear filter. The game loads that NBL at startup (even offline), stashes it somewhere, and preserves a pointer to it, which is all I need. As long as it doesn't contain the actual swear filter text file, the game will gladly ignore its contents.
2. Spent a bit of time working on the PSP->PSU model converter code. It's still not great (all my PSU work has some really nasty habits in it), but it should work for both monsters and maps now without much manual tweaking. I also fixed the lighting on Sand Rappy. You'll notice in the take 2 video, the Sand Rappies were always fully-lit from all sides; that's been fixed now.

The Sand Rappies did worry me for a bit, though. I fought a few in PSP2i and saw that they always peck 4 times (and then backflip 3 times), but they weren't doing that in PSU... turns out they only do it at low HP and I'd hurt them a fair amount on PSP2i trying to get rid of the other enemies that were with them, oops.

Bonus screenshots:
Sand Rappies just doin' Rappy things
Helga's arena from PSP1, properly ported (this one is cool)
User avatar
Agrajag
 
Posts: 885
Joined: Thu Feb 16, 2012 12:24 am

Re: AotI Offline (Unofficial) Expansion: Despair and Hope

Postby shade » Mon Feb 05, 2018 4:00 pm

Agrajag wrote:New maps, taken from Sonic Adventure (Dreamcast version).

Do you think it'll be possible to import maps from PSO v2 DC ? Or PSO Ep.I&II (Plus) GC ? Or PSOBB ?
I don't know how differents are file formats compared the one used in PSU...
(I just though about it now, and a quick research on google pointed me out this)

Agrajag wrote:I found a place I can stash all the monster data outside the .exe without requiring a bunch of extra work to make it load and stick around. [...] It was the swear filter.
It's truly brilliant.

And about the PSP->PSU model converter, does it work with bosses ?
shade
 
Posts: 124
Joined: Fri Feb 01, 2013 12:30 am

Re: AotI Offline (Unofficial) Expansion: Despair and Hope

Postby Agrajag » Tue Feb 06, 2018 12:28 am

shade wrote:
Agrajag wrote:New maps, taken from Sonic Adventure (Dreamcast version).

Do you think it'll be possible to import maps from PSO v2 DC ? Or PSO Ep.I&II (Plus) GC ? Or PSOBB ?
I don't know how differents are file formats compared the one used in PSU...
(I just though about it now, and a quick research on google pointed me out this)?

This is on the list of "things to investigate". Right now, with nothing special, you could probably use DXRipper (or whatever equivalent) to rip out the PSO models, then import the resulting model to PSU, but that's going to lose animations, material data, etc. At some point, I'll have to look how difficult it'd be to pull data from it directly in (same with PSO2).

shade wrote:And about the PSP->PSU model converter, does it work with bosses ?

I have not tried it on bosses.

To answer what I think you're actually asking, PSP2/i-exclusive bosses are not getting ported over. Not only are they an entire order of magnitude more complicated than anything I've done so far, they're also almost entirely directly controlled by the game's .exe.

The .exe that's x86 on PC and MIPS on PSP.

If someone who knows what they're doing is interested in trying, I can forward all the information I have to them, as I'd love to be wrong. As it is, scriptkiddie (who's generally a lot better than me at this) and I both agree that it's almost certainly not happening.

(Bil De Golus may or may not be possible in some capacity since it's a De Ragan reskin at heart. It may be "Bil De Golus ported completely", "Bil De Golus, but with certain attacks missing", or "De Ragan, but it looks like Bil De Golus", or it may be too complicated to do anything at all.)
User avatar
Agrajag
 
Posts: 885
Joined: Thu Feb 16, 2012 12:24 am

Re: AotI Offline (Unofficial) Expansion: Despair and Hope

Postby Agrajag » Mon Feb 19, 2018 5:04 am

Okay, spent a bit more time on the whole "port maps from the PSP games" thing.

On the plus side, I mostly got Dios' arena ported over (the glowing parts are missing, but those are set objects, anyway--they exist in the map NBL, they're just not placed yet).

On the minus side, having it lit properly causes character shadows to not work in it, and that bothers me to an irrational level.

On the "why is this even a thing" side, it turns out that quite a few map animations will misbehave badly if you load the map over Clyez 1F. It seems to be related to the giant rotating background pieces; certain model parts will start moving unexpectedly, some other parts that should be moving will stay still (this will, of course, not affect whether the game decides a model is onscreen or offscreen, so your not-moving-but-should-be pieces will disappear as soon as they'd leave the screen, while the moving-but-shouldn't-be pieces will only be visible as long as you're looking at where they started out). This may have caused a minor panic that I'd horribly broken things on the import, until I noticed that the PSU Falz 2 arena also didn't work right...

Screenshots:
Dios Arena (proper lighting but no forcefields) (notice the missing shadow...), with forcefields placed wrong, low health forcefields placed wrong
PSP2 online lobby
User avatar
Agrajag
 
Posts: 885
Joined: Thu Feb 16, 2012 12:24 am

Re: AotI Offline (Unofficial) Expansion: Despair and Hope

Postby LightDark » Wed Feb 28, 2018 4:45 am

For the emeralds in the Speed Highway mission, is it possible to shuffle and put them at different locations every time the mission loaded (like monster spawns do)? Or is it not possible to do?

I don't think there are any existing missions that do that so going by that, the answer would seem to be no.
User avatar
LightDark
 
Posts: 173
Joined: Thu Feb 16, 2012 10:03 am

Re: AotI Offline (Unofficial) Expansion: Despair and Hope

Postby Agrajag » Thu Mar 01, 2018 4:32 am

A couple of missions randomize collectables, not many. The main one that comes to mind is Ark to the Future, where each path has a chip you want to collect, and that chip can appear in one of four locations each run (usually all four places are within 20 feet of one another, so it's mainly just kinda silly). Unfortunately, it uses the built-in set randomizer to determine which position to place it in, and I'm already using that to determine which monsters to spawn.

I could have manually shuffled them in the script, but there were only 2-3 other locations that I considered putting them (the rule I followed was "don't force people to run both paths", so pretty much the only places they could be were the starting cobblestone area up to the split, the area around the clock, the fountain/bell area, and the shortcut back to the starting area), so I didn't really try to pursue that. Trying to write a proper shuffle in the script was liable to be irritating, anyway.

Maybe in v2, if I ever make one. I would like to make it online-friendly at some point.
User avatar
Agrajag
 
Posts: 885
Joined: Thu Feb 16, 2012 12:24 am

Re: AotI Offline (Unofficial) Expansion: Despair and Hope

Postby Agrajag » Mon May 14, 2018 4:01 am

So, past few months sorta sucked (January was bad because of work, then like 2-3 months of illness).

Spent the past couple weeks tracking down more stuff for model importing (I now actually understand the material data! big day). Got so close to tracking down how the game does reflections (like in PSO!), and then it turned out that it doesn't actually because the component that would use the reflection data doesn't exist. Oops.

I also spent some time trying to make the game do proper lighting! That was rather interesting. PSU runs on Direct3D 9 (fixed pipeline, it appears), so in theory, it supports these three types of lights. The game only actually uses the following:
2 directional lights for players
1 ambient light for players (and environments--I'll revisit this one)
2 directional lights for monsters
1 ambient light for monsters
Ambient light can be provided by any light type--you define the light directly generated by the light source, and then you define ambient light associated with it ("by having this light source present, every object receives this amount of light from all angles regardless of where the light source is"). The two ambient lights are actually created as directional lights.

You may have noticed that certain areas will have different lighting from other areas, despite being in the same map. This is done by changing the intensity of the first player directional light every frame based on the intensity associated with the current triangle the player character is standing on (based on a point in between its feet). Despite there being data that looks like it should do the same for the other player lights, that functionality does not actually exist.

Now, thanks to some help from Cydrith over on the Clementine side, I managed to find out where the game actually creates its light objects. This is done via a call to Direct3D's SetLight function, passing in a D3DLIGHT9 structure, replicated below:
typedef struct D3DLIGHT9 {
D3DLIGHTTYPE Type;
D3DCOLORVALUE Diffuse;
D3DCOLORVALUE Specular;
D3DCOLORVALUE Ambient;
D3DVECTOR Position;
D3DVECTOR Direction;
float Range;
float Falloff;
float Attenuation0;
float Attenuation1;
float Attenuation2;
float Theta;
float Phi;
} D3DLIGHT9, *LPD3DLIGHT;


Now, if you look at the docs, for directional lights (as mentioned before, PSU only uses directional lights), only the Diffuse/Specular/Ambient and Direction values are used.

...However, the other fields are populated. I haven't really tracked down where they're defined, but if you define a point light, the game will make sure it stays in the same position it started, even with the game world moving around. Of course, the game's got the light type hardcoded across the board, so it's mainly just a curiosity.

NOTE: These two things actually are available but (as far as I know) largely unused:
1. Specular highlights. As far as I can tell, these are never used because they're disabled two different places in the model file, but you can still make them work. Uncertain: specular map textures. One of the texture modes appears to take the current specular value as input, but I haven't investigated it too deeply.
2. A whole pile of (as far as I can tell) unused texture modes. The game lets you change the magnification/minification (read: zoom in/zoom out) filters, the filter used for going between mipmaps, and the color operation/alpha operation (this affects how the texture interacts with other textures on the same faces, as well as how they interact with lighting or vertex coloring).

So, long story short, mostly disappointments all around. Oh well.
User avatar
Agrajag
 
Posts: 885
Joined: Thu Feb 16, 2012 12:24 am

Re: AotI Offline (Unofficial) Expansion: Despair and Hope

Postby ninjadejedi » Wed May 16, 2018 10:31 pm

Thank you for your dedication and hard work.
ninjadejedi
 
Posts: 9
Joined: Thu Jul 25, 2013 4:44 pm

Re: AotI Offline (Unofficial) Expansion: Despair and Hope

Postby Shadowth117 » Wed Jul 11, 2018 10:19 pm

Wow, with school and everything I guess I forgot to keep checking back on progress here, but I see you've gotten a Speed Highway port of all things done and a whole bunch of other crazy things in the works. Do you have a Github link or anything for the tools you've been working on?

Either way, even if it was late, you've probably given Sonic a far better event than he's been given in any incarnation of PS and all of the work porting the Portable game stuff is a real sight to see as well, particularly working enemies from it. Honestly though, this all looks incredible. Lots of respect for continuing with this project for so long and going so far with it.


Also, pretty late, I know, but in case you haven't checked into PSO2 models, I've uploaded most of the tools I have for the game here: http://www.mediafire.com/folder/i5rgbc5ypzm1b/Tools
The source code should be provided with most of those tools. Textures are all dds so they're easy.

As for extracting, while some of the game's archives are incompatible with it, the easiest way to extract them is with Deicer with the aqp -> aqo option checked. Repacker's extractor can get the few files this doesn't cover which you can fix for NIFL tool by chopping off the initial 0x3C worth of bytes and renaming to aqo.
Most models will need to be converted with the "NIFL tool" ,as it's known, because the format was altered for most models in the game. Vertex colors aren't intact, but we currently don't have any tool that retains or retained them. Also note that unfortunately, this tool does not retain texture assignments, imports at 1/100th scale, y-z flipped, and with UVs vertically flipped. To extract, you''ll want to put the tool and model in a directory without spaces, then drag the model onto OBJ形式に変換.bat. This tool sometimes refuses to work on certain systems for one reason or another though unfortunately.
Notably, the noesis plugin can extract select old models with bones and rigging, but has a very high error chance.
Models for level geometry are stored in TRP/TRO files. These are functionally identical to AQP/AQO in layout and can be extracted the same way.
Shadowth117
 
Posts: 12
Joined: Mon Jan 28, 2013 11:49 pm

Re: AotI Offline (Unofficial) Expansion: Despair and Hope

Postby Necman » Mon Aug 20, 2018 12:56 am

Very interesting stuff about the lighting. I read it many times but I only came up with it being a bust. Is this so? I was just wondering if there were any other side projects of interest as well!

I was also wondering when you started working on this project. I know you posted Despair and Hope in April 2012 and joined months before. I never played the story missions until I played offline with your mission packs. It took me till today to find out that is also the mission name for episode 3 story mission 1. I just thought an annual celebration for Despair and Hope's birthday would be nice unless it's become a pain in your backside. Either way thanks for listening or (reading) my crazy thoughts.
Necman
 
Posts: 20
Joined: Tue Mar 31, 2015 3:26 pm

PreviousNext

Return to PSU Modding

Who is online

Users browsing this forum: No registered users and 6 guests

cron