Output/Export from a game

Unadept
Hey, guys,

Working on a pretty simple thing, just a store for my tabletop game characters to buy their gear through. I'm mostly done, but it would be VERY helpful for me to be able to output a file or text containing their purchases. I've tried directly cutting and pasting and it just crashes my writing program.

So, I'm wondering if there's any way I can do that?

The one idea that I've had is using the Log. However, the text I want to copy is the room description from the final room; so, when I try to put room.description into the Log it returns an error. When I do ToString(room.description) it just adds the code from room.description, not the text the player sees.

It's been really vexing me.

Thanks.

jaynabonne
First, I don't know why copy/paste would crash your writing program. Perhaps you need a better one? :)

If you want to capture your room description, then you either need to put a hook in for the low-level text output function, or you can refactor your room description script (I assume it's a script) to put the bulk of the code into a function that returns a string. The room description code would call this function and then just output the returned string. But you'd then be able to call that function to get the string you wish to write to the log.

Unadept
Cool, thanks, I'll give that a try tonight.

And, yeah, I don't know... maybe the background color choice... I'll try just copying unformatted.

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums