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 supporting infrastructure for first version of migo bio-tech #50178

Merged
merged 7 commits into from
Aug 8, 2021

Conversation

Ramza13
Copy link
Contributor

@Ramza13 Ramza13 commented Jul 23, 2021

Summary

Infrastructure "Add supporting infrastructure for first version of migo bio-tech"

Purpose of change

Add functionality to json around items using effect_on_conditions.
Give example of use case for talker_item

Describe the solution

This adds a new migo bio tech item, which does not yet spawn anywhere. The infrastructure needed for it to work has also been added.
At present migo bio technology functions as follows:
Upon usage it will choose a type which can be: "morale", "focus", "pain", or "fatigue". It then gives you a bonus of that type.
There is always a chance that a variable called migo interest goes up. At present this does nothing but the plan is to have it eventually trigger mi go attacks.
Included infrastructure features:

  • The ability to set a variable to a random value,
  • The ability to give an item conditional names based on the presence of a variable.
  • Cleaned up morale function to take string times rather than int.
  • Added support for defining in-line eocs for item usage.

Describe alternatives you've considered

Not including the actual migo bio tech item. It's not used yet and still needs better stats and details but it tests the new code and gives a good example of what can be done.

Testing

Additional context

@actual-nh actual-nh added [C++] Changes (can be) made in C++. Previously named `Code` [JSON] Changes (can be) made in JSON Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style Items / Item Actions / Item Qualities Items and how they work and interact labels Jul 23, 2021
@Ramza13 Ramza13 force-pushed the migo_bio_tech branch 2 times, most recently from 79291d4 to c522a22 Compare July 31, 2021 18:51
@kevingranade kevingranade merged commit 4fc4b31 into CleverRaven:master Aug 8, 2021
"id": "EOC_MIGO_BIO_TECH_INTEREST",
"condition": { "not": { "one_in_chance": 3 } },
"effect": [
{ "message": "You have a slight feeling of being watched." },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am pretty sure it should be u_message, not message.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is exactly what's causing #50590.

@Ramza13 Ramza13 deleted the migo_bio_tech branch August 8, 2021 13:37
satheon49 pushed a commit to satheon49/Cataclysm-DDA that referenced this pull request Aug 14, 2021
…verRaven#50178)

* Add ability to store random variable value.
* Allow add morale dialog function to use time strings
* Add ability to set item name by variable

Co-authored-by: chaohedgehogs <[email protected]>
@hm001121606
Copy link

Can 'var' change more than 'name'? Such as' description 'or' use_action'😊

@Ramza13
Copy link
Contributor Author

Ramza13 commented Jan 4, 2022

Can 'var' change more than 'name'? Such as' description 'or' use_action'😊

No to either. For description, that sounds like a good idea to add eventually, though I don't have a use case in mind right now so it will be pretty low on my to do list. For use_action since with EOCs you can make what an item does change already I'd probably just add a new dialog function if needed. If you have a use case in mind let me know and I'll see what I can do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style Items / Item Actions / Item Qualities Items and how they work and interact [JSON] Changes (can be) made in JSON
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants