LUA Programmer/scripter Needed!!

Your forum for all discussions around Modding.
Generic_Username
Posts: 26
Joined: Fri Sep 01, 2017 2:46 am

LUA Programmer/scripter Needed!!

Post by Generic_Username »

I require help for A mod I'm making, but I've run into a issue with how to replace the original vehicles with modded ones OR editing those original vehicles to add a feature I want, I cant see to figure it out with the xml file, so I assume I need to use lua to do this, but I don't know how to use lua(more importantly, how to use it with FS17) ALSO: is there a way in xml or lua to edit a $data/ xml file, like the xml file of a preexisting vanilla tractor Without creating duplicates
Generic_Username
Posts: 26
Joined: Fri Sep 01, 2017 2:46 am

Re: LUA Programmer/scripter Needed!!

Post by Generic_Username »

Another thing, I've made my own config for the store, but I need it to change the motor stats, how would I do that in the xml file? I can just put hp="x" in the config because that for some reason wont work
User avatar
Smith Modding
Posts: 2996
Joined: Sat May 14, 2016 12:42 pm
Location: Harris County, Georgia

Re: LUA Programmer/scripter Needed!!

Post by Smith Modding »

Not sure about the duplicates, but I pulled this from a mod with motor configurations, try making it look like this.

Code: Select all

	<motorConfigurations>
        <motorConfiguration name="1300" hp="130" price="0">
            <motor torqueScale="0.5765" minRpm="1000" maxRpm="2200" maxForwardSpeed="53" maxBackwardSpeed="15" brakeForce="7" lowBrakeForceScale="0.22" lowBrakeForceSpeedLimit="1" rotInertia="0.002" minForwardGearRatio="12.3" maxForwardGearRatio="300" minBackwardGearRatio="40" maxBackwardGearRatio="300">
                <torque normRpm="0.45" torque="0.9"/>
                <torque normRpm="0.5" torque="0.97"/>
                <torque normRpm="0.59" torque="1"/>
                <torque normRpm="0.72" torque="1"/>
                <torque normRpm="0.86" torque="0.88"/>
                <torque normRpm="1" torque="0.72"/>
            </motor>
        </motorConfiguration>
        <motorConfiguration name="1400" hp="140" price="10000" dailyUpkeep="20" icon="$dataS2/menu/hud/configurations/config_engine.png">
            <objectChange node="0>8|23|1|1" visibilityActive="true"/>
            <objectChange node="0>8|23|1|0" visibilityActive="false"/>
            <motor torqueScale="0.6208" />
        </motorConfiguration>
Smith Modding Co.
Christian Based Modding
Isaiah 30:23- He will also send you rain for the seed you sow in the ground, and the food that comes from the land will be rich and plentiful. In that day your cattle will graze in broad meadows.:
Playing FS15-19 on PC
Playing too much FS19 :mrgreen:
Specs-
i5-7300HQ|NVIDIA GTX 1050ti|16GB DDR4 RAM|1TB/500GB SSD/256GB M.2|Windows 10
Generic_Username
Posts: 26
Joined: Fri Sep 01, 2017 2:46 am

Re: LUA Programmer/scripter Needed!!

Post by Generic_Username »

You misunderstood what I was saying, Im trying to configure the motor within my custom config like this

Code: Select all

<EkotuneConfigurations>
		<EkotuneConfiguration name="None" price="0"> // this is the custom config
			<motor torqueScale="0.32"/>
		</EkotuneConfiguration>
		<motorConfiguration name="Ekotune 10%" price="3500" hp="83" dailyUpkeep="30">
					<motor torqueScale="0.36022"/>
		</motorConfiguration>
		<EkotuneConfiguration name="Ekotune 20%" price="8500" hp="90" dailyUpkeep="65">
            <motor torqueScale="0.3906"/>
        </EkotuneConfiguration>
	</EkotuneConfigurations>
this config adds another options bar in the store to select one of the above listed options, but the problem is the hp and torqueScale are not changed by my config, even though it is written there, only modifys the price, name and dailyUpKeep
Post Reply