Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more variables #1029

Closed
KingJulian13 opened this issue Dec 27, 2019 · 6 comments
Closed

Add more variables #1029

KingJulian13 opened this issue Dec 27, 2019 · 6 comments
Labels
Feature Request New feature or request.

Comments

@KingJulian13
Copy link

Feature request

This request is meant to discuss about ideas and my examples are probably far from perfect, but before digging into a whole redefinition of variables, I would like to get some feedback.

I've stumbled over some variables which might be useful for some quests. Generally I think some values which are currently only detectable via conditions should be added to variables in order to work with them in conversations and variable objective.

  • %facing% to get the location of the block the player is facing in the location format.

    • %facing.type% to get the Blocktype and
    • %facting.x% etc. to get the single location values as described in my other request (link at the end)
  • %inventory% to get more information about the players inventory. (different from %item% to avoid item-name collisions)

    • %inventory.empty% for empty inventory slots
    • %inventory.1-35% to get the item in that slot. (or maybe just for armor/offhand)

Examples how to add existing conditions to variables:

  • %time% to get the current time ingame time in a realtime format for conditions

    • %time.milliseconds% for the time in milliseconds
    • %time.hour% to get the current hour
  • %dayofweek% to get the current day of the week, working with the condition dayofweek

Maybe some ideas are too much for what BetonQuest is willing to offer the player as a quest plugin and should be done by learning java/spigot itself. But I think BetonQuest could extend more in that direction, as it still manages a lot around questwriting itself like storage, edgecases, compatibility and a lot more like conversation overhead. Additionally new variables wouldn't add more CPU usage to the plugin.

This feature request should be taken in consideration together with my other request to extended variable functionallity but I separated them, as they request different types of changes

Checklist:

@achandyman
Copy link

I would like to add that it would be awesome if you could add a variable that could store string text. It would be helpful to help automate some of the processes in betonquest. For example instead of having something like this as a message in every conversation folder:
Screen Shot 2020-06-18 at 10 16 11 PM
You could have a string variable that stores a list of objectives information and have a single message event run for the objective list (like in the picture above). I could also see this being used in a title event, having the subtitle display a variable of your quest name that you started.

@SaltyAimbOtter
Copy link
Member

SaltyAimbOtter commented Jun 19, 2020

@SaltyAimbOtter
Copy link
Member

SaltyAimbOtter commented Jul 22, 2020

Allow conditions as variables -> true / false. Maybe with questlang?
Done with quest: %hasTagX%
If true
Done with quest: true
If false
Done with quest: false

@KingJulian13
Copy link
Author

If I interpret that correctly, it could be useful to have some basic inline "if" clause in variables.

A quick and dirty pattern I just came up with: %condition:variable%
Example:
%conditions.isDay:objective.break.left% (Showing the objective.break.left only during day)

This could maybe be extended to allow strings as variable, allowing fully conditional text-(parts) in conversations.
e.g. %conditions.isDay:'It is currently day'%

Or even extending it to ifelse with something like %condtions.isDay:variable1:variable2%

This is just an idea - needs further rethinking and is maybe even more intuitive with different machanics/patterns of BQ

@SaltyAimbOtter
Copy link
Member

SaltyAimbOtter commented Jul 23, 2020

That was absolutly not what I wanted to note but that is infact a very good idea that fits the whole point of this idea much more! 😄

@J0B10
Copy link
Member

J0B10 commented Dec 31, 2020

Moved to discussion #1355.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New feature or request.
Projects
None yet
Development

No branches or pull requests

5 participants