Page 1 of 1

Dreck und Farbauswahl

Posted: Tue Feb 07, 2017 4:50 pm
by XPModder
Hallo zusammen!
Ich bin derzeit dabei ein paar zusätzliche Container für den ITRunner Hakenlift zu modden. Ich habe jetzt das erste Objekt soweit fertig das es auch Ingame fehlerfrei funktioniert. Ich habe diesen Container als washable erstellt und die nötigen shader und Texturen hinzugefügt, doch selbst nach einer ganzen Weile herumfahren auf den Feldern etc. ist das Teil noch kein bisschen dreckig geworden.
Außerdem habe ich den Code für die Farbauswahl beim Kauf eingefügt, allerdings ist der Container weiß (Standart Textur) egal welche Farbe man beim Kauf auswählt.

Hier mal die Dateien:

modDesk:

Code: Select all

<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<modDesc descVersion="31">
    <author>XPModder</author>
    <version>1.0</version>

    <title>
        <en>ITRunner Empty Platform2</en>
    </title>

    <description>
        <en>Container</en>
        <de>Container</de>
        <it>Container</it>
    </description>

    <iconFilename>store_platformEmpty.dds</iconFilename>
    <multiplayer supported="true"/>

    <storeItems>
        <storeItem xmlFilename="PlatformEmpty.xml"/>
    </storeItems>
	
        <vehicleTypes>
        <type name="ItRunnerPlatformEmpty" className="Vehicle" filename="$dataS/scripts/vehicles/Vehicle.lua">
            <specialization name="attacherJoints"/>
            <specialization name="lights"/>
            <specialization name="attachable"/>
            <specialization name="animatedVehicle"/>
            <specialization name="cylindered"/>
            <specialization name="foldable"/>
            <specialization name="dynamicMountAttacher"/>
            <specialization name="washable"/>
            <specialization name="mountable"/>
        </type>
    </vehicleTypes>	

    <l10n>
        <text name="typeDesc_container">
            <en>Container</en>
            <de>Container</de>
            <it>Container</it>
        </text>

        <text name="function_hookLiftContainer">
            <en>Container</en>
            <de>Container</de>
        </text>

    </l10n>

	<components count="1">
        <component1 centerOfMass="0 0.2 0" solverIterationCount="10" />
    </components>

	
    <brands>
        <brand name="ITRUNNER" title="IT Runner" image="$data/store/brands/brand_itrunner.png"/>
    </brands>
</modDesc>

PlatformEmpty.xml:

Code: Select all

<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="ItRunnerPlatformEmpty">

    <storeData>
        <name>
            <en>Empty ITRunner Platform2</en>
            <de>Leere ITRunner Plattform2</de>
        </name>
        <specs>
            <combination>ITR 26.33 HD</combination>
        </specs>
        <functions>
            <function>$l10n_function_hookLiftContainer</function>
        </functions>
        <image>store_platformEmpty.dds</image>
        <price>4000</price>
        <dailyUpkeep>2</dailyUpkeep>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>ITRUNNER</brand>
        <category>tippers</category>
        <vertexBufferMemoryUsage>131776</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>17448</indexBufferMemoryUsage>
        <textureMemoryUsage>5876640</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
    </storeData>

    <typeDesc>$l10n_typeDesc_container</typeDesc>
    <filename>PlatformEmpty.i3d</filename>

    <size width="3.5" length="8.5" lengthOffset="0.3"/>

    <brakeForce>0.5</brakeForce>
    	
    <inputAttacherJoints>
        <inputAttacherJoint index="0>1" jointType="hookLift" allowsJointRotLimitMovement="false" upperRotationOffset="0" forceSelectionOnAttach="false"/>
    </inputAttacherJoints>
	
	<baseColorConfigurations useDefaultColors="true" price="700" icon="$dataS2/menu/hud/configurations/config_color.png">
        <baseColorConfiguration color="0.0116 0.0944 0.0319 1" />
        <colorNode node="0>0" />		
    </baseColorConfigurations>
	
	<washable dirtDuration="90" washDuration="1" workMultiplier="4" />
	
    <components count="1">
        <component1 centerOfMass="0 0.2 0" solverIterationCount="10" />
    </components>


    <schemaOverlay file="$dataS2/menu/schemas/implementSchema.png" fileSelected="$dataS2/menu/schemas/implementSchemaSelected.png" fileTurnedOn="$dataS2/menu/schemas/implementSchemaTurnedOn.png" fileSelectedTurnedOn="$dataS2/menu/schemas/implementSchemaSelectedTurnedOn.png" width="0.5" height="0.5" attacherJointPosition="0 0"/>

</vehicle>

PlatformEmpty.i3d:

Code: Select all

<?xml version="1.0" encoding="iso-8859-1"?>

<i3D name="ITRunner-Empty Platform - LS17" version="1.6" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://i3d.giants.ch/schema/i3d-1.6.xsd">
  <Asset>
    <Export program="GIANTS Editor 64bit" version="7.0.2"/>
  </Asset>

  <Files>
    <File fileId="2" filename="platformEmpty_diffuse.dds" relativePath="true"/>
    <File fileId="4" filename="shaders/vehicleShader.xml" relativePath="true"/>
    <File fileId="3" filename="shared/rough_cube.dds" relativePath="true"/>
  </Files>


  <Materials>
    <Material name="lambert1" materialId="6" diffuseColor="0.494118 0.494118 0.494118 1" ambientColor="1 1 1">
    </Material>
    <Material name="lambert4" materialId="8" ambientColor="1 1 1" cosPower="20" specularColor="0.5 0.5 0.5" customShaderId="4" customShaderVariation="colorMask">
      <Texture fileId="2"/>
      <Reflectionmap fileId="3" lodDistanceScaling="0.5" viewDistanceScaling="0.5" type="cube" scaling="1" refractiveIndex="1" bumpScale="0.5" shapesObjectMask="4294967295" lightsObjectMask="4294967295"/>
      <CustomParameter name="RDT" value="1 1 24 12"/>
      <CustomParameter name="colorScale" value="0.012 0.094 0.032 1"/>
    </Material>
  </Materials>


  <Shapes externalShapesFile="PlatformEmpty.i3d.shapes">
  </Shapes>


  <Dynamics>
  </Dynamics>

  <Scene>
    <Shape shapeId="1" name="platformEmpty" dynamic="true" compound="true" clipDistance="300" nodeId="13" materialIds="6" castsShadows="true" receiveShadows="true" nonRenderable="true">
      <Shape shapeId="2" name="platform_vis" nodeId="14" materialIds="8" castsShadows="true" receiveShadows="true"/>
      <TransformGroup name="attacherJoint" translation="0 1.41675 3.71306" rotation="0 90 0" nodeId="15"/>
      <Shape shapeId="3" name="colPart" collisionMask="8194" compoundChild="true" linearDamping="0.5" angularDamping="0.5" density="0.1" nodeId="16" materialIds="6" castsShadows="true" receiveShadows="true" nonRenderable="true"/>
    </Shape>
  </Scene>

</i3D>
Der Dreck ist mir nicht so wichtig wäre aber natürlich schön. Die Farbauswahl ist mir allerdings wichtiger da man ja sonst nur die eine Farbe zur verfügung hat.

Ich hoffe ihr könnt mir helfen. Ich bin noch nicht sehr erfahren mit diesen Sachen und brauche daher noch etwas Hilfe.

Re: Dreck und Farbauswahl

Posted: Tue Feb 07, 2017 5:23 pm
by böserlöwe
Ich fürchte du musst den Mod nochmal mit einem anderen Editor beartbeiten.
Dein verwendeter GE 7.0.2 ist leider schon aus der Mode ;)
Aktuell verwenden wir jetzt den GE7.0.5 den man im GDN unter der Überschrift Downloads nach einer kostenlosen Anmeldung laden und dann installieren kann.
https://gdn.giants-software.com/downloads.php

Dann solltest du dir einen ähnlichen Container als Vorlage nehmen. Die Indexe die man für die farbänderungen braucht sind vom verwendeten Modell abhängig.

