I agree with @Akjosch that this should be broken up into multiple questions. Some closely related questions, or follow-up questions are fine, but this site is designed to be a place where others can easily search for answers as well as ask questions, and questions that depart too far from their main thrust aren't helpful in that regard. Anyway, it's just something to consider going forward.
Okay, let's get into the first question. Can I use a radio button to assign multiple variables? I want to use a radiobutton to decide var1 and add 5 to var2, is that possible?
It's possible, but you shouldn't do this. Imagine an indecisive user switching back and forth between both radio buttons a few times and accidentally gaining a large number to some variable. Instead, a safer approach would be to evaluate the answer in the next passage:
<<silently>>
<<if visited() is 1>>
/% you can omit this first <<if>> if the user can't return to this passage %/
<<if $radioButtonVariable is true>>
<<set $otherVar to 'something'>>
<<else>>
<<set $otherVar to 'another thing'>>
<</if>>
<</if>>
<</silently>>\
Passage text.
Second, I want a static textbox, one that the user can't change, is that a thing? I just want to give the illusion of input because it fits in with the rest of the story. I'm chill if it's not a thing, it's more an aesthetics thing.
You can just use pure HTML for this; the 'readonly' attribute will do what you want:
<input type='text' readonly='readonly' value='blah blah blah' />
Third I want to make a textbox (or is there a drop down menu I can use? I didn't see one) that has a limit to what the user can put in, which would be the numbers 01 through 30, no letters.
Here's a simple drop down macro:
Macro.add('dropdown', {
handler : function () {
var $wrapper = $(document.createElement('span'));
var $drop = $(document.createElement('select'));
var opts = this.args;
var storyVar = opts.shift();
var store;
var i;
// handle simple errors
if (typeof storyVar == 'undefined') {
return this.error('No arguments provided.');
}
if (opts.length < 1) {
return this.error('Must provide at least one list option.');
}
if (storyVar.charAt(0) === '$') {
store = State.variables;
} else if (storyVar.charAt(0) === '_') {
store = State.temporary;
} else {
return this.error('First argument should be a valid TwineScript variable.');
}
storyVar = storyVar.slice(1);
store[storyVar] = opts[0];
for (i = 0; i < opts.length; i++) {
var $option = $(document.createElement('option'));
$option
.attr('value', opts[i])
.wiki(opts[i])
.appendTo($drop);
}
$drop
.attr({
name : 'dropdown-macro',
id : storyVar
})
.appendTo($wrapper);
$wrapper
.addClass('macro-' + this.name)
.appendTo(this.output);
$(document).on('change', 'select#' + storyVar, function () {
store[storyVar] = $('select#' + storyVar).val();
})
}
});
Syntax:
<<dropdown '$variable' 'option1' 'option2' 'option3'>>
The macro sets the provided variable (must be a story variable ($var) or a temporary variable (_var)) to the indicated option. In your case, you'd want something like:
<<dropdown '$var' '01' '02' '03' '04' ...etc>>
You could also use a text box, let me know if you want an example of that instead.
Fourth, is there an easy (or rather shorter) way to assign variables to whatever number the textbox is. Like if it's a 20 I want to add a bunch of things to several variables. Like
Not really, no. Other that using semicolons or commas (as shown by @Chillbit), there isn't much else you can do.
Edit. Formatting