п.
Мой пример будет построен на добавлении типа груза "скошенная трава" (grass_windrow) в прицеп. Другие культуры (грузы) добавляются аналогично.
Данный урок универсален для любого кузова, бункера и т.п, способного вмещать какую-либо культуру (груз).
Я старался выразить свои мысли поэтапно. Если что-то не получается, указывайте на пункт, в котором возникли сложности.
Для добавления новой культуры нам нужно распаковать архив с модом, в любую другую папку.
Открываем в Гианте одноименный с прицепом файл ***.i3d.
1. Добавляем Plane для новой культуры в модели (Plane - это кучка с культурой, которая увеличивается по мере заполнения и уменьшается по мере
выгрузки культуры. Т.е. Нам нужно всего-лишь натянуть на этот Plane текстуру) :
1.1. В гиганте открываем ***.i3d
1.2. В группе "body/planes" видим : "rapsPlane"; "maizePlane"; "potatoPlane"; "sugarBeetPlane" (месторасположение "planes" в различных модах
может отличаться, в некоторых это группа grainPlanes).
1.3. Для добавления культуры нужно создать еще один Plane, для этого:
1.3.1 Копируем любой Plane (пусть будет rapsPlane), выделяем его и жмем ctrl+c (копировать) или нажимаем в меню на Edit, в подменю - Copy.
1.3.2 Теперь скопированный rapsPlane нам нужно вставить в группу planes, для этого наводим фокус (выделяем) группу "planes" и жмем ctrl+v (вставить) или нажимаем в меню на Edit, в подменю - Paste.
Нужно убедиться, что новый plane находится в списке культур рядом с остальными.
1.3.3 В окне атрибутов в поле "Name" пишем желаемое название для "Plane", пусть будет grassPlane.
1.4 В поле "Index Patch" запоминаем цифры (индексы), в данном случае 0>1|7, нам нужно запомнить 1|7.
Работа с гигантом окончена. Сохраняем открытый файл в Гианте (нажимая на "дискетку" в меню) или File-Save. Выходим из Гианта.
2. Теперь нужно добавить текстуру новой культуры, в нашем случае для травы.
2.1 Берем файл текстуры в формате ***.dds, можно из других модов, мультифруктовых, можно например из игры. Текстура травы находится по адресу:
c:\Program Files (x86)\Farming Simulator 2013\data\maps\textures\terrain\grass_diffuse.dds
2.2 Копируем файл текстуры в директорию с распакованным модом: прицеп\new (файл с текстурой можно разместить в любом удобном месте внутри мода,
прописав соотв. путь к файлу, как показано ниже).
3. Прописываем новую текстуру в модель. Работа с моделью в текстовом редакторе.
3.1 Открываем файл прицепа ххх.i3d текстовым редактором, например блокнотом.
3.2 В группе <Files> внизу добавляем строку с текстурой:
<File fileId="30" filename="new/grass_diffuse.dds" relativePath="true"/> (new/grass_diffuse.dds - путь к файлу текстуры внутри мода. Если текстура
находилась бы в корневой папке мода, запись была бы такой: filename="grass_diffuse.dds)
fileId может быть любым, большим чем числа fileId в списке Files. Позже игра сама присвоит ему свой id. Его нужно запомнить, т.к. он нам потребуется
ниже.
И у нас получается примерно такой список:
?<Files>
<File fileId="2" filename="Red.png" relativePath="true"/>
<File fileId="11" filename="adstrip.png" relativePath="true"/>
<File fileId="12" filename="adstrip2.png" relativePath="true"/>
<File fileId="13" filename="adstrip3.png" relativePath="true"/>
<File fileId="16" filename="new/Bild_Gerste.dds" relativePath="true"/>
<File fileId="19" filename="new/Bild_Kartoffel.dds" relativePath="true"/>
<File fileId="18" filename="new/Bild_Mais.dds" relativePath="true"/>
<File fileId="17" filename="new/Bild_Raps.dds" relativePath="true"/>
<File fileId="15" filename="new/Bild_Weizen.dds" relativePath="true"/>
<File fileId="20" filename="new/Bild_Zuckerrueben.dds" relativePath="true"/>
<File fileId="14" filename="new/Bild_leer.dds" relativePath="true"/>
<File fileId="7" filename="new/maize_diffuse.dds" relativePath="true"/>
<File fileId="8" filename="new/potatoes_diffuse.dds" relativePath="true"/>
<File fileId="6" filename="new/rape_diffuse.dds" relativePath="true"/>
<File fileId="9" filename="new/sugarBeets_diffuse.dds" relativePath="true"/>
<File fileId="3" filename="wheat01.png" relativePath="true"/>
<File fileId="30" filename="new/grass_diffuse.dds" relativePath="true"/>
</Files>
3.3 Добавление материала. Ищем группу <Materials>, она следующая, после группы <Files>. Поскольку в данной модели Plane один для всех культур -
"wheatPlane", нам нужно скопировать существующий, изменив несколько цифр.
3.3.1 Копируем строку
<Material name="wheatPlane_mat" materialId="21" ambientColor="1 1 1">
<Texture fileId="6"/>
</Material>
и вставляем ее перед закрытием группы, т.е. до последней строчки </Materials>
3.3.2 Меняем следующие параметры:
materialId="110" - ставим любое число, но большее чем другие числа materialId в списке Material. Это число нужно запомнить.
<Texture fileId="30"/> - Тут указываем fileId файла текстуры, прописанного в группе <Files>, согласно п. 3.2.
И у нас получается примерно такой Список Material:
? <Materials>
<Material name="L2" materialId="6" ambientColor="1 1 1" cosPower="48" specularColor="0.5 0.5 0.5">
<Texture fileId="2"/>
</Material>
<Material name="Material.001" materialId="7" diffuseColor="0.0784314
0.0784314 0.0784314 1" ambientColor="1 1 1" cosPower="50"
specularColor="0.5 0.5 0.5">
</Material>
<Material name="material20" materialId="8" ambientColor="1 1 1">
</Material>
<Material name="wheatPlane_mat" materialId="9" ambientColor="1 1 1">
<Texture fileId="3"/>
</Material>
<Material name="MatHook" materialId="10" ambientColor="1 1 1" cosPower="50" specularColor="0.5 0.5 0.5">
</Material>
<Material name="adStrip" materialId="11" ambientColor="1 1 1"
cosPower="50" specularColor="0.165 0.165 0.165" alphaBlending="true">
<Texture fileId="11"/>
</Material>
<Material name="wheatPlane_mat" materialId="12" ambientColor="1 1 1">
<Texture fileId="8"/>
</Material>
<Material name="wheatPlane_mat" materialId="13" ambientColor="1 1 1">
<Texture fileId="9"/>
</Material>
<Material name="adStrip" materialId="14" ambientColor="1 1 1"
cosPower="50" specularColor="0.165 0.165 0.165" alphaBlending="true">
<Texture fileId="13"/>
</Material>
<Material name="adStrip" materialId="15" ambientColor="1 1 1"
cosPower="50" specularColor="0.165 0.165 0.165" alphaBlending="true">
<Texture fileId="14"/>
</Material>
<Material name="adStrip" materialId="16" ambientColor="1 1 1"
cosPower="50" specularColor="0.165 0.165 0.165" alphaBlending="true">
<Texture fileId="15"/>
</Material>
<Material name="Mat04" materialId="17" ambientColor="1.2 1.2 1.2" cosPower="130" specularColor="0.2 0.2 0.2">
</Material>
<Material name="Jpl" materialId="18" diffuseColor="1 0 1 1" ambientColor="1 1 1">
</Material>
<Material name="RND" materialId="19" diffuseColor="0.0901961
0.0901961 0.0901961 1" ambientColor="1 1 1" cosPower="50"
specularColor="0.5 0.5 0.5">
</Material>
<Material name="adStrip" materialId="20" ambientColor="1 1 1"
cosPower="50" specularColor="0.165 0.165 0.165" alphaBlending="true">
<Texture fileId="12"/>
</Material>
<Material name="wheatPlane_mat" materialId="21" ambientColor="1 1 1">
<Texture fileId="6"/>
</Material>
<Material name="wheatPlane_mat" materialId="22" ambientColor="1 1 1">
<Texture fileId="7"/>
</Material>
<Material name="MatHook2" materialId="23" ambientColor="1 1 1" cosPower="50" specularColor="0.5 0.5 0.5">
<Texture fileId="2"/>
</Material>
<Material name="Mat01" materialId="24" ambientColor="1.2 1.2 1.2">
</Material>
<Material name="Mat03" materialId="25" diffuseColor="0.639216
0.639216 0.639216 1" ambientColor="1 1 1" cosPower="50"
specularColor="0.5 0.5 0.5">
</Material>
<Material name="Mat07" materialId="26" diffuseColor="0.0901961
0.0901961 0.0901961 1" ambientColor="1 1 1" cosPower="48"
specularColor="0.5 0.5 0.5">
</Material>
<Material name="adStrip" materialId="98" ambientColor="1 1 1"
cosPower="50" specularColor="0.165 0.165 0.165" alphaBlending="true">
<Texture fileId="16"/>
</Material>
<Material name="adStrip" materialId="99" ambientColor="1 1 1"
cosPower="50" specularColor="0.165 0.165 0.165" alphaBlending="true">
<Texture fileId="17"/>
</Material>
<Material name="adStrip" materialId="100" ambientColor="1 1 1"
cosPower="50" specularColor="0.165 0.165 0.165" alphaBlending="true">
<Texture fileId="18"/>
</Material>
<Material name="adStrip" materialId="101" ambientColor="1 1 1"
cosPower="50" specularColor="0.165 0.165 0.165" alphaBlending="true">
<Texture fileId="19"/>
</Material>
<Material name="adStrip" materialId="102" ambientColor="1 1 1"
cosPower="50" specularColor="0.165 0.165 0.165" alphaBlending="true">
<Texture fileId="20"/>
</Material>
<Material name="wheatPlane_mat" materialId="110" ambientColor="1 1 1">
<Texture fileId="30"/>
</Material>
</Materials>
4. Добавление сцены увеличения и уменьшения кучки с травой.
Ищем группу <Scene>, она практически в самом низу.
4.1.В этой группе находим строку с культурой травы:
<Shape name="grassPlane" translation="-1.13352 0.78231 -0.226213" scale="1.3 1 1" visibility="false" nodeId="100" materialIds="110" shapeId="5" receiveShadows="true"/>
4.2 В строке меняем следующие значения:
materialIds="110 - согласно п. 3.3.2
<Scene>
<Shape name="Container" dynamic="true" compound="true" collisionMask="8397058" staticFriction="1" dynamicFriction="1" skinWidth="0.005" density="0.02" nodeId="56" materialIds="25" shapeId="1" castsShadows="true" receiveShadows="true" nonRenderable="true">
<Shape name="Hook" translation="0.0159264 1.51338 0.0886831" rotation="0 90 90" visibility="false" nodeId="57" materialIds="10, 23" shapeId="2" castsShadows="true" receiveShadows="true"/>
<Shape name="Tank" translation="1.17294 -1.17141 0.331515" scale="1 1.4 1.4" nodeId="58" materialIds="17, 17, 17, 17, 24" shapeId="3" castsShadows="true" receiveShadows="true" nonRenderable="true">
<Shape name="Unload" translation="0.230613 0.185734 -0.0489465" scale="1 0.95 1" visibility="false" nodeId="59" materialIds="17, 17, 24" shapeId="4" castsShadows="true" receiveShadows="true" nonRenderable="true"/>
<Shape name="wheatPlane" translation="-1.13352 0.78231 -0.226213" scale="1.3 1 1" visibility="false" nodeId="60" materialIds="9" shapeId="5" receiveShadows="true"/>
<TransformGroup name="tank" translation="-2.50084 -3.11492 -1.17459" rotation="0 -90 0" scale="0.15 0.2 0.15" nodeId="61">
<Shape name="L" translation="6.32333 20.107 -0.157653" rotation="0 -90 0" scale="6 3.7 4.76" nodeId="62" materialIds="23, 23, 6" shapeId="6" castsShadows="true" receiveShadows="true"/>
<Shape name="L" translation="6.32333 20.107 -18.0025" rotation="0 90 0" scale="6 3.7 4.76" nodeId="63" materialIds="23, 23, 6" shapeId="6" castsShadows="true" receiveShadows="true"/>
<Shape name="F" translation="-12.2392 19.7261 -9.08335" rotation="0 90 0" scale="6.68 3.7 6" nodeId="64" materialIds="23, 23, 6" shapeId="7" castsShadows="true" receiveShadows="true"/>
<Shape name="F" translation="24.8956 19.7261 -9.08335" rotation="0 -90 0" scale="6.68 3.7 6" nodeId="65" materialIds="23, 23, 6" shapeId="7" castsShadows="true" receiveShadows="true"/>
<Shape name="Floor" translation="6.36428 15.7021 -9.08053" rotation="0 90 0" scale="6.65 4 4.8" nodeId="66" materialIds="19" shapeId="8" castsShadows="true" receiveShadows="true"/>
<Shape name="B" translation="6.31344 15.1164 -18.1617" scale="4.77 2.7 6" nodeId="67" materialIds="18, 19, 6" shapeId="9"/>
<Shape name="B" translation="6.31344 15.1164 -0.00535745" scale="4.77 2.7 6" nodeId="68" materialIds="18, 19, 6" shapeId="9"/>
</TransformGroup>
<Shape name="rapsPlane" translation="-1.13352 0.78231 -0.226213" scale="1.3 1 1" visibility="false" nodeId="69" materialIds="21" shapeId="5" receiveShadows="true"/>
<Shape name="maizePlane" translation="-1.13352 0.78231 -0.226213" scale="1.3 1 1" visibility="false" nodeId="70" materialIds="22" shapeId="5" receiveShadows="true"/>
<Shape name="potatoPlane" translation="-1.13352 0.78231 -0.226213" scale="1.3 1 1" visibility="false" nodeId="71" materialIds="12" shapeId="5" receiveShadows="true"/>
<Shape name="zuckerruebenPlane" translation="-1.13352 0.78231 -0.226213" scale="1.3 1 1" visibility="false" nodeId="72" materialIds="13" shapeId="5" receiveShadows="true"/>
<Shape name="grassPlane" translation="-1.13352 0.78231 -0.226213" scale="1.3 1 1" visibility="false" nodeId="100" materialIds="110" shapeId="5" receiveShadows="true"/>
</Shape>
<Shape name="CylinderRoot" translation="0.0184829 -1.07933 0.602537" scale="0.568346 0.595334 0.568346" visibility="false" nodeId="73" materialIds="8" shapeId="10" castsShadows="true" receiveShadows="true" nonRenderable="true">
<Shape name="C1" translation="-0.00263533 0.252305 0.00497018" scale="0.568346 0.595334 0.568346" nodeId="74" materialIds="8" shapeId="11" castsShadows="true" receiveShadows="true">
<Shape name="C2" translation="-0.00320536 0.261478 0.00359303" scale="0.568346 0.595334 0.568346" nodeId="75" materialIds="8" shapeId="11" castsShadows="true" receiveShadows="true">
<Shape name="C3" translation="-0.0020891 0.275842 -0.00193098" scale="0.568346 0.595334 0.568346" nodeId="76" materialIds="8" shapeId="11" castsShadows="true" receiveShadows="true"/>
</Shape>
</Shape>
</Shape>
На этом работа с моделью (***.i3d) закончена. Выходим из текстового редактора, сохраняем изменения.
5. Прописываем культуру в одноименном с прицепом файле ***.xml (стоить отметить, что как "груз" grass не подходит, а подходит grass_windrow
- скошенная трава).
Открываем в текстовом редакторе одноименный с прицепом файл ***.xml
5.1. В файле ***.xml ищем группу <fillPlanes>, практически в начале файла. Тут описаны культуры для прицепа.
5.2 Копируем любую строку культуры (ага, рапс).
Код
?<fillPlane type="rape">
<node index="1|3">
<key time="0" y="0.25389" scale="1.3 1 1"/>
<key time="0.5" y="0.78231" scale="1.3 1 1"/>
<key time="1" y="1.6" scale="1.3 1 1"/>
</node>
<node index="20">
<key time="0" x="1.40998" scale="2 4 1"/>
<key time="0.001" x="1.43769" scale="2 4 1"/>
<key time="1" x="1.43769" scale="2 4 1"/>
</node>
</fillPlane>
5.3 Вставляем ниже, перед закрытием группы </fillPlanes>
5.4 Меняем значения:
<fillPlane type="grass_windrow"> - Тип заполнения, тип груза на понятном для игры языке. Позже я сделаю список всех доступных.
<node index="1|7"> (согласно п. 1.4.)
<node index="24"> - любой, отличный от существующего, но больший чем у других культур в списке fillPlanes.
5.5 Ищем строку
<fillTypes fruitTypes="wheat barley rape maize potato sugarBeet" />
и добавляем grass_windrow, должно получиться:
<fillTypes fruitTypes="wheat barley rape maize potato sugarBeet grass_windrow" />
5.6 Осталось указать на Систему Частиц (ParticleSystems) для травы.
Ищем абзац:
Code
<dischargeParticleSystems>
<dischargeParticleSystem type="wheat" node="3" position="0 0 1.0669" rotation="0 0 0" file="data/vehicles/particleSystems/trailerDischargeParticleSystem.i3d" />
<dischargeParticleSystem type="maize" node="3" position="0 0 1.0669" rotation="0 0 0" file="data/vehicles/particleSystems/trailerDischargeParticleSystem.i3d" />
<dischargeParticleSystem type="barley" node="3" position="0 0 1.0669" rotation="0 0 0" file="data/vehicles/particleSystems/trailerDischargeParticleSystem.i3d" />
<dischargeParticleSystem type="rape" node="3" position="0 0 1.0669" rotation="0 0 0" file="data/vehicles/particleSystems/trailerDischargeParticleSystemRape.i3d" />
<dischargeParticleSystem type="chaff" node="3" position="0 0 1.0669" rotation="0 0 0" file="data/vehicles/particleSystems/trailerDischargeParticleSystemChaff.i3d" />
</dischargeParticleSystems>
копируем и вставляем строку с рапсом и заменяем в ней рапс на траву, в правой части указан адрес к файлу системы частиц травы.
В разных модах (прицепах) эти адреса могут быть разные, так как мододел может добавить системы частиц в архив мода, или не добавит и укажет на систему
частиц в папке игры Farming Simulator. Легче всего конечно указать на Систему частиц в папке FS-2013.
Системы частиц находятся по адресу: C:\Programs Files(x86)\Farming Simulator 2013\data\vehicles\particleSystems
Откройте в другом проводнике эту папку и найдете там Системы частиц для всех стандартных культур...
В нашем случае, мы указываем адрес к файлу травы: data/vehicles/particleSystems/trailerDischargeParticleSystemGrass.i3d
6. Запаковываем все файлы в архив zip (имя оставляем оригинальным).
7. Копируем распакованный архив обратно в папку с модами и наслаждаемся...
Список стандартных грузов/культур, которые можно перевозить в прицепах/бункерах/емкостях/самосвалах:
chaff - силос
silage - силос после обработки (после ферментации)
grass - трава
grass_windrow - скошенная трава
drygrass_windrow - сено
wheat_windrow - скошенная пшеница/солома
barley_windrow - скошенный ячмень/солома
manure - навоз
liquidManure - жидкий навоз
potato - картофель
sugarBeet - сахарная свекла
wheat - пшеница
rape - рапс (канола)
maize - кукуруза
barley - ячмень
fuel - топливо
water - вода
forage_mixing - смешанный корм/смесь для коров, свиней
dryGrass_windrow - высушенная трава (после сеноворошилки)
Если что упустил - добавляйте.
#РедактированиеМодов
Присоединяйтесь — мы покажем вам много интересного
Присоединяйтесь к ОК, чтобы подписаться на группу и комментировать публикации.
Комментарии 1