Views: 22,896,614 |
Home
| Forums
| Uploader
| Wiki
| Object databases
| IRC
Rules/FAQ | Memberlist | Calendar | Stats | Online users | Last posts | Search |
10-07-24 10:19 AM |
Guest: |
0 users reading CLPS Exposed! | 1 bot |
Main - General SM64DS hacking - CLPS Exposed! | Hide post layouts | New reply |
mibts |
| ||
Panser =Josh65536 (Programmer) Level: 39 Posts: 192/331 EXP: 383448 Next: 21323 Since: 08-31-13 Last post: 2112 days ago Last view: 89 days ago |
The CLPS is not an array of 8 bytes. It is a giant bitfield that just happens to be 64 bits long. A proper backronym for CLPS would be CoLlision Parameter Structure.
Here are the bits in order from bit 63 to bit 0. QQQQQQQQQQQQQQQQQQQQQQQQWWWWWWWWPPPPUXZBBBBBCCCCFFFVVVVVVATTTTT
(The numbers below will be in decimal) T = Texture.
A = Water This is a boolean indicating whether the surface defines a water plane. V = View ID This indexes the view that the surface should have. If the View ID is 63, it does not have a view attached to it. F = Traction
C = Camera Behavior
B = Behavior
Z = Transparent to Camera Whether the camera can go through it. X = Toxic Like the Water parameter, but this one defines a toxic barrier. U = Camera Wall Whether actors other than the camera can pass through it. P = Padding W = Wind Path ID Links the surface to a 2-point path defining a vector which says which direction the wind blows. Parameter 4 for the path is either 0, 1, 2, or 3. This could define a breeze, a water current, or a quicksand pulling direction. Q = Padding And here is a picture of a CLPS editor for Whomp's Fortress and that shows the proper way to break up the CLPS: Answer to Hiccup's question: Whoops, I meant to press "edit", and I can't post again until an hour passes. You'd have to unfortunately write out all the bits, convert to hexadecimal, and write the bytes in the CLPS editor in order from least to most significant. Where it says "zoom", I meant "transparent to camera". ____________________ Current hack: Excerpt from Super Mario 256 |
Arisotura |
| ||
Star Mario in this room you have a pile of apple pies Level: 164 Posts: 7173/9039 EXP: 57516422 Next: 185968 Since: 07-03-12 From: in a box Last post: 6 days ago Last view: 25 min. ago |
Hiccup |
| ||
Normal user Level: 58 Posts: 737/815 EXP: 1545784 Next: 31762 Since: 09-06-12 Last post: 1855 days ago Last view: 211 days ago |
How would one use this info with the current CLPS dialog box? |
mibts |
|
Fiachra |
| ||
Local moderator Level: 65 Posts: 1001/1065 EXP: 2282670 Next: 52958 Since: 12-15-12 From: Ireland Last post: 2325 days ago Last view: 274 days ago |
This is very useful. Do you have this integrated already with SM64DSe? If so you could open a pull request to the SM64DSe github repo, otherwise I will implement myself it in the next few weeks. |
Hiccup |
|
mibts |
| ||
Panser =Josh65536 (Programmer) Level: 39 Posts: 204/331 EXP: 383448 Next: 21323 Since: 08-31-13 Last post: 2112 days ago Last view: 89 days ago |
I have it integrated. I'd have to extract it from the million changes I've made to my version of SM64DSe, though. ____________________ Current hack: Excerpt from Super Mario 256 |
Fiachra |
| ||
Local moderator Level: 65 Posts: 1005/1065 EXP: 2282670 Next: 52958 Since: 12-15-12 From: Ireland Last post: 2325 days ago Last view: 274 days ago |
Are they changes that could be useful to others? If so it would be nice to have them. |
mibts |
| ||
Panser =Josh65536 (Programmer) Level: 39 Posts: 208/331 EXP: 383448 Next: 21323 Since: 08-31-13 Last post: 2112 days ago Last view: 89 days ago |
Some yes, some no.
Here's the list of changes I've made:
____________________ Current hack: Excerpt from Super Mario 256 |
Anthe |
| ||
Member I have found a basket to put in my SD card reader so I never lose it Level: 66 Posts: 1032/1099 EXP: 2425905 Next: 35946 Since: 08-17-12 From: Belgium Last post: 933 days ago Last view: 523 days ago |
Dear, that'd be quite the pull request. I'm amazed by your competences! ____________________ |
Fiachra |
| ||
Local moderator Level: 65 Posts: 1009/1065 EXP: 2282670 Next: 52958 Since: 12-15-12 From: Ireland Last post: 2325 days ago Last view: 274 days ago |
mints:
Could you please provide more detail about the following: - "Code compiler that takes an ASMPatchTemplate ...", "Dynamic overlay support ..." - What does this do and how does it work? - "A template for adding a new platform to the game" - Is this code to modify an existing object or something else? - "Overlay compiler for levels" - What is this? Out of the remaining items I would only exclude: - "Updated object renderer paths ..." - "Support for adding, removing and renaming files and directories" (until fully working) |
mibts |
| ||
Panser =Josh65536 (Programmer) Level: 39 Posts: 209/331 EXP: 383448 Next: 21323 Since: 08-31-13 Last post: 2112 days ago Last view: 89 days ago |
I got tired of NSMBe's heap-sucking patch template, so I transferred the code to SM64DSe and made a function that creates overlays for levels so the heap doesn't get used when it doesn't need to be used. For example, Blocky Block Land (displayed in "Launch Stars (and Totally Not Breaking the Game's Code)") doesn't use any objects from Bob-Omb Battlefield, but it has its own objects, and the overlay compiler for levels compiles the code for that.
A dynamic overlay is a type of file that I invented for Excerpt from Super Mario 256. For each level, a list of overlay 0 file IDs for each dynamic overlay is stored. When the level loads, they are loaded, and the pointers are fixed. This way, an object can be put in any level regardless of the bank settings. The new platform template does just that: add a new platform to the game. More specifically, you give it a name, show where the model and collision files are in the ROM, give it a description for documentation, say what object and actor ID it gets (and some more behavior-related stuff) and it generates ASMPatchTemplate/source/ ____________________ Current hack: Excerpt from Super Mario 256 |
Fiachra |
| ||
Local moderator Level: 65 Posts: 1010/1065 EXP: 2282670 Next: 52958 Since: 12-15-12 From: Ireland Last post: 2325 days ago Last view: 274 days ago |
Sounds like it could be very useful, I have a few questions:
1. Is it possible to use a custom object in multiple levels and if so how is this done? Is it a manual step or is based on something defined in the code eg. the way hook addresses come from function names? 2. Is it still possible to patch arm9 code? 3. What if I want to patch a non-level overlay eg. character control in overlay 2? 4. Would the existing ASM hacking template work without modification? |
mibts |
| ||
Panser =Josh65536 (Programmer) Level: 39 Posts: 210/331 EXP: 383448 Next: 21323 Since: 08-31-13 Last post: 2112 days ago Last view: 89 days ago |
1. Compile it as a dynamic overlay, put it into the ROM, look at the Ov0ID (displayed at the bottom on my version of SM64DSe) of the file, and hex edit the level overlays to add it to the list of dynamic overlays for the levels.
2. That would require NSMBe, and I haven't tested that yet. 3. The function that makes level overlays completely overrides the level overlays, so probably not, unless you want to decompile the entire overlay (it's big). 4. No. Each object (or level) should have its files in its own folder in the source folder, and the makefile source needs to be edited accordingly. Also, the function list and SM64DSe.h file are wildly different. ____________________ Current hack: Excerpt from Super Mario 256 |
Fiachra |
| ||
Local moderator Level: 65 Posts: 1013/1065 EXP: 2282670 Next: 52958 Since: 12-15-12 From: Ireland Last post: 2325 days ago Last view: 274 days ago |
OK, thanks. It would be a good feature to have, would you mind opening a pull request for this and the other features? |
mibts |
| ||
Panser =Josh65536 (Programmer) Level: 39 Posts: 212/331 EXP: 383448 Next: 21323 Since: 08-31-13 Last post: 2112 days ago Last view: 89 days ago |
After finishing the level I'm making. ____________________ Current hack: Excerpt from Super Mario 256 |
FallenLogic |
| ||
Newcomer Button Enthusiast Level: 7 Posts: 1/9 EXP: 1074 Next: 374 Since: 06-08-20 Last post: 1547 days ago Last view: 1546 days ago |
Hey, sorry for bumping such an old thread, but changing the bit marked "Unknown 26" affects the solidity of surfaces (tested in the editor on an unslippable rocky surface with normal camera). 1 makes it non-solid, 0 leaves it as is, so it seems to be a boolean. This is further backed up by the "window" in the play room (also non-solid) having it set to 1. There is also at least 1 CLPS entry on the 1st floor that uses it (ostensibly the entrance to the Secret Aquarium), but I didn't check that.
|
Main - General SM64DS hacking - CLPS Exposed! | Hide post layouts | New reply |
Page rendered in 0.042 seconds. (2048KB of memory used) MySQL - queries: 27, rows: 229/229, time: 0.010 seconds. Acmlmboard 2.064 (2018-07-20) © 2005-2008 Acmlm, Xkeeper, blackhole89 et al. |