New account registration is temporarily disabled.

[RMXP] ABSOLUTELY CANNOT FIGURE OUT SCRIPT LAYOUT.

Posts

Pages: 1
Hi everyone, I'm using several scripts people have made (the 1 player menu and battlescript by Tigurus Fay and thankfully they are extremely easy to use), however I am trying to implement game_guy's version of the quest log. I've installed it correctly as per the instructions and created a Journal item and can use it to bring up the quest menu. However, I can't seem to figure out how to actually ADD quests. I've read through the script's instructions and my brain seems to be melting. I can't make any sense of it in terms of where I should be putting the quest information and phases.
Could someone please tell/show me where I should start putting the relevant quest info?
Marrend
Guardian of the Description Thread
21806
I assume you're talking about this script.

So, from the looks of things, the relevant info is in the following tidbits:

def self.qname(id)
  case id
  #==================================================
  # Quest Name
  # Use when x then return "name"
  # x = id, name = quest name in quotes
  #==================================================
  when 1 then return "Village Hunt"
  when 2 then return "Pay Tab"
  when 3 then return "Hunting Knife"
  end
  return ""
end

def self.qlocation(id)
  case id
  #==================================================
  # Quest Location
  # Use when x then return "location"
  # x = id, location = location in quotes
  #==================================================
  when 1 then return "Arton Woods"
  when 2 then return "Eeka"
  when 3 then return "Eeka"
  end
  return "????"
end

def self.qdescription(id)
  case id
  #==================================================
  # Quest Description
  # Use when x then return "description"
  # x = id, description = quest description in quotes
  #==================================================
  when 1 then return "Capture 10 animals and bring back the meat."
  when 2 then return "Bring gold to Jarns Defense to pay her tab."
  when 3 then return "Go get Kip a hunting knife from Eeka."
  end
  return ""
end

This means the quest information is in three different functions. The "self.qname" function probably defines what the title of the quest is, while the "self.qlocation" function seems to indicate either where the quest is located, or where the quest-giver can be located after it's done. The "self.qdescription" function is what it says on the tin: the description text for the quest.

From the instructions, these function-calls might be useful for you:

# Quest.add(id) ~ Adds the quest(id) to the parties quests.
# Quest.take(id) ~ Takes the quest(id) from the party.
# Quest.complete(id) ~ Makes the quest(id) completed.
# Quest.completed?(id) ~ Returns true if the quest(id) is completed.
# Quest.has?(id) ~ Returns true if the party has quest(id).

The trick is to realize that each quest has it's own unique identifier ("id" in this case). Given the script-calls, and the functions above, that identifier is very probably referenced across all these functions.


I'm not sure if I'm explaining this very well, so, if you have any questions, don't hesitate to ask!
No, I totally get it now! In theory, at least! I'm halfway through a sprite sheet design so I haven't edited the script any further yet, but at least my brain doesn't hurt quite so much at even the thought of reading scripts.

Thanks! And thanks for not implying I'm some kind of moron for not being able to get it! :)
Marrend
Guardian of the Description Thread
21806
I'm just happy I could help a bit!
Pages: 1