-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Conversation
It would be better to make a new faction for this hunter, 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. |
data/json/mapgen/campsite.json
Outdated
}, | ||
"place_items": [ | ||
{ "item": "cannedfood", "x": [ 16, 4 ], "y": [ 21, 7 ], "chance": 75 }, | ||
{ "item": "cannedfood", "x": [ 16, 4 ], "y": [ 21, 7 ], "chance": 75 }, |
There was a problem hiding this comment.
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 ]
?
There was a problem hiding this comment.
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.
data/json/npcs/NC_HUNTER.json
Outdated
[ "bolt_wood", 90 ], | ||
[ "bolt_wood", 90 ], |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected
Co-Authored-By: Anton Burmistrov <Night_Pryanik@mail.ru>
{ "item": "cannedfood", "x": [ 16, 4 ], "y": [ 7, 21 ], "chance": 75 }, | ||
{ "item": "cannedfood", "x": [ 16, 4 ], "y": [ 7, 21 ], "chance": 75 }, |
There was a problem hiding this comment.
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 }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ "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 }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ "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 } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ "item": "camping", "x": [ 10, 8 ], "y": [ 15, 13 ], "chance": 75 } | |
{ "item": "camping", "x": [ 8, 10 ], "y": [ 13, 15 ], "chance": 75 } |
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. |
@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. |
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
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.