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

RPG dice #31031

Merged
merged 39 commits into from
Jun 11, 2019
Merged

RPG dice #31031

merged 39 commits into from
Jun 11, 2019

Conversation

krekeler0
Copy link
Contributor

@krekeler0 krekeler0 commented Jun 1, 2019

Summary

Summary: Content "adds rpg dice and makes the game master profession start with them"

Purpose of change

Purpose of Change: Now as I didn't fix a bug I don't know if I should use this, but just in case I am I'll do it anyways. I saw that the game master didn't have any dice, and most rpgs use dice. I figured I'd just add them in and see if anyone saw any reason for them existing.

Describe the solution

Describe the Solution: The dice are (unless I messed up) usable as ammunition for the sling and slingshot. They are pretty much marbles with slightly adjusted stats such as less damage and higher range.

Describe alternatives you've considered

Describe alternatives you've considered: I mean I haven't considered any alternatives besides just not having the dice put in. They don't really contribute much to the game after all.

Additional context

The zinc material is also added in #31217 If one is merged the other one will have its zinc material removed.

"type": "AMMO",
"id": "rpg_dice",
"price": 10,
"name": "rpg dice",
Copy link
Member

@anothersimulacrum anothersimulacrum Jun 1, 2019

Choose a reason for hiding this comment

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

