Jump to content

Photo

Fetch quest using strings - how to set it up?


  • Please log in to reply
2 replies to this topic

#1 bloqm

bloqm

    Newbie

  • Members

Posted 25 February 2020 - 02:16 PM

I'm having some trouble setting up some custom items that don't have any gameplay effect but can be used for a fetch quest, trading one for another with npcs.

My problem is that I can't get the trade to work, perhaps I did something wrong.

 

So far I've made a few custom items, each with Non gameplay class, enabled as Equipment Item and a GFX tile. These are item A(#151), B(#152), C(154)*

My strings look like this:

#3: Hey bring me some item A if you find it. \5\151\4
#4: You found some A, let's trade for B! \16\151 \17\152 \20\20

 #3 works as expected and launches string #4 when item A(151) is collected. However string #4 won't remove item 151 or give me 152, although it will play the SFX #20 as expected.

I also tried making each item of it's own class (so item 151 is of class 151), but it didn't work either.

 

What an I doing wrong?

 

edit: once the trade is completed, how can I make the npc go to another string, such as "thanks for the item". Since I'm trading one for another I guess there's no way to check for this?

 

Thank you!

 

 

*Bonus question: For some reason my item list is missing some entries, like 150 or 153 -- why is that?


Edited by bloqm, 25 February 2020 - 02:28 PM.


#2 Geoffrey

Geoffrey

    Chosen One

  • Members

Posted 26 February 2020 - 09:31 PM

edit: once the trade is completed, how can I make the npc go to another string, such as "thanks for the item". Since I'm trading one for another I guess there's no way to check for this?

 

Not sure on your main question, but this can be accomplished by another dummy item + another string control code. You can put the control code at the beginning of the default string (rather than at the end) for it to switch immediately. String control codes are activated when the characters of the code are reached by the scrolling text.



#3 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 09 March 2020 - 09:22 AM

I'm having some trouble setting up some custom items that don't have any gameplay effect but can be used for a fetch quest, trading one for another with npcs.

My problem is that I can't get the trade to work, perhaps I did something wrong.

 

So far I've made a few custom items, each with Non gameplay class, enabled as Equipment Item and a GFX tile. These are item A(#151), B(#152), C(154)*

My strings look like this:

#3: Hey bring me some item A if you find it. \5\151\4
#4: You found some A, let's trade for B! \16\151 \17\152 \20\20

 #3 works as expected and launches string #4 when item A(151) is collected. However string #4 won't remove item 151 or give me 152, although it will play the SFX #20 as expected.

I also tried making each item of it's own class (so item 151 is of class 151), but it didn't work either.

 

What an I doing wrong?

 

edit: once the trade is completed, how can I make the npc go to another string, such as "thanks for the item". Since I'm trading one for another I guess there's no way to check for this?

 

Thank you!

 

 

*Bonus question: For some reason my item list is missing some entries, like 150 or 153 -- why is that?

 

Try this sequence, replacing the item IDs in the control codes, string IDs, and the text body of the messages as you desire.

 

Note that I have a third string for the completion of the sequence, and two goto if item codes. You may need further checks, too. Using a counter for the trade sequence helps.

 

Trade Items: 201 (bananas), 202 (dog food)

String 4:
\5\201\5 \5\202\6I'm looking for a bunch of bananas.
String 5; 'next string 6'
\17\201 \17\202You found my bananas! Here, I'll give you this dog food...

String 6:
Thank you!

 

I typically want goto codes first, and you will want a condition to check that if the trade is complete, in addition to the trade itself, so that it doesn't loop around

 

Using a counter, you don't need duplicate, or dummy items. You merely need to increment the counter, and check it in your gotos for a minimum value equal to the number of items traded at that point:

 

Trade Items: 201 (bananas), 202 (dog food)

String 4, trade 1:
\5\201\5 \6\31\1\5I'm looking for a bunch of bananas.
String 5; 'next string 6'
\17\201 \17\202 \10\31\1You found my bananas! Here, I'll give you this dog food...

String 6:
Thank you!

 

In 2.55, you can set a screen DBit to use as well.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users