Difference between revisions of "Bethesda Tutorial Packages/ru"

1,438 bytes added ,  06:24, 14 April 2012
imported>Vitamant
imported>Vitamant
Line 100: Line 100:


=Создание нового пакета=
=Создание нового пакета=
{{Inuse/ru}}
Теперь ты знаешь, как, используя "default" пакеты, можно составить расписание персонажа. Пришло время заняться написанием собственного пакета Бенду. Давай научим его ходить вокруг своего дома в дневное время.
We've seen how to use existing "default" packages to build a schedule. What about making a new package specifically for Bendu? Let's say we want him to patrol the exterior around his house at a specific time during the day.


First, make a new package by right-clicking on the Package list and selecting "New". You'll get a blank package window that looks like this:
Для начала, создай новый пакет. ПКМ в списке пакетов, и выбери "New". Ты увидишь пустое окно пакета:


[[Image:Package_Tutorial_NewPackage1.jpg]]
[[Image:Package_Tutorial_NewPackage1.jpg]]


By default, the Travel template is selected - but we want to make a Patrol, so change the dropdown to Patrol. Note that the list of Package Data changes - the Patrol template requires different data than the Travel template. Now we have a blank Patrol package, ready to fill in some data for the specific package for Bendu:
По-умолчанию, выбран шаблон Travel (путешествие). Но нам нужен Patrol (патруль), выбери его из списка. Обрати внимание: изменилась таблица Package Data - параметры шаблона Patrol отличается от параметров Travel. Теперь у нас пустой пакет на основе шаблона Patrol:


[[Image:Package_Tutorial_NewPackage2.jpg]]
[[Image:Package_Tutorial_NewPackage2.jpg]]


The [[Patrol_(Procedure)|Patrol procedure page]] has the details for the data on this package. For now, the only things we need to specify on this package are:
{{ulink|Patrol_(Procedure)|На соответствующей страничке}} ты можешь детально ознакомиться с каждым из параметров этого пакета. Пока же нам нужно определить:
* Patrol Start - where should Bendu start his patrol route?
* Patrol Start - откуда Бенду начнет свой маршрут.
* Schedule - what time of day should he run this package?
* Schedule - в какое время будет выполняться данный пакет.


We haven't yet made a patrol route for Bendu, so let's load up the exterior and set up a simple one for him. (If you have the interior loaded, double-clicking on the yellow door marker is a quick way to get to the exterior; otherwise double-click on MixwaterMillExterior in the cell list for the Tamriel worldspace.)
Маршрута у нас пока еще нет, давай сделаем его. (Если у тебя уже загружено жилище Бенду, дважды щелкни по желтому маркеру у двери; иначе дважды щелкни по MixwaterMillExterior в списке ячеек пространства Tamriel.)


If you're not familiar with linked references, the [[Bethesda_Tutorial_Encounters|Encounters Tutorial]] is a good place to start. For now, let's just create a quick 3-point patrol route:
Если ты еще не читал {{ulink|Bethesda_Tutorial_Encounters|Encounters Tutorial}}, то настоятельно советуем ознакомиться. Но это не является жизненно необходимым. Всё, что нам нужно - создать маршрут из трех точек:
# Drop an XMarkerHeading into the render window.
# Перетащи XMarkerHeading в окно визуализации.
# Duplicate it twice with CTRL-D.
# Дважды продублируй их сочетанием Ctrl+D.
# Move the 3 markers into a nice patrol route, then link them together using the Linked Ref tab on each reference.
# Перемести маркеры так, как тебе нравится и объедини их в маршрут, используя вкладку Linked Ref каждого маркера.


You should end up with something looking like this (the exact locations of the patrol markers doesn't matter):
В итоге получится нечто вроде этого (точное расположение маркеров значения не имеет):


[[Image:Package_Tutorial_NewPackage3.jpg]]
[[Image:Package_Tutorial_NewPackage3.jpg]]


Now, in the package window, select Patrol Start and click the button on the right (it will initially say "Linked Ref". This will allow you to select the data for the Patrol Start - select the "Specific Reference" radio button and select one of your new patrol points (it doesn't matter which since they are all linked together in a circle).
Теперь, в окне пакета, выбери параметр Patrol Start и дважды щелкни по кнопке "Linked Reference" справа. В появившемся окне переключи тип ссылки на "Specific Reference" и выбери любую из точек (не имеет значения какую, так как они связаны в единый маршрут).


[[Image:Package_Tutorial_NewPackage4.jpg]]
[[Image:Package_Tutorial_NewPackage4.jpg]]


The second thing we wanted to do was specify when Bendu should run this package (otherwise this will be the only thing he does when we put it on his package stack). Switch to the Schedule tab in the package window, and let's say he should walk around outside during the morning between 10am and 12pm:
Также мы хотели указать промежуток времени, в который будет выполняться этот пакет - с 10 до 12 часов. Указываем:


[[Image:Package_Tutorial_NewPackage5.jpg]]
[[Image:Package_Tutorial_NewPackage5.jpg]]


The only thing left to do is give the package a name - let's say GSQBenduPatrol10x2, keeping with the standard naming conventions. Hit OK to close the window and we're done making a new package.
Осталось дать пакету какое-нибудь имя. Например GSQBenduPatrol10x2 (не забывай следовать соглашению об именовании). Щелкни по кнопке "ОК", чтобы сохранить изменения и закрыть окно.


Now that we've made the new package, we have to add it to Bendu's package list in order to actually change his behavior. Find the new package in the Package section of the Object window, and drag it into Bendu's AI Package List. By default, all new packages are placed at the bottom of the actor's package list, but we want this new package to go to the top (or at least above the DefaultSandboxHomeowner package - otherwise it will never run because the DefaultSandboxHomeowner package is always valid). Use the << arrow key to move it to the top of Bendu's stack:
Вот мы и создали свой первый пакет. Теперь нужно добавить его в набор пакетов Бенду. Найди свой пакет в списке объектов и перетащи в список пакетов Бенду. По-умолчанию, все добавляемые пакеты располагаются внизу списка. Но в этом случае. очередь до него никогда не дойдет, так как выше расположена "песочница". Перемести его наверх:


[[Image:Package_Tutorial_NewPackage6.jpg]]
[[Image:Package_Tutorial_NewPackage6.jpg]]


Hit OK to close Bendu's actor window and save your plugin. Go into the game to see Bendu do his new patrol:
Нажми "ОК", чтобьы закрыть окно персонажа и сохрани плагин. Зайди в игру и убедись, что Бенду следует проложенному маршруту:


  coc MixwaterMillExterior
  <pre>coc MixwaterMillExterior
  set gamehour to 10
  set gamehour to 10</pre>


That's it - you now know how to set up an actor's packages using existing or new packages. Most of the time, the premade [[Package Templates]] will provide all the functionality you need. But, if you find you need even more specialized behavior, you can even [[Creating_a_new_Package_Template|build your own Package Template]].
Вот и всё. Теперь ты знаешь, как изменять поведение персонажей, используя существующие и свои собственные пакеты. Существующие {{ulink|Package Templates|шаблоны пакетов}} способны задать практически любое поведение, тебе нужно лишь задать правильные параметры. Если же потребуется что-то совсем уж экзотическое, ты можешь создать и {{ulink|Creating_a_new_Package_Template|свои собственные шаблоны}}.




Anonymous user