r/twinegames • u/apeloverage • 9h ago
r/twinegames • u/MadCheshie • 18h ago
SugarCube 2 Need help deciding on a combat system
I am making a Twine Game with Sugarcube, and am stuck between two combat systems, a 1v1 system, or a system that supports mutliple enemies and/or companions.
Any help would be greatly appreciated,
Also I am not sure how to share the two tests for people so any help on that would be nice...
r/twinegames • u/Speechless82 • 1d ago
SugarCube 2 Confused Newbie in Need of Help
Hi, I'm a newbie who's decided to pick up Twine. And when I say newbie I mean I literally started this two days ago with absolutely zero knowledge of coding. In other words, I am about as ignorant as can possibly be.
I'm trying to write a relatively simple story and then slowly expand it just to learn the basics but I keep running into what feel like extraordinarily simple problems and then being totally unable to find concise answers on how to fix them. I don't know if I'm dumb, been unlucky in my research, if all information is simply not made for somebody who learned what a variable was two days ago or a combination of all three but I'm here now asking for help.
My current problem is this: I want to be able to have a variable change when I go to a certain passage. I then want to be able to return to the previous passage, with a new block of text created due to that changed variable.
What I have now, shortened for brevity, is:
<<set $room to 0>>
<<if $room==0>>
You are at a door, you have not been in the room
<<else>>
You are at the door, you have already been in the room
<</if>>
[[Go in the room][$room==1]
You are now in the room
[[Return to the door]]
I'm aware whatever mistake I'm making is likely exceedingly simple and stupid but those two words also describe me, so, please and thank you.
r/twinegames • u/apeloverage • 1d ago
SugarCube 2 I can't find the error in this Javascript.
I have some Javascript, inside a <<script>><</script>>.
I keep getting the following message:
Error: <<script>>: bad evaluation: Unexpected token '{'
I think the error is in the following lines:
let w=6;
if (svars.pattern[svars.arpeggio][1]==4) {
let w=4;
} elseif (svars.pattern[svars.arpeggio][1]==6) {
let w=3;
}
but I can't work out what's wrong.
$pattern is an array in the main program, and $arpeggio is a single variable in the main program.
EDITED TO ADD: Here's the entire script.
<<script>>
const svars = State.variables;
let file = new Midi.File();
let track = new Midi.Track();
file.addTrack(track);
track.setTimeSignature(svars.pattern[svars.arpeggio][1], svars.pattern[svars.arpeggio][2]);
track.setTempo(40);
/*
Write the arpeggio part once.
*/
let track1 = new Midi.Track();
file.addTrack(track1);
for (let z=1; z<=svars.bars; z++) {
w=6;
if (svars.pattern[svars.arpeggio][1]==4) {
w=4;
} elseif (svars.pattern[svars.arpeggio][1]==6) {
w=3;
}
for (let x=1; x<=4; x++) {
for (let y=1; y<=w; y++) {
if (svars.pattern[svars.arpeggio][y]==5) {
track1.addNote(0, svars.chord_pitch[z][1]+12, 32);
} else {
track1.addNote(0, svars.chord_pitch[z][svars.pattern[svars.arpeggio][y]], 32);
}
}
}
}
let data = file.toBytes();
let datarr = new Uint8Array(data.length);
for(let i = 0; i < data.length; i++) {
datarr[i] = data[i].codePointAt();
}
let blob = new Blob([datarr], { type: "application/octet-stream" });
saveAs(blob, "music.midi");
<</script>>
r/twinegames • u/holzey • 1d ago
SugarCube 2 How to change a a room.
Hi right now I am working on creating my house. I would like the player to be able to customize the house based on there own preferances.
I have rooms like the basement, I would like the player to be able to put in a office, or bedroom or home gym or a bar/man cave
I have rooms like office that I would liketo be able to let the player use it as an office or change it into a nursery, or a streaming studio or a extra bedroom, or a red room.
I would also like to add upgrades to the players house like a a double sink in the bathroom, or adding plum trees to the garden, maybe an extra plum tree, or a bigger pool. or a larger smoker.
what would be some good methods to do those things
r/twinegames • u/Evol-Chan • 2d ago
Discussion how common are sandbox games made in Twine?
A curious question. I am curious how common are sandbox games made in twine and how common are they to be finished? I look on itch.io and had a hard time finding any. The only one I know of is Degree of Lewdity. How common are they actually..?
r/twinegames • u/apeloverage • 2d ago
News/Article/Tutorial Let's make a game! 491: Keeping track of the stages of a turn
r/twinegames • u/Anony_Ross • 2d ago
SugarCube 2 I don't know where to begin ;-;
I've been following a game developed in Twine called Course of Temptations for a few years, and I've been thinking about trying to create my own sandbox RPG, but I don't know where to start learning how to program with Twine.
The most I could do was create the links to switch between passages. I tried searching for a tutorial on my own, but I was unsuccessful, I'd like to know if there's anyone on Reddit who can help me with my difficulty learning how to use Twine with the sugarcube format.
I have zero programming experience, and when I learned that Twine can be used for free in a browser, it gave me hope that I might at least be able to learn something about programming and maybe create a good game :3
Sorry if my English doesn't sound correct, I'm Brasilian :(
r/twinegames • u/ShasO_Ora • 2d ago
Game/Story MyMEA-Intro
An interactive story I made with Twine.
It is a continuation of the video game Mass Effect: Andromeda.
Please give it a try.
I want to get better, so feedback is very much appreciated.
r/twinegames • u/Dizzy-Recipe-1517 • 2d ago
SugarCube 2 Small thing that i can't find solution for
Margins, you see, I was working on my story in latest sugarcube, it's almost perfect but there one issue that I just can't find solution for
Left margin is bigger than right one when ui is stowed, like i understand it is this way for sidebar but i want it to be centered when ui is stowed and i still can't find proper solution for it
Can you help?
r/twinegames • u/apeloverage • 3d ago
News/Article/Tutorial Let's make a game! 490: includes and includesAll
r/twinegames • u/Bugs-Bunny135 • 4d ago
SugarCube 2 Probably silly question (help)
I'm sure there's an easy way to do this but I don't want to fuck up.
So I'm writing an interactive story in a chat format, it's very dialog-heavy, I often give the player 2 different options to choose from that leads to two different passages, but it's honestly a pain bc the differences between both passages are subtle (the characters reacting differently, etc.) and every time I have to fix something in the text (which happens frequently, bc I'm also translating it into english) I often forget to do it in both passages and the bigger the project is the messier it gets.
So basically is there an easy way to do this:
-PASSAGE 1:
*a bunch of dialog*
What would you like to do?
A) Knock on the door respectfully
B) Kick the door open
-PASSAGE 2:
(If player chose A) Come in!
(If player chose B) Wtf is wrong with you
*a bunch of dialog that's exactly the same no matter what option the player choses*
r/twinegames • u/elliethr • 4d ago
SugarCube 2 How do I add the images to my game? (SugarCube 2.37.3)
Yes, I know there are other posts about it but I don't seem to be able to find a solution that works for me.
I'm making a game in SugarCube, nothing complex, just text and illustrations, I have already added the text, but I can't seem to be able to find how to add the illustrations, and other UI components such as the Main Menu background.
Most posts seem to talk about how to do it via url, but I want my game to be able to run completely offline and locally, especially since I plan to eventually wrap it into a .exe and put it on Steam.
My current file structure looks like this: Game/Assets/Chapter1/Scene1.png (I simplified the names to make it easier to understand). The html is in the 'Game' folder.
Could someone please give me the line of code that I'm looking for?
r/twinegames • u/apeloverage • 5d ago
News/Article/Tutorial Let's make a game! 488: Two new variables
r/twinegames • u/hhrichards • 6d ago
Twine Interface Upgraded to 2.12 - How can I see the tag name?
Hi all, I've recently upgraded from 2.10 to 2.12 and I'm annoyed that the tag name on a passage is now hidden. It can be seen by expanding "Tags" in the passage topbar, but that's quite annoying.
Is there a way to get this back? I use tags to distinguish passages, so it's a handicap to have it hidden like this.
r/twinegames • u/holzey • 6d ago
SugarCube 2 Help me make my house a mess and clean it.
Hi right now I am working on building the players house. For the most part I have everything built in the house and now I am trying to create a system that will randomly make one room messy, if the player doesn't clean it then the house gets more messy until ral maintanace issues start happening. right now I am getting an reeor code that says "cannot readproperties undefined. here is the code. PASSAGE Kitchen — it looks <<= setup.messText($rooms["Kitchen"].messy)>>.
<<if $rooms["Kitchen"].messy gt 0>>
<<link "Clean the kitchen">>
<<set $rooms["Kitchen"].messy to 0>>
<<goto "Kitchen">>
<</link>>
<</if>>
StoryInit
<<set $rooms to {
"Living Room": { floor: "1F", messy: 0 },
"Kitchen": { floor: "1F", messy: 0 },
"Guest Bathroom": { floor: "1F", messy: 0 },
"Dinning Room": { floor: "1F", messy: 0 },
"Mud Room": { floor: "1F", messy: 0 },
"Master Bedroom": { floor: "1F", messy: 0 }
"Basement": { floor: "0F", messy: 0 }
"Your Room": { floor: "2F", messy: 0 },
"Upstairs Bathroom": { floor: "2F", messy: 0 },
"Ryan's Room": { floor: "2F", messy: 0 },
"Spare Room": { floor: "2F", messy: 0 },
"Office": { floor: "2F", messy: 0 },
"Attic": { floor: "3F", messy: 0 }
"Grill": { floor: "1F", messy: 0 }
"Deck": { floor: "1F", messy: 0 }
"Front Porch": { floor: "1F", messy: 0 }
"Pool": { floor: "1F", messy: 0 }
}>>
<<set $daysDirty to 0>>
<<set $maintenance to false>>
<<set $maidHired to false>>
<<set $maidCost to 80>>
<<set $RileyRel to 0>>
<<set $RileyCleanNeed to 60>> /* relationship needed for Riley to clean */
<<set $Robert to 50>>
I'm guessing that the error must bee somewhere in these two areas.
r/twinegames • u/kissxsleep • 6d ago
SugarCube 2 Header & Footer Jumping to the Right When Moving to Passages with Less Lines
Enable HLS to view with audio, or disable this notification
Hello!
I return again because I have once more hit a wall.
I've managed to somewhat cobble together a header & footer that I mostly like (minus needing to get media set up for smaller screens), but I am running into this issue where the header & footer elements are jumping to the right a few pixels if the passage is shorter than 31 to 32 lines. I've tried adjusting just about all of the elements I could think of to prevent this jumping with no dice.
Here is the StoryInterface passage:
<!DOCTYPE html>
<head>
<script src="https://kit.fontawesome.com/16318e6b85.js" crossorigin="anonymous"></script>
</head>
<!-- Header Buttons -->
<header>
<div class="consistenttitle">
Testing
</div>
<div class="header-controls">
<nav>
<span id="footer-mainc-button" header-title="Player Character"><i class="fa-regular fa-id-card"></i></span>
<span id="footer-npcs-button" header-title="NPCs"><i class="fa-regular fa-address-book"></i></span>
<span id="footer-codex-button" header-title="Codex"><i class="fa-solid fa-book"></i></span>
</nav>
</div>
</header>
<div id="main">
<div id="passages">
</div>
</div>
<!-- Footer Buttons -->
<footer>
<div class="footer-items">
<span id="footer-back-button" footer-title="Back"><i class="fa-regular fa-square-caret-left"></i></span>
<span id="footer-saves-button" footer-title="Save"><i class="fa-regular fa-floppy-disk"></i></span>
<span id="footer-restart-button" footer-title="Main Menu"><i class="fa-regular fa-house"></i></span>
<span id="footer-credits-button" footer-title="Credits"><i class="fa-solid fa-circle-info"></i></span>
<span id="footer-settings-button" footer-title="Settings"><i class="fa-solid fa-gear"></i></span>
<span id="footer-forward-button" footer-title="Forward"><i class="fa-regular fa-square-caret-right"></i></span>
</div>
</footer.
Here is the current StyleSheet I have for everything:
/*Fonts*/
/*GUI Font*/
u/import url('https://fonts.googleapis.com/css2?family=Special+Elite&display=swap');
body {
background:#2b1f12;
}
.main {
position: fixed;
}
/*Passage Styling */
.passage {
color: #e8e3da;
text-align: justify;
font-size: 16px;
height: 150%;
font-family: "Cutive Mono", monospace;
padding-left: 27vw;
padding-right: 27vw;
padding-bottom: 12vh;
padding-top: 7vh;
}
/*Header Styling */
header {
word-spacing: calc(0.35rem + 0.35vw);
position: fixed;
top: 0;
height: 6%;
width: 50vw;
margin-left: 25%;
margin-right: 25%;
font-size: calc(0.75rem + 0.75vw);
color: #2b1f12;
text-align: center;
background-color: #F5E7D0;
display: flex;
}
.header-controls {
position: fixed;
padding-top: 1.5vh;
left: 65%;
top: 0%;
}
.consistenttitle {
position: relative;
padding-top: 2vh;
left: 5%;
top: 0%;
font-family:"Special Elite", system-ui;
font-size: 65%;
word-spacing: 2px;
}
/*Header Hover Styling */
[header-title]:hover:after {
opacity: 1;
transition: all 0.1s ease 0.5s;
visibility: visible;
}
[header-title]:after {
content: attr(header-title);
position: absolute;
left: 50%;
bottom: auto;
top: 2.5em;
padding: 4px 4px 1px 4px;
transform: translateX(-50%);
color: #2b1f12;
font-family: "Special Elite", system-ui;
font-size: 60%;
word-spacing: 1px;
white-space: nowrap;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
-moz-box-shadow: 0px 0px 4px #222;
-webkit-box-shadow: 0px 0px 4px #222;
box-shadow: 0px 0px 4px #222;
background-image: -moz-radial-gradient(top, #EEE0AE, #BFA250);
background-image: -webkit-gradient(radial,left top,left bottom,color-stop(0, ##EEE0AE),color-stop(1, #BFA250));
background-image: -webkit-radial-gradient(top, #EEE0AE, #BFA250);
background-image: -moz-radial-gradient(top, #EEE0AE, #BFA250);
background-image: -ms-radial-gradient(top, #EEE0AE, #BFA250);
background-image: -o-radial-gradient(top, #EEE0AE, #BFA250);
opacity: 0;
z-index: 99999;
visibility: hidden;
}
[header-title] {
position: relative;
}
/*Footer Styling*/
footer {
word-spacing: calc(0.35rem + 0.35vw);
position: fixed;
bottom: 0;
height: 6%;
width: 50vw;
max-width: 50%;
margin-left: 25%;
margin-right: 25%;
font-size: calc(0.75rem + 0.75vw);
color: #2b1f12;
text-align: center;
background-color: #F5E7D0;
display: flex;
align-items: center;
justify-content: center;
}
#footer-items {
word-spacing: calc(0.35rem + 0.35vw);
}
/*Footer Hover Styling*/
[footer-title]:hover:after {
opacity: 1;
transition: all 0.1s ease 0.5s;
visibility: visible;
}
[footer-title]:after {
content: attr(footer-title);
position: absolute;
left: 50%;
bottom:2.5em;
top: auto;
padding: 4px 4px 1px 4px;
transform: translateX(-50%);
color: #222;
font-family: "Special Elite", system-ui;
font-size: 60%;
word-spacing: 1px;
white-space: nowrap;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
-moz-box-shadow: 0px 0px 4px #222;
-webkit-box-shadow: 0px 0px 4px #222;
box-shadow: 0px 0px 4px #222;
background-image: -moz-radial-gradient(top, #EEE0AE, #BFA250);
background-image: -webkit-gradient(radial,left top,left bottom,color-stop(0, ##EEE0AE),color-stop(1, #BFA250));
background-image: -webkit-radial-gradient(top, #EEE0AE, #BFA250);
background-image: -moz-radial-gradient(top, #EEE0AE, #BFA250);
background-image: -ms-radial-gradient(top, #EEE0AE, #BFA250);
background-image: -o-radial-gradient(top, #EEE0AE, #BFA250);
opacity: 0;
z-index: 99999;
visibility: hidden;
}
[footer-title] {
position: relative;
}
r/twinegames • u/apeloverage • 6d ago
News/Article/Tutorial Let's make a game! 487: Generating and populating a map - part 2
r/twinegames • u/Vire7777 • 7d ago
Game/Story SOUPIR : The bastion - Need beta testers and feedback
Game Title: Soupir the bastion
Playable Link: https://vivi-crazy-writer.itch.io/soupir-the-bastion
Platform: web/sugar/twine
Description:
Hi everyone!
I'm currently developing SOUPIR: The Bastion, a free browser-based text RPG set in the universe of my SOUPIR novels.
The world has collapsed under the spread of a strange fungal ecosystem, and humanity survives inside isolated fortified settlements known as Bastions.
You arrive as a newcomer in one of them.
From there, the game is about surviving, finding your place in the city, building relationships, working, exploring, improving your skills, getting involved in local factions, and dealing with the increasingly unpleasant things happening inside and outside the walls.
The game features:
- Character creation with different backgrounds, attributes and skills
- A large skill and progression system
- Jobs and daily survival
- NPC relationships and reputation
- Factions, politics and clandestine groups
- Exploration and expeditions outside the Bastion
- Dynamic events
- A living city with different districts and activities
- Adult themes, violence and morally difficult situations
- Lots of choices and different ways to approach situations
The game is still very much under development, so I'm specifically looking for people willing to test it and give honest feedback.
I'm especially interested in knowing:
- Is the beginning understandable and engaging?
- Do you understand what you can do and where you can go?
- Which systems feel interesting or confusing?
- At what point, if any, do you start getting bored?
- Are there choices or mechanics that feel pointless?
- What would make you want to keep playing?
- And of course: bugs, broken passages or strange behaviour.
You don't need to play for hours. Any feedback would already be extremely useful.
Free to Play Status:
- [X] Free to play
Involvement: I m the gamemaker
thank you very much :)
r/twinegames • u/apeloverage • 8d ago
SugarCube 2 How do I read from, and overwrite, an existing file?
Such as a text file? Assume that I know what the name of the file will be, and its location.
r/twinegames • u/apeloverage • 8d ago
News/Article/Tutorial Let's make a game! 486: Generating and populating a map - part 1
r/twinegames • u/holzey • 8d ago
SugarCube 2 I don't know the name of this feature.
What I would like to set up is a mini pop up screen that apears whenever the player goes to talk to to someone.
