-
Notifications
You must be signed in to change notification settings - Fork 41
Tips & Trick Page #70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
hifishlol
wants to merge
6
commits into
CodenameCrew:main
Choose a base branch
from
hifishlol:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
90bba7b
Tips & Tricks page
hifishlol 647bb4c
Merge branch 'CodenameCrew:main' into main
hifishlol 4a938f1
added alt text and fixed insert section
hifishlol abd9f86
include note about coolutil.playmusic
hifishlol cfead51
Mod Name Here
hifishlol bc9efea
Merge branch 'CodenameCrew:main' into main
hifishlol File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"name": "Mod Name Here", | ||
"description": "friday night funkin in 2049", | ||
"author": "betopia", | ||
"version": "2.0.0-demo", | ||
"link": "https://gamebanana.com/mods/378548", | ||
"source": "", | ||
|
||
"lastUpdated": "2025-03-31T15:58:17.000Z", | ||
|
||
"tags": ["softcoded"] | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
--- | ||
author: hifish | ||
desc: This page has small general tips and tricks. | ||
lastUpdated: 2025-01-11T23:44:26.934Z | ||
title: Tips & Tricks | ||
--- | ||
# Tips & Tricks | ||
## <h2 id="inserting" sidebar="Sprite Layering">Add sprite/object behind or above another</h2> | ||
|
||
You may have a sprite that you might wanna put above or below another sprite. This is possible using the `insert(position:Int, object:T)` function. | ||
```haxe | ||
var blueSolid = new FunkinSprite(200, 200).makeSolid(200, 200, FlxColor.RED); | ||
add(blueSolid); | ||
|
||
var redSolid = new FunkinSprite(250, 250).makeSolid(100, 100, FlxColor.RED); | ||
insert(members.indexOf(blueSolid)+1, redSolid); | ||
/* | ||
This would add the red solid right above the blue solid. If we want it below the blue | ||
solid, we would use the insert function, like so. | ||
*/ | ||
insert(members.indexOf(blueSolid), redSolid); | ||
|
||
``` | ||
## <h2 id="set-window-name" sidebar="Window Name">Set Window Name</h2> | ||
|
||
Instead of the window name being "Friday Night Funkin' - Codename Engine", you can change it to be whatever you want. | ||
|
||
Start by editing or making a script named `global` in `your mod/data`. | ||
|
||
Now, you can add these lines. | ||
|
||
```haxe | ||
import funkin.backend.utils.WindowUtils; //Put this at the top of the file. | ||
|
||
WindowUtils.winTitle = 'Your Mod Name'; | ||
/* | ||
This line could either be added outside of a function, or you could put it in | ||
function new() | ||
*/ | ||
``` | ||
|
||
Using this over `window.title` is much better, since it won't reset on state changes. | ||
|
||
## <h2 id="sprite-preload" sidebar="Preloading Sprites">Preloading Sprites</h2> | ||
|
||
It's literally just one line. | ||
|
||
```haxe | ||
graphicCache.cache(Paths.image('your image')); | ||
``` | ||
|
||
## <h2 id="add-mod-menu" sidebar="Mod switch menu in custom state">Adding the mod switch menu to a ModState.</h2> | ||
|
||
<img src="./Tips-1.png" alt='An image showing the mod switch menu in the normal main menu state.'/> | ||
|
||
If you want to add this mod switch menu to your custom mod state, it is relatively simple. | ||
|
||
```haxe | ||
import funkin.menus.ModSwitchMenu; //Import the menu. | ||
|
||
if (controls.SWITCHMOD) //Or any sort of event you want this to happen | ||
{ | ||
openSubState(new ModSwitchMenu()); | ||
persistentUpdate = false; | ||
persistentDraw = true; | ||
} | ||
|
||
//You can also do the same thing with the editor picker. | ||
import funkin.editors.EditorPicker; | ||
|
||
if (FlxG.keys.justPressed.SEVEN) //Or any sort of event you want this to happen | ||
{ | ||
openSubState(new EditorPicker()); | ||
persistentUpdate = false; | ||
persistentDraw = true; | ||
} | ||
|
||
``` | ||
|
||
## <h2 id="custom-bpm" sidebar="BPM in audio file">Set BPM for an audio file without code.</h2> | ||
|
||
You may want an audio file to have a BPM assigned to it, like the menu music. | ||
|
||
To do this, navigate to the folder that has the audio you want to assign a BPM to (ex: freakyMenu.ogg). | ||
<img src="./Tips-2.png" alt='An image showing a file named "freakyMenu.ogg" in the file explorer.'/> | ||
|
||
Now, create an .ini file with the same name as the audio file you want to assign a BPM to, and open the file and add `BPM=your bpm value`. | ||
<img src="./Tips-3.png" alt='An image showing two files in the file explorer both named "freakyMenu", with the different file extensions ".ini" and ".ogg".'/> | ||
<img src="./Tips-4.png" alt='An image showing a file named "freakyMenu.ini" in the notepad editor, with it saying "BPM=100" in the file.'/> | ||
|
||
Please note that you must use `CoolUtil.playMusic()` for the .ini file to have any effect. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you confirm that this is how it works
and mention how using the -1 or +1 is incorrect if you want to do x