How should I approach an ending with 600+ possible outcomes?


I do have a formula that will make it faster getting the info from your google spreadsheet into twine, it looks unwieldy but thats to do with putting in CHAR(34) to get quote marks.

=CONCATENATE("(set: $",lower(A1),B1," to (dm: ",CHAR(34),"name",CHAR(34),",",CHAR(34),A1,CHAR(34),",",CHAR(34),"max",CHAR(34),",",C1,",",CHAR(34),"min",CHAR(34),",",D1,"))")

Which looks like this in the spreadsheet:
and from there you can just copy the E column (or whatever column you have it in) and paste it into twine.

You may notice I haven’t included Spread. Since it’s a calculated number from max and min, I recommend that you leave it out and let twine do the calculation.

EDIT: Changed name to lowercase in the example.

1 Like

The amount of work you’d save doing it this way, versus doing it by hand line by line with copy and paste, makes it worth it imo. As long as the data is formatted correctly then your formula will always make proper Twine datamap objects that you can drop into the project in one go, which is really cool.

As far as naming conventions go, my personal preference would be to have $LAjoe instead of $joeLA. My inclination would be to sort the spreadsheet by the city column then name column before bring the code into the project - this way it is all sorted alphabetically once it is in the project and the city names would line up with each other, making it easier to see in the 600+ lines of datamap objects where one region ended and another began. I’m a bit ocd about getting my code to line up - makes it easier to spot what is different when I am looking for my mistakes but that is a personal preference.

I don’t really know anything about Twine or datamaps, but another option might be to make an array of judges for each city, eg:

(set: $LA_judges to (array:
    (dm: "name","Joe","max",92,"min",57),
    (dm: "name","Jane","max",62,"min",6),

Or possibly even one step further (again I don’t know Twine, so this might not be valid syntax):

(set: $cities to (array:
    (dm: "name","LA","judges",(array:
        (dm: "name","Joe","max",92,"min",57),
        (dm: "name","Jane","max",62,"min",6),
    (dm: "name","MN","judges",(array: ...),

Then once the player has established which city they’re in, you could either use that as a lookup into that table or just copy it to $current_city and later pick a $current_judge from that or something. (Copying part of the table might impact save sizes, though, which could be good or bad depending on what you want to happen if you tweak the numbers in a later version of the game but the player loads an older save.)

I don’t think these numbers change during play, so they logically should belong in the setup area to minimize the impact on saves like @tayruh mentioned earlier in the thread. An array/datamap of datamaps would be interesting but I’ve not tested or looked into whether that is possible.

1 Like