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

More flexible and generic mission yamls #3

Open
Archina opened this issue Dec 19, 2016 · 5 comments
Open

More flexible and generic mission yamls #3

Archina opened this issue Dec 19, 2016 · 5 comments

Comments

@Archina
Copy link
Collaborator

Archina commented Dec 19, 2016

To make mission submission more flexible I purpose a new format for the mission yamls.
The outcome can be evaluated with the eval() method of ruby. The attribute tags can be replaced with the according character attributes.

title: Mission title
info: Short mission description text of how the mission started.
authors: [ Archina, Undertaker ]
attr: [ DEX ] # This may be obsolete with the attribute outcome within the outcomes array.
difficulty: Medium
outcomes:
  - chance: 0.7 # A percent or weight based value can be used to describe the likelihood of outcomes.
    text: Description of a positive outcome for the party/character.
    outcome: 70 + 7 DEX + 2 LCK
  - text: Description of a negative outcome for the party/character.
    outcome: LCK - 70 # A negative value will result in a loss of money.
@snus-kin
Copy link
Contributor

I'm for this, it would make things like themes a lot easier to manage,

I'm curious about the use of the evai(), whilst I know this file is owned and run by the bot operator it is an attack vector. I'd perhaps suggest rewards/failures based on difficulty than per-mission outcomes and calculate the outcome in the program.

@Archina
Copy link
Collaborator Author

Archina commented Dec 19, 2016

I agree that this may have to be handled carefully. Missions will have to reviewed and approved by some admins before they are added directly to the bot. Other than that I could try to just write a few lines that will parse a simple math expression.

@Varzeki
Copy link
Owner

Varzeki commented Dec 20, 2016

Looks better than what we had - with the exception that I think outcomes should be handled by the mission class somewhat. I was planning on removing the bonus for luck on mission failure so you can always lose money. Does this system support more than 2 outcomes? That could be cool!

@Archina
Copy link
Collaborator Author

Archina commented Jan 29, 2017

Honestly, I could just evaluate and calculate the different outcomes with a stack and enforced postfix notation. This would allow us to avoid the dangerous eval method. I wouldn't let this concern limit the design of our missions.

That said we should really think about what missions are meant to become. Calculating the outcome per mission was meant to make them more interesting, but given how little influence a player has on them at this moment, it may, in fact, be a waste of effort.

@Varzeki: Yes this system would allow for more then 2 outcomes, but what would be the reason to have more then two outcomes if they are all identical?

@Varzeki
Copy link
Owner

Varzeki commented Feb 9, 2017

Postfix notation and such makes it a little less user friendly - this format should be human readable, to not discourage user submissions.
Also, multiple outcomes with varying rewards could be cool - e.g, 1% chance to get lucky on a mission and increase the reward, or have something else happen, like a free stat upgrade

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants