TTLG|Thief|Bioshock|System Shock|Deus Ex|Mobile
Results 1 to 14 of 14

Thread: Using conversations to add loot to inventory

  1. #1
    New Member
    Registered: Oct 2019
    Location: Germany

    Using conversations to add loot to inventory

    Another stupid newbie question here:

    In my mission I've got a set of seven "lucky coins", individually almost worthless (1 gold) but valuable as a full set (60 gold total, so I have to award a bonus 53 gold somehow).

    To achieve this, I have done the following, based on this thread

    * Put a coin pile worth 53 golds in my blue room and put that into the inventory of an AI named Derp that is also in my blue room.
    * Each lucky coin in the level has the TrigContained script and a ControlDevice link to a RequireAllTrap, so that each coin can send a signal and so that all need to be collected to trigger the conversation that will award the bonus.
    * The RequireAllTrap uses ControlDevice to activate a conversation marker (I gave it the TrapConverse script and an AIConversationActor link to Derp)
    * Set the Data of the AIConversationActor to Actor ID=1
    * The conversation itself is as follows, all in conversation step 00 read from top to bottom:

    Actor: Actor One
    Conversation Action 0: Remove link (flavor, destination, source)
    Argument 1: Contains
    Argument 2: CoinSetBonus
    Argument 3: Derp

    Actor: Actor One
    Conversation Action 1: Wait (ms)
    Argument 1: 2000

    Actor: Actor One
    Conversation Action 2: Add link (flavor, destination, source)
    Argument 1: Contains
    Argument 2: CoinSetBonus
    Argument 3: Player (I tried this also with StartingPoint and Garrett, no luck)


    However, I cannot get it to put the bonus money in inventory. What am I doing wrong?
    Last edited by StoBo; 31st Oct 2019 at 11:49. Reason: clarify

  2. #2
    Dˇttirin klŠ­ist oft mˇ­ur m÷ttli
    Registered: Apr 2015
    Does the conversation marker work at all?
    I'd always try something simple first that you can see immediately (open door, frob something).

    It's also recommended to begin with "wait" in the first entry (100ms is enough).

  3. #3
    New Member
    Registered: Oct 2019
    Location: Germany
    Yes, using the conversation to frob a switch near the player works fine.

    I can also use the conversation to give myself a mine rather than money.

    Why is loot different?

    edit: I noticed something else strange-

    If I pick up the coins in the wrong order, or I pick up anything else at all along the way, the conversation will no longer award me the mine and it also will no longer frob my test switch. The RequireAllTrap itself doesn't depend on order so I'm not sure what's going wrong.

    I am completely confused.
    Last edited by StoBo; 31st Oct 2019 at 12:46. Reason: ????????????????????????????????????????

  4. #4
    Dˇttirin klŠ­ist oft mˇ­ur m÷ttli
    Registered: Apr 2015
    Argument "Player" is okay. I remember fixing Lord Fishkills Curse.
    An Ai gives the player loot and it will combine with the existing loot. But I think there has to have some loot already or it wouldn't combine.

    This is the conversation

    https://www.ttlg.com/forums/showthre...=1#post2398981

  5. #5
    Desperately Dodgy Moderator
    Registered: Nov 2001
    Location: Dragonsreach
    Giving the bonus loot object a unique combine type might do the trick.

  6. #6
    New Member
    Registered: Oct 2019
    Location: Germany
    Won't that give me two loot stacks in my inventory, one containing the normal loot and one containing the special bonus?

    Anyway, I still have the problem of the conversation being highly sensitive to the order in which I pick stuff up.

  7. #7
    New Member
    Registered: Oct 2019
    Location: Germany
    Okay, it seems that this is impossible to accomplish with conversations.

    I've done a bunch of testing and the problems are the following:

    * Grabbing loot or items interfers with the ability of a RequireAllTrap to activate a conversation, even if the loot item doesn't link to anything. (or maybe it messes with TrapConverse itself?) I have no idea why, but that's what happens.

    * Using a conversation to put anything into your inventory gives you a new stack of those things. So if you use it to obtain a gas mine, and you already have some, you will now have two gas mine stacks. The happens with loot.

    I'm going to have to do this with a script, once I know what I'm doing with those. But using a conversation to get this effect is a bust. It cannot be done.

  8. #8
    Member
    Registered: Jan 2001
    Location: Formby, NW England
    When you pick up the first of any 'combine' object (some loot, a mine etc) that exact object goes in to your inventory. The next one you pick up doesn't. Its model name is assigned to the existing inventory object (with loot, not sure about other things), and the loot value/stack count is increased, and the original object is deleted. It doesn't become contained.

    RequireAllTraps use ScriptParams links back to each triggering object to keep track of which ones are 'on'.
    If the first loot object you pick up is Coin1, it'll remain in your inventory forever, and the RAT will have an SP link back to it. Each subsequent coin (and other loot object of course) will be deleted. When the final coin is picked up, it also gets deleted and all of a sudden the RAT sees that there's is 1 object CD linked to it (Coin1) and it has an SP link back to Coin1, therefore all triggering objects are on, so it fires.
    In other words, it works by accident.

    When the first loot object is something else, the first coin (or other loot object) will be deleted, so none of them will actually turn on the RAT.


    The way to record the coins being picked up is to replace TrigContained with TrigWorldFrob, add the property Engine Features > FrobInfo and add 'script' to the World Action list. Then give each coin a CD link to its own RelayTrap. Give each RelayTrap a CD link to the RequireAllTrap.

    The other part of the problem is that, as mentioned, subsequent loot objects don't become 'Contained', so adding a Contains link is not the right way to go. You should install NVScript and use NVItemGiver.
    Last edited by R Soul; 31st Oct 2019 at 17:46.

  9. #9
    Member
    Registered: May 2002
    Location: Texas
    Quote Originally Posted by Unna Oertdottir View Post
    Argument "Player" is okay. I remember fixing Lord Fishkills Curse.
    An Ai gives the player loot and it will combine with the existing loot. But I think there has to have some loot already or it wouldn't combine.

    This is the conversation

    https://www.ttlg.com/forums/showthre...=1#post2398981
    If the first loot item is the conversation loot then any subsequent loot picked up by the player will combine with the conversation loot. Otherwise there will be more than one loot stack. I agree that Contains is not the way to go when it comes to giving loot to the player.

    If the 53 loot item already exists when the mission starts then its not really a bonus. The total loot will include the 53, and those who find all of the other loot will know that there is 53 still to be found... somehow.

  10. #10
    New Member
    Registered: Oct 2019
    Location: Germany
    Quote Originally Posted by R Soul View Post
    Then give each coin a CD link to its own RelayTrap. Give each RelayTrap a CD link to the RequireAllTrap.
    That seems to have solved the problem of picking things up in the wrong order from letting the RAT trigger the conversation.

    Quote Originally Posted by john9818a View Post
    If the first loot item is the conversation loot then any subsequent loot picked up by the player will combine with the conversation loot. Otherwise there will be more than one loot stack. I agree that Contains is not the way to go when it comes to giving loot to the player.
    Yes, I'll have to go with NVScripts and ItemGiver. Still, it was good to learn a bit about conversations and how they work.

    If the 53 loot item already exists when the mission starts then its not really a bonus. The total loot will include the 53, and those who find all of the other loot will know that there is 53 still to be found... somehow.
    That's not a problem. I'll eventually have a hidden optional objective "Collect all seven lucky coins" appear when you pick one up. If you never find any it will be 60 missing loot, a nice round number that won't make the player suspect anything other than they've missed a loot item.

  11. #11
    Member
    Registered: Jan 2006
    Location: On the tip of your tongue.
    Any reason why the coins need to be contained by the AI in the first place? Having the conversation remove it from the AI's inventory first seems like an unnecessary step. The bonus could just exist in a blue room.

  12. #12
    Desperately Dodgy Moderator
    Registered: Nov 2001
    Location: Dragonsreach
    Not even a blue room, they can be anywhere, like in solid, even and it should be fine. No need for them to be contained by an AI, I agree.

  13. #13
    Member
    Registered: May 2002
    Location: Texas
    While it would be unlikely that any player would miss all of the coins, it will drive some players mad who like to find the total loot. Also when a loot list is made there would have to be some way of accounting for the last 60.

    One idea I has was to create the extra loot first as soon as the player picks up the first coin. That way players don't feel penalized for not finding any or all of the coins, and the total loot will increase by 60 when the player needs to know about it.

  14. #14
    New Member
    Registered: Oct 2019
    Location: Germany
    Sure, but if you find no coins the missing loot will be 60 so a player who doesn't already know about them will just assume he's missing a single loot item worth 60.

    You could also use the ItemGiver method to give monetary rewards for non-theft objectives. For instance, you could have a contract to sabotage a nobleman's electrical generator or to blackjack a specific guard. The award for those should be part of the recorded total loot for that mission.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •