(Partial) Text Adventure Questions

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: (Partial) Text Adventure Questions

Post by raidho36 »

We won't debate, promise! :D

Just tell what is it.
Zireael
Party member
Posts: 139
Joined: Fri Sep 02, 2016 10:52 am

Re: (Partial) Text Adventure Questions

Post by Zireael »

On topic: LOVE has a library for using xml files: https://love2d.org/wiki/libxml

You could store the content in an xml and load it when needed.
User avatar
SiENcE
Party member
Posts: 797
Joined: Thu Jul 24, 2008 2:25 pm
Location: Berlin/Germany
Contact:

Re: (Partial) Text Adventure Questions

Post by SiENcE »

@JGAberrance First you should take a look at Twine...it it can do the job for you. If not, use it as banching editor and write our own runtime. This works really well at least for my game.
JGAberrance
Prole
Posts: 6
Joined: Sun Aug 28, 2016 5:43 pm

Re: (Partial) Text Adventure Questions

Post by JGAberrance »

SiENcE wrote:@JGAberrance First you should take a look at Twine...it it can do the job for you. If not, use it as banching editor and write our own runtime. This works really well at least for my game.
Yes, I've been using Twine to organize my story. It is extremely helpful, but is not at all what I want for actually running my game.
User avatar
SiENcE
Party member
Posts: 797
Joined: Thu Jul 24, 2008 2:25 pm
Location: Berlin/Germany
Contact:

Re: (Partial) Text Adventure Questions

Post by SiENcE »

JGAberrance wrote:
SiENcE wrote:@JGAberrance First you should take a look at Twine...it it can do the job for you. If not, use it as banching editor and write our own runtime. This works really well at least for my game.
Yes, I've been using Twine to organize my story. It is extremely helpful, but is not at all what I want for actually running my game.
What could you need else?

You could use Twine tags for your own needs. For example...i use the // // to add an image, do scripting, check conditions and add results to the Twine texts.

To change the font or colors in a Text I use the {} tags.

A Node in Twine:
//image npc1_mummy.png//
{white}Rappok: {green}Ah uh, who {even}are {uneven}you?

//color {0, 199, 150, 255}//
//condition { pc={ {'Kturim','remove'}, {'Harro'}, }, }//
[[I\'m Kturim, the 16s son of Rak\'shala. Whats up?|Link1]]
//condition { pc={'Harro'}, nopc={'Shandrala','Tula'}, }//
[[Harro from the dome city of Nurrak. And who are you?|Link1]]
//condition { pc={ {'Tula','remove'}, {'Harro'}, }, }//
[[I\'m Tula of Lesh-541. And you?|Link1]]
//condition { pc='Vuolo' }//
[[Who wants to know this?|Link1]]
//color {224, 199, 150, 255}//
[[Let\'s start with you. Who are you?|Link5]]
//image npc1_mummy.png//
{white}Rappok: {green}You might need something to open the door. The stick of the doorswitch was removed that no one can get out this grave site.
Do you have some money?

//condition { check = function(value)
return (value['money'] >= 99 and value['money'] <= 100)
end }
//
[[Yes, you have some 5 bucks.|Link1.3]]
[[I guess You don\'t have the stick?|Link1.2]]
Of couse...for all this you need to write an interpreter. But Twine using as base editing tools suites really well. No need todo xml...or write your own editor. You can export the "source code" (raw texts)....and read it using a Twine library (like this https://github.com/bensku/twine-lua). There might be other as well.
JGAberrance
Prole
Posts: 6
Joined: Sun Aug 28, 2016 5:43 pm

Re: (Partial) Text Adventure Questions

Post by JGAberrance »

Twine has a few limitations that made me shy away from using it to create something.

I'm not adverse to using it as a editing tool however as I do love Twine for that. The library you linked could be very helpful. Thanks very much.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 5 guests