Immersive Thievery Request

Post » Wed Sep 01, 2010 8:49 pm

That sounds like a printc error. It looks like you haven't added a string in double quotes after the printc, or haven't done so in the right format. Post your code after you added the printc lines and we should be able to help more.
User avatar
Chavala
 
Posts: 3355
Joined: Sun Jun 25, 2006 5:28 am

Post » Wed Sep 01, 2010 8:03 pm

Okay! I figured out how "printc" works (omg der :facepalm: ) Now, I have set checks to see how far the script goes...

scn SCScript

float fquestdelaytime

ref itemRef
ref ownerRef

short init


begin GameMode

if(init == 1)
if(oncontroldown 5 == 0)
return ;optimizing
else
;activate button pressed
-printc "Check 1"
set itemRef to getCrosshairRef
if(itemRef != 0)
-printc "Check 2"
if(itemRef.isActor == 0 && itemRef.IsActivatable == 0) ;rule out actors and activators like doors
-printc "Check 3"
if(player.isActorDetected == 0)
-printc "Before SetOwnership"
TestExpr(itemRef.SetOwnership)
-printc "After SetOwnership"
;try to set the ownership of the ref in the crosshair to player
;(testexpr should save the script from crashing if the target is still not valid somehow)
endif
endif
endif
endif

else
set fquestdelaytime to 0.001
set init to 1
endif

end

Let me know if I made anything unclear :sadvaultboy:
User avatar
Dalton Greynolds
 
Posts: 3476
Joined: Thu Oct 18, 2007 5:12 pm

Post » Wed Sep 01, 2010 9:58 pm

if(itemRef.isActor == 0 && itemRef.IsActivatable == 0) ;rule out actors and activators like doors

Try changing this to:

if (itemRef.GetObjectType == 23)
User avatar
Emily Rose
 
Posts: 3482
Joined: Sat Feb 17, 2007 5:56 pm

Post » Wed Sep 01, 2010 11:30 am

Try changing this to:

if (itemRef.GetObjectType == 23)

No, still didn't pass this condition :shakehead:
User avatar
Miss Hayley
 
Posts: 3414
Joined: Tue Jun 27, 2006 2:31 am

Post » Wed Sep 01, 2010 3:11 pm

Hmm. Worth trying the base object instead:

if (GetObjectType itemRef == 23)

...though to be honest, I'm not sure whether GetObjectType functions on statics. (It should, but it's documented in the section for inventory items.)
User avatar
Undisclosed Desires
 
Posts: 3388
Joined: Fri Mar 02, 2007 4:10 pm

Post » Wed Sep 01, 2010 5:55 pm

The person who posted that original code might have meant IsActivator, instead of IsActivatable, at least going on the comments that were attached. Try that instead, but I haven't used these functions before, so I don't know exactly what they do. Presumably there is a difference, otherwise they wouldn't both exist.
User avatar
Soraya Davy
 
Posts: 3377
Joined: Sat Aug 05, 2006 10:53 pm

Post » Wed Sep 01, 2010 12:57 pm

Y'know, while initially testing to see if this concept even works, you might as well just comment out the line where it's stalling (and the matching endif, of course).
User avatar
(G-yen)
 
Posts: 3385
Joined: Thu Oct 11, 2007 11:10 pm

Post » Wed Sep 01, 2010 6:29 pm

Terrific crysallus, thank you, that was the problem!

Works perfect - I stole an item in Margarte's house, detected, from both containers & items just lying around with the flag not being removed, and I've tried undetected, both sneaking & not, with them no longer being marked stolen as intended.
User avatar
SEXY QUEEN
 
Posts: 3417
Joined: Mon Aug 13, 2007 7:54 pm

Post » Wed Sep 01, 2010 11:06 am

Any chance of an esp release? :goodjob:
User avatar
Lyndsey Bird
 
Posts: 3539
Joined: Sun Oct 22, 2006 2:57 am

Post » Wed Sep 01, 2010 9:01 am

I have asked Skycaptain if I may go ahead and release this on TESNexus, as it is his script originally & I don't want to be rude, especially since he took the liberty of helping me out in the first place despite being busy with DR6.
User avatar
Keeley Stevens
 
Posts: 3398
Joined: Wed Sep 06, 2006 6:04 pm

Post » Wed Sep 01, 2010 10:09 pm

This is an interesting idea! Good to see that it's working now, I think I'd be very interested in a mod like that.

Just one idea: If you put in an upper limit of item value in the script, then the mod will still be compatible with the Thieves Guild - in order to advance in the TG, you'll just have to steal more valuable items, which is an idea I actually like (especially since you'll have to sell them for really bad money in the beginning - keeps everything nice and balanced). If you add an *.ini file to your mod, which isn't that difficult, you can also allow players to set this value themselves. And since you might decide to make the mod more advanced in the future, you'll most likely have to include an *.ini file anyway.

Edit: Hm, so actually, this doesn't work on items that are in containers, right?
For that you'd have to set the ownership of the container to yourself temporarily.
User avatar
Britta Gronkowski
 
Posts: 3475
Joined: Mon Apr 09, 2007 3:14 pm

Post » Wed Sep 01, 2010 6:42 pm

No, it does work on items in containers. I had to make sure that worked as well :goodjob: Items you pick from pockets are still marked as stolen though.
User avatar
Darren Chandler
 
Posts: 3361
Joined: Mon Jun 25, 2007 9:03 am

Post » Wed Sep 01, 2010 8:35 am

I've encountered one serious problem with the script: locked chests no longer prompt you to pick the lock with this mod active.

Does anyone know of a way to resolve this issue?
User avatar
Alisha Clarke
 
Posts: 3461
Joined: Tue Jan 16, 2007 2:53 am

Post » Wed Sep 01, 2010 10:02 am

That was the purpose of the problematic code to eliminate objects that could be activated. That should have excluded doors, containers etc. but I'd guess the code you have now has taken that exclusion out completely. Some form of it need to go back in. Tejon's test for GetObjectType == 23 was specifically looking for containers to bypass them.

The original script was for picking items up, rather than selecting them from a container inventory, so another piece of code running in a Menumode block would have to do the same for objects in containers.
User avatar
lilmissparty
 
Posts: 3469
Joined: Sun Jul 23, 2006 7:51 pm

Post » Wed Sep 01, 2010 4:15 pm

I'm sorry to ask, but are there any conditions I could apply to fix this? It's... well, gamebreaking, and I am far too green when it comes to scripting.
User avatar
jason worrell
 
Posts: 3345
Joined: Sat May 19, 2007 12:26 am

Post » Wed Sep 01, 2010 12:09 pm

Some form of it need to go back in. Tejon's test for GetObjectType == 23 was specifically looking for containers to bypass them.

Err... actually, that excludes everything BUT containers. I thought that it WAS for looting chests. :P This is prototype code, nowhere near release quality, and I was just trying to make it do something rather than nothing -- that's step one. Making it do the right thing comes later, and making it stop also doing wrong things is what we call "polish." ;)
User avatar
I’m my own
 
Posts: 3344
Joined: Tue Oct 10, 2006 2:55 am

Post » Thu Sep 02, 2010 12:18 am

