Syntax Error

Matsoman

MatsoKing
Member
Joined
Jul 12, 2013
Messages
14
Reaction score
0
First Language
English
Primarily Uses
]When I use the quest journal code to make quests, this error shows up.

http://imgur.com/iCEDe91

I used the template it gave me and also put in the latest script in the script editor.

This is the full version of what I put into script. I can't fit this whole thing so I had to shorten it.

when 99 q[:name] = "??????" q[:icon_index] = 0 q[:level] = 0q[:description] = "" q[:objectives][0] = "" q[:objectives][1] = "" q[:objectives][2] = "" q[:prime_objectives] = [0, 1, 2] q[:custom_categories] = [] q[:banner] = "" q[:banner_hue] = 0 q[:client] = "" q[:location] = "" q[:rewards] = []
q[:common_event_id] = 0


This is the entire part of the code I was typing in (including instructions)

  1.   # Template:
  2.     #
  3.     #  When making a new quest, I recommend that you copy and paste the
  4.     # following template, removing whichever lines you don't want to alter.
  5.     # Naturally, you need to remove the #~. You can do so by highlighting
  6.     # the entire thing and pressing CTRL+Q:
  7. #~     when 2 # <= REMINDER: The Quest ID MUST be unique
  8. #~       q[:name]              = "??????"
  9. #~       q[:icon_index]        = 0
  10. #~       q[:level]             = 0
  11. #~       q[:description]       = ""
  12. #~       # REMINDER: You can make as many objectives as you like, but each must
  13. #~       # have a unique ID.
  14. #~       q[:objectives][0]     = ""
  15. #~       q[:objectives][1]     = ""
  16. #~       q[:objectives][2]     = ""
  17. #~       q[:prime_objectives]  = [0, 1, 2]
  18. #~       q[:custom_categories] = []
  19. #~       q[:banner]            = ""
  20. #~       q[:banner_hue]        = 0
  21. #~       q[:client]            = ""
  22. #~       q[:location]          = ""
  23. #~       q[:rewards]           = []
  24. #~       q[:common_event_id]   = 0
 
Last edited by a moderator:

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
can we see the whole script, please?
 

BigEd781

undefined method 'stupid_title' found for nil:NilC
Veteran
Joined
Mar 1, 2012
Messages
940
Reaction score
304
First Language
Dothraki
Primarily Uses
N/A
Please show the rest of the code around that snippet.  The error is telling you that the "when 99" bit is in the wrong place, but it could be caused by an error elsewhere.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
the error message "unexpected when 99" could be cause by anything anywhere, but the best guess is that the code before the when is incomplete and missing something - otherwise the "when" wouldn't be unexpected.

So please show the full code for this.
 

Matsoman

MatsoKing
Member
Joined
Jul 12, 2013
Messages
14
Reaction score
0
First Language
English
Primarily Uses
I updated it. 
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
I updated it. 
Wrong

That update is not what we requested.

We need the lines BEFORE the line with "When 99" - preferably at least beginning with "when 95" and if existing the lines after that until "when 102" or so.

