#Code help
Explore tagged Tumblr posts
Text
hi neocities coders. does anyone know how to make your website password protected and to also be able to make posts like. without going directly into the code. like almost the way social media would let you but it just goes onto your website? also possibly if theres a way to let people react to those posts? a like (or some other sort of reaction) would be nice but being able to comment would also be really nice!!
im trying to make a social media esque website (think cara or like twitter/tumblr. maybe even like old deviantart) but just for me and my partner. (image hosting would be elsewhere instead of neocities) don't know if thats possible on neocities.
13 notes
·
View notes
Text
Using Git for Twine Games
A while back, I somehow managed to copy the contents of one file and overwrite a different file, meaning the entire section of the map was lost for good. I had to reconstruct it from snippets of prose written in separate documents. It sucked. And that motivated me to try something that would stop that problem from ever happening- hosting my project on GitHub!
Git sounds really fancy and hard to understand, but it's really not! So I'm going to walk you through how to use it to back up your files and do much, much more.
This tutorial expects you to have an already set up Tweego folder and VSCode. If you don't know how to get that started, @manonamora-if has an excellent ready-to-use folder with an explanation of how to use it.
What is Git?
In short, git is a kind of version control. Say you're working on a coding project with somebody else, and you need to work on the same file they were working on. But how do you know you're working on the right version of that file? Maybe they forgot to send you the newest version. Or maybe you both have to make changes at the same time. It would take a lot of effort to manually splice together everybody's changes, let alone identify what each of you had changed. That's what git's job is. Git identifies what has changed about a file, notes those changes, and updates the "main" files to match. That way, everything stays consistent, and big files can be updated easily.
Okay, but what benefit does git provide to you, somebody who's just working on a solo project with very little code? Well for one, it would have completely fixed my problem. Instead of overwriting all of my work, git would have shown me that the file had been changed. Then, I could simply click a button to revert the change. Neat! It also means you can keep working on the same project from multiple locations without losing progress. Say you're working on your game on your home computer, but then you want to keep working on your school laptop. All you'd have to do is "push" your changes to save them to your master file, and then "pull" the changes when you get to school. Neat
The Basics of Git
Okay, but what does "push" and "pull" mean? Git's confusing, but the basic terms you'll be encountering don't have to be! Here's some terminology:
Git - This is the program that goes on your computer to manage your files. It does all of the version control.
GitHub/GitLab/BitBucket - These provide servers you can host your git repositories on.
Repositories - This is a fancy word for a folder that's being maintained by git. Every file in a repository is getting analyzed by git for changes.
Local vs Remote - Your local repository is the one hosted on your computer, and it's the one you're editing. The remote one is the one hosted on a site like GitHub.
Stage - When you stage a file, you're getting it ready to commit it.
Commit - A commit is like saving your progress as a new update. You can go back to a commit later if you messed something up.
Push - When you "push" your commits, git will look at your changes, go into the remote repository, and individually change all of those things in the "main" branch.
Pull - Just like pushing, when you pull, you're taking changes from the remote repository and updating your local one to match it.
Under the cut, I'll show you full step-by-step (with photos!) of how to set up your game with GitHub using VSCode!
Setting Up Git With VSCode
Lucky for you, VSCode has built in integration with GitHub, which means you don't have to download any new programs other than git itself. You'll just have to set it up. A note- I'm not sure at what point exactly in this process VSCode prompts you to install git, because I'm not going to install it on another computer just for this tutorial haha. VSCode will provide the installation, just go along with the default settings and you'll be fine.
So first, make a Github account. It's free!
Now, open VSCode. Here's our project! You're going to want to click on that third button down in the side menu, the Source Control tab.
Under source control, you'll see this option. Click it.
Aaaaand it's done! That was easy, right? Now your folder is a git repository. Crazy!
Before you can put all of this up in GitHub, you'll need to push all of your files. Type a brief message (try "Initializing" to feel like a real cool coder), press commit, and VSCode will ask if you want to skip staging and just commit everything. Yes! Yes you do!
Now that all of your "changes" have been committed, let's publish your new repository to GitHub. Click on the new button that says "publish branch." When the popup appears, click "Allow" to give VSCode access to your GitHub account and sign in. Back in VSCode, you'll see this:
You're probably going to want it to be private, otherwise anyone on the internet could see all of your writing! Which is cool if it's a public coding project that people might want to download and use for their own projects, but if you're not a fan of code diving, leave it private.
Using Git To Help You Write
Now that you've got your folder set up as a git repository, it'll change the way VSCode looks. VSCode is using git's info to know where you've made changes, and it'll represent those changes in the UI. Here's what those look like:
If you click on those lines, you'll get to see this fancy new panel that highlights all of your changes:
So let's say we have a scene, and we aren't happy with how it's looking, but we aren't sure if we want to make one change or a different change. Instead of backing up all of your stuff or copy and pasting it to test it, you can just make whatever change you want and click that backwards facing arrow to revert it back if you aren't happy with it. You can do the same for things like CSS- when you've made some good progress and want to save your changes, commit them. Then any more changes you make will be easy to revert back if they don't look right. Groovy!
Now that everything's set up, it's as easy as committing your changes when you're satisfied with them and pushing those commits to back up your work.
Pat yourself on the back! You just learned (the very basics of) how to use git! You absolute genius!
If you have any questions while following this tutorial, feel free to ask! My askbox is always open!
#code help#twine tutorial#please don't ask me actual serious questions about git... i'm still a beginner lol#seriously though. use git!!!!! it's so useful
130 notes
·
View notes
Note
Hi!
I'm sorry to bother you but I'm working on a ghost (for the first time) and just can't figure out something... So I thought maybe you could help? No obligation, I'm just getting frustrated.
I'm a beginner with next to none experience with code prior to that and I'm using the very useful Girl and Triangle template from Zarla.
I've set menus where you can ask stuff to my character and one of the options is for him to tell stories, some are long. And long stories somehow keep getting cut by RandomTalk. Even if I put the talk rate to none, then it's the specialized talk for december who decide to pop and disturb the story...
I tried many things and I might have done them wrong maybe but I just can't figure out ;w;
The stories are stored in word.dic so that they're randomized upon selecting the option
So if you have an idea on how I could go for my ghost to be able to tell his stories without interrupting himself, I'd be so grateful!
Have a nice day and thanks anyways
Hi! It's not a bother at all, helping with ghost-related matters is what we're here for.
I'm a little confused what you mean by the specialized talk for December. Is that a part of RandomTalk, or something else outside of it?
Either way, the first thing I would do is make sure that your stories have a menu choice at the end, like a clickable option that says "done" or "thanks" or "back". It doesn't necessarily have to lead anywhere (if it doesn't lead to anything it will just close the balloon when clicked), but having a menu option should prevent other scripts from interrupting until the user has finished reading. You might also consider adding a \* tag to prevent the menu choice from timing out.
An alternative to this would be to use a \x tag at the end. This would keep the window open until the user clicks, and also should prevent the interruption! If it's a long story, you might consider using \x every couple of paragraphs. It can help to break it up and make it easier for the reader to process, in addition to helping block other scripts from interrupting.
If those don't resolve it or you don't find them to be ideal solutions for your ghost, send us another ask with further details! You can also join our Discord server for more immediate help; it can be easier to fuss with the details when we can ask questions and get replies immediately. (If you'd prefer to stay on Tumblr, you can feel free to DM me as well!)
Also, as a sidenote: these stories don't need to be placed in word.dic to be randomized! It's a common myth. Which dic file you put a function in has absolutely no bearing on how it works, the different files are just for your organization. If you would find it more helpful to place them somewhere in another file, don't be afraid to move them around ✨
3 notes
·
View notes
Text
Why do websites only use a limited width for the important part of their content?
Facebook, Tumblr, Twitter, etc all have sidebars on both sides with the content in the center. I get that it's a popular way to do things, but when I'm trying to take screenshots or read without scrolling every few seconds, it's wildly inconvenient.
Is there a way to change the code on my blog so that it fills the screen/adapts to the screen size?
Every single site has so much wasted blank space; and when the window is made smaller than full screen, like when I have windows next to each other, the formatting is still fukt and often the actual content is the part that is sacrificed rather than the damn sidebars.
I know I can't fix other sites like facebook and twitter, but how can I get my personal tumblr blog to have an adaptable width?
#help#ask tumblr#blog help#html#css#web desin#blog layout#blog design#code help#codeblr#web design#user interface#ui help#thank you#i love you goodnight
8 notes
·
View notes
Text
Need help figuring out this error... Noticed it only occurs once the delays are added. If I only use line 18-21, it functions fine.
6 notes
·
View notes
Text
AMIGAAAAA..... a boat
#tubbo#qsmp#qsmp tubbo#qsmp purgatory#help#help im scared#code help#code what the actual fuck do we do now
7 notes
·
View notes
Text
Customizing your blog tumblr can you help me?
When I try to put in an image for my background the preview looks fine,
The editor here looks fine,
But when I exit it doesn’t work.
I don’t know what im doing wrong or why this is happening but I need some help please. I’m fairly new to coding and website-making so a little insight would be wonderful. <:]
#blog customization#blog customizing#blog backgrounds#tumblr help#coding#html coding#html css#css#html#css coding#code help#mcr#mcr danger days#Mcr background#my chemical romance#danger days spider#neon colors#please help
11 notes
·
View notes
Note
Hello. I love your AO3 theme. Well Done! I just have a quick question. I want to use it on my main side blog (@thenightwishsingers) so I tested it out on an old side blog (@hurricanerucas) but the theme won't show the scroll to to button. Idk what happened. Can you help?
hi! the scroll to top option in theme 11's settings is controlled by an enabled/disabled toggle, and should be enabled by default. however, due to a bug in the tumblr theme editor, when you first paste the theme code in and refresh settings, you'll need to turn it off and then back on to get it to actually display properly. (this also applies to any other toggle options- switch them off/on or on/off to get them to work properly.) i hope this helps!
5 notes
·
View notes
Text
sorry for codeposting on main but I desperately need help with this code AHFSSJVSN,,,, i don’t really know where else to post this….
(copy/pasted from Reddit (unfortunately)- here’s that post though because it’s easier to read the code)
hello! I’m very new to RenPy- as in i started yesterday- and i’m trying to customize my GUI/main menu. I’ve followed this tutorial, and i seem to be having the same problem as some more recent comments; only my start button is working. here’s my code:
screen navigation():
vbox:
style_prefix "navigation"
#xpos gui.navigation_xpos
#yalign 0.5
spacing gui.navigation_spacing
if main_menu:
#textbutton _("Start") action Start()
imagebutton auto "gui/mm_start_%s.png" focus_mask True action Start() hovered [ Play ("sound", "audio/realhover.wav") ]
else:
textbutton _("History") action ShowMenu("history")
textbutton _("Save") action ShowMenu("save")
#textbutton _("Load") action ShowMenu("load")
imagebutton auto "gui/mm_save_%s.png" focus_mask True action ShowMenu("load") hovered [ Play ("sound", "audio/realhover.wav") ]
#textbutton _("Preferences") action ShowMenu("preferences")
imagebutton auto "gui/mm_options_%s.png" focus_mask True action ShowMenu("prefrences") hovered [ Play ("sound", "audio/realhover.wav") ]
if _in_replay:
textbutton _("End Replay") action EndReplay(confirm=True)
elif not main_menu:
textbutton _("Main Menu") action MainMenu()
#textbutton _("About") action ShowMenu("about")
imagebutton auto "gui/mm_info_%s.png" focus_mask True action ShowMenu("about") hovered [ Play ("sound", "audio/realhover.wav") ]
if renpy.variant("pc") or (renpy.variant("web") and not renpy.variant("mobile")):
## Help isn't necessary or relevant to mobile devices.
textbutton _("Help") action ShowMenu("help")
if renpy.variant("pc"):
## The quit button is banned on iOS and unnecessary on Android and
## Web.
textbutton _("Quit") action Quit(confirm=not main_menu)
thank you for any and all help!!!
4 notes
·
View notes
Text
Para quienes hacer css desde cero le es muy complicado o simplemente recordar todas las opciones es complicado.
the lazy coders guide...
okay, so from my various trolls through mammoth google searches to learn bits about coding, i’ve discovered a few wonderful resources out there which actually do some of ( and in some cases, a lot of ) the hard work for you…
these are otherwise known as code generators… here are a few of my faves;;
( NB/ all of the generators are pure CSS - no javascript is needed… )
CSS3 generator - includes generators for; border radius, box shadow, text shadow, rgba, font face, multiple columns, box resize, box sizing, outline, transition, transform, flexbox and gradient
EnjoyCSS - is another multi option generator and will give great live previews with a ton of options - includes; blocks, buttons, text, gradients, backgrounds, shadows, border radius, transition, transformation
CSS3maker - is again, another multi option generator - includes; border radius, gradient, transform, animation, transition, rgba, text shadow, box shadow, text rotation, fontface
Layerstyles - for those of you who use photoshop, this is the editor for you! it will generate CSS code from a PS like editor that should be very familiar - includes; drop shadow, inner shadow, background, border, border radius
Westciv - includes options to generate; gradients, text properties, box properties, transformations
here are some individual generators which give a little more detail and flexibility with the options;
scrollbar generator border radius generator gradient generator gradient generator box shadow button generator button generator menu generator menu generator ( includes bootstrap option ) menu generator tooltip generator tooltip generator ribbon generator table generator table generator typeset generator ease animations full box styling full box styling pattern generator
enjoy :3 love from, octomoosey <3
3K notes
·
View notes
Text
01000010 01100101 01110111 01100001 01110010 01100101 00100000 01110100 01101000 01100101 00100000 01100011 01100001 01110100 00100000 01110100 01101000 01100001 01110100 00100000 01100010 01101001 01110100 01100101 01110011 00100000 01101100 01101001 01101011 01100101 00100000 01100001 00100000 01100100 01101111 01100111
0 notes
Text
They’re so married.
#supercorp#supergirl cw#supergirl#kara x lena#lena luthor#kara danvers#katie mcgrath#melissa benoist#they’re so gay#pls notice the wedding rings dhdhdhd#I will never get over them#also currently listening to enchanted from tailor swift help me#they’re so ts coded istg
4K notes
·
View notes
Note
Hi! I recently started to use twine and sugarcube and I'd like to know if there is a way to make a textbox that only accepts 8 numbers and one letter something like this: "F-85634410". And another textbox that only accepts 12 letters, Thank you.
That wouldn't be possible with the <<textbox>> macro without a lot of work. You could probably achieve something like this with pure HTML, though you might have to split the letter and numbers into two different textboxes. It is possible to restrict a user to only letters or numbers, and also possible to limit the length of the entry (or size of the number). Passing that info to a Twine variable... I'm not sure.
If you're okay with getting quite complicated with Twine code, however, you could do something like the code examples in this forum post: http://ww.twinery.org/forum/discussion/8637/sugarcube-disallow-certain-textbox-input
1 note
·
View note
Note
Hello again! "mode" anon here
Sorry yeah now I see how confusing my ask was- (I mean I am very confused about how stuff works as a begginer so yeah sounds right)
So I use the girl and triangle template from Zarla so I think it's yaya? I think I saw that somewhere.
What I want to do: I want to have what I call a "watching mode" so that my ghost would sit still and watch stuff with the user. I have special poses for the mode.
To do that, I separated the regular poses in randomtalk with the mode poses using an if/else to check if the mode is on or not
To put the mode on and off, I put two buttons in my ghost menu
And what's not clicking is what do I need to write exactly under those buttons so it turns the mode on and off....?
I dunno if it's clear, here's part of my code:
this is in aitalk (the stuff in green is the stuff I want to happen when the mode is on) ->
RandomTalk : nonoverlap_pool { if watchmode == "on" { "\1\s[161]\0\s[162]" "\1\s[161]\0\s[163]\w8\w8\w8\w8\w8\w8\0\s[162]" "\1\s[161]\0\s[164]\w8\w8\w8\w8\w8\w8\0\s[162]" "\1\s[161]\0\s[165]\w8\w8\w8\w8\w8\w8\0\s[162]" "\1\s[161]\0\s[166]\w8\w8\w8\w8\w8\w8\0\s[162]" "\1\s[161]\0\s[167]\w8\w8\w8\w8\w8\w8\0\s[162]" "\1\s[161]\0\s[168]\w8\w8\w8\w8\w8\w8\0\s[162]" "\1\s[161]\0\s[169]\w8\w8\w8\w8\w8\w8\0\s[162]" "\1\s[161]\0\s[170]\w8\w8\w8\w8\w8\w8\0\s[162]" "\1\s[161]\0\s[171]\w8\w8\w8\w8\w8\w8\0\s[162]" "\1\s[161]\0\s[172]\w8\w8\w8\w8\w8\w8\0\s[162]" "\1\s[161]\0\s[173]\w8\w8\w8\w8\w8\w8\0\s[162]"
}
else {
all the other poses🌟
}
and then this part I struggle with is in menu, I know some stuff are wrong it was filler because I just can't figure out what I need to write here ->
MenuRun : all { "![*]\q[Ask something,askmenu]\n"
"![*]\q[Give something,giftmenu]\n" "![*]\q[Play,gamemenu]\n"
"![*]\q[Show me a picture,picmenu]\n" "![*]\q[Watch something with me!,screentime]\n\n[half]"
}
Select.screentime { ScreenOrNot }
ScreenOrNot : all { "\0\s[5]\b2Watching time?\n\n[half]"
"\![*]\q[Watching time!,watchon]\n"
"\![*]\q[Enough watching.,watchoff]\n\n[half]"
"\![*]\q[Nevermind,CANCEL]\n"
}
Select.watchon { "\1\s[161]\0\s[162]![enter,watchmode]" }
Select.watchoff { "\1\s[15]\0\s[5]That was great!![leave,watchmode]" }
I think I'm gonna give up this option if I can't figure it out soon enough but it makes me a bit sad because I was very enthusiast about the idea. Anyway, can you help me? That's fine if not
have a nice day!
Thanks for writing back! This paints a much clearer picture, we can certainly help! You are correct, if you're using the Girl and Triangle template then you're using YAYA (unless you have an older version written in AYA, but that's very unlikely these days)
You're actually almost there, the one thing you're missing is that you need to know how to assign your variable!
In RandomTalk you have written the following:
if watchmode == "on"
This is checking if a variable named "watchmode" is equal to the string "on". So all we need to do is assign the string "on" to watchmode when you want the mode on, and assign it to something else like "off" when you want it to be off.
This is quite simple to do. In your function Select.watchon, just add the following on a separate line within the brackets:
watchmode = "on"
And in your function Select.watchoff, do the same, but assigning "off" instead of "on":
watchmode = "off"
That should get it working for the menu buttons! (You won't need the \![enter,watchmode] and \![leave,watchmode] tags you have in red there, I'm assuming those are the placeholders you spoke of. They're not valid SakuraScript tags, so SSP would just ignore them!)
There are a couple other things you'll want to do to avoid bugs though. In your OnFirstBoot function, you'll want to make sure you define the variable watchmode, that way your ghost has it from the start and it doesn't cause any unexpected behavior. You can just add the following somewhere within the brackets of OnFirstBoot:
watchmode = "off"
And, assuming that you don't want watchmode to stay on if the user closes the ghost and then opens it again later, you'll also want to change it to be off whenever the user opens the ghost!
There are a few ways to accomplish this, but I would highly recommend that you add the event OnInitialize to your ghost for this if you don't already have it. This event runs any time your ghost loads, no matter the reason. A normal bootup? Changed from another ghost? Switched to this ghost because the last ghost got uninstalled? It doesn't matter, it always runs OnInitialize, so you don't have to copy this variable change to OnBoot and OnGhostChanged and OnVanished, etc.
This is the setup I would recommend:
OnInitialize { //If you use the Reload SHIORI option in the dev palette, this check ensures that this code won't run, so that it doesn't silently kick you out of watch mode. Just to make your life as a dev a bit easier! if reference0 != "reload" { watchmode = "off" } }
But of course, maybe you want it to persist across sessions until the user turns it off! If that's what you want, then you can skip this part.
I hope that helps you out! If you've got more questions or something's not working right, feel free to send another ask. What you're looking to do is very much possible.
And like I said, you very nearly had it figured out on your own, so take heart! You're doing well already, and if you run into anything that you're not sure how to approach, we're glad to help answer questions and give resources ✨
#Ukagaka#English Ukagaka#Developer help#Code help#YAYA help#Answered ask#Anonymous#Ukagaka Dream Team
1 note
·
View note
Note
hi is there a way to make the images larger on ur memories page theme?
hi, there is yes! it involves adjusting the size of several containers to make sure the images still fit within the character box. it will cause the whole character box to become bigger so they'll get spaced over the page less evenly because of it. for this example let's say you want to increase the size of the images by 50px
look in the css of the code for "item {}" and add 50 to the values of "height" and "width". below "item {}", you will find "i-container {}" and "i-big {}", also add 50 to the "height" and "width" entries here. this will resize the character box, the image container, and the single big image option respectively!
for the smaller images, these are the size of the full single image - 4 / 2. this means instead of adding 50 to the values of the "height" and "width" entries, you'll have to add 25 instead! do this for "i-smallone {}", "i-smalltwo {}", "i-smallthree {}" and "i-smallfour {}", all listed below the previously mentioned css sections!
it should now look like this:
then simply hit "update preview" and "save" and it should resize the containers for your images!
0 notes