CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.31k stars 4.13k forks source link

ownership system? #9555

Closed jcd000 closed 7 years ago

jcd000 commented 9 years ago

inspired by this post: http://smf.cataclysmdda.com/index.php?topic=8022.0

we have currently no way to know to whom items belong. what if items had also an ownership attribute?

how this helps:

perceived problems:

all in all, it should be helpful as we are building up npc's and factions.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Zireael07 commented 9 years ago

That's a sound idea.

smmck commented 9 years ago

I haven't looked into it yet, but I've been seeing references to area designations like in Dwarf Fortress. Maybe we could use one of those to designate areas that you consider to belong to you. The problem with that is that players could immediately claim any valuable property that they came across (such as grocery stores), but it would be an effective way to let NPCs know what you consider to be 'yours'.

Shoes01 commented 9 years ago

Maybe you could use spray paint to tag a building ;p then that entire overmap tile comes yours. Some NPCs could respect the tags, others not.

In any case, this would require a lot of work on NPCs I think.

jcd000 commented 9 years ago

this is NPC groundwork... in a way essential, as ownership is essential when more than 1 people are involved.

I would think that we need ways to set both area and item ownership along the way.

item owneship should take priority though...

Mshock777 commented 9 years ago

I really like whole 24x24 zone claiming idea: for player and npcs. We might not even need item ownership with this. But there should be system to stop player from claiming whole town.

kevingranade commented 9 years ago

Yea, I'm not a fan of marking individual items as owned by the player, especially if the player isn't present, just how do NPCs detect that?

I support the 'posting a sign' option that designates a whole area as claimed, though I imagine the majority of NPCs would ignore it if no one is around.

To specifically avoid NPCs grabbing thing the player is interacting with, we could have NPCs not pick things up that are adjacent to the player.

What I'd really like to see is a clear statement of the situations where this is a problem, all I've seen so far is "NPCs take my stuff", which we're not going to simply stop from happening.

jcd000 commented 9 years ago

About how ownership causes problems: well, when i have a pile of stuff, and i have a friend NPC to follow me, then he just takes as much as he can carry from what * I * have copiously gathered and stashed, it is a problem. If i'm feeling good, i just trade him junk to take back my things. But in the cata world this would be reason enough to kill him. Imagine randomly taking a CBM from your stash. If every NPC does this... killing all NPC's can't be the solution.

The 'honest' NPC's must respect my ownership, as i will respect theirs, while 'thieving' ones could try and take our stuff without the player noticing.

As for the how, the problem with "the player isn't present" is that the reality bubble is not here, so nothing happens to the stuff (apart from rot/ferment systems)

As i say in the first post, the unclaiming could be done after some time has passed. E.g. if the player is not present for let's say, 30 days, his claimed area could be unclaimed, as he clearly "is not living there"

And of course we'd need a system to prevent the player from claiming too much.. Maybe 1 overmap area and 5 vehicles max claimed things? (things stashed in my vehicle are my property too)

PS. I would like to hear why marking individual items as 'owned' is not a good idea. To me it seems straightforward and clean enough: You pick it up, its yours unless it belonged to another previously.

KA101 commented 9 years ago

You pick it up, its yours unless it belonged to another previously.

Pretty sure those houses, gun stores, clothing stores, sporting goods stores, and so on didn't just POOF into existence. (OK, mapgen, but in-world New England wasn't built in a day.) Who's to say that NPC you're accusing of stealing "your" CBMs didn't work at/manage/own the electronics store from which you looted them?

"But the store was abandoned!"

OK. Evacuation pressures aside, how do I know a place is or is not abandoned? IRL there'd be fresh tracks/trash pile/waste/etc, but that's not available in DDA. Best I can think of is a PE/Survival/Traps roll to detect "hey, someone lives here" on entering a map tile. The idea of various player signs might be interesting, but then you ought to be expected to honor those of others.

As for max area-claimable, I'd argue for 3x3 + vehicle at least. You could thus take over a farm.

Mshock777 commented 9 years ago

I think I was too harsh when suggested stopping player from claiming whole town. I think you actually should be able to claim town if there is no soul in 1 km. radius. Closer you are to society, harder it is to claim land. If you want to live next door to some faction, you can claim only 1 map tile.

KA101 commented 9 years ago

Or perhaps the faction assigns you X area. Factions would be a good way to patrol territory, since they've got personnel to look in on that sort of thing.

jcd000 commented 9 years ago

The idea of various player signs might be interesting, but then you ought to be expected to honor those of others.

i like the dynamics this may bring into existence....

Or perhaps the faction assigns you X area. Factions would be a good way to patrol territory, since they've got personnel to look in on that sort of thing

I also dig this

Closer you are to society, harder it is to claim land

this seems quite correct.. and factions won't give you much, if at all...

Who's to say that NPC you're accusing of stealing "your" CBMs didn't work at/manage/own the electronics store from which you looted them?

But we can also flag stuff as belonging to NPC's. So if its theirs, its theirs and when i try to pick it up i will get a message ("are you sure you want to steal this?") if i know of their presence, and nothing if i do not.. But if i steal, the NPC may go hostile (or at least like me much less) when/if he finds out. So if i do take that CBM, i might have a problem with the local faction.

EDIT (last one) This might bring the dynamic of having to scavenge in far away places, since you cannot scavenge in the faction's town, and while in there you will have to trade to get the necessities.

kevingranade commented 9 years ago

but we can flag things as owned by NPCs too.

I'm not talking about implementation, I have a problem with a system where you and NPCs magically know who owns what. We need a way to claim things with some kind of visible marker for long term ownership, and have NPCs not pick things up that you've just dropped. However, if you drop something and walk off, it should be fair game, since it looks like you're discarding it.

Simply ignoring NPC actions outside the reality bubble is short-sighted, they in fact are operating outside the reality bubble, the only thing keeping them from claiming items while you aren't around is the fact that we haven't coded it yet, so any system we decide on should take that into account.

In your system, EVERYTHING should be claimed by the pre-cataclysm owners by default, after all, that meets your 30 day limit.

KA101 commented 9 years ago

FWIW this is a valid reason for those old trap-protected stashes... ;-)

jcd000 commented 9 years ago

In your system, EVERYTHING should be claimed by the pre-cataclysm owners by default, after all, that meets your 30 day limit.

It is the apocalypse: all bets are off. Most people are dead anyway, and the rest own as much as they can claim, and claim as much as they can scavenge and/or protect.

Simply ignoring NPC actions outside the reality bubble is short-sighted, they in fact are operating outside the reality bubble, the only thing keeping them from claiming items while you aren't around is the fact that we haven't coded it yet, so any system we decide on should take that into account.

Ok, this makes sense.

I'm not talking about implementation, I have a problem with a system where you and NPCs magically know who owns what. We need a way to claim things with some kind of visible marker for long term ownership, and have NPCs not pick things up that you've just dropped. However, if you drop something and walk off, it should be fair game, since it looks like you're discarding it.

Ah, i get it now. In this light, visible markers like signs make sense. These could be constructable, and then a player could write on them or carve on them something to show the place is his.

For such a thing, i could see the area claimed and the time before the claim expires to vary in response to factions: 1) If its unclaimed city (=no factions around), the claims are restricted to what the player can protect, so he cannot claim too much (as the initial claims will start expiring), and he cannot be away for too long (as anyone passing might take some of his stuff, or even set camp on the players claim) The chance that someone will steal from the player's stash while he is away, is quite significant too.

2) If it is a faction city, the player will not be able to claim much as only the faction will have the authority to assign land to the player, but the faction also will make sure that the player's claim is respected, resulting in the player being able to be away for much longer from his base before the claim expires (when the faction believes the player is dead) Factions should also protect the base of the player when he is away, so the thievery chances should be smaller on that occasion.

kevingranade commented 9 years ago

Cool I think we're getting somewhere. There is one thing this could pretty easily hook into, which is a timestamp of the player's latest visit to the map tile. I was planning on adding this for tracking things over long distances anyway, and it could be used to derive a "lived in indication". I'd prefer to generalize it for players, NPCs and maybe even monsters moving around on the overmap, it would just consist of something like a std::map<std::string, int> where the string is either player name or monster id (this means you can't track individual monsters, but does that really matter?), and the int is the turn number where they last appeared on that overmap square. By comparing the timestamps of adjacent overmap squares, you could tell the direction something is moving and track it. You could get more sophisticated than this, for example by having a number indicating how much time the entity spent there, which also decays over time, but I think for a first crack at it a timestamp would be sufficient.

How this would hook into your concept of lone claims versus faction claims is that the player needs to visit their claims to keep them fresh (but I'm guessing we're talking week+ absences are fine), but the faction could just set a NPC to patrol all the claimed area, which would keep them fresh.

Side issue regarding "faction cities", I see no reason to prevent a player from staking a claim (they might not even know the faction is there), the question is whether the faction respects it.

jcd000 commented 9 years ago

timestamp details and how it integrates with claims....

sounds fine.. nothing more to add...

Side issue regarding "faction cities", I see no reason to prevent a player from staking a claim (they might not even know the faction is there), the question is whether the faction respects it.

no problem with this too, but i guess someone making claims inside faction territory may also negatively affect relations with the faction (even have them go hostile), but this could be dependent on the faction.

