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

supplydrop bulk crate #40216

Merged
merged 2 commits into from
May 8, 2020
Merged

supplydrop bulk crate #40216

merged 2 commits into from
May 8, 2020

Conversation

Jerimee
Copy link
Contributor

@Jerimee Jerimee commented May 5, 2020

Summary

SUMMARY: Content "adds a bulk shipping crate possibility to the supplydrop map extra"

Purpose of change

Provides a supply crate with a bulk package of a one item. So, for example, you get 128 units of dental floss or 32 voltmeters.

Describe the solution

Two lines were added to map_extras.cpp with the intended effect of making mil_food return only 30% of the time (down from 40%) and mil_bulk return 1 in 10.

mil_bulk:

  {
    "type": "item_group",
    "id": "mil_bulk",
    "//": "A bulk of uniform goods all of the same type likely found in a shipping crate",
    "subtype": "distribution",
    "entries": [
      { "item": "mil_mess_kit", "prob": 10, "count": 32 },
      { "item": "voltmeter", "prob": 10, "count": 32 },
      { "item": "drivebelt", "prob": 10, "count": 64 },
      { "item": "grapnel", "prob": 10, "count": 32 },
      { "item": "string_floss", "prob": 5, "count": 128 },
      { "item": "toothbrush_plain", "prob": 5, "count": 128 },
      { "item": "sm_extinguisher", "prob": 5, "count": 16 },
      { "item": "fire_ax", "prob": 5, "count": 16 },
      { "item": "manual_stabbing", "prob": 5, "count": 64 },
      { "item": "manual_rifle", "prob": 5, "count": 64 },
      { "item": "m17", "prob": 3, "count": 32 }
    ]
  },

Or, simplified, mil_bulk is a 1d7 roll on this table:

  1. mess kit
  2. voltmeter
  3. drivebelt
  4. grappling hook
  5. dental hygiene
  6. fire response
  7. mil training manual

Describe alternatives you've considered

I wanted to this bulk crate to contain only one type of item, but as it stands now it will be paired with another item from the mx_supplydrop switch. There is 1 in 100 chance that a crate will contain two bulk items. It would be better if case 1 (mil_bulk) meant that only one item was generated. I think this could be achieved by putting int items_created = 0; inside the switch, and then setting case 1 to int items_created = 1; but didn't want to muck too much up.

The diversity of possible items in mil_bulk could be increased.

The bulk items could each be placed in boxes or together in some sort of cellophane warehouse packaging to simulate a shipping container (packing peanuts?).

Additional context

I believe there is no way for this item group to use existing item groups in order to get a better diversity of items. Because 32 instances of an item group will not return 32 instances of one item, but instead a variety of items from that group.

@Jerimee
Copy link
Contributor Author

Jerimee commented May 7, 2020

This seems relevant to future development of military bulk crate: https://quicksearch.dla.mil/qsDocDetails.aspx?ident_number=35520

@ZhilkinSerg ZhilkinSerg merged commit b04994b into CleverRaven:master May 8, 2020
@Jerimee Jerimee deleted the milbulk branch July 24, 2020 00:44
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

Successfully merging this pull request may close these issues.

2 participants