GithubHelp home page GithubHelp logo

yhvrwastaken / synergism-plus Goto Github PK

View Code? Open in Web Editor NEW

This project forked from flamemasternxf/synergism-plus

0.0 1.0 3.0 36.71 MB

License: MIT License

JavaScript 0.32% CSS 3.81% HTML 23.40% TypeScript 72.47%

synergism-plus's Introduction

Synergism Plus

Modding

Getting Started

Welcome to Synergism Plus! Here's a quick and easy to understand guide on how to get started making your own mod!
To start simply fork this Repository and clone it to your local machine.
Once you've done that open it up in your code editor of choice (preferably Visual Studio Code) and open up the Terminal.
Once you've opened the Terminal run npm install to install all dependencies. This is very important, the project will not work without it!
If you've completed all these steps you're ready to move on to the next section!

Adding a new Mod Toggle

Congrats on completing the first section! This section will walk you through creating the Mod Toggle for your Mod!
Let's start by adding it to index.html
Head over to index.html line 2986. This line begins the section of index.html that contains all the content in the Modifications tab.
You should see a block of code that looks something like this: img.png
You're going to want to copy that entire code block and paste it beneath the last block of its type (so, if there were 3 blocks like that you'd paste it beneath the 3rd).
This is your Mod's toggle code! You'll want to start by replacing the text in the <span> element with the name of your Mod.
We're going to be making a few changes to the button element. First, replace the id with toggle<your Mod's Toggle Number here>. Then replace the toggleid with <your Mod's Toggle Number here>
Don't know what your Mod's Toggle Number is? That's ok, we'll be going over that in the next section :)
Congratulations! You've successfully created your Mod's Toggle! Head over to the next section to learn how to give its own Toggle Number and make it a functional toggle! Oh, and don't forget to add your Mod and a short description of it to the Mods List!

Creating a Toggle Number and making the Toggle functional

You've almost finished setting up your Mod's Toggle! Read through this section to learn how to create a Toggle Number for your Mod and how to make the Toggle functional!
Ok, this is where things get a bit more complex. Let's start by heading over to line 378 of UpdateHTML.ts.
There you should see a list of Toggle Numbers with a comment next to them. You'll want to copy that line and paste it beneath the other Toggle Numbers.
From there, change the number in its name to the previous Toggle Number's plus one (so, if the previous Toggle was named "toggle35" you'd name yours "toggle36") and change the comment to say //Settings - Mods - <your Mod's name here> Toggle
Now head over to Synergism.ts line 269. There you should see a array of all the Toggle Numbers. Simply add your Toggle Number to the bottom of the array!
Last but not least head over to EventListeners.ts line 191. There you should see a for loop. Simply change the second number in the for loop to whatever it was plus one (so, if it was a 35 you'd change it to a 36)!
Congratulations! You've now created a fully functional Mod Toggle! If you didn't already, go back to your code block in index.html and fill in your Toggle Numbers.

Running your Mod locally

Running your Mod locally only takes 3 simple steps!

  1. Open up index.html in your browser of choice.
  2. Go back to your code editor, open the terminal and run npm run build:esbuild.
  3. Go back to your browser and refresh the page.

Your Mod should now be running locally! If you make a update to your Mod but still have the page open simply repeat steps 2 and 3 to see all your new changes.

Coding your Mod

This is the part where I have to leave you to your own devices.
From here you can venture into the code and modify whatever you please, just be careful to fix any errors that you may cause!
Important: Make sure whatever effect your Mod has only runs when the toggle is enabled. Thanks :)
Have fun!

Adding your Mod to Synergism Plus

Are you finished with your Mod and ready to share it with the world? Here's a simple guide on how to do that!
First, be sure there are no errors. No Mods that cause errors will be added, sorry.
Then simply create a PR (pull request) to the Synergism Plus repo, I'll merge it as soon as I see it! Once I do your Mod will be on the main site!

synergism-plus's People

Contributors

1e1000000 avatar alienc4 avatar baraklevy20 avatar blaze33 avatar cephyric-gh avatar flamemasternxf avatar forgottenangel avatar gendoikari82 avatar gringomaniac avatar hexagonhexagon avatar iamyhvr avatar jahwsuf avatar jsherbach avatar kaisertom avatar kewne7768 avatar khafradev avatar mcpower avatar ndoub avatar nmussy avatar omsi6 avatar platypusking avatar pomroka avatar potatoart avatar pseudonian avatar q00u avatar sefa65 avatar strentax avatar xander374 avatar xanthousphoenix avatar yasmir2 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.