The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script Multiple Choice Test

Notices
For all updates, view the main page.

Binary ROM Hacking Need a helping hand or just want to talk about binary ROM hacks? Get comments and answers to any ROM Hacking-related problems, questions or thoughts you have here.

Ad Content
Reply
 
Thread Tools
  #1   Link to this post, but load the entire thread.  
Old March 4th, 2020 (10:43 AM).
Kurapik's Avatar
Kurapik Kurapik is offline
 
Join Date: Aug 2012
Gender: Male
Posts: 129
Is it possible to insert a multiple choice test in Emerald in order to receive an item depending on the answers given?
(eg. the test in Dragon's Den to obtain Dratini)

My goal is to script a multiple choice test in order to give the player a Firestone/thunderstone/leafstone depending on the score realized with the answers.
__________________

Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old March 4th, 2020 (10:50 AM).
mgriffin's Avatar
mgriffin mgriffin is offline
 
Join Date: Apr 2014
Posts: 1,406
I think so? Just have a variable that you update differently based on the answers that are chosen, and at the end check if its value is the right number, and if so, give the item?
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old March 5th, 2020 (2:49 AM).
DrFuji's Avatar
DrFuji DrFuji is offline
Heiki Hecchara‌‌
 
Join Date: Sep 2009
Location: Aussie
Age: 30
Gender: Male
Nature: Jolly
Posts: 1,693
You would be looking to use the 'multichoice' scripting command. In Emerald it displays a message with multiple answers that you can choose between with the number of the answer chosen stored in variable 0x800D which can then be compared. It would look something like this:

Code:
...
multichoice 0x0 0x0 0x2 0x1 // Put's multichoice 0x2 in the top left corner of the screen, the B button cannot be used to exit
copyvar 0x8000 0x800D // Moving the player's answer from variable 0x800D to 0x8000 as 0x800D will be overwritten automatically by later commands
compare 0x8000 0x0 // Checking if the value in 0x8000 is 0x0
if 0x1 goto @ThunderStone // If it is, they chose the first answer and get a Thunder Stone
compare 0x8000 0x1 // Checking if the value in 0x8000 is 0x1
if 0x1 goto @FireStone // If it is, they chose the second answer and get a Fire Stone
compare 0x8000 0x2 // Checking if the value in 0x8000 is 0x2
if 0x1 goto @LeafStone // If it is, they chose the third answer and get a Leaf Stone
...
This is a very basic write up of how the multichoice system works but I'd suggest reading diegoisawesome's XSE tutorial to properly learn its functions. In addition, if you're using Emerald's binaries rather than the decomps, you can use LSA's multichoice box editor to change the number of available answers/ total boxes.
__________________
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old March 10th, 2020 (2:54 AM).
Kurapik's Avatar
Kurapik Kurapik is offline
 
Join Date: Aug 2012
Gender: Male
Posts: 129
Quote:
Originally Posted by DrFuji View Post
You would be looking to use the 'multichoice' scripting command. In Emerald it displays a message with multiple answers that you can choose between with the number of the answer chosen stored in variable 0x800D which can then be compared. It would look something like this:

Code:
...
multichoice 0x0 0x0 0x2 0x1 // Put's multichoice 0x2 in the top left corner of the screen, the B button cannot be used to exit
copyvar 0x8000 0x800D // Moving the player's answer from variable 0x800D to 0x8000 as 0x800D will be overwritten automatically by later commands
compare 0x8000 0x0 // Checking if the value in 0x8000 is 0x0
if 0x1 goto @ThunderStone // If it is, they chose the first answer and get a Thunder Stone
compare 0x8000 0x1 // Checking if the value in 0x8000 is 0x1
if 0x1 goto @FireStone // If it is, they chose the second answer and get a Fire Stone
compare 0x8000 0x2 // Checking if the value in 0x8000 is 0x2
if 0x1 goto @LeafStone // If it is, they chose the third answer and get a Leaf Stone
...
This is a very basic write up of how the multichoice system works but I'd suggest reading diegoisawesome's XSE tutorial to properly learn its functions. In addition, if you're using Emerald's binaries rather than the decomps, you can use LSA's multichoice box editor to change the number of available answers/ total boxes.
Thank you very much!
__________________

Reply With Quote
Reply

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account
Ad Content

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 9:18 AM.