is it like just a text document or something. ive read the example stuff and it made my head hurt and i had to reread it a few time and think i know what it means so then i go to get started and try to make one simple recipe for the barricades in the horror elements mod cause it doesnt normally have one and id like to craft them but unlike alot of the config files im messing with to mess with other stuff in my modpack this isnt just a text file. its a different type of file. a script even something i realized i cant just right click and add. i tried going back to the introduction but im just an idiot and it assumes everyone knows how to do that atleast or im overloooking where it said how. do i need special software? can i just venmo someone 12 bucks to do this for me? do i need to up my anxiety meds dosage before attempting this?
#Idek how i add a script man
1 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
based on this im assuming youre trying to script without having any experience scripting before
to create a script you need to create a .js file
recipes are created under the server_scripts folder
You can add, remove, and modify recipes with KubeJS. The wiki has a page on that!
If you want to learn how to add recipes to any mod, click the Custom button.
the wiki has a page on how to add recipe scripts
If you're working with KubeJS scripts, config files, or similar things, we generally recommend using an actual IDE rather than just Notepad++ and its various siblings.
In a lot of cases, it can help you find errors in your code faster and also gives you neat features like syntax highlighting, automatic formatting, etc!
We recommend Visual Studio Code, since it's lightweight(-ish) and works very well with JavaScript files out-of-the-box.
I think it's worth mentioning that you can just edit the files with notepad
It's pretty bad long term but it might be easier at the start so you won't get overwhelmed with a new software
no its not, it causes problems
then we have to debug why scripts arent working when they forget to add a bracket or something
If they never made a script before then vscode won't help them realize that something is missing
i mean vscode literally spells out a lot of errors for you, notepad doesnt even highlight them
:|
Ye for anyone familiar with that stuff is very clear
But they don't know how to edit the example file
how do i do this. would adding a text file with the correct stuff and then change it from .txt to .js work. like how do i add a file to a folder that isnt in the right clikc and add menu. i get the scripting language going on in the example on the wiki. i feel decently confident if i could overcome this i could write something that works i just dunno how to add strange file types lmao]
like ive opened the sever scripts folder. ive opened the wiki. i read about callback and how to write out the wording. i even got the name using the advanced tool tips in advanced and then i opened the folder and realixed the piece of information im missing is how to add a file that isnt just right click inside of folder, click add button, click text, folder, etc.
ig my wording was weird?
people arent seeming to get where i am in this process
text file and rename it is thanks
if youd liek ill let you know if this chaotic scattreebrained plan of mine works
but for now ig resolved
Ticket re-opened!
wait do i need brackets around this shit like in alot of config json files
and spaces in front of lines
cool
i have put this into a txt doc
ServerEvents.recipes(event => {event.shaped( Item.of('horror_element_mod;barricadeoak', 5), // arg 1: output
[
'A A',
' A ', // arg 2: the shape (array of strings)
'A A'
],
{
A: 'minecraft: oak_planks',
}
)
})
cross your fingers as i rename it to .js
im a failure
maybe its that bit ok arg text that someone became part of the stuff
You have a space before oak planks
i copied and pasted that fromthe file so no
And you have a ; instead of : before that
do i need a space
okay so a ; before oak planks?
im gonna bite you
ServerEvents.recipes(event => {
event.shaped( Item.of('horror_element_mod:barricadeoak', 5), [
'A A',
' A ',
'A A'
], { A: 'minecraft:oak_planks'})
})
:bite
emote fail

sorry had to take a sec and check you bio to see if you were the age i can make that joke at. lucky me i saw grad
lol
im not sure if thats more awkward with or without the clarification XD
x3
Ticket re-opened!
lovely.

