gaetane on 13/10/2009 at 16:12
I'm searching for a tutorial wich explain how to do a store at the start of each mission, (the screen which suggest several items to be bought). I tried to do a fast search on the forum but i didn't find anything for to help me :erm:
Rufus on 13/10/2009 at 16:16
I've a tutorial about this but didn't try it so far. If you use it, please tell me if it works, ok?
"Making A Store
The docs said "making a store is very much like making the player inventory," and they were correct. However, they didn't spell out the steps there and so I thought I would.
Normally, when making a Thief mission, you need to specify a Marker (fnord::Marker[-36]), which you name "StartingPoint." To give items to Garrett at the beginning of the level, you set the starting point to "contain" those items. If you know how to do that, the rest is super-easy.
Make two more Markers. Name one "Store" and the other "LoadoutCache," though it probably doesn't matter what they're named.
Go to the Store Marker and add the property "Inventory::Store," and when the pop-up window comes up, check the box and hit OK. You should see a property that says "Store: TRUE."
Go to the Loadout Cache Marker and add the property "S::Scripts," and when the pop-up window comes up, write "LoadoutCache" (no spaces) into the first ("Script0") field. Leave the other fields alone and hit OK. You should see a property called "Scripts: {LoadoutCache;;;;FALSE}."
Here's what happens before the mission starts:
* The items contained by "StartingPoint" appear on the left side of the store.
* The items contained by "Store" appear on the right side of the store, available for purchase.
* The items contained by "LoadoutCache" get inserted into your inventory after you buy everything.
* Any loot you had when you exit the store mysteriously vaporizes.
If your mission is the first mission of a sequence (or the only mission), you need to give the player some starting capital. Just link some loot to the "StartingPoint" marker. If your mission is a later mission in a sequence, you will automagically have whatever loot you had at the end of the last mission. Whether or not this behavior is controllable, I don't know. I do know that if you link loot to the starting point of a latter game in the sequence, you get that as a bonus, above and beyond what you got from the last level.
Apparently, if you put an item in the store that doesn't have the "Inventory::Purchase Price" property, you can get the item for free. Don't bother with that, and just make sure to have the "Inventory::Purchase Price" on any item you put in the store. If you make new items, like "tip" scrolls, you'll also need to add textual descriptions - as far as I know, you'll need to copy strings\english\OBJDESCS.STR and OBJNAMES.STR from "strings.crf" and then append your descriptions to the lists - otherwise all the "regular" objects won't have descriptions and names. Be sure to include the files in a "strings\english" folder in the zip file you make for Thief Loader (you ARE using Thief Loader, right?!). OBJDESCS.STR appears to be keyed by the "Inventory::Long Description" property, and OBJNAMES.STR appears to be keyed by the "Inventory::Object Name" property. [NOTE: this note has been deleted, see next post]."
Nameless Voice on 13/10/2009 at 16:46
Thief Loader? Whoa, that's old.
It's all accurate apart from the note in square brackets at the end, which should be ignored. (Since modern versions of DarkLoader should automatically copy the English strings into a non-English-language folder if the folder doesn't exist for that language.)
gaetane on 13/10/2009 at 17:20
Many thanks to both alike :)
nicked on 1/12/2019 at 11:09
I feel like I'm going mad here... is the above tutorial from Rufus 100% of all you need to set up a store?
I have set up a store exactly as above, and every time I start the mission in Thief 2, it skips the store, without fail. Everything else works. I have convict and gen loaded, have seen no other bugs running in Thief 2.
skacky on 1/12/2019 at 11:39
Check missflag.str and make sure "no_loadout" isn't present on your mission id's line.
nicked on 1/12/2019 at 12:56
Hahaha! Of course! I knew it would be something so simple I'd overlooked it! :laff:
Thanks!
Yandros on 2/12/2019 at 15:42
:( tfw you thought gaetane was back
Tannar on 2/12/2019 at 16:57
I thought the same thing when I saw this thread! Drat..
nicked on 3/12/2019 at 07:33
Oh no! What a disappointment to find it's just me being an idiot! :laff: