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

NPCs - added a new hunter NPC that trades with the player to two locations #35121

Closed
wants to merge 17 commits into from

Conversation

Brytenwalda
Copy link
Contributor

@Brytenwalda Brytenwalda commented Oct 28, 2019

Summary

SUMMARY: Content "A new type of a hunter NPC will spawn in some cabins and campsites"

Purpose of change

More NPC hunters would make the world more plausible - hunting and fishing are some of the easiest ways to obtain food after the apocalypse, and one of the few long-term solutions left. As cabins are one of the best places to live in, it shouldn't be surprising to find survivors there.

It also goes along with my Free Merchants additions - hunters sell their surplus to Free Merchants, who in turn sell it to survivors who don't produce enough for themselves or their families.

Describe the solution

  1. I created a new hunter NPC who trades in food, water and furs. He has multiple dynamic speech options so it doesn't feel like you're always talking to the same person.
  2. NPCs will spawn in some cabins and campsites (I added two special types of these).

Describe alternatives you've considered

It would be great if, at some point in the future, they would wander around the area as well, but I have no idea how to code it.

Testing

I tested everything and it should work properly.

EDIT: It seems that some checks failed due to reasons completely unrelated to any of my changes.

@Brytenwalda Brytenwalda changed the title NPCs - added a new hunter NPC that trades with the player to two locations NPCs - added a new hunter NPC that trades with the player in two locations Oct 28, 2019
@Brytenwalda Brytenwalda changed the title NPCs - added a new hunter NPC that trades with the player in two locations NPCs - added a new hunter NPC that trades with the player to two locations Oct 28, 2019
@ghost
Copy link

ghost commented Oct 29, 2019

It would be better to make a new faction for this hunter,
"wasteland_scavengers" is a legacy faction thing, where previously all dynamic NPCs and some static ones belonged to it, if you add your hunter to this faction, and someone kills this hunter, then some members of the refugee center will telepathically know and go hostile to the player.

Or use the existing no_faction faction, which has different rules in the code, ( i.e it dosnt telepathically communicate wrongdoing across its "members" )

@ghost ghost mentioned this pull request Oct 29, 2019
@Brytenwalda
Copy link
Contributor Author

Brytenwalda commented Oct 29, 2019

It would be better to make a new faction for this hunter,
"wasteland_scavengers" is a legacy faction thing, where previously all dynamic NPCs and some static ones belonged to it, if you add your hunter to this faction, and someone kills this hunter, then some members of the refugee center will telepathically know and go hostile to the player.

Or use the existing no_faction faction, which has different rules in the code, ( i.e it dosnt telepathically communicate wrongdoing across its "members" )

Changed it, they now have a faction of their own. Until we have dynamic factions for individuals, this is necessary for the item ownership.

@curstwist curstwist added [JSON] Changes (can be) made in JSON NPC / Factions NPCs, AI, Speech, Factions, Ownership Map / Mapgen Overmap, Mapgen, Map extras, Map display labels Oct 29, 2019
},
"place_items": [
{ "item": "cannedfood", "x": [ 16, 4 ], "y": [ 21, 7 ], "chance": 75 },
{ "item": "cannedfood", "x": [ 16, 4 ], "y": [ 21, 7 ], "chance": 75 },
Copy link
Contributor

@Night-Pryanik Night-Pryanik Nov 2, 2019

Choose a reason for hiding this comment

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

This is a duplicate of a line above. Is it an error, or you just wanted to make cannedfood itemgroup have double rolls to spawn?

Also, "y": [ 21, 7 ] (and the like down below) is a weird notation. Did you mean "y": [ 7, 21 ]?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wanted it to have double rolls for greater variety.

The notation is of course a mistake, corrected.

Comment on lines 82 to 83
[ "bolt_wood", 90 ],
[ "bolt_wood", 90 ],
Copy link
Contributor

Choose a reason for hiding this comment

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

You should use syntax like { "item": "bolt_wood", "prob": 90, "count": 2 }. Here and below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Corrected

Comment on lines +126 to +127
{ "item": "cannedfood", "x": [ 16, 4 ], "y": [ 7, 21 ], "chance": 75 },
{ "item": "cannedfood", "x": [ 16, 4 ], "y": [ 7, 21 ], "chance": 75 },
Copy link
Contributor

Choose a reason for hiding this comment

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

Double rolls can be achieved by { "item": "cannedfood", "x": [ 16, 4 ], "y": [ 7, 21 ], "chance": 75, "repeat": 2 }

"r": "f_tourist_table"
},
"place_items": [
{ "item": "cannedfood", "x": [ 16, 4 ], "y": [ 7, 21 ], "chance": 75 },
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
{ "item": "cannedfood", "x": [ 16, 4 ], "y": [ 7, 21 ], "chance": 75 },
{ "item": "cannedfood", "x": [ 4, 16 ], "y": [ 7, 21 ], "chance": 75 },

"place_items": [
{ "item": "cannedfood", "x": [ 16, 4 ], "y": [ 7, 21 ], "chance": 75 },
{ "item": "cannedfood", "x": [ 16, 4 ], "y": [ 7, 21 ], "chance": 75 },
{ "item": "pasta", "x": [ 16, 4 ], "y": [ 7, 21 ], "chance": 75 },
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
{ "item": "pasta", "x": [ 16, 4 ], "y": [ 7, 21 ], "chance": 75 },
{ "item": "pasta", "x": [ 4, 16 ], "y": [ 7, 21 ], "chance": 75 },

{ "item": "cannedfood", "x": [ 16, 4 ], "y": [ 7, 21 ], "chance": 75 },
{ "item": "cannedfood", "x": [ 16, 4 ], "y": [ 7, 21 ], "chance": 75 },
{ "item": "pasta", "x": [ 16, 4 ], "y": [ 7, 21 ], "chance": 75 },
{ "item": "camping", "x": [ 10, 8 ], "y": [ 15, 13 ], "chance": 75 }
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
{ "item": "camping", "x": [ 10, 8 ], "y": [ 15, 13 ], "chance": 75 }
{ "item": "camping", "x": [ 8, 10 ], "y": [ 13, 15 ], "chance": 75 }

@stale
Copy link

stale bot commented Dec 4, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not 'bump' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

@stale stale bot added the stale Closed for lack of activity, but still valid. label Dec 4, 2019
@I-am-Erk
Copy link
Member

@Brytenwalda I'd love to merge this and your other changes, they just need a few fixes and some conflict resolution. Feel free to reopen these if you come back to fix up the last bits. I can talk to you on discord to help fix the last bits if you need help.

@I-am-Erk I-am-Erk closed this Dec 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[JSON] Changes (can be) made in JSON Map / Mapgen Overmap, Mapgen, Map extras, Map display NPC / Factions NPCs, AI, Speech, Factions, Ownership stale Closed for lack of activity, but still valid.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants