[?] Repair & reload boats?

Making or wanting help making your own asset? Check in here
Post Reply
badmojo420
Posts: 2849
Joined: 2008-08-23 00:12

[?] Repair & reload boats?

Post by badmojo420 »

Is there any way to enable the vehicle depot to repair and rearm the RHIB? No matter how close you get, it doesn't work.
Zeno
Posts: 3430
Joined: 2008-09-07 14:16

Re: Repair & reload boats?

Post by Zeno »

yes it would be nice because we are going to need it for the cb90 :razz:
Image
[R-DEV]Ninja2dan: Not having a spotter is like masturbating with a cheese grater...mildly amusing at first, but generally painful and bloody in the end.

Thornehaw: If all this have been evidently true, Battlefield is a much scarier and dirtier than ever imagined. Not a conspiracy, but a possibility. If it is true, then trusting another is quite worrisome.
Rhino
Retired PR Developer
Posts: 47909
Joined: 2005-12-13 20:00

Re: Repair & reload boats?

Post by Rhino »

Well if you look at the code for the supply object of the depo you can see why:

Code: Select all

ObjectTemplate.create SupplyObject pr_supply_depot
ObjectTemplate.floaterMod 0
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.radius 5
ObjectTemplate.workOnSoldiers 1
ObjectTemplate.workOnVehicles 1
ObjectTemplate.healSpeed 2
ObjectTemplate.refillAmmoSpeed 4
[b]ObjectTemplate.addVehicleType 0[/b]
ObjectTemplate.teamFromClosestCP 1
Note the bit in bold.

Now if we look at my Mapping Audit tut, down in the Step 5: Combat Zones sections I list all the vehicle groups.

https://www.realitymod.com/forum/f189-m ... audit.html
'[R-DEV wrote:Rhino;431800']Image This box controls what kind of vehicle is effected by the combat zone. This can be used for crating an extra large, seprate combat zone around the base combat zone only for jets, to give them a much larger area to fly in and when you hop into a jet, you can still see the base combat zone, but the area between the base and the jet combat zone will be 1/2 transparent. When hand coding this the values are:
VehicleType "0" = Land
VehicleType "1" = Sea
VehicleType "2" = Planes
VehicleType "3" = Choppers
VehicleType "4" = All
VehicleType "5" = Planes/Choppers
Now if you look back at the supply object code above, you will note that in bold I have highlighted the line "ObjectTemplate.addVehicleType 0", where from the list in my audit tut, we can see that 0 = Land Vehicles only.

This is why the vehicle depo is not reloading any boats.

In order to get it to reload boats, you could change 0 to 1 but then it wouldn't reload any land vehicles, or you could change it to 4 but then it would also reload a chopper hovering next to it, or you could do this:

Code: Select all

ObjectTemplate.create SupplyObject pr_supply_depot
ObjectTemplate.floaterMod 0
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.radius 5
ObjectTemplate.workOnSoldiers 1
ObjectTemplate.workOnVehicles 1
ObjectTemplate.healSpeed 2
ObjectTemplate.refillAmmoSpeed 4
[b]ObjectTemplate.addVehicleType 0[/b]
[b]ObjectTemplate.addVehicleType 1[/b]
ObjectTemplate.teamFromClosestCP 1
Which would then mean it would reload both land vehicles and boats.

But if I was you I would simply make a new supply object, in fact here is one I made just the other day for my BF Pirates 2 map so the boats could reload in the bay at there main bases since they couldn't.


ship_supplyobject.con

Code: Select all

GeometryTemplate.create StaticMesh ship_supplyobject
CollisionManager.createTemplate ship_supplyobject

ObjectTemplate.create Bundle ship_supplyobject
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.creator EDMUND:Edmund_Fovargue

include ship_supplyobject.tweak

ship_supplyobject.tweak

Code: Select all

rem *** Generated with Bf2Editor.exe [created: 2006/5/15 12:52]
GeometryTemplate.doNotGenerateLightmaps 0
GeometryTemplate.lightmapOverride 0
GeometryTemplate.compressVertexData 1
GeometryTemplate.maxTextureRepeat 16
GeometryTemplate.glowing 0
GeometryTemplate.noLighting 0
ObjectTemplate.activeSafe Bundle ship_supplyobject
ObjectTemplate.creator EDMUND:Edmund_Fovargue
ObjectTemplate.modifiedByUser "Edmund Fovargue"
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.hasCollisionPhysics 0
rem -------------------------------------
ObjectTemplate.setPosition 0/0/0
ObjectTemplate.addTemplate ship_supplyobject_SupplyObject
rem -------------------------------------

ObjectTemplate.create SupplyObject ship_supplyobject_SupplyObject
ObjectTemplate.modifiedByUser "Edmund Fovargue"
ObjectTemplate.createdInEditor 1
ObjectTemplate.floaterMod 0
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.radius 150
ObjectTemplate.workOnSoldiers 0
ObjectTemplate.workOnVehicles 1
ObjectTemplate.healSpeed 25
ObjectTemplate.refillAmmoSpeed 25
ObjectTemplate.restoreSpeed 5
ObjectTemplate.teamFromClosestCP 1
ObjectTemplate.addVehicleType 1


This object is a simple dummy object, has no mesh, no collisions and all it has is a supply object so you can put it anywhere and anything in 150m of it (thou you will probably want to lower the radius etc) that is a boat will reload/rearm from it.
Image
Zeno
Posts: 3430
Joined: 2008-09-07 14:16

Re: Repair & reload boats?

Post by Zeno »

super job rhino! i might contact you later about using this for my map :-P
Image
[R-DEV]Ninja2dan: Not having a spotter is like masturbating with a cheese grater...mildly amusing at first, but generally painful and bloody in the end.

Thornehaw: If all this have been evidently true, Battlefield is a much scarier and dirtier than ever imagined. Not a conspiracy, but a possibility. If it is true, then trusting another is quite worrisome.
Rhino
Retired PR Developer
Posts: 47909
Joined: 2005-12-13 20:00

Re: Repair & reload boats?

Post by Rhino »

you dont need my permission to use it, if you did I wouldn't post up all the code to it. Its really very simple code...
Image
H.sta
Posts: 1355
Joined: 2006-12-07 12:40

Re: Repair & reload boats?

Post by H.sta »

Zeno is a very simple person aswell... Rhino to the rescue again!
Zeno
Posts: 3430
Joined: 2008-09-07 14:16

Re: Repair & reload boats?

Post by Zeno »

H.sta wrote:Zeno is a very simple person aswell!
i dont know to take that as a insult or positive :mrgreen:
Image
[R-DEV]Ninja2dan: Not having a spotter is like masturbating with a cheese grater...mildly amusing at first, but generally painful and bloody in the end.

Thornehaw: If all this have been evidently true, Battlefield is a much scarier and dirtier than ever imagined. Not a conspiracy, but a possibility. If it is true, then trusting another is quite worrisome.
badmojo420
Posts: 2849
Joined: 2008-08-23 00:12

Re: Repair & reload boats?

Post by badmojo420 »

Thanks Rhino, exactly what I needed.
Post Reply

Return to “PR:BF2 Community Modding”