Inline scripting?

I've been using ChatGPT to try to figure out various weird stuff I want to do with the generator. It's quite confident that there is an undocumented inline scripting function, and it provides examples...but I can't seem to get them to work. Is this just a hallucination, or are there JS-like internal script blocks that can be used? Any notes or docs on them if so?

Comments

  • I find that ChatGPT knows nothing about IPP syntax, or it hallucinates that it's JavaScript or pseudocode. I have to spell out the syntax in detail, so usually I'd have it generate something straightforward like weighted table entries with possible end-of-line comments.

    In a sense though, a table invocation might achieve the effect of inline scripting. Do you have examples of what you have in mind?

  • You can embed some amount of html, e.g., there's an example floating around that includes images that way. I don't know if there are any limits on that but in principle it might work to embed JavaScript that way. But it would be IPP comes up with the html, and then it displays including the JS. The JS couldn't modify how IPP processes anything.

  • Sorry for late response--moving house has thrown everything into pure chaos :)

    I'd like documentation/examples on incrementing, for one thing. I'm trying to figure out a way to generate hex contents that may affect the contents of nearby hexes. I can brute-force this, I think, but would like a more elegant solution. Proper if-then loops. Like that.

  • I think to do that, you need a single run of your table to generate multiple hexes. Rather than only generating one hex per iteration. It's still a bit tricky without arrays though.

    Alternately, perhaps you could use the time as a random seed since it will remain constant (or nearly constant?) across all the repetitions? And you can access the current repetition number with {rep}.

Leave a Comment