You need a "name_plural", or else multiples will show up as x rpg dices.
(The plural name should be the same, because it's already plural)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

okay so (I really don't know how this works) should I end this one and make a new one with that in?

Copy link
Member

Choose a reason for hiding this comment

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

No, you make the change, commit it, and push it to this branch.

Copy link
Member

Choose a reason for hiding this comment

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

also, the singular is "die"

@krekeler0 krekeler0 changed the title Secondtestbranch rpg dice Jun 1, 2019
@Rivet-the-Zombie
Copy link
Member

These ought to spawn somewhere in-world too, not just in the DM's starting gear.

@YukariMindGap
Copy link
Contributor

Don't forget the rpg table basement room!

@I-am-Erk
Copy link
Member

I-am-Erk commented Jun 1, 2019

One step closer to me programming an entire session of d&d in the game with NPCs

@ZhilkinSerg ZhilkinSerg self-assigned this Jun 1, 2019
@ZhilkinSerg ZhilkinSerg added [JSON] Changes (can be) made in JSON Items / Item Actions / Item Qualities Items and how they work and interact Mutations / Traits / Professions/ Hobbies Mutations / Traits / Professions/ Hobbies labels Jun 1, 2019
@ghost
Copy link

ghost commented Jun 1, 2019

You can get metal rpg dice. These could have higher damage and range.

Example of metal dice

"id": "rpg_dice",
"price": 10,
"name": "rpg dice",
"name_plural": "rpg dice",
Copy link
Contributor

Choose a reason for hiding this comment

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

Here and above, "RPG" should be all caps

"symbol": "=",
"color": "light_gray",
"looks_like": "marble",
"description": "Some dice used to play various role playing games, coming in several shapes and sizes",
Copy link
Contributor

Choose a reason for hiding this comment

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

The description should be for that of a singular die (rather than "some dice"). Also, "role-playing" is hyphenated

Eg

Suggested change
"description": "Some dice used to play various role playing games, coming in several shapes and sizes",
"description": "A die often used to play various role-playing games",

Copy link
Member

@I-am-Erk I-am-Erk Jun 1, 2019

Choose a reason for hiding this comment

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

There's no reason the item can't depict a set of dice. A deck of cards is a single item, not 52 individual playing cards.

Copy link
Contributor

Choose a reason for hiding this comment

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

Per the PR:

The dice are (unless I messed up) usable as ammunition for the sling and slingshot. They are pretty much marbles with slightly adjusted stats such as less damage and higher range.

It probably makes more sense to be shooting individual die, no?

@anothersimulacrum
Copy link
Member

You need to lint your changes (paste the whole file you editing into the linter, format it, and paste it back into the file).

@@ -3582,7 +3582,7 @@
"skills": [ { "level": 2, "name": "speech" }, { "level": 1, "name": "survival" } ],
"items": {
"both": {
"items": [ "jeans", "tshirt", "socks", "sneakers", "mbag", "pizza_cheese", "cola", "dnd_handbook", "wristwatch" ],
"items": [ "jeans", "tshirt", "socks", "sneakers", "mbag", "pizza_cheese", "cola", "dnd_handbook", "wristwatch", "rpg_dice" ],
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"items": [ "jeans", "tshirt", "socks", "sneakers", "mbag", "pizza_cheese", "cola", "dnd_handbook", "wristwatch", "rpg_dice" ],
"items": [ "jeans", "tshirt", "socks", "sneakers", "mbag", "pizza_cheese", "cola", "dnd_handbook", "wristwatch", "RPG_dice" ],

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thank you when changing the ID I forgot about that.

@krekeler0 krekeler0 changed the title rpg dice RPG dice WIP Jun 2, 2019
@krekeler0 krekeler0 changed the title RPG dice WIP RPG dice Jun 3, 2019
@egorzaderiy
Copy link
Contributor

This would be even better if dice can be activated to roll it and get number, like already existing coin

@krekeler0 krekeler0 closed this Jun 5, 2019
@krekeler0 krekeler0 reopened this Jun 5, 2019
@krekeler0 krekeler0 changed the title RPG dice RPG dice WIP Jun 6, 2019
@krekeler0 krekeler0 changed the title RPG dice WIP RPG dice WIP do not merge Jun 6, 2019
@anothersimulacrum
Copy link
Member

anothersimulacrum commented Jun 6, 2019

This would be even better if dice can be activated to roll it and get number, like already existing coin

Done! If anyone has comments/reviews on the C++ changes, I'm the person responsible for that.
d6
(wire is replaced with the item's name, this is just an image from testing)
die

src/item.cpp Outdated
@@ -2691,6 +2691,11 @@ std::string item::info( std::vector<iteminfo> &info, const iteminfo_query *parts
}
}
}
if( this->get_var( "die_num_sides", 0 ) != 0 ) {
info.emplace_back( "DESCRIPTION",
string_format( _( "* This item can be used as a <info>die</info>, and has %s sides." ),
Copy link
Contributor

Choose a reason for hiding this comment

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

Add accent maybe?

Suggested change
string_format( _( "* This item can be used as a <info>die</info>, and has %s sides." ),
string_format( _( "* This item can be used as a <info>die</info>, and has <info>%s</info> sides." ),

Copy link
Member

Choose a reason for hiding this comment

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

Done!

src/iuse.cpp Outdated
@@ -4051,6 +4051,23 @@ int iuse::mp3_on( player *p, item *it, bool t, const tripoint &pos )
return it->type->charges_to_use();
}

int iuse::rpgdie( player *you, item *die, bool, const tripoint & )
{
const std::array<int, 6> sides_options = { 4, 6, 8, 10, 12, 20 };
Copy link
Contributor

Choose a reason for hiding this comment

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

Hey, I need this one too
изображение
:-)

Copy link
Member

Choose a reason for hiding this comment

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

Done!

@ZhilkinSerg ZhilkinSerg removed their assignment Jun 7, 2019
src/item.cpp Outdated Show resolved Hide resolved
krekeler0 and others added 2 commits June 7, 2019 18:01
"color": "light_gray",
"looks_like": "marble",
"description": "A metal die used to play various role-playing games",
"material": "zinc",
Copy link
Member

Choose a reason for hiding this comment

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

This material does not exist

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, I made another PR adding it, and removed it from this one. I'll put it back in this one and just mention that in both PRs.

@krekeler0 krekeler0 changed the title RPG dice WIP do not merge RPG dice Jun 10, 2019
@kevingranade kevingranade merged commit 8001c32 into CleverRaven:master Jun 11, 2019
@adamkad1
Copy link
Contributor

add d4 that can be used as caltrops

@krekeler0 krekeler0 deleted the secondtestbranch branch June 12, 2019 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Items / Item Actions / Item Qualities Items and how they work and interact [JSON] Changes (can be) made in JSON Mutations / Traits / Professions/ Hobbies Mutations / Traits / Professions/ Hobbies
Projects
None yet
Development

Successfully merging this pull request may close these issues.