-
Notifications
You must be signed in to change notification settings - Fork 0
move LoopService.js compilation from google sheets to internal #23
Comments
fuck you open pyxl, hello pandas it doesn't matter how long the intermediary file is!!!!! fuck yes, use object notation. there's no longer any reason to have this weird implicit "starting with 2 numbers means this, but if there's no numbers then this happens, unless the first string is 'auto', and a number at the end means this, and" stop being a fucking idiot. just use a dict. delay, duration, message, function. list of dicts. boom. bosh. done. dumbass. |
#4 is VERY relevant |
just so I have it somewhere permanent, the new structure will be this: dialogue: {
event_name: {
precommand: (aic) ->
do_a_thing()
lines: [
{
delay: 0
duration: "auto"
text: "Line 1"
options: [
{
text: "Button title"
opinion: -1
destination: "event_name"
conditions: [
(aic) -> some_status is true
]
oncommand: (aic) ->
do_a_thing()
}
{ ... }
]
}
{ ... }
]
postcommand: (aic) ->
do_a_thing()
}
another_event_name: { ... }
} (noting that rossjrw/cluedo uses a slightly different sheet structure in which options are associated with a line of speech instead of an event (cluedo event = maitreya interaction), and each line of speech has its own row. would be very useful to implement this here once it is finished. this also adds oncommands, which execute on selection of the command but before the next interaction/frame) as opposed to it currently, which has separate sections for a) the lines b) the options' button / text output c) a functional section that has a) precommands b) postcommands c) a function that recieves how long the messages will take to write, waits that long, and then calls on the options to appear and all this is done in 3 competely separate sections in LoopService.js, so there's 3 items per interaction. it's fucking stupid but "it's fine because it's generated by a spreadshet" who the fuck writes a javascript-outputting spreadsheet? me, apparently |
the above structure would necessitate implementation of #27 |
look at how ridiculously better this is https://github.com/rossjrw/cluedo/blob/a7e33c96cacc014994160594dc5d808084a4b286/dist/events.temporary.js compare with old: https://github.com/rossjrw/maitreya/blob/2598c27eb4b06b44e57829d438e1f77ebc809d9b/src/js/LoopService.js old is likely more space-efficient but good god I do not give one fuck |
this doesn't matter for cluedo, so I'll be leaving it to later, but the character should be made an attribute of each line or each event as well. then a single loop function can handle all events instead of having one per character. |
turns out that seemingly 99% of maitreya.coffee is just to parse LoopService into something actually useful instead of a cancerous mess. the cancer has been cured so most of maitreya.coffee can be deleted (and therefore most of cluedo.coffee as well). it might even be possible to make it entirely project-independent, at which point it could be moved to something like engine.coffee and anything specific in init.coffee |
in order for chatLog to not need to be initialised for each conversation, it has become a dict with keys log and options, each of which is a list of dicts with keys conversation, cssClass, text (and destination for options). html will be responsible for filtering out what messages and options it wants from those lists. |
probably python or something
would certainly make the spreadsheet way easier to manage.
data from the sheet is already being moved to src/js/events.json - just need to convert it into dialogue.coffee and events.coffee
The text was updated successfully, but these errors were encountered: