grazingAnimals einbauprobleme

Eure Foren für alle Diskussionen rund ums Thema Modding.
anthu
Posts: 4967
Joined: Thu Nov 06, 2014 8:03 am

grazingAnimals einbauprobleme

Post by anthu »

Hallo Leute
von Rm gibts ja nun den grazingAnimals mod
hab nu nversucht, den in eine map einzubauen.
bin danach vorgegangen:
https://github.com/RealismusModding/FS1 ... ingAnimals
das sind meine einträge:

Code: Select all

Under <Files> include:

<File fileId="2127" filename="map01/grazing_density.png" relativePath="true"/>
<File fileId="2128" filename="map01/grazing_mask_diffuse.png" relativePath="true"/>

Under <Materials> include:

<Material name="grazing_mask_mat" materialId="265" ambientColor="1 1 1" customShaderId="44">
  <Texture fileId="2128"/>
  <CustomParameter name="alphaBlendStartEnd" value="70 75 0 0"/>
  <CustomParameter name="cellSizeTerrainSizeScaleXZScaleY" value="16 1024 2 255"/>
</Material>

The customShaderId should be pointing to the windrowFoliageShader.xml Under <Layers> include:

<FoliageMultiLayer densityMapId="2127" numChannels="5" numTypeIndexChannels="0">
  <FoliageSubLayer name="grazingCows" numDensityMapChannels="1" materialId="265" cellSize="8" viewDistance="110" objectMask="16711935" decalLayer="0" atlasSize="1" atlasOffsets="1 0" numBlocksPerUnitDefault="1.8" numBlocksPerUnitMin="1.8" numBlocksPerUnitMax="1.8" width="0.8" height="0.3" widthVariance="0.1" heightVariance="0.1" horizontalPositionVariance="0.3" blockShapeId="1"/>
  <FoliageSubLayer name="grazingSheep" densityMapChannelOffset="1" numDensityMapChannels="1" materialId="265" cellSize="8" viewDistance="110" objectMask="16711935" decalLayer="0" atlasSize="1" atlasOffsets="1 0" numBlocksPerUnitDefault="1.8" numBlocksPerUnitMin="1.8" numBlocksPerUnitMax="1.8" width="0.8" height="0.3" widthVariance="0.1" heightVariance="0.1" horizontalPositionVariance="0.3" blockShapeId="1"/>
  <FoliageSubLayer name="extraChannels" densityMapChannelOffset="4" numDensityMapChannels="3" materialId="354" cellSize="8" viewDistance="110" objectMask="0" decalLayer="0" atlasSize="1" atlasOffsets="1 0" numBlocksPerUnitDefault="0" numBlocksPerUnitMin="0" numBlocksPerUnitMax="0" width="2" height="2" widthVariance="0" heightVariance="0" horizontalPositionVariance="0"/>
</FoliageMultiLayer>
die zwei "127" hab ich auf "2127" und die zwei "128" hab ich auf "2128" geändert,
die viewdistance 3x von 0 auf 110 geändert
und die customShaderId="44">
weil in der i3d:
<File fileId="44" filename="../shaders/windrowFoliageShader.xml" relativePath="true"/>
steht.
habe auch die beiden dateien grazing_density.gdm und grazing_mask_diffuse.dds nach
C:\Users\anthu\Documents\My Games\FarmingSimulator2017\mods\Gorzkowa_V3_2k17_multifruit\maps\map01
kopiert.
wenn ich nun die i3d im GE öffne, kann ich im terrain editor, dort wo die weizen, gerste, grass,.. ist drei neue anwählen.
grazingcows, grazingsheeps und extrachannels
kann auchalle drei auswählen, aber nichts malen.
da sollte dann doch so ein blaues gekritzel sein, ich seh aber nix. egal welches der drei ich auswähle und welchen channel ich auswähle.
wo liegt mein denkfehler?
Painting the grass areas in Giants Editor

After including the above, the grazingCows and grazingSheep foliage layer will be visible under Terrain Editing in GE. Paint the cow and sheep meadows with the respective layers. In order to see the layers on the screen, change viewDistance of the FoliageSubLayer to a higher value than 0, for instance to 80. Paint grazingCows with channel 0 and grazingSheep with channel 1. When you're done painting, don't forget to revert to a viewDistance of 0.
lg
andreas
User avatar
HeinzS
Posts: 11728
Joined: Mon May 16, 2011 5:19 pm

Re: grazingAnimals einbauprobleme

Post by HeinzS »

und die materialId="265" war noch nicht vergeben? Keine Errors im GE?
anthu
Posts: 4967
Joined: Thu Nov 06, 2014 8:03 am

Re: grazingAnimals einbauprobleme

Post by anthu »

doch, die gibts schon:

Code: Select all

    <Material name="acmat_1" materialId="265" ambientColor="1 1 1">
      <Texture fileId="341"/>
    </Material>
aber i nder anleitung steht nicht, das man die ändern soll, oder hab ich da einen denkfehler in der übersetzung?
und wenn ja, welche material id soll ich dann verwenden?

Code: Select all

  materialId="2265"
falls die noch frei wäre?
lg
andreas
anthu
Posts: 4967
Joined: Thu Nov 06, 2014 8:03 am

Re: grazingAnimals einbauprobleme

Post by anthu »

ok, hat jetzt geklappt
danke für den tip mit der material id
BBCode Thumbnail: Image
(hab die view distance derweil noch sichtbar für tests)
man sieht auch schon einen teil des Grases, das schon "abgegrast" wurde

hab jetzt aber noch ein kleines problem, und zwar wird mir im hilfefenster bei sheep und cow immer nur 0 (null) eingeblendet,
und nicht der Rest Gras welches noch zum abgrasen wäre
BBCode Thumbnail: Image

bzw könnte mir das jemand verständlich übersetzen?
Creating a transform group to improve performance

Create a transform group on the root called "grazingAreas". In the next level include two groups called "sheep" and "cow". Within each group there should be a parallelogram (as they are defined for field defs) that encompass the respective painted areas. It is useful to create the parallelograms under the "fields" transformGroup so their visible extent can be seen on screen. The transform group should have the following structure (make sure the parent and first childs have the correct name):

grazingAreas
sheep
corner01_1
corner01_2
corner01_3
cow
corner01_1
corner01_2
corner01_3

The grazingAreas transform group (parent) need a user attribute (script callback) named "onCreate" with the value "FS17_RM_grazingAnimals.onCreate". When including the scripts in a map the value needs to be "modOnCreate.grazingArea".
aber es funktioniert erst einmal
lg
andreas
anthu
Posts: 4967
Joined: Thu Nov 06, 2014 8:03 am

Re: grazingAnimals einbauprobleme

Post by anthu »

Hier noch die situation der TG´s im GE:
BBCode Thumbnail: Image

das user atribute hab ich auch gesetzt:

Code: Select all

    <UserAttribute nodeId="32293">
      <Attribute name="onCreate" type="scriptCallback" value="FS17_RM_grazingAnimals.onCreate"/>
    </UserAttribute>
User avatar
HeinzS
Posts: 11728
Joined: Mon May 16, 2011 5:19 pm

Re: grazingAnimals einbauprobleme

Post by HeinzS »

so wie es im GE aussieht hast du den Text richtig verstanden, sind denn in der moddesc alle Einträge dazu vorhanden?

Edit: man könnte mal einen Blick in die umgebaute Map werfen, falls du einen Link hast.
anthu
Posts: 4967
Joined: Thu Nov 06, 2014 8:03 am

Re: grazingAnimals einbauprobleme

Post by anthu »

Danke Heinz
Kann sie dir nachmittags auf filehorst hochladen.
Kriegst ne pm mit link

Edit:
Hab auch versuchsweise die ganze tg crazing animals in die fields verschoben.
Wie der tipp von RM.
Konnte aber mit toggle field size da nichts erkennen.
Die Felder wurden normal blau, die grazing areas nicht.

Lg
Andreas
Post Reply