(Numbers where chosen to explain that we need more data, I don't know how far or how few there are in your script)
 

Matsoman

MatsoKing
Member
Joined
Jul 12, 2013
Messages
14
Reaction score
0
First Language
English
Primarily Uses
That is the entire script. There is no "When 95". The quest ID is 99 so the code explains "when 99".
 

Dark Paladin

Game Designer
Veteran
Joined
Jul 10, 2012
Messages
165
Reaction score
10
First Language
English
Primarily Uses
RMMV
You can fit the entire script in a codebox then in spoilers. We won't be able to help you unless we see the whole script and not just the configuration.

Alternatively you could upload a demo somewheres then post it for someone to look at.

The codebox and spoiler buttons can be found here:

copy the entire script from your project. Use ctrl A to select the whole thing.

1:Click the Code brackets as described in the picture below

2: select PHP/Generic/Autodetect from the code type 

3: Set starting line to 1 or leave it blank

4:paste the code into the message box at the bottom

5:click "OK"

6: Highlight the entire Codebox and text

7:Click the bbcode button as described in the picture

8:Select spoiler fromt he dropdown box

9: Click OK.

 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
That is the entire script. There is no "When 95". The quest ID is 99 so the code explains "when 99".
But that doesn't change the fact that we need to know what is in your code before and after that snippet you gave, because the error is most probably NOT inside that snippet.

But we can't even be sure about that because we still don't know what is before and after those lines you gave us.

EDIT:

That snippet is part of the quest journal script you discussed in the other topic.

The quest data and its functions start in line 368 of that script and go (if no quests are added to the examples) to lline 502 (including both "end"s.

THAT is a single function, and we need this entire function in your version of it to be able to look for the bug.

Please use spoiler and code tags when placing it here to allow for better readability
 
Last edited by a moderator:

Dark Paladin

Game Designer
Veteran
Joined
Jul 10, 2012
Messages
165
Reaction score
10
First Language
English
Primarily Uses
RMMV
I'm going to assume your using modern algebra's script Your setup should look like this::

Code:
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  # * Setup Quest  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  def self.setup_quest(quest_id)    q = { objectives: [] }    case quest_id    #\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\    #  BEGIN Editable Region B    #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||    #    Quest Setup    #    #  This is where you set up the data for every quest in the game. While    # it may seem complicated, I urge you to pay attention and, once you get    # the hang of it, I am sure it will quickly become second nature.     #    #  Every single quest should be set up in the following format, but note    # that if you are not setting anything for a particular aspect, you can     # delete that line. Anyway, this is what each quest should look like, with    # the values on the left being the default values if you don't set them:    #    #  when quest_id    #   q[:name]              = "??????"    #   q[:icon_index]        = 0    #   q[:level]             = 0    #   q[:description]       = ""    #   q[:banner]            = ""    #   q[:banner_hue]        = 0    #   q[:objectives][0]     = ""    #   q[:objectives][1]     = ""    #   q[:objectives][2]     = ""    #   q[:objectives][n]     = ""    #   q[:prime_objectives]  = [0, 1, 2, n]    #   q[:custom_categories] = []    #   q[:client]            = ""    #   q[:location]          = ""    #   q[:rewards]           = []    #   q[:common_event_id]   = 0    #   q[:layout]            = false    #    #  For each line, with the exception of objectives, it is only the value on     # the right of the equals sign that you will need to change. Now I will     # explain each line:    #    # when quest_id    #    quest_id - is an integer of your choosing, and this is how you     #        reference a quest in order to advance and do anything else. It     #        must be unique for every quest; if you use 1 for the first quest,     #        you cannot use 1 for any other quest.    #    #   q[:name]              = ""    #     "" - This line sets the name of the quest which shows in the Quest     #        List.    #       #   q[:icon_index]        = 0    #     0  - This line sets the icon to be used for this quest. It will show    #        to the left of the quest's name in the Quest List.    #    #   q[:level]             = 0    #     0  - This line sets the level of the quest. If 0, no level will be    #        shown. See the level options at lines 441-458 for more detail.    #       #   q[:description]       = ""    #     "" - This line sets the description of the quest. You can use message     #        codes in this string, but if you are using "" then you need to use    #        \\ to identify codes and not just \. Ie. It's \\v[x], not \v[x]    #    #   q[:objectives][0]     = ""    #   q[:objectives][1]     = ""    #   q[:objectives][2]     = ""    #   q[:objectives][n]     = ""    #  Objectives are slightly different. Notice that after q[:objectives] on    # each line there is an integer enclosed in square brackets:    #    [n] - This is the ID of the objective, and n MUST be an integer. No     #       quest can have more than one objective with the same ID. This is     #       how you identify which objective you want to reveal, complete or     #       fail. That said, you can make as many objectives as you want, as     #       long as you give them all distinct IDs. The IDs should be in     #       sequence as well, so there shouldn't be a q[:objectives][5] if     #       there is no q[:objectives][4].    #     "" - This is the text of the objective. You can use message codes in     #        this string, but if you are using "" then you will need to use     #        \\ to identify codes and not just \. Ie: It's \\v[x], not \v[x]    #    #   q[:prime_objectives]  = [0, 1, 2, n]    #     [0, 1, 2, n] - This array determines what objectives need to be     #        completed in order for the quest to be complete. In other words,     #        all of the objectives with the IDs in this array need to be     #        complete for the quest to be complete. If any one of them is     #        failed, the quest will be failed. If you remove this line     #        altogether, then all objectives are prime. If you set this to [],    #        then the quest will never be automatically completed or failed and    #        you need to use the manual options described at lines 208-219.    #    #   q[:custom_categories] = []    #     [] - This allows you to set an array of custom categories for this    #        quest, whiich means this quest will show up in each of those     #        categories if you add it to the CATEGORIES array at line 370.    #        Note that each category you make must be identified by a unique     #        :symbol, and you must set up all the category details for that     #        :symbol.     #    #   q[:banner]            = ""    #     "" - This line sets the banner to be used for a quest. It must be the    #        filename of an image in the Pictures folder of Graphics.    #    #   q[:banner_hue]        = 0    #     0 - The hue of the banner graphic, if used    #    #   q[:client]            = ""    #     "" - This line sets the client name for this quest. (basic data)    #    #   q[:location]          = ""    #     "" - This line sets the location of the quest. (basic data)    #    #   q[:rewards]           = []    #    [] - In this array, you can identify particular rewards that will     #       show up. Each reward should be in its own array and can be any of    #       the following:    #          [:item, ID, n],    #          [:weapon, ID, n],    #          [:armor, ID, n],    #          [:gold, n],    #          [:exp, n],    #       where ID is the ID of the item, weapon or armour you want    #       distributed and n is the amount of the item, weapon, armor, gold,     #       or experience you want distributed. Additionally, you can also set    #       some text to show up in the rewards format but which wouldn't be    #       automatically distributed. You would need to specify that type of    #       reward text in the following format:    #          [:string, icon_index, "string", "vocab"],    #       where icon_index is the icon to be shown, "string" is what you     #       would show up as the amount, and "vocab" is what would show up as a    #       label between the icon and the amount.    #          #    #   q[:common_event_id]   = 0    #     0  - This allows you to call the identified common event immediately    #        and automatically once the quest is completed. It is generally     #        not recommended, as for most quests you should be controlling it    #        enough not to need this feature.    #    #   q[:layout]            = false    #     false - The default value for this is false, and when it is false the    #        layout for the quest will be inherited from the default you set at    #        302. However, you can also give the quest its own layout - the     #        format would be the same as you set for the default at line 307.    #      # Template:    #    #  When making a new quest, I recommend that you copy and paste the    # following template, removing whichever lines you don't want to alter.     # Naturally, you need to remove the #~. You can do so by highlighting    # the entire thing and pressing CTRL+Q:    when 1 # <= REMINDER: The Quest ID MUST be unique      q[:name]              = "??????"      q[:icon_index]        = 0      q[:level]             = 0      q[:description]       = ""      # REMINDER: You can make as many objectives as you like, but each must       # have a unique ID.      q[:objectives][0]     = ""       q[:objectives][1]     = ""      q[:objectives][2]     = ""      q[:prime_objectives]  = [0, 1, 2]      q[:custom_categories] = []      q[:banner]            = ""      q[:banner_hue]        = 0      q[:client]            = ""      q[:location]          = ""      q[:rewards]           = []      q[:common_event_id]   = 0    when 2 # Quest 1 - SAMPLE QUEST      q[:name]              = "Runaway Bride"      q[:level]             = 3      q[:icon_index]        = 7      q[:description]       = "A local woman was abducted by bandits on the night of her wedding."      q[:objectives][0]     = "Talk to Boris"      q[:objectives][1]     = "Search the Haunted Woods for Boris' wife, Ladia"      q[:objectives][2]     = "Slay the Bandits"      q[:objectives][3]     = "Escort Ladia back to Boris"      q[:prime_objectives]  = [1, 2]      q[:custom_categories] = []      q[:banner]            = ""      q[:banner_hue]        = 0      q[:client]            = "Boris"      q[:location]          = "The Haunted Woods"      q[:common_event_id]   = 0      q[:rewards]           = [        [:item, 1, 3],        [:gold, 500],      ]      q[:layout]            = false    #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||    #  END Editable Region B    #//////////////////////////////////////////////////////////////////////    end    q  endend
 

Matsoman

MatsoKing
Member
Joined
Jul 12, 2013
Messages
14
Reaction score
0
First Language
English
Primarily Uses
I'm going to assume your using modern algebra's script Your setup should look like this::

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  # * Setup Quest  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  def self.setup_quest(quest_id)    q = { objectives: [] }    case quest_id    #\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\    #  BEGIN Editable Region B    #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||    #    Quest Setup    #    #  This is where you set up the data for every quest in the game. While    # it may seem complicated, I urge you to pay attention and, once you get    # the hang of it, I am sure it will quickly become second nature.     #    #  Every single quest should be set up in the following format, but note    # that if you are not setting anything for a particular aspect, you can     # delete that line. Anyway, this is what each quest should look like, with    # the values on the left being the default values if you don't set them:    #    #  when quest_id    #   q[:name]              = "??????"    #   q[:icon_index]        = 0    #   q[:level]             = 0    #   q[:description]       = ""    #   q[:banner]            = ""    #   q[:banner_hue]        = 0    #   q[:objectives][0]     = ""    #   q[:objectives][1]     = ""    #   q[:objectives][2]     = ""    #   q[:objectives][n]     = ""    #   q[:prime_objectives]  = [0, 1, 2, n]    #   q[:custom_categories] = []    #   q[:client]            = ""    #   q[:location]          = ""    #   q[:rewards]           = []    #   q[:common_event_id]   = 0    #   q[:layout]            = false    #    #  For each line, with the exception of objectives, it is only the value on     # the right of the equals sign that you will need to change. Now I will     # explain each line:    #    # when quest_id    #    quest_id - is an integer of your choosing, and this is how you     #        reference a quest in order to advance and do anything else. It     #        must be unique for every quest; if you use 1 for the first quest,     #        you cannot use 1 for any other quest.    #    #   q[:name]              = ""    #     "" - This line sets the name of the quest which shows in the Quest     #        List.    #       #   q[:icon_index]        = 0    #     0  - This line sets the icon to be used for this quest. It will show    #        to the left of the quest's name in the Quest List.    #    #   q[:level]             = 0    #     0  - This line sets the level of the quest. If 0, no level will be    #        shown. See the level options at lines 441-458 for more detail.    #       #   q[:description]       = ""    #     "" - This line sets the description of the quest. You can use message     #        codes in this string, but if you are using "" then you need to use    #        \\ to identify codes and not just \. Ie. It's \\v[x], not \v[x]    #    #   q[:objectives][0]     = ""    #   q[:objectives][1]     = ""    #   q[:objectives][2]     = ""    #   q[:objectives][n]     = ""    #  Objectives are slightly different. Notice that after q[:objectives] on    # each line there is an integer enclosed in square brackets:    #    [n] - This is the ID of the objective, and n MUST be an integer. No     #       quest can have more than one objective with the same ID. This is     #       how you identify which objective you want to reveal, complete or     #       fail. That said, you can make as many objectives as you want, as     #       long as you give them all distinct IDs. The IDs should be in     #       sequence as well, so there shouldn't be a q[:objectives][5] if     #       there is no q[:objectives][4].    #     "" - This is the text of the objective. You can use message codes in     #        this string, but if you are using "" then you will need to use     #        \\ to identify codes and not just \. Ie: It's \\v[x], not \v[x]    #    #   q[:prime_objectives]  = [0, 1, 2, n]    #     [0, 1, 2, n] - This array determines what objectives need to be     #        completed in order for the quest to be complete. In other words,     #        all of the objectives with the IDs in this array need to be     #        complete for the quest to be complete. If any one of them is     #        failed, the quest will be failed. If you remove this line     #        altogether, then all objectives are prime. If you set this to [],    #        then the quest will never be automatically completed or failed and    #        you need to use the manual options described at lines 208-219.    #    #   q[:custom_categories] = []    #     [] - This allows you to set an array of custom categories for this    #        quest, whiich means this quest will show up in each of those     #        categories if you add it to the CATEGORIES array at line 370.    #        Note that each category you make must be identified by a unique     #        :symbol, and you must set up all the category details for that     #        :symbol.     #    #   q[:banner]            = ""    #     "" - This line sets the banner to be used for a quest. It must be the    #        filename of an image in the Pictures folder of Graphics.    #    #   q[:banner_hue]        = 0    #     0 - The hue of the banner graphic, if used    #    #   q[:client]            = ""    #     "" - This line sets the client name for this quest. (basic data)    #    #   q[:location]          = ""    #     "" - This line sets the location of the quest. (basic data)    #    #   q[:rewards]           = []    #    [] - In this array, you can identify particular rewards that will     #       show up. Each reward should be in its own array and can be any of    #       the following:    #          [:item, ID, n],    #          [:weapon, ID, n],    #          [:armor, ID, n],    #          [:gold, n],    #          [:exp, n],    #       where ID is the ID of the item, weapon or armour you want    #       distributed and n is the amount of the item, weapon, armor, gold,     #       or experience you want distributed. Additionally, you can also set    #       some text to show up in the rewards format but which wouldn't be    #       automatically distributed. You would need to specify that type of    #       reward text in the following format:    #          [:string, icon_index, "string", "vocab"],    #       where icon_index is the icon to be shown, "string" is what you     #       would show up as the amount, and "vocab" is what would show up as a    #       label between the icon and the amount.    #          #    #   q[:common_event_id]   = 0    #     0  - This allows you to call the identified common event immediately    #        and automatically once the quest is completed. It is generally     #        not recommended, as for most quests you should be controlling it    #        enough not to need this feature.    #    #   q[:layout]            = false    #     false - The default value for this is false, and when it is false the    #        layout for the quest will be inherited from the default you set at    #        302. However, you can also give the quest its own layout - the     #        format would be the same as you set for the default at line 307.    #      # Template:    #    #  When making a new quest, I recommend that you copy and paste the    # following template, removing whichever lines you don't want to alter.     # Naturally, you need to remove the #~. You can do so by highlighting    # the entire thing and pressing CTRL+Q:    when 1 # <= REMINDER: The Quest ID MUST be unique      q[:name]              = "??????"      q[:icon_index]        = 0      q[:level]             = 0      q[:description]       = ""      # REMINDER: You can make as many objectives as you like, but each must       # have a unique ID.      q[:objectives][0]     = ""       q[:objectives][1]     = ""      q[:objectives][2]     = ""      q[:prime_objectives]  = [0, 1, 2]      q[:custom_categories] = []      q[:banner]            = ""      q[:banner_hue]        = 0      q[:client]            = ""      q[:location]          = ""      q[:rewards]           = []      q[:common_event_id]   = 0    when 2 # Quest 1 - SAMPLE QUEST      q[:name]              = "Runaway Bride"      q[:level]             = 3      q[:icon_index]        = 7      q[:description]       = "A local woman was abducted by bandits on the night of her wedding."      q[:objectives][0]     = "Talk to Boris"      q[:objectives][1]     = "Search the Haunted Woods for Boris' wife, Ladia"      q[:objectives][2]     = "Slay the Bandits"      q[:objectives][3]     = "Escort Ladia back to Boris"      q[:prime_objectives]  = [1, 2]      q[:custom_categories] = []      q[:banner]            = ""      q[:banner_hue]        = 0      q[:client]            = "Boris"      q[:location]          = "The Haunted Woods"      q[:common_event_id]   = 0      q[:rewards]           = [        [:item, 1, 3],        [:gold, 500],      ]      q[:layout]            = false    #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||    #  END Editable Region B    #//////////////////////////////////////////////////////////////////////    end    q  endend
That is what I used.
 

Dark Paladin

Game Designer
Veteran
Joined
Jul 10, 2012
Messages
165
Reaction score
10
First Language
English
Primarily Uses
RMMV
That is what I used.
Just make sure that your script matches the one I posted and it should work. 

If even one comma, end, bracket is missing it will throw errors. If you can post what you have edited like I did then I could look for you.

The error is not from your template. Its somewheres else in the script.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
That is what I used.
True, but you made an error when trying to enter your quests - probably while you were deleting the example quests in that script.

Because if you didn't made one, then it would work.

To find that error we need your version of the entire script block as put up by DarkPaladin - the entire hundred or so lines.

Please put this up for us to look for the problem.
 

Dark Paladin

Game Designer
Veteran
Joined
Jul 10, 2012
Messages
165
Reaction score
10
First Language
English
Primarily Uses
RMMV
I updated my previous post to show you how to properly make a codebox in a spoiler.
 

Matsoman

MatsoKing
Member
Joined
Jul 12, 2013
Messages
14
Reaction score
0
First Language
English
Primarily Uses
This is the quest I used.

when 99 q[:name] = "The First Quest" q
[:level] = 1
q[:description] = "Save the man in the
woods!" q[:objectives][0] = "Kill the
slimes" q[:prime_objectives] = [0] q
[:client] = "Steven" q[:location] =
"Burnsley Woods" q[:rewards] = [:exp, 100]
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
This is the quest I used.

when 99 q[:name] = "The First Quest" q[:level] = 1

q[:description] = "Save the man in the

woods!" q[:objectives][0] = "Kill the

slimes" q[:prime_objectives] = [0] q

[:client] = "Steven" q[:location] =

"Burnsley Woods" q[:rewards] = [:exp, 100]
Any answer of you that has less than about a hundred lines of code is the wrong one. we don't need the quest you wantd to use, we need the entire function tat handles the quest to look for the error.
 

Dark Paladin

Game Designer
Veteran
Joined
Jul 10, 2012
Messages
165
Reaction score
10
First Language
English
Primarily Uses
RMMV
This is the quest I used.

when 99 q[:name] = "The First Quest" q[:level] = 1

q[:description] = "Save the man in the

woods!" q[:objectives][0] = "Kill the

slimes" q[:prime_objectives] = [0] q

[:client] = "Steven" q[:location] =

"Burnsley Woods" q[:rewards] = [:exp, 100]
....

Once again you need to post the ENTIRE SECTION OF THE SCRIPT not just the quest you are making. AND you MUST put it in a CODEBOX AND SPOILER,  NOT just the spoiler else it becomes unreadable.

If you don't know how to do this re-read post #8

I'm not trying to be rude to you but we have already explained this several times.

When you are done it should look EXACTLY like this:

Code:
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  # * Setup Quest  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  def self.setup_quest(quest_id)    q = { objectives: [] }    case quest_id    #\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\    #  BEGIN Editable Region B    #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||    #    Quest Setup    #    #  This is where you set up the data for every quest in the game. While    # it may seem complicated, I urge you to pay attention and, once you get    # the hang of it, I am sure it will quickly become second nature.     #    #  Every single quest should be set up in the following format, but note    # that if you are not setting anything for a particular aspect, you can     # delete that line. Anyway, this is what each quest should look like, with    # the values on the left being the default values if you don't set them:    #    #  when quest_id    #   q[:name]              = "??????"    #   q[:icon_index]        = 0    #   q[:level]             = 0    #   q[:description]       = ""    #   q[:banner]            = ""    #   q[:banner_hue]        = 0    #   q[:objectives][0]     = ""    #   q[:objectives][1]     = ""    #   q[:objectives][2]     = ""    #   q[:objectives][n]     = ""    #   q[:prime_objectives]  = [0, 1, 2, n]    #   q[:custom_categories] = []    #   q[:client]            = ""    #   q[:location]          = ""    #   q[:rewards]           = []    #   q[:common_event_id]   = 0    #   q[:layout]            = false    #    #  For each line, with the exception of objectives, it is only the value on     # the right of the equals sign that you will need to change. Now I will     # explain each line:    #    # when quest_id    #    quest_id - is an integer of your choosing, and this is how you     #        reference a quest in order to advance and do anything else. It     #        must be unique for every quest; if you use 1 for the first quest,     #        you cannot use 1 for any other quest.    #    #   q[:name]              = ""    #     "" - This line sets the name of the quest which shows in the Quest     #        List.    #       #   q[:icon_index]        = 0    #     0  - This line sets the icon to be used for this quest. It will show    #        to the left of the quest's name in the Quest List.    #    #   q[:level]             = 0    #     0  - This line sets the level of the quest. If 0, no level will be    #        shown. See the level options at lines 441-458 for more detail.    #       #   q[:description]       = ""    #     "" - This line sets the description of the quest. You can use message     #        codes in this string, but if you are using "" then you need to use    #        \\ to identify codes and not just \. Ie. It's \\v[x], not \v[x]    #    #   q[:objectives][0]     = ""    #   q[:objectives][1]     = ""    #   q[:objectives][2]     = ""    #   q[:objectives][n]     = ""    #  Objectives are slightly different. Notice that after q[:objectives] on    # each line there is an integer enclosed in square brackets:    #    [n] - This is the ID of the objective, and n MUST be an integer. No     #       quest can have more than one objective with the same ID. This is     #       how you identify which objective you want to reveal, complete or     #       fail. That said, you can make as many objectives as you want, as     #       long as you give them all distinct IDs. The IDs should be in     #       sequence as well, so there shouldn't be a q[:objectives][5] if     #       there is no q[:objectives][4].    #     "" - This is the text of the objective. You can use message codes in     #        this string, but if you are using "" then you will need to use     #        \\ to identify codes and not just \. Ie: It's \\v[x], not \v[x]    #    #   q[:prime_objectives]  = [0, 1, 2, n]    #     [0, 1, 2, n] - This array determines what objectives need to be     #        completed in order for the quest to be complete. In other words,     #        all of the objectives with the IDs in this array need to be     #        complete for the quest to be complete. If any one of them is     #        failed, the quest will be failed. If you remove this line     #        altogether, then all objectives are prime. If you set this to [],    #        then the quest will never be automatically completed or failed and    #        you need to use the manual options described at lines 208-219.    #    #   q[:custom_categories] = []    #     [] - This allows you to set an array of custom categories for this    #        quest, whiich means this quest will show up in each of those     #        categories if you add it to the CATEGORIES array at line 370.    #        Note that each category you make must be identified by a unique     #        :symbol, and you must set up all the category details for that     #        :symbol.     #    #   q[:banner]            = ""    #     "" - This line sets the banner to be used for a quest. It must be the    #        filename of an image in the Pictures folder of Graphics.    #    #   q[:banner_hue]        = 0    #     0 - The hue of the banner graphic, if used    #    #   q[:client]            = ""    #     "" - This line sets the client name for this quest. (basic data)    #    #   q[:location]          = ""    #     "" - This line sets the location of the quest. (basic data)    #    #   q[:rewards]           = []    #    [] - In this array, you can identify particular rewards that will     #       show up. Each reward should be in its own array and can be any of    #       the following:    #          [:item, ID, n],    #          [:weapon, ID, n],    #          [:armor, ID, n],    #          [:gold, n],    #          [:exp, n],    #       where ID is the ID of the item, weapon or armour you want    #       distributed and n is the amount of the item, weapon, armor, gold,     #       or experience you want distributed. Additionally, you can also set    #       some text to show up in the rewards format but which wouldn't be    #       automatically distributed. You would need to specify that type of    #       reward text in the following format:    #          [:string, icon_index, "string", "vocab"],    #       where icon_index is the icon to be shown, "string" is what you     #       would show up as the amount, and "vocab" is what would show up as a    #       label between the icon and the amount.    #          #    #   q[:common_event_id]   = 0    #     0  - This allows you to call the identified common event immediately    #        and automatically once the quest is completed. It is generally     #        not recommended, as for most quests you should be controlling it    #        enough not to need this feature.    #    #   q[:layout]            = false    #     false - The default value for this is false, and when it is false the    #        layout for the quest will be inherited from the default you set at    #        302. However, you can also give the quest its own layout - the     #        format would be the same as you set for the default at line 307.    #      # Template:    #    #  When making a new quest, I recommend that you copy and paste the    # following template, removing whichever lines you don't want to alter.     # Naturally, you need to remove the #~. You can do so by highlighting    # the entire thing and pressing CTRL+Q:    when 1 # <= REMINDER: The Quest ID MUST be unique      q[:name]              = "??????"      q[:icon_index]        = 0      q[:level]             = 0      q[:description]       = ""      # REMINDER: You can make as many objectives as you like, but each must       # have a unique ID.      q[:objectives][0]     = ""       q[:objectives][1]     = ""      q[:objectives][2]     = ""      q[:prime_objectives]  = [0, 1, 2]      q[:custom_categories] = []      q[:banner]            = ""      q[:banner_hue]        = 0      q[:client]            = ""      q[:location]          = ""      q[:rewards]           = []      q[:common_event_id]   = 0    when 2 # Quest 1 - SAMPLE QUEST      q[:name]              = "Runaway Bride"      q[:level]             = 3      q[:icon_index]        = 7      q[:description]       = "A local woman was abducted by bandits on the night of her wedding."      q[:objectives][0]     = "Talk to Boris"      q[:objectives][1]     = "Search the Haunted Woods for Boris' wife, Ladia"      q[:objectives][2]     = "Slay the Bandits"      q[:objectives][3]     = "Escort Ladia back to Boris"      q[:prime_objectives]  = [1, 2]      q[:custom_categories] = []      q[:banner]            = ""      q[:banner_hue]        = 0      q[:client]            = "Boris"      q[:location]          = "The Haunted Woods"      q[:common_event_id]   = 0      q[:rewards]           = [        [:item, 1, 3],        [:gold, 500],      ]      q[:layout]            = false    #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||    #  END Editable Region B    #//////////////////////////////////////////////////////////////////////    end    q  endend
 
Last edited by a moderator:

Matsoman

MatsoKing
Member
Joined
Jul 12, 2013
Messages
14
Reaction score
0
First Language
English
Primarily Uses
I don't understand. In reply to Andar
 
Last edited by a moderator:

Dark Paladin

Game Designer
Veteran
Joined
Jul 10, 2012
Messages
165
Reaction score
10
First Language
English
Primarily Uses
RMMV
I don't understand. In reply to Andar
Andar is telling you the same thing I did except less instructions on how to do so.



 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Honestly this script is too hard to use for a non-scripter.


I would just ask MA to provide an easier way to create quests.
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,070
Members
137,577
Latest member
SadaSoda
Top