Re: Dreck und Farbauswahl

Posted: Tue Feb 07, 2017 6:40 pm
by XPModder
Ok Ich habe jetzt die neue Version des Editors und habe das ganze mal in diesem gerladen. Soweit ich das sehe hat sich dadurch allerdings nichts geändert.
Ich habe allerdings in der Zwischenzeit eine weitere Coli hinzugefügt, welche die Lage des Containers auf dem Hakenlift-Hänger verbessert.

Was die Farbe betrifft:
Ich habe das was ich verwendet habe bereits aus einem anderen Mod übernommen und entsprechend angepasst. Muss ich außer dem Eintrag in der PlatformEmpty.xml noch einen Eintrag in der i3d oder ähnliches vornehmen.
Hier der Eintrag aus der xml:

Code: Select all

<baseColorConfigurations useDefaultColors="true" price="700" icon="$dataS2/menu/hud/configurations/config_color.png">
        <baseColorConfiguration color="0.0116 0.0944 0.0319 1" />
        <colorNode node="0>0" />		
</baseColorConfigurations>
Hier nochmal die aktualisierte i3d:

Code: Select all

<?xml version="1.0" encoding="iso-8859-1"?>

<i3D name="ITRunner-Empty Platform - LS17" version="1.6" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://i3d.giants.ch/schema/i3d-1.6.xsd">
  <Asset>
    <Export program="GIANTS Editor 64bit" version="7.0.5"/>
  </Asset>

  <Files>
    <File fileId="2" filename="platformEmpty_diffuse.dds" relativePath="true"/>
    <File fileId="4" filename="shaders/vehicleShader.xml" relativePath="true"/>
    <File fileId="3" filename="shared/rough_cube.dds" relativePath="true"/>
  </Files>


  <Materials>
    <Material name="lambert1" materialId="6" diffuseColor="0.494118 0.494118 0.494118 1" ambientColor="1 1 1">
    </Material>
    <Material name="lambert4" materialId="8" ambientColor="1 1 1" cosPower="20" specularColor="0.5 0.5 0.5" customShaderId="4" customShaderVariation="colorMask">
      <Texture fileId="2"/>
      <Reflectionmap fileId="3" lodDistanceScaling="0.5" viewDistanceScaling="0.5" type="cube" scaling="1" refractiveIndex="1" bumpScale="0.5" shapesObjectMask="4294967295" lightsObjectMask="4294967295"/>
      <CustomParameter name="RDT" value="1 1 24 12"/>
      <CustomParameter name="colorScale" value="0.012 0.094 0.032 1"/>
    </Material>
  </Materials>


  <Shapes externalShapesFile="PlatformEmpty.i3d.shapes">
  </Shapes>


  <Dynamics>
  </Dynamics>

  <Scene>
    <Shape shapeId="1" name="platformEmpty" dynamic="true" compound="true" clipDistance="300" nodeId="14" materialIds="6" castsShadows="true" receiveShadows="true" nonRenderable="true">
      <Shape shapeId="2" name="platform_vis" nodeId="15" materialIds="8" castsShadows="true" receiveShadows="true"/>
      <TransformGroup name="attacherJoint" translation="0 1.417 3.71306" rotation="0 90 0" nodeId="16"/>
      <Shape shapeId="3" name="colPart" compoundChild="true" collisionMask="8194" linearDamping="0.5" angularDamping="0.5" density="0.1" nodeId="17" materialIds="6" castsShadows="true" receiveShadows="true" nonRenderable="true"/>
      <Shape shapeId="4" name="colPart" compoundChild="true" collisionMask="8194" linearDamping="0.5" angularDamping="0.5" density="0.1" nodeId="18" materialIds="6" castsShadows="true" receiveShadows="true" nonRenderable="true"/>
    </Shape>
  </Scene>

</i3D>


Re: Dreck und Farbauswahl

Posted: Wed Feb 08, 2017 11:41 am
by XPModder
Ich habe den Fehler entzwischen selbst gefunden und erfolgreich behoben.
Hatte die specular Map vergessen.... fail.....

Naja jetzt funktioniert es jedenfalls.