Take Gold

Post » Fri May 13, 2011 3:11 pm

I've just started a new game and have been reminded of something I've always wanted - that when you open a chest you get a 'take gold' button, alongside the 'take all', so you can take the gold with one click and ignore all the low-value rubbish and anything else you don't want to take.

I've never seen a mod that allows that and I've looked through the Morrowind scipts and haven't see one that controls chest opening, so I imagine it's hardcoded. But I thought I'd ask in case I've missed something. I can't be the only one who's wanted this.
User avatar
jennie xhx
 
Posts: 3429
Joined: Wed Jun 21, 2006 10:28 am

Post » Fri May 13, 2011 7:01 pm

That's a pretty good idea and it could be possible using MWSE. The only difference is that the "Take Gold" button would have to be replaced by a hotkey. I don't know if it had been done before.

If you don't mind, I'll check and see what I can throw together.
User avatar
Leah
 
Posts: 3358
Joined: Wed Nov 01, 2006 3:11 pm

Post » Fri May 13, 2011 4:12 pm

Sweet idea.. ! I hope you're able to whip something up, Adul. I'd like this in my game as well..
User avatar
stephanie eastwood
 
Posts: 3526
Joined: Thu Jun 08, 2006 1:25 pm

Post » Fri May 13, 2011 8:16 am

That's a pretty good idea and it could be possible using MWSE. The only difference is that the "Take Gold" button would have to be replaced by a hotkey. I don't know if it had been done before.

If you don't mind, I'll check and see what I can throw together.


I certainly don't mind, i hope someone can do something :)
User avatar
Karl harris
 
Posts: 3423
Joined: Thu May 17, 2007 3:17 pm

Post » Fri May 13, 2011 5:07 am

I've just started a new game and have been reminded of something I've always wanted - that when you open a chest you get a 'take gold' button, alongside the 'take all', so you can take the gold with one click and ignore all the low-value rubbish and anything else you don't want to take.
Well it is a point (to the gold) and SHIFT + click, but IIRC taking all of an item should be available already (or even click alone if you enable a MCP option)
User avatar
Pumpkin
 
Posts: 3440
Joined: Sun Jun 25, 2006 10:23 am

Post » Fri May 13, 2011 8:18 am

Well, it works most of the time. You open the chest, press the hotkey, and the mod automatically transfers all gold pieces to your inventory and closes the chest. But there's a small (~1%) chance that the script does not start up in time due to some engine weirdness, and then the key won't work and you need to open the chest again to fix it. It's really frustrating. :brokencomputer:

I'll check if I can get rid of that pesky thing tomorrow.

Is "Take Gold" an okay name for it by the way?
User avatar
Antony Holdsworth
 
Posts: 3387
Joined: Tue May 29, 2007 4:50 am

Post » Fri May 13, 2011 11:05 am

That'll be so sweet! I never understood why on a pc, games don't abuse hotkeys and the like... come on, how many keys are there on a keyboard! It's faster than using the fracking mouse (as long as you can use both for the same option; click or type)!
By the way, "Take Gold" is ok, better then "http://www.youtube.com/watch?v=xzfbb6QJ7_w"!
User avatar
Etta Hargrave
 
Posts: 3452
Joined: Fri Sep 01, 2006 1:27 am

Post » Fri May 13, 2011 2:59 pm

Well, it works most of the time. You open the chest, press the hotkey, and the mod automatically transfers all gold pieces to your inventory and closes the chest. But there's a small (~1%) chance that the script does not start up in time due to some engine weirdness, and then the key won't work and you need to open the chest again to fix it. It's really frustrating. :brokencomputer:

I'll check if I can get rid of that pesky thing tomorrow.

Is "Take Gold" an okay name for it by the way?


Call it whatever you like, since you are doing it ;)

@abot - yeah I know you can shift+click but that's not as easy as a single click (or a hotkey) and when you're doing it umpteen times it gets annoying. I had a look at the MCP options but couldn't see anything there, I have 1.9 installed.

@mariedanj - hehe - one of my favourite SF movies :)
User avatar
Emily Graham
 
Posts: 3447
Joined: Sat Jul 22, 2006 11:34 am

Post » Fri May 13, 2011 1:16 pm

Call it whatever you like, since you are doing it ;)

@abot - yeah I know you can shift+click but that's not as easy as a single click (or a hotkey) and when you're doing it umpteen times it gets annoying. I had a look at the MCP options but couldn't see anything there, I have 1.9 installed.

@mariedanj - hehe - one of my favourite SF movies :)


In MCP 2.0 the Beta section has "Shortcut key improvements", part of which says "Normally, while picking up stacks, holding down shift would pick up a whole stack without a quantity window, and holding down ctrl would pick up one item. This option makes a click pick up a whole stack by default, and holding shift instead makes the quantity window appear."
User avatar
Chloe Botham
 
Posts: 3537
Joined: Wed Aug 30, 2006 12:11 am

Post » Fri May 13, 2011 7:29 am

@Adul maybe offer a mode to automatically just take all the gold? IMHO the only reason you wouldn't want to is when playing with a gold weight mod.
User avatar
Music Show
 
Posts: 3512
Joined: Sun Sep 09, 2007 10:53 am

Post » Fri May 13, 2011 7:31 am

@Adul maybe offer a mode to automatically just take all the gold? IMHO the only reason you wouldn't want to is when playing with a gold weight mod.

That's very similar to how I planned it, in my version you just activate the container once to open it, then once again to close it and take all money.

The problem of the moment is that initially I wrote the script using the OnActivate call on the chest, and I didn't realize that doing so disables the default activate action on that object reference for good. This of course messes up your game if you disable the mod at any time. So now I'm rewriting the script and hope no new problems arise because of that. :laugh:
User avatar
Lewis Morel
 
Posts: 3431
Joined: Thu Aug 16, 2007 7:40 pm

Post » Fri May 13, 2011 2:57 pm

FWIW, I would handle this by keeping track of the player's current target and using xRefType to find out what it is. When it is a container, set a flag and wait for the activate key (spacebar) to be pressed, then trigger the script.

You can also look at my "Take All" mod and perhaps adapt some of that, but using a filter to only get gold.

Also, for xKeyPressed weirdness, I suggest always calling it twice in succession:

setx pressed to xKeyPressed lkeysetx pressed to xKeyPressed lkey


That seems to clear up any previous key presses that may still be causing it to return true (I have no logical explanation for why that happens, but it does) and just seems to help with the overall reliability of using that function.
User avatar
josie treuberg
 
Posts: 3572
Joined: Wed Feb 07, 2007 7:56 am

Post » Fri May 13, 2011 6:20 am

Thanks for the heads up Fligg, I had been wondering why xKeyPressed didn't always work the way I'd expect it to. The mod already works well "in theory", there are just a few obscure bugs that occasionally happen in-game that I still need to track down.
User avatar
Curveballs On Phoenix
 
Posts: 3365
Joined: Sun Jul 01, 2007 4:43 am

Post » Fri May 13, 2011 4:33 pm

Welcome to the world of MWSE modding. ;)
User avatar
Matt Fletcher
 
Posts: 3355
Joined: Mon Sep 24, 2007 3:48 am


Return to III - Morrowind