Well, so far everything works except for containers. They (I'm guessing) become owned by the player upon being used, thus making them not need to be picked if locked. I may be dead wrong in thinking this, but that's all I can come up with. I asked Skycaptain if there could be another condition to fix this and am awaiting a response.
User avatar
Joe Alvarado
 
Posts: 3467
Joined: Sat Nov 24, 2007 11:13 pm

Post » Wed Sep 01, 2010 8:55 pm

Okay there is a problem concerning doors now. The same problem that effected chests, with them not needing to be picked if locked. Is there anything wrong with this condition?

if(ItemRef.IsActor == 0 && ItemRef.IsContainer == 0 && ItemRef.IsActivator == 0)

I believe this is where the problem lies.
User avatar
FLYBOYLEAK
 
Posts: 3440
Joined: Tue Oct 30, 2007 6:41 am

Post » Wed Sep 01, 2010 11:55 am

Try adding ItemRef.IsDoor == 0
User avatar
Sami Blackburn
 
Posts: 3306
Joined: Tue Jun 20, 2006 7:56 am

Post » Wed Sep 01, 2010 3:30 pm

Nyuck nyuck... didn't wok. I had uploaded the mod to TESNexus earlier, before finding out about this error, but luckily only 5 downloaded it. The file is currently set to hidden until this issue is resolved.
User avatar
Jack Moves
 
Posts: 3367
Joined: Wed Jun 27, 2007 7:51 am

Post » Wed Sep 01, 2010 8:15 am

I got keen...

Spoiler
scn TestStealScriptfloat fquestdelaytimeref itemRefref ownerRefshort initbegin GameMode	if(init == 1)		if(oncontroldown 5 == 0) 			return ;optimizing		else			;activate button pressed			set itemRef to getCrosshairRef			if(itemRef != 0)				if(itemRef.isActor == 0)					if (itemRef.IsActivator == 0)						if (itemRef.IsContainer == 0)							if (itemRef.IsDoor == 0)								if (itemRef.IsFurniture == 0)									if(player.isActorDetected == 0)										DebugPrint "setting ownership on %i" itemRef										TestExpr(itemRef.SetOwnership)										;try to set the ownership of the ref in the crosshair to player 										;(testexpr should save the script from crashing if the target is still not valid somehow)									else										Printd "player detected"									endif								else									Printd "IsFurniture"								endif							else								Printd "IsDoor"							endif						else							Printd "IsContainer"						endif					else						Printd "IsActivator"					endif				else					Printd "IsActor"				endif			endif		endif 	else		set fquestdelaytime to 0.001		set init to 1	endifend

This seems to work for me. As you can see I've left in debug output to help you test it, as I've only tested briefly on doors and beds. You should test it more thoroughly. To see the debug output, type in tdt in the console, and you should see some messages telling you what conditions are being met on the particular object you are activating. Obviously when releasing you'll want to remove all those else blocks and the printd/debugprint lines.
User avatar
JESSE
 
Posts: 3404
Joined: Mon Jul 16, 2007 4:55 am

Post » Wed Sep 01, 2010 8:23 am

Excellent, this seems to be bugless. I'll continue to play and test with this script for any errors, if no errors occur I'll update the file on TESNexus and provide a link here. Thank you again, crysallus!
User avatar
Angela Woods
 
Posts: 3336
Joined: Fri Feb 09, 2007 2:15 pm

Post » Wed Sep 01, 2010 9:08 am

Any update on whether this will be compatible with fencing items? The answer I received last time was just a short... "I know how to edit scripts, that's easy." "I dislike the Theives Guild anyway..." which was less than helpful. I noticed a good suggestion on the previous page of a configurable ini setting to allow more expensive items to be fenced. I think that sounds like the best solution and allows each individual to decide what a sufficient value is. Also you could increase this setting as you move to the next level of fences. It would make sense that the higher ranking fences don't want items of petty value and require a certain threshold to be met before they accept your item.

This mod has promise and is something I think many folks would be interested in, but not if it destroys the Thieves Guild quest line. I mean how can a mod that nullifies the Thieves Guild be called "Immersive Thievery"?
User avatar
Adam Kriner
 
Posts: 3448
Joined: Mon Aug 06, 2007 2:30 am

Post » Wed Sep 01, 2010 12:04 pm

I've not played the Thieves Guild, but if you can only fence items that are not owned by the player, and you want this to be immersive and realistic, I'd suggest just adding the ability to set any item in the players inventory as stolen. That way, if the player wants to fence the item, they just open their inventory and set it to stolen beforehand. Of course this would mean you could set any item, even ones you haven't stolen, as stolen, but that's quite realistic anyway. If the player wishes to play with 'honour amongst thieves', then they can be honest, and choose to only set as stolen those items that they have stolen. Others may like the idea of cheating the Thieves Guild by being dishonest, which is entirely realistic.

Note that I wouldn't recommend being able to do the opposite, ie. setting stolen items to player ownership, as that would defeat the whole purpose of attempting to steal things without being seen. So the set to stolen option would be irreversible, in which case I'd recommend a confirmation message box before doing it. In order to set as stolen, I'd suggest creating a dummy character, that isn't actually in the game world, that you could set inventory items ownership to. You'd also need to handle stacks of items somehow too, i.e. if the player has an apple, and then steals an apple, they might only want to set one of the apples as stolen, not both. Not sure if obse's inventory references allow you to do this, as they return references to the whole stack of items of the same type. You might need to ask someone who has a little more knowledge with scripting in menumode for tips, as I haven't done that at all as yet.
User avatar
Farrah Lee
 
Posts: 3488
Joined: Fri Aug 17, 2007 10:32 pm

Post » Wed Sep 01, 2010 10:25 am

Any update on whether this will be compatible with fencing items? The answer I received last time was just a short... "I know how to edit scripts, that's easy." "I dislike the Theives Guild anyway..." which was less than helpful. I noticed a good suggestion on the previous page of a configurable ini setting to allow more expensive items to be fenced. I think that sounds like the best solution and allows each individual to decide what a sufficient value is. Also you could increase this setting as you move to the next level of fences. It would make sense that the higher ranking fences don't want items of petty value and require a certain threshold to be met before they accept your item.

This mod has promise and is something I think many folks would be interested in, but not if it destroys the Thieves Guild quest line. I mean how can a mod that nullifies the Thieves Guild be called "Immersive Thievery"?


You did nothing but ask me how I planned on getting through the Thieves' Guild and I answered you.

Now, there are still three ways you can accomplish fencing stolen goods with the way things are now:

1. Let people see you take the item and make a run for it.

2. Pick the item from the pocket of an NPC.

3. Take the item from a container. (Pretty much the same as #2)

The stolen items will remain tagged as such if taken under these conditions.

Link:

http://www.tesnexus.com/downloads/file.php?id=35723
User avatar
Javier Borjas
 
Posts: 3392
Joined: Tue Nov 13, 2007 6:34 pm

Previous

Return to IV - Oblivion