Multiple Carryovers - Par nicked
21/11/10 - Pour DP2 - 0,3 Mo

Athalle

Le fichier

===================================================================================
November 21st 2010
===================================================================================

Author : Nick Dablin (nicked)
Contact Info : Contact me through PM or email on TTLG.com
Homepage : n/a
Date of Release : Nov 21st 2010

Description : Demo showing how to carry over items and loot between multiple missions using tnhscripts InvCarryOver and InvLoadUp.
Briefing : No

===================================================================================

* Playing Information *

Game : Thief 2
Mission Title : Multiple CarryOvers
File Name : miss20.mis, miss21.mis, miss22.mis
Difficulty Settings : No
Equipment Store : No
Map : No
Auto Map : No
New Graphics : No
New Sounds : No
Multi-Language Support : No
EAX Support  : No
Briefing : No
Length : n/a
Size : n/a

Difficulty Level Info : Normal, Hard, Expert

* Construction *

Base : From scratch
Build Time : N/A

===================================================================================
* Loading Information *
This mission will through Darkloader.
===================================================================================

* Copyright Information *

This level was created by Nick Dablin (nicked).

Distribution of this level is allowed as long as it is free and the package is kept intact.

This level was not made and is not supported by Looking Glass Studios or Eidos Interactive.

===================================================================================
TUTORIAL
===================================================================================

Here’s how it’s done :

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 !

Plan du site | Suivre la vie du site RSS 2.0