Illegal harvesting

Post » Tue Jul 20, 2010 11:38 am

From an RP and immersion POV, I don't like how you can harvest people's farms and the decorative gardens of the city freely. This would clearly not be socially acceptable to do. There's also what looks to be a flower shop in Chorrol with a wagon full of flowers you can freely take, as another example.
Would it possible to make this illegal?

I'm not even sure if you can assign ownership to flora, but even if you could this would not be ideal. It should be a universal feature that could work for any mod, probably done via background script.
I'm guessing the logic would be something like....if player is in and plant is ...but beyond that I'm not sure how you'd go about doing it. I haven't done scripting behind the vanilla basics, does OBSE or any plugins have anything to offer for this?
User avatar
Dawn Porter
 
Posts: 3449
Joined: Sun Jun 18, 2006 11:17 am

Post » Tue Jul 20, 2010 12:47 pm

I agree with you, it's always bugged me that we can just steal people's crops like this. However, after looking in the CS, it doesn't look like it's possible to set ownership to flora. I don't see why scripting wouldn't work though, I just don't know how to do it.
User avatar
yessenia hermosillo
 
Posts: 3545
Joined: Sat Aug 18, 2007 1:31 pm

Post » Tue Jul 20, 2010 1:40 am

But certain nirnroots had ownerships.....
User avatar
Ellie English
 
Posts: 3457
Joined: Tue Jul 11, 2006 4:47 pm

Post » Tue Jul 20, 2010 6:54 am

Fun part is, despite ownership on the object, harvesting is not a crime.

There are some serious technical hurdles to this one, and while I think eventually it will be feasible as OBSE breaks new ground, I'm also 99% certain that right now it's not.
User avatar
No Name
 
Posts: 3456
Joined: Mon Dec 03, 2007 2:30 am

Post » Tue Jul 20, 2010 3:31 pm

This should be easily do-able, as there are owned plants in the vanilla game already- I think it's Cheydinal castle, but it's one castle, not 100% sure which. Check it out in the CS to see how they did it and then repeat. It might take a while to find and edit every owned plant though.
User avatar
Umpyre Records
 
Posts: 3436
Joined: Tue Nov 13, 2007 4:19 pm

Post » Tue Jul 20, 2010 6:06 am

Just curious, could you not use OBSE's GetCrossHairRef? Something like, Scan for Flora-types and then check the CellID-- might not be perfect, but I'm guessing if the Cell has a Town ID (Like AnvilCell02 or whatever) it is not unreasonable to assume it has an owner (obviously there ARE exceptions to this-- if memory serves there are plants to Harvest by Anvil lake, for example). Could you not just check for a new item being added to the PC's inventory after Pressing Activate, and increment a minor bounty from there?
User avatar
Kelly John
 
Posts: 3413
Joined: Tue Jun 13, 2006 6:40 am

Post » Tue Jul 20, 2010 3:42 pm

CDM_: Yes, you can do all of that. You can even use GetSoundPlaying checks to detect a successful harvest. Lock Bash Omega's bash detection code would work perfectly for this with just the sound name and object type conditions changed. I'm not certain whether you can detect the ownership of the plant, and if not this is a sticking point, but it's likely; the proper thing to do, IMO, would be to actually set those ownerships rather than trying to guess according to what cell you're in. I've seen a few owned plants, it shows the red hand and everything (even though it's a lie!).

The thing you currently can't do, is mark the harvested ingredients as stolen, and that fact was stuck in my head when I wrote my first reply. But if you're satisfied with it being just a generic crime with a minor bounty attached, that's probably within the realm of possibility right now!
User avatar
adam holden
 
Posts: 3339
Joined: Tue Jun 19, 2007 9:34 pm

Post » Tue Jul 20, 2010 6:13 am

Well, I just did a quick check using this Script:

Short OnceRef TargetBegin GameMode	If ( Once == 0 )		Set Once to 1		Set Target to Player.PlaceAtMe JailPants		Target.SetOwnership ZCDMIHStolenFaction		Target.Activate Player 1	EndIfEnd


The item spawned enters the Inventory, remaining marked as Stolen :)

So, what may be possible is...
1. Use the above-outlined checks
2. Modify the Bounty slighty
3. Get the last item added to the PCs Inventory (is this possible? If not, then that's an issue, but OBSE may have it already, I'm not sure).
4. Get it's base form (again, I don't know if this can be done, or not...)
5. Remove last added item
6. Make a new version of the last-added Item using PlaceAtMe
7. Pick up the new Item

The only issue is... PlaceAtMe-- I know using "Pickup" and RemoveAllItems clears them, but if you kept them as a normal item, do they still bloat the Savegame?

Going to test with Flora now, but I assume it works the same.

Edit: Well, it is definitely do-able :)
The only issues I can see are:
1. The above mentioned PAM one.
2. Working out if it is owned (surprisingly few seem to be owned, and getting CellOwner isn't always suitable) -- in my test, I simply checked if it had an Owner, if not, then see if the cell is classed as "wilderness" (anywhere with a name should have an owner-- but things like "Such-A-Place Cave" have their cells named, which will cause false positives for stealing).
3. Detecting if you've been successful-- the demo script I've wrote has 100% success.
User avatar
JUan Martinez
 
Posts: 3552
Joined: Tue Oct 16, 2007 7:12 am

Post » Tue Jul 20, 2010 2:42 pm

Should be no issue with PlaceAtMe in this situation, as soon as the object enters an inventory it's removed from the gameworld.

Here's the remaining, completely non-obvious but hair-pullingly frustrating bug:

Let's say you pick an ear of corn which belongs to Farmer Bob. Script fires, you lose one ear of corn, gain one that is correctly flagged as stolen.

Now you pick a second ear of corn. Script fires and has a 50% chance of removing the stolen ear instead of the fresh one, so when it adds a new stolen one, you still have one that's not. :( This is the part that is currently insurmountable. v0019 is making baby-steps toward fixing it, and might actually be able to handle this application with what we've been previewed, so there's hope on the near horizon.
User avatar
Alyna
 
Posts: 3412
Joined: Wed Aug 30, 2006 4:54 am

Post » Tue Jul 20, 2010 3:04 am

Question: If you saw someone stealing an ear of corn, and then you searched him and actually found five ears... would you believe he got them from the market at the nearest town, or would you rather think that he also stole them from the corn field he's standing in?

I say, if someone steals food of a certain type, then mark all other food items he has of that type as stolen too. Saves a lot of trouble, is fairly realistic and it is a very good approximation (by that I mean, nobody'd ever notice the difference).
Would be even better if they were only marked as stolen if you were actually caught stealing. Food probably wins the prize of being the most ridiculous item guards could possibly claim to recognize from a previous crime. (On the other hand, at least for corn there'd be appropriate dialogue already... "you have my ear, citizen.")
User avatar
Chenae Butler
 
Posts: 3485
Joined: Sat Feb 17, 2007 3:54 pm

Post » Tue Jul 20, 2010 8:22 am

"you have my ear, citizen."

:stare:
User avatar
helen buchan
 
Posts: 3464
Joined: Wed Sep 13, 2006 7:17 am

Post » Tue Jul 20, 2010 9:11 am

Yes, I totally forgot about that-- when you Steal, it places it as 2 different items in the Inventory, but it still only counts as one... Hmm. I think Fear's suggestion is a pretty good solution, of course-- much easier to implement, too. Although I may have a messy work-around, depending how fast Oblivion works.... What if you set a secondary TargetRef to the plant's ingredient, removed the existing one, and then did a check, before adding it back after the check...

May be messy, and no idea if it would work without an Ingredient (does it say harvest none, or still have the percentage chance...). If it worked, it would remove the entire issue...

Hmm, I like this-- a challenge :)

Edit:
In fact, why not just simulate the entire thing? OBSE can set the Chance of Success to Zero, you can check the PlantType to scan for Nirnroots, and then just simulate everything else with a Script-- nothing is ever added except what you want, so no need to remove one, either :)

Edit 2:
And... Done :D

So, it still needs some game-play testing (esp. since my Computer still isn't upto running Oblivion properly, which means little real gameplay), but I believe everything is working now :)
What I've done is written a Script which:
1. Sets the Plant to have a 0 Chance of Success
2. Calculates the Chance of Success, taking Nirnroots into account
3. Checks for Ownership
4. Check the Cell Name for Named Cells if it is not the Wilderness
5. Checks the Cell Music Type for non-Wilderness cells, and sees if they are Dungeon type
6. Determines whether the Flora is owned or not, and then acts accordingly
7. Allows you to Set the Bounty and Chance of Success (including individual Seasons)

The only issues I can see, right now...
1. Some worlds may register as steal all the time (for example, SE -- no included SE Patch, yet)
2. Some outdoor Cells may trigger stealing (i.e., anything like "Such and Such Cave")
3. For some reason, Messages are not appearing... The line runs, but nothing comes up... It may be because I blanked the "Harvest Fail" message, however....
User avatar
lacy lake
 
Posts: 3450
Joined: Sun Dec 31, 2006 12:13 am

Post » Tue Jul 20, 2010 9:11 am

Wow nice, sounds like you got the bulk of it worked out there.
Hmmm now, how would you recognize farms, since those are out in the wilderness?
User avatar
CArla HOlbert
 
Posts: 3342
Joined: Wed Feb 21, 2007 11:35 pm

Post » Tue Jul 20, 2010 3:41 am

Most of them, from a glance in the CS, have their own ID, and Cell area ID (it seems-- for example, Applewatch has a Cell around it, and so does Drakelowe, both with their names), so it shouldn't be a problem-- Mod added may be, however...
User avatar
maria Dwyer
 
Posts: 3422
Joined: Sat Jan 27, 2007 11:24 am

Post » Tue Jul 20, 2010 1:01 pm

Why not use OnActivate on the plant you want to make illegal, and use player->AddItem 1 to add a stolen plant. That way you don't have to remove one first, although you'll have to enter the formula to calculate if they harvest the plant or not.
User avatar
Gavin boyce
 
Posts: 3436
Joined: Sat Jul 28, 2007 11:19 pm

Post » Tue Jul 20, 2010 3:47 pm

I wanted to try for maximum compatibility, personally, hence no directly editing the Plants themselves :( Otherwise, it would be much easier, it's true :)
User avatar
Sammie LM
 
Posts: 3424
Joined: Thu Nov 30, 2006 1:59 pm

Post » Tue Jul 20, 2010 3:40 pm

Ah that's true, it might conflict with Harvest Flora or something. Your way is probably best then.
User avatar
Jason White
 
Posts: 3531
Joined: Fri Jul 27, 2007 12:54 pm

Post » Tue Jul 20, 2010 7:57 am

I like the Idea of if being a crime but!!! Only if it is viewed Reason being is that if you are not observed by an NPC then it would be hard to tell that the vegitable is stolen. I mean what would they say "I know that is my tomato plant because of that bruise and the worm burrow". It's not like a sword or anything like that, they can have dings and marks that are easy to Identify. Also you have to think about this Settlestone I believe is marked but no one living is there. But I think the flaw in the owned Gardens is a problem I just don't harvest that was my way of resolving the Issue.
User avatar
Riky Carrasco
 
Posts: 3429
Joined: Tue Nov 06, 2007 12:17 am

Post » Tue Jul 20, 2010 12:58 pm

Well, once I've worked out a couple of kinks, I'll probably release a Beta/PoC version to get feedback, before adding anything like being seen in, just to make sure everything is working reliably under core conditions :) Hopefully there shouldn't be too many problems.

Where is Settlestone? I don't think I've heard of it, but it has been a while :)
User avatar
Nina Mccormick
 
Posts: 3507
Joined: Mon Sep 18, 2006 5:38 pm


Return to IV - Oblivion

cron