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

Make Arsonist NPC spawn with way fewer items so they fit in inventory #48339

Merged
merged 3 commits into from
Apr 7, 2021
Merged

Make Arsonist NPC spawn with way fewer items so they fit in inventory #48339

merged 3 commits into from
Apr 7, 2021

Conversation

Musteval
Copy link
Contributor

@Musteval Musteval commented Apr 3, 2021

Summary

Content "Reduce arsonist NPC stock to what they can carry"

Purpose of change

On master the arsonist NPC spawns with a ton of stuff - 50 molotovs, 50 pipe bombs, 20 bags of fuses. They can't carry all that, so they drop a lot of it immediately. This is kind of weird in the refugee center, but super weird when they spawn in your starting shelter, which has been happening a lot for me recently. This PR reduces it to the point where they can carry it all.

Describe the solution

I dialed down the ridiculous numbers, converted the rebar_rails (which are ammunition for a railgun) to regular rebar (which is what their missions refer to), and gave them a golf bag because a regular backpack can't hold rebar.

Describe alternatives you've considered

I bet there's a better way to give them a golf bag than a one-item group, but I don't know what it is.

Testing

Teleported to refugee center, saw that they hadn't dropped anything. Mind controlled them, traded, confirmed all the items I expected were there.

@Musteval Musteval requested a review from I-am-Erk as a code owner April 3, 2021 13:24
@actual-nh
Copy link
Contributor

I'm just waking up - but would a duffel bag (as with the military recruit profession) allow fitting more of their original set of items?

@Musteval
Copy link
Contributor Author

Musteval commented Apr 3, 2021

Nope - rebar is 80cm, max length for duffel bag is 55cm.

@Musteval
Copy link
Contributor Author

Musteval commented Apr 3, 2021

Well, they could fit closer to 50 molotovs with a duffel bag, but I don't think it's super reasonable for them to be carrying around 50 molotovs and 50 pipe bombs. They have a bunch of spare volume with this PR, not sure exactly how much but it's at least "a golf bag minus five rebars" worth, because before I added the golf bag they only dropped the rebar.

@actual-nh
Copy link
Contributor

actual-nh commented Apr 3, 2021

Well, they could fit closer to 50 molotovs with a duffel bag, but I don't think it's super reasonable for them to be carrying around 50 molotovs and 50 pipe bombs.

Molotovs, no, also given the likelihood of breakage - some allowance for padding wrapping them should be included. Pipe bombs, maybe.

They have a bunch of spare volume with this PR, not sure exactly how much but it's at least "a golf bag minus five rebars" worth, because before I added the golf bag they only dropped the rebar.

I'd put back in some pipe bombs. Definitely no more Molotovs, possibly less of them but add some rags - suitable for both padding and making more Molotovs.

I'm also noticing that both pipes and pipe bombs lack a longest_side (the pipe bomb should be a bit above 1/3 the length of the pipe, according to the comment). EDIT: #48337 has a suggested change for the pipe bomb, namely the longest_side.

@Musteval
Copy link
Contributor Author

Musteval commented Apr 3, 2021

Well, my impression is that in real life pipe bombs aren't super stable - lots of stories of people blowing themselves up by accident. So I don't think you'd want to carry around 50. Maybe 1-5 pipe bombs and the components for more?

@actual-nh
Copy link
Contributor

actual-nh commented Apr 3, 2021

Well, my impression is that in real life pipe bombs aren't super stable - lots of stories of people blowing themselves up by accident. So I don't think you'd want to carry around 50. Maybe 1-5 pipe bombs and the components for more?

I note that there are 3 types of pipe bombs in the file; the improvised (as opposed to primitive) version is said to be using (mostly) reasonably stable explosives (the difference - in terms of stability - between it and the military-explosives "bootleg" one is whether it detonates in a fire, from what I can see). I can see some of them being replaced with components, however - or, to be precise, partial components, namely the harder-to-get but lighter-weight parts as opposed to the pipes; the NPC should also have a hacksaw or similar, then.

@Musteval
Copy link
Contributor Author

Musteval commented Apr 3, 2021

02d8782 tweaks the numbers and gives them some rags and a plastic jerrycan with 10L of gasoline. Confirmed that they can still hold it all (they can't hold it all with 50 pipe bombs though). I think 25 pipe bombs is too many but at least it's better than 50.

@Maleclypse Maleclypse added the NPC / Factions NPCs, AI, Speech, Factions, Ownership label Apr 3, 2021
@@ -1,4 +1,10 @@
[
{
"type": "item_group",
"id": "NC_ARSONIST_storage",
Copy link
Contributor

Choose a reason for hiding this comment

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

It doesn't seem like you're adding a reference to this new group anywhere. Does it just magically get used based on the name?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I dunno exactly how it works but I saw the golf bag show up in-game.

Copy link
Contributor

@actual-nh actual-nh Apr 4, 2021

Choose a reason for hiding this comment

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

It's in npc.cpp - look at random_item_from and starting_clothes.

@ZhilkinSerg ZhilkinSerg merged commit bbe44c0 into CleverRaven:master Apr 7, 2021
@Musteval Musteval deleted the marloss/arsonist-stock branch April 7, 2021 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NPC / Factions NPCs, AI, Speech, Factions, Ownership
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants