All You Need is GPT
Introduction
Fellow plebs, our time is now.
GPT x oncyber enables anyone to customize existing oncyber templates and experiences, or create brand new experiences of their own.
You can visit the oncyber Scripting GPT here: https://chat.openai.com/g/g-yzcgA9SJy-oncyberscriptin (opens in a new tab)
We'll start by covering a general approach.
Working with GPT
You'll likely develop your own flow for working with the oncyber scripting GPT over time, but for now we'll provide a sample flow.
A good prompt is like a sandwich: a little bit of code sandwiched between two nice slices of clarification and intent.
To get started, prep a single prompt (one chat message, sent all at once) with these three sections:
Section 1 of Prompt: Intent
Describe what you're trying to do, while referencing relevant objects/components in your scene as needed.
Tip: the best prompts are polite, start with, "Good morning GPT!" and include "Please" and "Thank you!" It's just common decency, really.
Section 2 of Prompt: Code
If you're not creating a new script file, giving GPT an existing code base to work from can be helpful.
In this example, we'll use the boilerplate main
script file (which might be thought of as the central nervous system for an oncyber experience).
If this is your first time in the Script editor, you can find the code for your main
script like this:
- Go to the Studio -- in your desired world, click the "Script" icon in the left-hand toolbar.
- Next, click the
main
tab and copy 100% of the code in that file (CTRL-A, CTRL-C can be used as a shortcut).
Now that you have the code in your clipboard, paste your main
script file (or whichever script file you're working with) to GPT, so that GPT can use it as a basis.
Tip: Placing code in quotes (or something like CSS-style commenting) can help indicate a start and end to your included code snippets, adding clarity to your communication with GPT.
Section 3 of Prompt: Clarification
Paste this text at the end:
"Does that make sense? Please describe it in perfect logic to confirm, and then based on that logic, your expertise, and my current script, please determine a plan to change my current script so we can achieve the desired behavior -- and then please give me 100% of the code and instructions needed to update my script."
Once you've written your prompt with the sections/format above:
- Execute the prompt.
- Follow GPT's instructions.
- Click Preview to test.
- Repeat until you receive the desired results.
Trying a Follow-Along Example with GPT
Coming thoon™.
In the meantime, visit our Discord for direct feedback from the team and community, with weekly Dev Office Hours to address your questions/blockers live: https://discord.gg/NCuAWD4FCz (opens in a new tab)