login

Author Topic: Picking up dead people's stuff  (Read 4999 times)

svaucher

  • Guest
Picking up dead people's stuff
« on: January 18, 2007, 06:23:10 pm »
This is just a discussion, not an actual plan for development, so feel free to pipe in if you have suggestions.

Discussion: I was wondering if it would be possible to check if the player is near a dead guy and override the inventory button to cheat to "pick up" stuff.

1/ Copy current inventory to dummy troop, copy inventory skill
2/ Remove current items (except equipped stuff), reduce inventory skill to 0. The ideal would be to reduce the number of inv slots to 0 since you are fighting, and you can only carry what's on your body. >>> I don't know if we can remove **all** inv slots. (negative skill ??) <<<
3/ Add trigger for the inventory access event in fight mission templates when near a dead agent
  3a/ Give access to "trading" screen, with the empty inventory for the player (to avoid having access to normal inventory)
  3b/ You could then pick up and use dead person's stuff as it wouldn't affect your "real" inventory
4/ When battle is over, change inventory back to default inventory

Opinions, thoughts, discussions ?  ;)

Offline Winter

  • I am Tek Jansen!
  • Administrator
  • *****
  • Posts: 476
  • MBX Forum owner
    • View Profile
    • Street of Eyes: The Writing of Ryan A. Span
Re: Picking up dead people's stuff
« Reply #1 on: January 18, 2007, 08:05:47 pm »
This is just a discussion, not an actual plan for development, so feel free to pipe in if you have suggestions.

Discussion: I was wondering if it would be possible to check if the player is near a dead guy and override the inventory button to cheat to "pick up" stuff.

Should be possible, yeah.


Quote
1/ Copy current inventory to dummy troop, copy inventory skill

Check.


Quote
2/ Remove current items (except equipped stuff), reduce inventory skill to 0. The ideal would be to reduce the number of inv slots to 0 since you are fighting, and you can only carry what's on your body. >>> I don't know if we can remove **all** inv slots. (negative skill ??) <<<

Not possible. The player has 12 inventory slots as a minimum.


Quote
3/ Add trigger for the inventory access event in fight mission templates when near a dead agent

Just check if near a dead agent whenever the player hits the inventory key. No need for a new trigger.


Quote
3a/ Give access to "trading" screen, with the empty inventory for the player (to avoid having access to normal inventory)

You could move all the player's non-equipped items to a temporary troop before showing the inventory screen . . .


Quote
3b/ You could then pick up and use dead person's stuff as it wouldn't affect your "real" inventory

4/ When battle is over, change inventory back to default inventory

. . . And move the items back after the battle is over.

Punitively,
Winter

Offline Hellequin

  • Journeyman
  • ***
  • Posts: 254
    • View Profile
Re: Picking up dead people's stuff
« Reply #2 on: January 18, 2007, 09:22:30 pm »
Interestingly, though, we know that you can open the inventory screen.  But that's different from either the trade screen or the loot screen (the difference being whether you pay for what you take ;)).  You'll have to test the relevant commands for that; no guarantees, but easy to test.

Offline Fisheye

  • Blues Brother
  • Moderator
  • *****
  • Posts: 427
  • My scalp's so bright, I gotta wear shades.
    • View Profile
Re: Picking up dead people's stuff
« Reply #3 on: January 18, 2007, 10:17:40 pm »
Yeah, change_screen_loot has a good probability of not working if fired from mission trigger. I know it doesn't work if fired from dialog.

This is what I'd do:

Near the corpse, press I.

Scan through the player's non-equipped items, remove and remember what they are (maybe transfer to a temp. troop).

Place the corpse items into the player's inventory.

Fire up the inventory (not loot or trade) screen, let player change equipment as needed.

When done, transfer player's non-equipped items back to corpse inventory.

After battle:

Restore player inventory from temp. troop.

Iterate through all corpse inventories and put them into the loot pool (so you can retrieve that dagger you had to toss when you snatched that great orc axe).

Drawback:

You'll get spammed to death with "Lost item" and "Gained item" messages. If armagan's disable messages actually worked as claimed this wouldn't be a problem; unfortunately that command currently does a big fat load of nothing.

Offline Hellequin

  • Journeyman
  • ***
  • Posts: 254
    • View Profile
Re: Picking up dead people's stuff
« Reply #4 on: January 18, 2007, 11:09:27 pm »
You can fix the drawback, though, with my "poor man's set_show_messages" trick.

Set up your scripts which take away/give items to/from the player so that every four-or-so takings is followed by about six instances (or a loop which generates same) of (display_message, "str_empty_string").

You'll get spammed to death by blank strings instead, which don't show up onscreen.  Of course, neither will any of the other combat messages until several minutes later. :(

svaucher

  • Guest
Re: Picking up dead people's stuff
« Reply #5 on: January 18, 2007, 11:24:48 pm »
I hope you guys don't mind if I throw these questions out in the air. I'll let someone else ask the next question

Nice suggestion Fisheye, I didn't think of that, and it's much simpler than my suggestion

and nice hack Hellequin ;)
« Last Edit: January 18, 2007, 11:35:17 pm by svaucher »

Highlander

  • Guest
Re: Picking up dead people's stuff
« Reply #6 on: January 18, 2007, 11:34:48 pm »
I've actually just done it in a small mod that I'll release any time soon