0 votes
by (140 points)
I am building a sports simulator. I want to add team stats, so when a variable is declared with the team name, it can be used with the .csv to fetch values such as offense, defense, etc.

 

How can I go about this?

1 Answer

0 votes
by (159k points)
Which version of Twine and which story format (name and full version number) are you using, as answers can be different depending on what you are using?

Are you planning on hosting your story HTML file on a web-server?
If so are you able to host a web-service on the same web-server, and do you know how to program?
I ask because you will need somewhere to fetch the CSV values from.

If you are planning to run your story HTML file locally instead, are you able to transform the data within the CVS (file?) into JSON?
I ask because there are restrictions on what types of files a web-browser can open locally, and when they are able to open those files.
by (140 points)
I am using Harlowe 2.0.1 and am planning to run the HTML file locally. I would prefer to retain the csv format.
...