Kuribo64
Views: 20,068,957 Home | Forums | Uploader | Wiki | Object databases | IRC
Rules/FAQ | Memberlist | Calendar | Stats | Online users | Last posts | Search
04-27-24 01:21 PM
Guest:

0 users reading Collision, Gravity and Camera controllers | 1 bot

Main - Archived forums - General SMG hacking - Collision, Gravity and Camera controllers Hide post layouts | New reply


Bluma
Posted on 07-06-13 03:25 PM (rev. 5 of 07-06-13 03:53 PM) Link | #27303
I've always been interested in this type of stuff, modifying games to be different and such.

Lately I've been experimenting with Wii Games, namely Super Mario Galaxy 2.

I've tried importing models from games such as The Wind Waker, Twilight Princess, Super Mario Sunshine, Double Dash, Mario Kart Wii and Super Mario 64, as well as custom models I've created. Whether the model is imported directly from another game or is ripped from another and converted to the proper format is not really an issue, it's just about everything else.

First thing I noticed, would be the cameras. They get stuck just about everywhere, around corners, on objects, inside of walls, the only way to free them would be to press the D-Pad rapidly until they come free. Their movement is also very choppy. I've only managed to activate other camera systems via area trigger, but nothing useful.

The second issue would be gravity. Pretty much the only thing I've gotten to work would be the standard, gravity only goes one way, gravity box. The rest are a total blank, I've found no way to get spheres, twists, or other similar instances working when working with gravity. While I can guess what each gravity object does judging by it's name, there's no visual aid or clear way to know just where it will effect and how it will work.

I'd like to know first, does anybody know how cameras work? Is there just a free-form camera that follows your movements smoothly and adjusts as you do? Then I'd like to know: What is known about gravity? How big is each one? Is there any way to determine it's size?

I see hacks like Super Mario Galaxy 2.5, for example. Their concept art and models appear as if in certain areas they'll need non-standard gravity and cameras working in certain ways. I assume that this means that subjects are fully understood, correct? So where's the information? What is known, and how is it done?

EDIT


Also, what is known about collision values, such as bouncy/grassy/harmful surfaces? Could someone possibly give me a reference list of known values?

Marionumber1
Posted on 07-06-13 04:16 PM Link | #27305
For your first issue, there's a collision flag called camera_through that allows the camera to go through models. This flag can be set in the collision tools by checking the box for it.

These are the collision flags for surfaces (known as Floor_code in the collision tools):


00(00) normal ground
01(01) instant death
02(02) slippery (on slopes)
03(03) can't slip
04(04) get knocked over
05(05) ice (non reflective)
06(06) bouncy
07(07) more bouncy
08(08) even more bouncy
09(09) sand slide
0A(10) lava
0B(11) bouncy again?
0C(12) normal?
0D(13) sand (footprints)
0E(14) reflective
0F(15) electrical
10(16) bubble transport?
11(17) sinking sand
12(18) hurt sand water?
13(19) slippery sliding
14(20) waist deep water
15(21) knee deep water
16(22) ankle deep water
17(23) heel deep water
18(24) spikes
19(25) quick sinking sand
1A(26) snow
1B(27) moving sand
1C(28) squizzard's sand pit
1D(29) moving blocks
1E(30) sand (no footprints)
1F(31) sinking swamp
20(32) mud
21(33) ice (reflective)
22(34) bouncy again?
23(35) normal?
24(36) metal
25(37) grass
26(38) cloud
27(39) platform moving around cylindrical planetoid
28(40) boulder boosting ramp
29(41) player disintegrates
2A(42) footprints and dust trail
2B(43) snow (can't slip)

this list was made by wiiztec (http://wiird.l0nk.org/forum/index.php/topic,5791.msg51067.html#msg51067)

The collision flags for walls (the flag is known as Wall_code) are 0 for Wall-Jumpable and 1 for Non Wall-Jumpable.

As for gravity, I don't know much about this. A level creator could give you more information, like shibboleet.

Bluma
Posted on 07-06-13 04:25 PM (rev. 2 of 07-06-13 04:29 PM) Link | #27306
Posted by Marionumber1
For your first issue, there's a collision flag called camera_through that allows the camera to go through models. This flag can be set in the collision tools by checking the box for it.

These are the collision flags for surfaces (known as Floor_code in the collision tools):


00(00) normal ground
01(01) instant death
02(02) slippery (on slopes)
03(03) can't slip
04(04) get knocked over
05(05) ice (non reflective)
06(06) bouncy
07(07) more bouncy
08(08) even more bouncy
09(09) sand slide
0A(10) lava
0B(11) bouncy again?
0C(12) normal?
0D(13) sand (footprints)
0E(14) reflective
0F(15) electrical
10(16) bubble transport?
11(17) sinking sand
12(18) hurt sand water?
13(19) slippery sliding
14(20) waist deep water
15(21) knee deep water
16(22) ankle deep water
17(23) heel deep water
18(24) spikes
19(25) quick sinking sand
1A(26) snow
1B(27) moving sand
1C(28) squizzard's sand pit
1D(29) moving blocks
1E(30) sand (no footprints)
1F(31) sinking swamp
20(32) mud
21(33) ice (reflective)
22(34) bouncy again?
23(35) normal?
24(36) metal
25(37) grass
26(38) cloud
27(39) platform moving around cylindrical planetoid
28(40) boulder boosting ramp
29(41) player disintegrates
2A(42) footprints and dust trail
2B(43) snow (can't slip)

this list was made by wiiztec (http://wiird.l0nk.org/forum/index.php/topic,5791.msg51067.html#msg51067)

The collision flags for walls (the flag is known as Wall_code) are 0 for Wall-Jumpable and 1 for Non Wall-Jumpable.

As for gravity, I don't know much about this. A level creator could give you more information, like shibboleet.


Thank-you for the information!

Yes, I'm already aware of camera_through. The problem here is that I don't want the camera to clip through my model, it just doesn't look good.

Does the game not contain a standard follow-me camera system?

About the walls: I'm pretty sure I already had it set to 0, but wall jump was not working. Are you sure it's not the other way around? I can't check my PA files because the BSCV editor will not read it.

If 'MrRean' is anywhere around here, feel free to post then.

Marionumber1
Posted on 07-06-13 04:32 PM Link | #27308
The game contains many types of cameras, including the one you mentioned. MrRean is also good with them.

I'm sure that 0 makes the models Wall-Jumpable, because that's what I've used for Wall_code in all the models I imported, and you can wall jump.

I'm surprised to hear that the BCSV Editor can't read the PA files you made. I'm the author of the BCSV Editor, so could you please give me the PA file so I can see why it's not being read?

Bluma
Posted on 07-06-13 04:42 PM (rev. 2 of 07-06-13 04:43 PM) Link | #27309
Posted by Marionumber1
The game contains many types of cameras, including the one you mentioned. MrRean is also good with them.

I'm sure that 0 makes the models Wall-Jumpable, because that's what I've used for Wall_code in all the models I imported, and you can wall jump.

I'm surprised to hear that the BCSV Editor can't read the PA files you made. I'm the author of the BCSV Editor, so could you please give me the PA file so I can see why it's not being read?


Sure, here it is:

https://kuribo64.net/get.php?id=z534uFTxwhg3tIQe

That's actually a zip file, for some reason it kept removing the file extension, so just add a .zip to the end.

Please let me know what may be wrong with it.

Marionumber1
Posted on 07-06-13 04:44 PM Link | #27310
The collision opens fine in the BCSV Editor for me. What specific error do you get, and which version of the BCSV Editor are you using?

Bluma
Posted on 07-06-13 04:48 PM Link | #27311
Posted by Marionumber1
The collision opens fine in the BCSV Editor for me. What specific error do you get, and which version of the BCSV Editor are you using?


Unhandled exception:


at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode)
at BCSV_Editor.Lookup.Read(String fileName)
at BCSV_Editor.Form1.openToolStripMenuItem_Click(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

It's a version my friend gave me a download to, somewhere at DropBox.com.

Marionumber1
Posted on 07-06-13 04:50 PM Link | #27312
Try this version of the BCSV Editor, and see if it works: https://www.dropbox.com/s/thc3rep4kvj1q32/BCSVE-v0.7.zip

Bluma
Posted on 07-06-13 04:52 PM Link | #27313
Posted by Marionumber1
Try this version of the BCSV Editor, and see if it works: https://www.dropbox.com/s/thc3rep4kvj1q32/BCSVE-v0.7.zip


I get the same error with that version, which appears to be exactly the same version I have judging by the file size.

NWPlayer123
Posted on 07-06-13 04:54 PM (rev. 3 of 07-06-13 04:57 PM) Link | #27314
Oh, well that would be the problem then. Try this
Its an older version, for some reason the newer ones sometimes has problems.


____________________
"I hate playing musical chats" ~ Quote of the month

Marionumber1
Posted on 07-06-13 04:56 PM Link | #27315
Bluma, do you have a lookup.txt file in the same directory as the BCSV Editor? When I removed lookup.txt from the directory that the EXE was in, I got the same error that you did.

Bluma
Posted on 07-06-13 05:01 PM (rev. 6 of 07-06-13 05:09 PM) Link | #27317
-NWPlayer123 - I get the same error in that version.

-Marionumber1 - The lookup.txt is still there.

It can open any file type other than PA files. Trying to trick it by renaming the .pa to .bcsv doesn't work either.

EDIT: Marionumber1, I found the issue. See this line of text in the error:

System.IO.FileNotFoundException: Could not find file 'C:\Documents and Settings\U\SMG\collision-v0.6\lookup.txt'.

---

It tries to look for the lookup.txt within the directory that the PA file is that I'm opening. Copying and pasting the lookup.txt to the same directory as the PA file works.

EDIT2: Alright, now that I can open the PA file, what should I do to change the wall code back to 0?

Marionumber1
Posted on 07-06-13 05:10 PM Link | #27318
It's strange that it would be opening lookup.txt from the same path that your PA file is at. Since you're using Windows XP, it may be a subtle difference in XP's implementation of file I/O. I'll try to look into this.

Bluma
Posted on 07-06-13 05:18 PM Link | #27319
Posted by Marionumber1
It's strange that it would be opening lookup.txt from the same path that your PA file is at. Since you're using Windows XP, it may be a subtle difference in XP's implementation of file I/O. I'll try to look into this.


Well I've had this type of error with things before, I should have realized that was issue.

I'm examining my PA file, and it goes as follows:

Data: FF

Data Shifted: 0

Is that not correct? Wall Jump is still not working.

Marionumber1
Posted on 07-06-13 05:20 PM Link | #27321
I'm not quite sure why wall jumping wouldn't work, but just out of curiosity, are you using the Spin to Fly code? You can't wall jump as Flying Mario.

Bluma
Posted on 07-06-13 05:26 PM Link | #27323
Posted by Marionumber1
I'm not quite sure why wall jumping wouldn't work, but just out of curiosity, are you using the Spin to Fly code? You can't wall jump as Flying Mario.


Argh. Yes I am.

Thank-you for clearing that up for me.

As far as collision goes, I think I'm all set, thank-you.

I'd still like to know about cameras and gravity, so if anybody knows, speak up.

shibboleet
Posted on 07-06-13 05:54 PM Link | #27324
Gravity;
Placed in area where it's going to be activated
X Y Z scale need to be the range of the gravity.


Range; can either replace the X Y and Z scale as a whole new area for the gravity to be used.

Distance; Somewhat related to Range. Leave at 0.

Priority; Points in a direction of not given a dir rotation.

Inverse; Keep at FFFFFFFF value or in Whitehole, -1

Power and Type; Normal

And edit the X rotation, y rotation and Z rotation to rotate in the preferred spot to use it. (90 X for left, -90 X for right, etc)

____________________
a

Bluma
Posted on 07-07-13 10:35 PM (rev. 2 of 07-07-13 10:43 PM) Link | #27457
Posted by Luigi
Gravity;
Placed in area where it's going to be activated
X Y Z scale need to be the range of the gravity.


Range; can either replace the X Y and Z scale as a whole new area for the gravity to be used.

Distance; Somewhat related to Range. Leave at 0.

Priority; Points in a direction of not given a dir rotation.

Inverse; Keep at FFFFFFFF value or in Whitehole, -1

Power and Type; Normal

And edit the X rotation, y rotation and Z rotation to rotate in the preferred spot to use it. (90 X for left, -90 X for right, etc)


Thanks a ton, I've managed to get a spiral shaped planet working without any issues.

---

Now about the cameras:

After several memory dumps and debugging with Dolphin, I've learned quite a few things about how the cameras work in this game.

I wrote a script which scans through each of the level files and copies each unique camera type, placing them in a level split into 64x64 blocks, using an area trigger to activate each. None of them are capable of performing in ways such as Super Mario 64 or Sunshine, where the transition is both automatic and smooth, not being limited to only user input or pre-existing camera systems.

If it's alright with everyone else, I'm going to make a new board in the appropriate section for this particular subject regarding the thought in my mind.

This can be locked is that's alright.


Main - Archived forums - General SMG hacking - Collision, Gravity and Camera controllers Hide post layouts | New reply

Page rendered in 0.032 seconds. (2048KB of memory used)
MySQL - queries: 30, rows: 232/232, time: 0.010 seconds.
[powered by Acmlm] Acmlmboard 2.064 (2018-07-20)
© 2005-2008 Acmlm, Xkeeper, blackhole89 et al.