I mean there could be peaceful laid-back factions that tolerate claims inside faction territory, so long as the player is not claiming something already belonging to someone else, but also factions that will go hostile if you claim in their territory without taking permission first.

Either way, 'faction cities' imply two kinds of claims: Individual claims = NPC's/player's territory Faction claims = Faction territory

Faction territory may contain multiple individual claims from faction (even non-faction?) members. It basically sets the core (only the core?) area of that faction, or the area where they can enforce their claims / police / protect.

Without the second kind of claims, how will the faction know what they have/ where to patrol? Ok, i guess they could just detemine their territory according to their member's claims, but what if a faction claims a whole city, but not every house is claimed by a member of the faction?

This second kind of claim could be subject to expiration only if the faction cannot patrol it regularly (i.e. hasn't got the manpower to protect their claims)

EricFedrowisch commented 9 years ago

I mean, if a faction is violent, I would expect them to display the corpses of interlopers. This is a pretty hard to miss territorial sign and also the "freshness" of the corpses gives an indication of the last time the faction was around. Maybe the player could do this too, but only the Cannibal and Psychopath can do it without suffering morale penalties. So, "territorial markers" could be constructed with bodies of slain foes (head on a stick, or whatever) to mark an area as well as using spray paint (for the less violent). Unintelligent creatures might leave freshly slain and fed upon corpses or large piles of dung littered with bones and fur/hair that mark their "territory" or even scent markers (which may or may not be apparent to most characters).

KA101 commented 9 years ago

Corpse as territory-marker, but morale penalties

Depends on the corpse. Wax Mistah J and I'd be surprised if people didn't put jabberwock corpse on display. pulped zombie hulk corpse would probably also be an acceptable decoration.

If you wouldn't reasonably take morale penalties for butchering it, you shouldn't take penalties for displaying it. Hulks are pretty clearly no-longer-human IMO.

SilverDragonLord commented 9 years ago

The timestamping sounds interesting, one way we might be able to keep some NPCs out as well is if we could lock containers/doors, though this might not keep them out entirely would at least slow them down and maby discourage most if they have to break down a reinforced metal door to get to your stuff, would also keep our buddy NPCs from stealing all our good stuff, as for claiming territory in a faction area maby one could set it up so they will allow us to claim a part of there territory for some tribute every now and then (food/ammo/cash card) though likely only if we have worked with them to the point they trust us (Gotta work hard for safety).

Dunkhan commented 9 years ago

We have zones now where you can designate a zone and say auto pickup should be disabled. Why not just extend this mechanic to allow marking a home zone. This could help with NPCs overburdening themselves as well.

Behaviour: While in home zone friendly/following NPC will sleep without being told, will drop things they dont currently need, and will not pick up things unless they need them. e.g. if he has a bow and there are arrows on the ground he will grab them, but he will not pick up leather patches and string.

The zone mechanic is not hard but the NPC AI integration might be more complex, I don't know if they have a concept of 'need' and 'want'

edit: Might be nice to let them sleep there automatically as well. It can get frustrating when you tell them to go to sleep and then two hours later they wake you up to complain about being tired

kevingranade commented 9 years ago

Yea, they already don't pick things up unless they think they need them, so that doesn't help much.

Dunkhan commented 9 years ago

I just read through the need function in the npc.ccp file and something else is happening. One thing that they will always pick up is thread. I could not work out why.

Additionally they never pick up food. My companions all seem to die eventually as well although it may not necessarily be starvation.

Coolthulhu commented 9 years ago

May be infection. I don't think they understand how to fix their infected wounds at the moment. I enabled infection when I simplified bite function and it may have been too early. I'll probably disable it with a hack - properly fixing it would require them understanding how to disinfect and knowing how to ask the player for meds.

illi-kun commented 7 years ago

This issue was closed as it appears inactive.

Reducing open issues to those which are (or will) be actively worked upon helps us focus our efforts. This issue has not been deleted - it still appears in searches and if it contains relevant information you are encouraged to continue to link to it.

If this issue was a bug

It should be reopened if it can be reproduced in the current build. You can obtain the most recent copy here. Please check there is not a more recent report of this bug before doing so. If no more recent report exists you should continue the discussion in this issue.

If this was a feature request

If the consensus was that the idea was good you could consider submitting an implementation via a PR. If you want to comment further please do so here as opposed to opening a new issue. Before posting check nobody has already made the same point and consider whether your comments are likely to lead to an implementation. If you have doubts about either consider instead voting for the issue

If you want to work on this issue

Then either assign it to yourself or if you are unable to do so claim it via adding a comment. Please don't assign others or make a general request for action.

ZhilkinSerg commented 4 years ago

Fixed in #29834