Jump to content

Merge alignment one click OSTIM SA


Recommended Posts

Posted

Merge alignment one click OSTIM SA

View File

Hello, here I will leave the program I created to generate a consistent merge between various "alignment.json" files. It is very easy to use and installs just like a mod so that you can have it handy in your mod list. By itself, it doesn't do anything; you need to follow some steps to make it work. Here is how to do it.

 

  • To start, you need to enter the program. It's easy, just go to the mod you installed, and inside there will be an .exe file. Run it. There is also a .pyw version for enthusiasts who want to modify it or read how the code works.

 

 

image.png.1dec3e46ff95c6617cb3ecfe0b56b10b.png

 

 

 

 

The first is knowing where to place this file. It should be on your PC, specifically in "%USERPROFILE%\Documents\My Games\Skyrim Special Edition\OStim". There, you will have two .json files, but the important one is "alignment.json".

 

In my case, the location of the "alignment.json" file is "C:\Users\5652156\OneDrive\Documentos\My Games\Skyrim Special Edition\OStim".

 

Remember this: if you receive an "alignment.json" file from a friend or someone else, and you know it works and want to add the code to yours, first you need to paste it into the application's folder, overwriting what is there, and then run the program as shown in the GIF.

 

 

 

 

image.gif.239a516b6898184010f541c5f366da05.gif

 

 

  • You can use multiple programs available on the internet to do the merge. There is one called OStimSA Alignment Tool, it looks good and is created by SimonPhil, but I still don't understand how to use it. There are also different online programs that do the same, but you have to move the files yourself, such as json-merge. With that, you should be all set.

 

 

OK, this part is important. Wait... yes, wait. It seems that OStim takes some time to associate the alignments, and maybe the first time you open the game after all this, they might not be aligned. Therefore, after restarting the game, they will associate correctly. It's an OStim issue, and there's not much I can do about it. Thank you, everyone 🐈.

 

 

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

For those who know some Python, this is the inside of the program. It's basically the only thing it has. It's simple and has some comments. If you can improve it, let me know. Thanks.

 

import json
import tkinter as tk
from tkinter import filedialog, messagebox
import os

def merge_json_files(default_file_path, selected_file_path):
    try:
        # Load data from the default JSON file
        with open(default_file_path, 'r') as default_file:
            default_data = json.load(default_file)

        # Load data from the selected JSON file
        with open(selected_file_path, 'r') as selected_file:
            selected_data = json.load(selected_file)

        # Merge selected_data into default_data (keep existing data in default_data)
        merge_dicts(default_data, selected_data)

        # Write the merged data back to the selected file respecting original format
        with open(selected_file_path, 'w') as selected_file:
            json.dump(default_data, selected_file, indent=2)  # Dump merged data with original format

        messagebox.showinfo("Success", "The files have been successfully merged! you can close it now 🐈")
        cubo.config(bg="green")  # Change the color of the cube to green

    except Exception as e:
        messagebox.showerror("Error", f"An error occurred: {str(e)}")

def merge_dicts(dict1, dict2):
    """ Merge two dictionaries recursively """
    for key, value in dict2.items():
        if key in dict1 and isinstance(dict1[key], dict) and isinstance(value, dict):
            merge_dicts(dict1[key], value)
        else:
            dict1[key] = value

def select_file():
    file_path = filedialog.askopenfilename(filetypes=[("JSON files", "*.json")])
    if file_path:
        file_name = os.path.basename(file_path)
        if file_name != "alignment.json":
            messagebox.showerror("Error", "The selected file must be named 'alignment.json'.")
            return
        
        default_file_path = os.path.join(os.path.dirname(__file__), "alignment.json")
        merge_json_files(default_file_path, file_path)

# Set up the main window
root = tk.Tk()
root.title("Merge JSON Files")
root.geometry("300x170")  # Set window size to 300x170 pixels
root.configure(bg="purple")  # Set window background color to purple

