Jump to content

MkM

Members
  • Posts

    3
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by MkM

  1. Wumpscut here btw bdbssb 😉

    the quick and dirty change that would not messup anything would be in the <l10n> for the config  name itself , lets see if i can explain with a example

    so i have a edit of the cherry smartbox and have the addconfig script in that one.

    In this example the addConfig script by Ifko[nator] was used for personal use and as always if you want a release a mod to the public then make sure you get the approval from the creator.

    parts in moddesc:

        <specializations>
            <specialization name="addConfig" className="AddConfig" filename="specializations/AddConfig.lua"/>
        </specializations>
        
        <vehicleTypes>
            <type name="cherryBox" parent="implement" filename="$dataS/scripts/vehicles/Vehicle.lua">
                <specialization name="addConfig"/>
            </type> 
        </vehicleTypes>
        
        <newConfigurations>
            <newConfiguration configName="smartBoxDesign" isColorConfig="false" />
            <newConfiguration configName="smartBoxWeight" isColorConfig="false" />
        </newConfigurations>

    i use a separate file   for the  l10n but can ofcorse be in moddesc directly

     

    <l10n>
        <annotation></annotation>
    
        <texts>
        
            <text name="configuration_smartBoxDesign"                     text="Smartbox Design" />
            <text name="configuration_claas"                              text="CLAAS" />
            <text name="configuration_cherry"                              text="CHERRY" />
            
            <text name="configuration_smartBoxWeight"                     text="Smartbox Weight" />
            <text name="configuration_smartBoxWeight1600"                 text="Weight: 1600kg" />
            <text name="configuration_smartBoxWeight1800"                 text="Weight: 1800kg" />
            <text name="configuration_smartBoxWeight2000"                 text="Weight: 2000kg" />
            <text name="configuration_smartBoxWeight2200"                 text="Weight: 2200kg" />
            <text name="configuration_smartBoxWeight2400"                 text="Weight: 2400kg" />
    
    
        </texts>
    </l10n>

    and last the vehicle xml part (yeah i was to lazy to make a new smaller example )

        

    <smartBoxDesignConfigurations>
            <smartBoxDesignConfiguration name="$l10n_configuration_cherry" price="0">
                <colorChanges>    
                    <colorChange materialName="weight_mat"             shaderParameterName="colorMat0"    materialId="0"    color="SHARED_BLACK1"     />
                    <colorChange materialName="weight_mat"             shaderParameterName="colorMat1"    materialId="0"    color="SHARED_RD1"     />
                    <colorChange materialName="weight_mat"             shaderParameterName="colorMat2"    materialId="0"    color="SHARED_BLACK1"     />
                    <colorChange materialName="weight_mat"             shaderParameterName="colorMat3"    materialId="0"    color="SHARED_RD1"     />
                    <colorChange materialName="weight_mat"             shaderParameterName="colorMat4"    materialId="0"    color="SHARED_WHITE1"     />
                    <colorChange materialName="weight_mat"             shaderParameterName="colorMat5"    materialId="0"    color="SHARED_WHITE1"     /> 
                </colorChanges>
                <objectChange node="cherryBigLogo" visibilityActive="true" />
                <objectChange node="cherrySmallLogo" visibilityActive="true" />
                <objectChange node="cherrySmartboxLogo" visibilityActive="true" />
                <objectChange node="claasBig" visibilityActive="false" />
                
                <objectChange node="turnLightLeftFront" visibilityActive="false" />
                <objectChange node="turnLightRightFront" visibilityActive="false" />
                <objectChange node="turnLightLeftStatic01" visibilityActive="false" />
                <objectChange node="turnLightLeftStatic02" visibilityActive="false" />
                <objectChange node="turnLightRightStatic01" visibilityActive="false" />
                <objectChange node="turnLightRightStatic01" visibilityActive="false" />
            </smartBoxDesignConfiguration>        
            <smartBoxDesignConfiguration name="$l10n_configuration_claas" price="1000">
                <colorChanges>    
                    <colorChange materialName="weight_mat"             shaderParameterName="colorMat0"    materialId="0"    color="CLAAS_DARKGREY2"     />
                    <colorChange materialName="weight_mat"             shaderParameterName="colorMat1"    materialId="0"    color="CLAAS_GREEN1"     />
                    <colorChange materialName="weight_mat"             shaderParameterName="colorMat2"    materialId="0"    color="CLAAS_GREEN1"     />
                    <colorChange materialName="weight_mat"             shaderParameterName="colorMat3"    materialId="0"    color="CLAAS_RED1"     />
                    <colorChange materialName="weight_mat"             shaderParameterName="colorMat4"    materialId="0"    color="CLAAS_RED1"     />
                    <colorChange materialName="weight_mat"             shaderParameterName="colorMat5"    materialId="0"    color="CLAAS_RED1"     />
                </colorChanges>
                <objectChange node="cherryBigLogo" visibilityActive="false" />
                <objectChange node="cherrySmallLogo" visibilityActive="false" />
                <objectChange node="cherrySmartboxLogo" visibilityActive="false" />
                <objectChange node="claasBig" visibilityActive="true" />
                
                <objectChange node="turnLightLeftFront" visibilityActive="true" />
                <objectChange node="turnLightRightFront" visibilityActive="true" />
                <objectChange node="turnLightLeftStatic01" visibilityActive="true" />
                <objectChange node="turnLightLeftStatic02" visibilityActive="true" />
                <objectChange node="turnLightRightStatic01" visibilityActive="true" />
                <objectChange node="turnLightRightStatic02" visibilityActive="true" />
            </smartBoxDesignConfiguration>
        </smartBoxDesignConfigurations>
        
        <smartBoxWeightConfigurations>
            <smartBoxWeightConfiguration name="$l10n_configuration_smartBoxWeight1600" price="0">
                <objectChange node="cherry_main_component1" massActive="1600" />
                <objectChange node="cherry_main_component1" centerOfMassActive="0 0.2 0" />    
            </smartBoxWeightConfiguration>
            <smartBoxWeightConfiguration name="$l10n_configuration_smartBoxWeight1800" price="1000">
                <objectChange node="cherry_main_component1" massActive="1800" />
                <objectChange node="cherry_main_component1" centerOfMassActive="0 0.2 0" />
            </smartBoxWeightConfiguration>
            <smartBoxWeightConfiguration name="$l10n_configuration_smartBoxWeight2000" price="2000">
                <objectChange node="cherry_main_component1" massActive="2000" />
                <objectChange node="cherry_main_component1" centerOfMassActive="0 0.2 0" />
            </smartBoxWeightConfiguration>
            <smartBoxWeightConfiguration name="$l10n_configuration_smartBoxWeight2200" price="3000">
                <objectChange node="cherry_main_component1" massActive="2200" />
                <objectChange node="cherry_main_component1" centerOfMassActive="0 0.2 0" />
            </smartBoxWeightConfiguration>
            <smartBoxWeightConfiguration name="$l10n_configuration_smartBoxWeight2400" price="4000">
                <objectChange node="cherry_main_component1" massActive="2400" />
                <objectChange node="cherry_main_component1" centerOfMassActive="0 0.2 0" />
            </smartBoxWeightConfiguration>
        </smartBoxWeightConfigurations>

     

    Ok now when when have all the part to make it work lets say i wanted the menu in the shop say Cherry Design instead of smartbox design i would just change this line in l10n

    <text name="configuration_smartBoxDesign"                     text="Smartbox Design" />

    to

    <text name="configuration_smartBoxDesign"                     text="Cherry Design" />

    and that is applicable on all parts referenced in  l10n, you can change everting to have a new name but that can be a lot of work and really not needed as long you don't lose track of what is what 😉