• 1 Post
  • 3 Comments
Joined 17 days ago
cake
Cake day: October 27th, 2024

help-circle
  • I made another copy of my test generator to experiment with, so here’s the one where I’ve figured out the fixes:

    https://perchance.org/kzttwn1wna#edit

    1. I used your code to make the user input box in place of the other code I had originally used, and I just changed some of the names of things within it to match categories already in my generator (so I’d have to change fewer total things). Now every generated prompt shows the user inputted character names on the first click of the generate button (instead of only updating the 3rd line on the first click).

    2. I moved the line of code that defined [one] and [two] to above the line those categories are associated with in the body’s “text” output – that fixed the issue of those spots pulling up as “undefined” on the initial page load/refresh. (I felt like a dummy - but what a relief!)

    3. I changed this – [b] & [b] – to this – [one] & [two] – on the specific prompt possibilities where one or both characters are mentioned in the same line again. And I’ve left other prompt possibilities as [b] or [c] or [q] so that if a user inputs more than two characters, other characters can still show up on other lines of the prompt.


    I do have one last question I can’t seem to find a fix for. I’ve been unable to duplicate one part of how your example generator works. For my current generator, when the user inputs character names, the output updates on each “return” after entering each character name. I can’t figure out how to get it to remain static until the user has inputted all of the names they want and then only change when they press the generate button. I think it might be related to whatever I’m running into here:

    On my generator I left the button information as: onclick=“update()” — In your generator, it says: onclick=“update(output)”

    But when I put the word output inside the parentheses, my button stops working entirely. I haven’t been able to puzzle out what I’m doing or what I’m missing. Do you have any insight?

    Thank you again!



  • Thank you! Yes, this is fixing the issues I’ve been having perfectly!

    I apologize, I am still having trouble figuring out how to make these changes/fixes work in my generator. (Again, so un-tech-savvy over here - I’ve just gotten hooked on making generators and so it’s become a hyper-fixation!)

    I think the biggest thing I am “getting” is that you made / shown me a super cool way to have the default list built into the user input box in the HTML panel (I think that’s what it’s called) so I don’t need a separate “default” list over in the left-hand box (List panel?) where all the lists are. One less step in my wild Frankenstein approach! Very neat! I’m tickled pink!

    So I think I have two initial big questions that I’m simply not knowledgeable enough to figure out how to adapt with your lovely solution:

    1. Location of “body” or “output” information

    I think what I’m most confused about is that in the generator you’ve created, the output sentences (e.g. about tiddlywinks, etc) are in the right-hand box (HTML panel?).

    In my generator, I have that information under “body” in the left-hand box (List panel?) where I reference 3 separate lists (each of which in my full generator are very long lists: 50+ items on each) - in addition to the character names - for the generator to draw information from. Do I need to move the List panel’s “body”'s “text” information into the HTML box?

    2. Ability to output more than only 2 characters per prompt generated

    Additionally, while the default list of characters is 2 (Ed & Stede), folks can enter more than 2 characters, so I’d like the generator to draw from all possible characters. So, for example, if someone entered 4 characters (e.g. Jim, Olu, Archie, Zheng), the generated response could potentially include all 4 (rather than only a randomly chosen 2) except for the couple of spaces where I’ve gotten the [one] and/or [two] designated (because the response could be very nonsensical without those specifications - e.g. Archie & Jim have been on one date, and it’s the best date that Zheng has ever been on.).

    So this is my (very potentially quite bad/amateur) logic for having the [b], [c], and [q] lists (one for each line of output) and the [one] and [two] designations (for very specific possible prompts).

    For example, a possible output with 4 characters could be something like:

    Archie & Jim have been on one date, and it’s the best date that Archie has ever been on. Zheng says, “Blah blah blah.” Olu & Jim are best friends.

    OR, using your generator:

    Archie & Jim are strangers when Archie beats Jim at tiddlywinks. Archie & Olu are schoolmates, Archie bullied Olu.

    I am sorry if these are super dumb questions. Again, I know my approach in the coding is likely very convoluted as I’ve Frankensteined different parts together from the very little I’ve learned/gleaned/googled so far, so the amount of complexity and redirecting I’m sure are a result of my lack of know-how to allow for any degree of finesse. If you have the time and are willing, could you explain it to me like I’m a little bit dumb? I won’t be offended!

    I certainly don’t expect you to explain it to me - it’s truly just an ask if you are interested/willing.

    No matter what, I already so appreciate the time you’ve taken! So thank you! <3