Minnow
365
Quicktest, if questions about it here are any indication, is a bully.
3 Likes
LisHz
366
Iāve also run into that annoyance with setting variables to zero, too. Iāve just taken to setting my variables to 1 at the start. So like,
*temp triplet 1
And then setting it as the real thing before I use the variable in multireplace.
2 Likes
Iām going to be real with yāall. Like, painfully real. And prove that Iām not as far removed from the noob I was at the top of this thread as my Hosted Games Author title implies.
I was just about to ask how to type the vertical line that divides the different options, and then I realized thereās a key on the keyboard for that. And Iām about 75% sure that key snuck on here somehow in the night, because thatās the only explanation for someone who has been using a computer for 20 years not recognizing a key on a keyboard. Right? Yeah, it snuck on there. Iām sticking with that.
5 Likes
will
368
Fun fact itās called a pipe!
3 Likes
Szaal
369
Huh, I called it separator bar.
1 Like
Trying to make some achievements, noticed the name variable $!{aname} shows up as exactly that in the text body of the achievement. Is there a reason it did not update when the variable was set, and can I fix it or is it just not possible?
Minnow
371
Iāll admit Iām guessing here, but thereās probably no fix. The achievement will persist across all subsequent play-throughs, while the value of aname absolutely wonāt.
1 Like
Minnow
373
@hustlertwo I just discovered this temp variable is technically unnecessary. Instead, you could do the following:
*stat_chart
text ("$" & money) Money
Basically, at many points youād stick a variableās name, you could instead stick a pair of parentheses and do stuff to the variable inside those parentheses!
Except itās not actually changing the variable itself, only changing the way the player sees the variable. The variableās value is unchanged. And sometimes thatās exactly what you need!
In the example above, I used concatenation, but the process works just as well for arithmetic. Behold:
It's currently ${temperature}°F. That means it's
*if temperature > 32
${(temperature - 32)} degrees above
*if temperature = 32
exactly
*if temperature < 32
${(32 - temperature)} degrees below
freezing.
Iām glad I decided to test this idea. Itās pretty neat.
3 Likes
i was looking on the choice of games wiki for dice coding cause id like to have it so that i could make it harder for people to fight against a zombie hoard and i want to possibly make there a chance for the character to get bit and a chance for people to turn on you if you lead the group if you make an evil decision but also to give the player a buff with how much they fear you if you go down that route
i also was looking for a simple item collecting code to set up into stats menu that tells how much of the item you have and when you use it it goes down or find more of the item it goes up
will
375
*create dice 0
...
*label roll_dice
*rand dice 1 6
You rolled a ${dice} on the die.
(alternatively)
You rolled a @{dice+1 |one|two|three|four|five|six} on the die.
Assuming your result is 2, youāll see either
You rolled a 2 on the die.
or
You rolled a two on the die.
depending on how you output the result.
1 Like
If you donāt want them to see the results of the roll and have it work behind the scenes DM-style, you just do like will said, but instead of outputting the answer, you use an *if for each outcome.
Forgive the lack of indents in the following, I am on my phone.
For example:
*temp fightroll 0
*rand fightroll 1 3
*if (fightroll = 1)
*goto youdie
*if (fightroll = 2)
*goto youlive
*if (fightroll = 3)
*goto youwin
1 Like
Okay, so I am wanting to institute a save feature for my WIP. I tried it with Nuclear Powered Toaster and it never worked right, but I am sure thatās because I didnāt ask about it here, where all the smart people hang out. How do I do this and have it actually function this time?
Which one specifically, the on-the-fly or chapter restart save system?
For the former, all you need to do is check a box on dashingdon. For the latter youād need to write one, where it takes a snapshot of all the var values at the start of the chapter and then restores them if the reader chooses to reload at the end. I do believe a subroutine (in a separate .txt scene) should be the most efficient here. Then you just use *gosub_scene.
1 Like
The Dashingdon one is all I want. This is just to help my beta readers, not for the finished product. I clicked the box and it didnāt work. I inserted the code it mentions and it killed the whole demo (said it was an invalid command I believe). This is the same thing that happened when I tried it with NPT, except this time I have time enough to try and resolve it. What specifically is needed to use it?
I removed the code, since it made the demo unplayable. I can reinsert it later today or tomorrow to try again.
Szaal
382
You just need to insert it for your dashingdon version. *sm_init works in tandem with the checkbox thing in the site.
In your case, your error only comes up in your local version as you donāt have something to checkbox.
1 Like
Iād also like to add that you make sure that *sm_init goes after all the *create and *achievement lines in startup. Otherwise itāll produce an error.
Yeap!
1 Like
Ah, thatās the issue. First I put it before everything, then after title but in the middle of the create list. It needs to literally be right above the start of the story I take it?
@Szaal I was testing it off the Dashingdon, for the brief time I had the version with the code uploaded. Does that mean it will prevent me testing locally though?
Szaal
385
If you want the feature to present in your local version, thereās more things to do. You can check it out on the saving plugin thread, but in the mean time, Iām at outside.
Iāll try to do something once I get back.
1 Like