Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Segstrate

knot126 edited this page Dec 27, 2023 · 12 revisions

Warning

Segstrate has been completely deprecated and will be removed by releases after 2024-01-01 and will be removed from the UI before then.

show old page

Warning

Initialising Segstrate in auto mode is no longer available in new versions of Shatter since the static mode is much more effective. You can keep using Segstrate in static mode since only auto mode is effected by this deprecation. Additionally, you will still be able to export to older Segstrate-protected APKs in auto mode.

Segstrate is a basic form of DRM that prevents segments simply being copied and pasted into mods other than the one they were created under. It does not provide advanced protection and will not stop someone who is very determined.

Notice

When you use Segstrate on an APK, it is locked in that state. You are meant to make a copy of the APK for your mod, and then lock this copy and distribute the locked copy. After you lock an APK, you cannot export any more segments to it.

Lock a finished APK with Segstrate

Screenshot_2023-11-08_002147

Please read all of the instructions first, so you don't overwrite your only copy of an APK with a locked one!

To permantly lock an APK using Segstrate:

  1. Make a copy of your finalised APK.
  2. Open your copied APK in APK Editor Studio.
  3. Open Blender
  4. Go to Shatter (3D viewport) > Extra features > Lock APK with Segstrate or strike Shift + Alt + Y.
  5. Go back to APK Editor Studio and click "Browse files".
  6. Copy the path that is opened.
  7. Go back to Blender and paste the path into the top bar.
  8. Make sure to accept the agreement (tick in the top right).
  9. Click the blue button.
  10. Wait for your APK to be protected.
  11. Save the APK in APK Editor Studio.
  12. Release only the APK that has been protected.

This APK has been locked and can now be saved in APK Editor Studio as a seprate APK file from the one you use to edit the mod.

Limitations

  • Very easy to reverse, you could simpily look at the libsmashhit.so of the mod and write a simple script to convert them back to useful segment files.
  • This only protects segments. Room, levels, menu items and other things are not protected.

More: What it is

In the XML files, there are names for tags like "segment", "box", "obstacle" and others that are never really used outside of segment loading. We can randomise the names of these tags (for examlple, replace "obstacle" with "G2Ivm03_2zH-") to be specific to your mod, thus making it not possible to copy and paste segments from your mod to another mod without at least some simple scripts or extra work.

More: What is isn't

This protection is not perfect, it is not strong and it is not a real solution.

Not perfect

Perfect DRM is largely not possible: at some point, the thing you want to protect will have to exist in reality as information. In the physical world, you cannot really just make things appear (at least for now) - when your friend steals your nose you will no longer have a nose - but with information it is easy to copy - if your friend told you that we will meet in the shop at 15:00, then you didn't "steal" this information - it was duplicated.

Of course, we could just make it really really hard to copy the information. Maybe we could write a secret code? Well, this only makes it hard, not impossible. Again, at some point the information needs to exist in a way that someone can exprience it, regardless of their intent to steal it or not.

Not strong

More specific to this implementation is that is easy to defeat. I have already given basically the entire scheme away, so if you want to defeat it that might be a good project for you.

Not a real solution

Any DRM does not solve the social problem of copying work without credit, and can make it worse in some cases. It's best to simply encourage people to credit you or not to copy your work rather than endlessly trying to enforce it.

Clone this wiki locally