# Button to select the JSON file
merge_button = tk.Button(root, text="Select alignment.json in OStim directory", command=select_file, bg="silver")
merge_button.pack(pady=20)

# Create the cube
cubo = tk.Canvas(root, width=50, height=50, bg="red")
cubo.pack(pady=10)

# Run the application
root.mainloop()

 

 

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

"Here I'll leave the link to my other works if you'd like to take a look."

 

 Ostim SA port volumes

 

 

Ostim and SL Custom Animation Volume "self-created animations"

 

  • I haven't opened the ideas forum yet. When I have more volumes, I'll start asking🐈.

 

Tools for Ostim SA

 

 

Translations in multiple languages

 

 

Pandora + patch for specific mods

 

 

Pandoraforge engine patch (still in progress) and manual method to merge ZAZ 8+ Pandora

 

 

Tools to mod and improve Skyrim

 

  • SSE Engine Fixes - Full UP Config AE🌪️
  • Skyrim AI voice synthesizer program to add voices to mods and translate audio into multiple languages ("Still in progress 70%")🔨
  • Motion recorder for direct export to HKX ("Still in progress 💀 10%")🔨
  • Tool for exporting character models for 3D printing  ("Still in progress 30%")🔨

 

 

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

I will be more active, creating patches, translations into multiple languages, programs, conversions from LE to AE, and in the future, robotics with Skyrim "a bit ambitious." Any requests or feedback will be read in the comments, and thank you for reading so much.

 

I’m not looking for remuneration for this, I love mods and enjoy making the material available to everyone.

But if you want, buy me a coffee . God bless you. 

 

If you'd like to support me even more across various areas such as additional animation packages not only for OStim, dialogue mods, programs, special requests, and see how I gradually expand into creating different articles related to Skyrim.

 

here is my Patreon 🐱💻 Thank you very much in advance. I will respond to your requests as if my life depended on it 🐱👤.

 

kofi      patreon

 

All my content will be free, allowing Patreon and Kofi followers to decide which package will be released every two weeks through voting. I'll also prioritize their requests. In the future, I'll create my own animation packages for SL and Ostim, where you can choose which animations to include. Although it's not open yet, I've already prepared the board for future contributions. You'll also be part of the robot creation project, which will eventually move to Kickstarter as it grows. Thank you very much, everyone!

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

 


  • Submitter
  • Submitted
    06/20/2024
  • Category
  • Requires
    Ostim.esp
  • Regular Edition Compatible
    No

 

  • 2 weeks later...
Posted

Just want to say I really appreciate the ammount of effort you're putting into helping people smooth out compatability stuff. The pandora + FNIS tool is such a lifesaver for me. (I assume it's you because of the cats and the color schemes XD)

  • 2 months later...
Posted (edited)

I have read the entire description and still have no clue what does it do and how does it work.

So, all i need to do is copy file for Ostim folder, replace with on inside Merge program folder, run inside merge folder and just thats it ? No additional steps ?
Then what do i need to do with other mods ? Nothing ? I am completely and utterly confused and would like to get help on explanation

Edited by NolanDaneworth
  • 2 months later...
Posted
On 9/11/2024 at 2:17 PM, NolanDaneworth said:

I have read the entire description and still have no clue what does it do and how does it work.

So, all i need to do is copy file for Ostim folder, replace with on inside Merge program folder, run inside merge folder and just thats it ? No additional steps ?
Then what do i need to do with other mods ? Nothing ? I am completely and utterly confused and would like to get help on explanation

 

It looks like it takes a file named alignment.json in the same folder as itself, you tell it where to find another alignment.json file, (such as the one in your documents/sse folder), and merges the two.

  • 5 months later...
  • 3 months later...
Posted

I've watched that GIF at least 50 times, and I can't see quickly enough to figure out what it's saying to do.

 

Are there perhaps step by step instructions anywhere or a film which can be paused? I just can't figure out what to copy where :(

 

Thanks either way.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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