Difference between revisions of "Bethesda Tutorial Quest Loose Ends/ru"

imported>Vitamant
imported>Vitamant
Line 171: Line 171:


=Передача амулета Бэнду=
=Передача амулета Бэнду=
{{Inuse/ru}}
Теперь о передаче предмета от игрока к квестодателю после выполнения квеста. Сделать это, как обычно, очень просто.
Right now the player neither gives the amulet to Bendu nor receives any reward when completing the quest. Both of these are easily fixed.  


Open up the stages tab again, and go to stage 40. Right now its script only contains <code>SetObjectiveCompleted(30)</code>. We'll add additional logic below this.  
Снова открой список стадий и выбери 40ую. Ее скрипт состоит всего из одной строчки: <code>SetObjectiveCompleted(30)</code>. Расширим его.


The first line we'll put in is:
Добавь в начало скрипта эту строку:


<source lang="papyrus">
<source lang="papyrus">
Line 182: Line 181:
</source>
</source>


Note that with <code>AddItem</code>, you can give it either a base object (in which case it will create a new instance of that object out of thin air in someone's inventory), or a reference (in which case it will move that reference from wherever it is). So this line will grab the amulet out of the player's inventory and put it into Bendu's. Neat!  
Обрати внимание, что если в функцию <code>AddItem</code> передать базовый объект, то новый экземпляр будет создан "из воздуха". Если же мы передаем экземпляр объекта (ссылку на предмет), то он ''переместится'' из прежнего контейнера в новый. В нашем случае - из инвентаря игрока в инвентарь Бэнду Оло. Круто!


Now there's the matter of the gold. We add gold the same way we add any item. But that means we have to make a property on the quest script that points to the gold. Click on the "Properties" button, and you'll see the automatically-created alias properties already in the list. Add a new property of type "MiscObject" and call it "Gold001" -- it will auto-fill, so you're good to go.  
Теперь о деньгах. Золото можно выдать точно также, как и любой другой предмет. Но для этого нам придется создать свойство в скриптах квеста, указывающее на золото. Щелкни по кнопке "Properties" и в списке слева увидишь автоматически созданные свойства псевдонимов. Добавь новое с типом "MiscObject" и именем "Gold001" - заполнится оно автоматически.


{{InDepth|Back in the day, we used to have different base objects for different denominations of gold, hence the "001" appended to the name of the single gold piece.}}
{{InDepth|Back in the day, we used to have different base objects for different denominations of gold, hence the "001" appended to the name of the single gold piece.}}


Now that we have that property, we just have to add this line:  
Свойство есть, осталось добавить эту строчку:


<source lang="papyrus">
<source lang="papyrus">
Line 194: Line 193:
</source>
</source>


(Note that if you don't give <code>AddItem</code> a number, it assumes you're only adding one.)
(Обрати внимание, что если ты не укажешь количество добавляемых предметов в функции <code>AddItem</code>, то получишь один.)


Now, Bendu promised the player twice what the amulet was worth, and we're delivering that with the 500 gold. However, say we have to change the value of the amulet for lore, balance, or whimsical reasons. Then we would also have to remember to come back here and change the reward value. Or we could be slightly more clever about it.  
Как Бэнду и обещал, он выплатил двойную стоимость амулета. Но что если нам потребуется изменить ее? Исходя из требований баланса или просто по желанию левой ноги. В этом случае нам придется вернуться к этому скрипту и вновь изменить его (о чем ты наверняка забудешь). А можно поступить умнее и изменить скрипт вот так:


<source lang="papyrus">
<source lang="papyrus">
Line 202: Line 201:
</source>
</source>


Now it will automatically multiply the worth of amulet by two, and give that much gold to the player.  
Вот теперь система сама проверит стоимость амулета, умножит ее на 2 и выдаст игроку полученную сумму.  


{{InDepth|Note that we're making this gold out of thin air, rather than having it in Bendu's inventory and moving it to the player. This is a minor break in "realism" that we typically use for quest rewards, to avoid players getting them too easily via pickpocketing/killing/etc.}}
{{InDepth|Обрати внимание - деньги появляются из воздуха, а не из инвентаря Бэнду. Это болезненный, но не смертельный пинок "реализма", чтобы жаждущие скорой наживы игроки не могли получить награду куда более простым и быстрым способом - убив или обокрав квестодателя.}}


=Dropping the Amulet=
=Dropping the Amulet=
Anonymous user