Community Forum

Default Vehical Co-ords for XML file need halp

Forum Overview >> Farming Simulator 15

CategoryFarming Simulator 15
Created09.07.2015 08:14


Cassidy Habermann (Unknown) 09.07.2015 08:20
Hi

I am creating a new map and need to place default vehicals. I have tried all kinds of co-ords with no luck :( can some one please tell me how I can do this?

I have tried
grabbing them from saved games,
getting them from the Giants editor (doing this just places them anywhere the game feels like it on the map)
and a whole lotta other things

here is a snippit of the vehical xml that I am wanting to place

<vehicle filename="data/vehicles/steerable/deutz/deutzFahr7250.xml" xPosition="185.54" yOffset="0.5" zPosition="135.66" yRotation="0" dirtAmount="0.5"/>

how do i get the X and Z positions?
thanks



Bilbo Beutlin (BBeutlin) 09.07.2015 08:41
Quite simple: start your map, buy vehicles, place them where they should be later for default, then save.
Open the savegame/vehicles.xml and copy the basic vehicle datas into your defaultVehicles.xml - see the defaultVehicles template for reference which xml attributes/tags are required.

Cassidy Habermann (Unknown) 09.07.2015 08:51
here is my vehical save and these dont work the vehical does move but not where I want it or even close

vehicle id="11" filename="data/vehicles/steerable/deutz/deutzFahr7250.xml" isAbsolute="true" fuelFillLevel="475.70487549372" cruiseControl="62" operatingTime="2654.0916071682" attacherJointComboDir="-1" dirtAmount="0.94234583177006">
<component1 position="-124.43039703369 100.05855560303 -510.99224853516" rotation="3.1190545558929 -1.0273623466492 3.1415722370148" />
</vehicle>

what numbers do I put in the below ????
<vehicle filename="data/vehicles/steerable/deutz/deutzFahr7250.xml" xPosition="185.54" yOffset="0.5" zPosition="135.66" yRotation="0" dirtAmount="0.5"/>

thanks

Bilbo Beutlin (BBeutlin) 09.07.2015 09:05
You must not copy the datas 1:1 because the defaultVehicles has another format.
The coordinates are in <component1 position="x y z" .. here you need only x and z .. but keep the attrib. yOffset="0.5"
Also for yRotation you nee only the rotation="x y z" y-value.
Keep in mind to adapt the filepath: filename="data/vehicles/.." must be changed to filename="$data/vehicles/.."

Master Saygo (Unknown) 18.07.2015 17:27
I agree with Bilbo, but there is an even easier way. While making your map, import and place any vehicle at the location and position you want them in game, then look at your attributes and write down the x and z position numbers and yRotation number. Then move that vehicle to where you want second vehicle and do the same. Do this to all vehicles locations you want in game. Then delete "cut" that vehicle out, save your map, close editor. Now go to your FS15 folder and open "profileTemplate" folder. Copy one of the careerVehicles files and paste into the root directory of your mod folder. Rename the file you just pasted into mod as: "defaultVehicles" (without quotes). Now open that file and look for vehicle info there. Just change the x, z, and y numbers you wrote while in editor. Save. If you want different vehicles than the default, then just change the name path to point to that vehicle. Now open your mod description file and look for line "defaultVehiclesXMLFilename="defaultVehicles.xml"> (with quotes) should be right after your map lua line.
Should look something like this:
<maps>
<map id="map02" className="map02" filename="map02.lua" defaultVehiclesXMLFilename="defaultVehicles.xml">

I find this to be a more precise way of placing. Hope it helps you too.


Note: Log in to post. Create a new account here.