Happened across this game really randomly and saw the word bunnies so I went for it. Perfect for just trying to play something fun text-based that still requires you to use some brain-cells. I love it! Excuse me while I go order my bunnies to dig more warrens so we can wage war later.
Hey check it out! “Bunnies” has done more good in the world… @Jacic has released a game “Dragon Chronicles” that is slightly influenced by this game Check it out here, I’m enjoying it: https://dashingdon.com/play/jacic/dragon-chronicles/mygame/
Are you still working on BUNNIES!
“Bunnies!” is basically finished, it’s everything I intended it to be, and I learned a lot about choice script doing it. I guess the only thing i wished it had was commas in the numbers (hard to tell exactly what “162547282 bunnies” really means…
I’m working on other projects now.
Hey Bob, I just wanted to provide a sample of code for associating a text value with a numerical one. It doesn’t give you commas in your number, but it will give you a description of how big that number is, i.e. “under ten” or “under one thousand” etc.
Thanks for a hopping good time with BUNNIES!
Code
*title test
*author test
*create number 5
*create amount ""
*label main
*gosub amount
Amount of bunnies: ${number}
*line_break
(${amount})
Change this amount to...?
*input_number number 1 9999999999
*goto main
*label amount
*if length (number) = 1
*set amount "under ten"
*if length (number) = 2
*set amount "under one hundred"
*if length (number) = 3
*set amount "under one thousand"
*if length (number) = 4
*set amount "under ten thousand"
*if length (number) = 5
*set amount "under one hundred thousand"
*if length (number) = 6
*set amount "under one million"
*if length (number) = 7
*set amount "under ten million"
*if length (number) = 8
*set amount "under one hundred million"
*if length (number) = 9
*set amount "under one billion"
*if length (number) > 9
*set amount "over one billion"
*return
hi, Carlos, and thanks!
Does choicescript have a MID$() function? (the ability to take a part of a string, starting at character x, for length y)
I bet i could turn that method into something with commas if there’s a mid()
(probably not what people are hoping for… I suppose they want content)
There’s not really a MID$()
function, but we can achieve functionality very similar to that; it’s just a bit of work. Choicescript does have an &
function, meaning that it’s possible to add things on.
For example:
*temp one "hello"
*temp two " "
*temp three "world"
*temp four ""
*set four &one
*set four &two
*set four &three
four = ${four}
In this example, the variable four would display hello world
However, let’s change the code and see what happens:
*temp one "hello"
*temp two " "
*temp three "world"
*temp four ""
*set four &one
*set four &two
*set four &(three#1)
four = ${four}
Now, the variable four displays as hello w
When you use a code like *set variable &(thing#number)
you are telling it to add a specific character in that string. That said, all you’d have to do is…
- check to see if the length of the numerical value is over 3, i.e. 4567
- add “one number at a time”
– i.e. in the above example I would use an empty variable then concatenate the 7, then the 6, then the 5, then add a comma, then the 4 so if I did that it would display as 4,567
As far as when to put in the comma, you can create a counter and come up with a subroutine. The limits are your imagination.
The problem with doing that is that you would end up with 765,4 instead of 4,567… so it’s buggy but you get the general idea.
Edit: Solved it! Go here for a solution: Adding commas to numbers
interesting gameplay would be nice to have a easy difficulty for the more casual interactive novel readers
Looking forward to seeing them in the future
Hi all, I just want to say that I am working on an update. @BABYCRY , that’s a math error, it will be fixed in the update.
In general, I’m doing some balancing, and also adding a few more events. Nothing major, but probably something worth looking at again
OK, the update is live
This topic was automatically closed 60 days after the last reply. If you want to reopen your WiP, contact the @moderators.