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

Thread: Multiple Loot and Item Carryover Demo

  1. #1
    Member
    Registered: Jan 2006
    Location: On the tip of your tongue.

    Multiple Loot and Item Carryover Demo

    I just knocked up a test campaign to wrap my head around Telliamed's InvCarryOver and InvLoadUp scripts, and since it all works, I wrote down what I did in a readme and packaged it up into a demo.

    So here it is - a demo showing how to carry items and loot between missions more than once (e.g. you grab stuff in mission one, you take it to mission two, grab some more stuff, and take the whole lot to mission three). I'll not pretend it's comprehensive, but it's a good starting point if anyone wants a functioning example.

    Rapidshare link: http://rapidshare.com/files/43220174...CarryOvers.zip

    I'd be very grateful if any folks with websites want to grab this for a more permanent hosting solution!

    Also, here's the tutorial I wrote, copy-pasted from the demo readme:

    TUTORIAL
    --------------

    Mission One:

    script_load convict
    script_load gen
    script_load tnhscript -> requires Telliamed's scripts

    Create a Marker. Call it StartingPoint. Add a Playerfactory link to Garrett as usual.
    Add S>Scripts and type in VictoryCheck in the first box and InvCarryOver in the second.
    Add Editor>Design Note and type "inv_player=true;" <- this tells the script that we're using
    the player as the container for the carry-over script.
    Links: Add a ScriptParams link from StartingPoint to the archetypes of any object to be carried over.
    (e.g. -236 is the Sword archetype)
    Set the data of the ScriptParams link to CarryOver.
    Don't link to any loot items; this is handled separately.
    Add Contains links from the StartingPoint to anything you want the player to start with. You can also
    set up a store as normal, but I haven't for this demo.
    Place items in the level that you've linked to the archetypes for.
    (e.g. place a Sword if you've linked to -236).
    You can also place any loot in the level. Nothing special is required for this in mission one.
    Set up an objective to complete so the player can move on to the next level. Don't forget to set
    Dark Mission Description.
    So in the demo I have a sword, a blackjack and some loot on the ground, and the lockpicks in the
    player's inventory. The sword, blackjack and lockpicks archetypes are linked from the StartingPoint
    with ScriptParams (Data: CarryOver)

    Mission Two:

    script_load convict
    script_load gen
    script_load tnhscript

    Create a StartingPoint marker as before. Link it to Garrett, and again link it via ScriptParams to any
    items to be carried over. You can add additional items at this point that weren't in mission one if you
    like. In the demo I've added a ScriptParams link to the ExplosiveCharge archetype so I can carry those
    over into the third mission. Remember to set the data to CarryOver.
    Add S>Scripts and put VictoryCheck, InvCarryOver and InvLoadUp. If you have only two missions, you don't
    need InvCarryOver again. InvCarryOver is used here for saving stuff in mission 2 to take to mission 3.
    InvLoadUp grabs the stuff from mission one.
    So when this mission starts, you should have in your inventory anything that you picked up in the last
    mission, so don't give the player any equipment in this mission unless it's supposed to be added at the
    start of this mission for some reason.
    Add Editor>Design note: inv_player=true; as before.
    The only thing left to do is sort out loot!
    Create a purse (or any loot type - you could even make a custom "Swag bag" model and use that).
    To the purse add Difficulty>Script and tick 0, 1, 2. <- This tells the game to give you the loot on all
    difficulty levels.
    Add S>Scripts and type LastMissionLoot in the box (you can override LootSounds).
    Create a marker. Call it LoadoutCache.
    To the marker add S>Scripts and type LoadoutCache into the top box.
    Now add a Contains link from the LoadoutCache to the Purse.
    This will add the last mission's loot, stored in the purse object, to the player's inventory at the
    start of the mission. Containing the purse directly in the StartingPoint doesn't work unfortunately.
    Add any loot or items to this mission that you want. Again, no special properties are needed for loot
    in this mission.
    Set the Dark Mission Description and set up an objective to let the player end the level.
    Now, if we want a third mission, it's quite simple as long as you added InvCarryOver to the
    StartingPoint in mission two.

    Mission Three:

    I'm assuming for these purposes that mission three is the final mission, but if you have four or more
    missions with carry over abilities, you can just follow the instructions for mission two with all the
    "in-between" missions.

    script_load convict
    script_load gen
    script_load tnhscript

    For the final mission, create a StartingPoint.
    Add S>Scripts and put VictoryCheck and InvLoadUp. We don't need InvCarryOver for the final mission as
    there's nowhere to carry anything to!
    Add Editor>Design note: inv_player=true;
    For the StartingPoint links, we don't need any ScriptParams links this time, because it's the final
    mission. Just PlayerFactory link the StartingPoint to Garrett.
    Set up the loot carry over exactly as before.
    Create a purse and add Difficulty>Script and tick 0, 1, 2.
    Add S>Scripts and type LastMissionLoot in the box.
    Create a marker. Call it LoadoutCache.
    To the marker add S>Scripts and type LoadoutCache into the top box.
    Now add a Contains link from the LoadoutCache to the Purse.
    Set up an objective and dark mission description for this mission so it can be finished.

    Package the whole lot up as normal with missflag.str etc. and load it up in Darkloader!

  2. #2
    Member
    Registered: Aug 2007
    Location: LosAngeles: Between Amusements
    That's great, nicked. With the demo it should all make sense. One question, what if I want to skip a mission and have the stuff from mission 1 carry over to mission 3, but not mission 2? Can I do that?

  3. #3
    Member
    Registered: Jan 2006
    Location: On the tip of your tongue.
    I haven't tried it, but the documentation says that is possible and should be straightforward. I think it's as simple as having InvCarryOver on mission one's StartingPoint, InvLoadUp on mission three's StartingPoint and nothing on mission two's StartingPoint. The "inv" property is a campaign variable, so the info should be saved no matter how many missions apart they are.

    One thing I should also add is that when adding ScriptParams to arrows, use the projectile archetypes, not the crystal archetypes (e.g., a water (-128) rather than a WaterCrystal (-142)) because the actual arrow is what the player contains.

  4. #4
    Member
    Registered: Aug 2007
    Location: LosAngeles: Between Amusements
    Super!

    One thought about carrying over loot: if you have loot objectives, they probably should be for "additional" loot instead of for absolute amounts. I suppose that shouldn't be hard to set up, but still it bears thinking upon.

  5. #5
    Member
    Registered: Jan 2006
    Location: On the tip of your tongue.
    There's a script in miss10.osm called FixLootGoal (I think) that means you can use a loot goal when you've already carried over the previous mission's loot. I didn't put that in the demo, but I think it's pretty easy to set up.

  6. #6
    Member
    Registered: May 2002
    Location: Between dreams and shadows...
    I'd love to put up a mirror for you, but rapidfail refuses to let me download it. If you want, throw a copy at my email address and I'll put it up for you.

  7. #7
    Member
    Registered: Jan 2006
    Location: On the tip of your tongue.
    Thanks! I've dropped you an email.

  8. #8
    Member
    Registered: May 2002
    Location: Between dreams and shadows...

  9. #9

  10. #10
    Thanks for the info! This will come in handy later.

  11. #11
    Member
    Registered: Aug 2001
    Location: Virginia, USA
    You should upload that here: http://dromed.whoopdedo.org/dromed/carryover

    And remember that you can save the contents or more than one container by giving each one its own ''inv_code''. The code gets tacked-on to the name of the quest variables.

Tags for this Thread

Posting Permissions

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