Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into main
  • Loading branch information
ShadowMario committed Aug 2, 2021
2 parents 5c4a856 + e296508 commit 2fa877b
Show file tree
Hide file tree
Showing 4 changed files with 119 additions and 38 deletions.
61 changes: 23 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# FNF-PsychEngine
Engine originally used on [Mind Games Mod](https://gamebanana.com/mods/301107)
Engine originally used on [Mind Games Mod](https://gamebanana.com/mods/301107), intended to be a fix for the vanilla version's many issues while keeping the casual play aspect of it. Also aiming to be an easier alternative to newbie coders.

**Credits:**
* Shadow Mario - Coding
Expand All @@ -11,9 +11,14 @@ Engine originally used on [Mind Games Mod](https://gamebanana.com/mods/301107)
WARNING: This engine is still very early in development! You can request new features though
_____________________________________

**Features:**
**FEATURES:**

Atleast one change to every week:
Attractive animated dialogue boxes:

![](https://user-images.githubusercontent.com/44785097/127706669-71cd5cdb-5c2a-4ecc-871b-98a276ae8070.gif)


**Atleast one change to every week:**
* Week 1:
* New Dad Left sing sprite
* Unused stage lights are now used
Expand All @@ -34,7 +39,7 @@ Atleast one change to every week:
* On Thorns, the HUD is hidden during the cutscene
* Also there's the Background girls being spooky during the "Hey!" parts of the Instrumental

Cool new Chart Editor changes and multiple bug fixes
**Cool new Chart Editor changes and countless bug fixes**
![](https://i.imgur.com/h6Ja7eT.png)
* You can now chart "Event" notes, which are bookmarks that trigger specific actions that usually were hardcoded on the vanilla version of the game.
* Your song's BPM can now have decimal values
Expand All @@ -43,52 +48,32 @@ Cool new Chart Editor changes and multiple bug fixes
* Alt Animation: Forces an alt animation to play, useful for songs like Ugh/Stress
* Hey: Forces a "Hey" animation instead of the base Sing animation, if Boyfriend hits this note, Girlfriend will do a "Hey!" too.

Story mode menu rework:
**Improved Animation Debug menu (Press 8 in-game on a Debug build)**
![](https://user-images.githubusercontent.com/44785097/127721062-f912853c-2513-41b8-bd66-fd80d9d4ee0f.png)
* You can now press Save Offsets to save a .txt file with the editted offsets
* You can also now change the characters while on the Menu
* Go back to the game by pressing Escape
NOTE: This should be used for fixing your character floating or being slightly under the ground! It's not for texture editting.

**Story mode menu rework:**
![](https://i.imgur.com/UB2EKpV.png)
* Added a different BG to every song (less Tutorial)
* All menu characters are now in individual spritesheets, makes modding it easier.

A Credits menu
**Credits menu**
![](https://i.imgur.com/NdIQt3d.png)
* You can add a head icon, name, description and a Redirect link for when the player presses Enter while the item is currently selected.

Awards/Achievements
**Awards/Achievements**
* The engine comes with 16 example achievements that you can mess with and learn how it works (Check Achievements.hx and search for "checkForAchievement" on PlayState.hx)

Options menu:
* You can change Note colors, Controls and Preferences there, not much to say about it. Go check it yourself k?
**Options menu:**
* You can change Note colors, Controls and Preferences there.
* On Preferences you can toggle Downscroll, Anti-Aliasing, Framerate, Low Quality, Note Splashes, Hide Hud elements, Flashing Lights, etc.

Other gameplay features:
**Other gameplay features:**
* When the enemy hits a note, it plays the note hit animation on their strum, just like when the player hits a note.
* Lag doesn't impact the camera movement and player icon scaling anymore.
* Some stuff based on Week 7's changes has been put in (Background colors on Freeplay, Note splashes)
* You can reset your Score on Freeplay/Story Mode by pressing Reset button.
* You can listen to a song on Freeplay by pressing Space once.

Dialogue file:
* Example:
```
psychic:left bf:right
:0:talk:0.05:normal:What brings you here so late at night?
:1:talk:0.05:normal:Beep.
:0:angry:0.05:angry:Drop the act already.
:0:unamused:0.05:normal:I could feel your malicious intent the\nmoment you stepped foot in here.
:1:talk:0.05:normal:Bep bee aa skoo dep?
:0:talk:0.05:normal:I wouldn't try the door if I were you.
:0:unamused:0.05:normal:Now...
:0:talk:0.05:normal:I have a couple of questions to ask you...
:0:angry:0.1:normal:And you WILL answer them.
```

* The first line will define the characters you will use on the dialogue
* First value is the character
* Second value is the character's position ("left", "center" or "right")
* You separate the characters by adding a space between them
* It's important that you keep in mind their creation order, as it will be used on the dialogue lines's first value

* Dialogue lines must start with a `:` and every value is separated by another `:`, the values are in the respective order:
* Character speaking's ID (Based on character creation order)
* Animation to use during this line
* Text speed, default is 0.05 (20 characters per second)
* Speech bubble type ("normal" or "angry")
* Text. Warning! Don't use this kind of quote: ``, use this instead: `'`
48 changes: 48 additions & 0 deletions tutorials/add-dialogues-to-your-song.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
First you need to be aware about how the Dialogue file works:
* Example:
```
psychic:left bf:right
:0:talk:0.05:normal:What brings you here so late at night?
:1:talk:0.05:normal:Beep.
:0:angry:0.05:angry:Drop the act already.
:0:unamused:0.05:normal:I could feel your malicious intent the\nmoment you stepped foot in here.
:1:talk:0.05:normal:Bep bee aa skoo dep?
:0:talk:0.05:normal:I wouldn't try the door if I were you.
:0:unamused:0.05:normal:Now...
:0:talk:0.05:normal:I have a couple of questions to ask you...
:0:angry:0.1:normal:And you WILL answer them.
```

* The first line will define the characters you will use on the dialogue
* First value is the character
* Second value is the character's position ("left", "center" or "right")
* You separate the characters by adding a space between them
* It's important that you keep in mind their creation order, as it will be used on the dialogue lines's first value

* Dialogue lines must start with a `:` and every value is separated by another `:`, the values are in the respective order:
* Character speaking's ID (Based on character creation order)
* Animation to use during this line
* Text speed, default is 0.05 (20 characters per second)
* Speech bubble type ("normal" or "angry")
* Text. Warning! Don't use this kind of quote: ``, use this instead: `'`

________________________________________
With that in mind, we can now go to the next step, making your song trigger the dialogue.

**1.** First off, you need to name your dialogue file as your song name + "Dialogue.txt". If my song is called `focus`, the dialogue file then should be named `focusDialogue.txt`.
Place the dialogue file in the same folder as your charts and it should be ready to be loaded.

**2.** Now, open PlayState.hx and go to line 971, you should be seeing this:

![](https://i.imgur.com/udchEJX.png)

Add your song to it and the dialogueIntro function, just like that:

![](https://i.imgur.com/b7NCVrf.png)

If you'd prefer a small delay (in this case, 0.8 seconds) before the dialogue starts, do this:

![](https://i.imgur.com/Hop6fCg.png)

You can also make the dialogue play a background music with it too!
Instead of using `dialogueIntro(dialogue);` you just have to use `dialogueIntro(dialogue, 'your-music-name-here');`, make sure you file is inside the `music` folder of your week's loaded folder!
17 changes: 17 additions & 0 deletions tutorials/creating-an-event.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
🙂 **PART 1 - Adding it to Chart Editor** 🙂

**1.** Open ChartingState.hx and around Line 50 you will see the `eventStuff` array.

![](https://user-images.githubusercontent.com/44785097/127798468-47d51a1c-ce0c-4d89-9ad9-405cf5f7254f.png)

**2.** Add your new Event's name and description to it.

😢 **PART 2 - Coding your event** 😢

**1.** Open PlayState.hx
**2.** Search for the function named `triggerEventNote`, add a new case using your event's name and code your event's action there.

![](https://user-images.githubusercontent.com/44785097/127798675-d56631da-6fb6-4926-b267-9f5f81ba4d91.png)

**EXTRA.** Some events like "Kill Henchmen" are triggered earlier than their chart position (280ms earlier).
If you want to do something similar, search for the function `eventNoteEarlyTrigger` and set a new case with your event's name and how many milliseconds earlier should it be triggered.
31 changes: 31 additions & 0 deletions tutorials/how-to-add-a-new-difficulty.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
*On this Example, i will be adding a new difficulty called "Crazy", all charts for this difficulty should end with "-crazy".*

🔥 **PART 1 - Adding the difficulty to the list** 🔥

This is probably the easiest part.
Our difficulty will be called `Crazy`, and the chart suffix will be `-crazy`

Open CoolUtil.hx inside `source/`, right at the start, you will see this array:

![](https://i.imgur.com/NA2aIIH.png)

So... add your new difficulty to it, like this.

![](https://i.imgur.com/JMfoJI0.png)

We're basically done with it, but now comes he boring part.

👽 **PART 2 - Files** 👽

You will need the difficulty image for the Story mode menu, and you're also gonna have to do the Crazy difficulty chart to all songs.
Here's my Crazy difficulty image for an example:

![](https://i.imgur.com/mvaseyY.png)

Put this image inside `assets/preload/images/menudifficulties/` with it being named `crazy.png` and we're ready to go!
If you've done everything alright, it should be in and working properly!

![](https://i.imgur.com/MDzP1PF.png)
![](https://i.imgur.com/qHY7beU.png)

That's all, folks.

0 comments on commit 2fa877b

Please sign in to comment.