Aid in transplanting Forklift

Ask questions, discuss ideas, get answers
Post Reply
GoodDayToDie!!
Posts: 226
Joined: Mon Dec 13, 2010 7:59 am
Location: Bat Country, California
Contact:

Aid in transplanting Forklift

Post by GoodDayToDie!! »

I can't seem to get the forklift working from the DC mod into an Interstate1982 map
ANy suggestions??

GEOMETRIES.CON:

Code: Select all

renderer.beginGlobalCluster Forklift
GeometryTemplate.create StandardMesh Forklift_Hull
GeometryTemplate.file ../bf1942/levels/AAA/standardMesh/Forklift/Forklift_Hull_m1
GeometryTemplate.hasDynamicShadow 1
GeometryTemplate.setLodDistance 0 0
GeometryTemplate.setLodDistance 1 10
GeometryTemplate.setLodDistance 2 15
GeometryTemplate.setLodDistance 3 30
GeometryTemplate.setLodDistance 4 50
GeometryTemplate.setLodDistance 5 100

GeometryTemplate.create StandardMesh Forklift_WheelFR_M1
GeometryTemplate.file ../bf1942/levels/AAA/standardMesh/Forklift/Forklift_WheFR_M1
GeometryTemplate.setLodDistance 0 0
GeometryTemplate.setLodDistance 1 20
GeometryTemplate.setLodDistance 2 60
GeometryTemplate.setLodDistance 3 100

GeometryTemplate.create StandardMesh Forklift_WheelFL_M1
GeometryTemplate.file ../bf1942/levels/AAA/standardMesh/Forklift/Forklift_WheFL_M1
GeometryTemplate.setLodDistance 0 0
GeometryTemplate.setLodDistance 1 20
GeometryTemplate.setLodDistance 2 60
GeometryTemplate.setLodDistance 3 100

GeometryTemplate.create StandardMesh Forklift_WheelRR_M1
GeometryTemplate.file ../bf1942/levels/AAA/standardMesh/Forklift/Forklift_WheRR_M1
GeometryTemplate.setLodDistance 0 0
GeometryTemplate.setLodDistance 1 20
GeometryTemplate.setLodDistance 2 60
GeometryTemplate.setLodDistance 3 100

GeometryTemplate.create StandardMesh Forklift_WheelRL_M1
GeometryTemplate.file ../bf1942/levels/AAA/standardMesh/Forklift/Forklift_WheRL_M1
GeometryTemplate.setLodDistance 0 0
GeometryTemplate.setLodDistance 1 20
GeometryTemplate.setLodDistance 2 60
GeometryTemplate.setLodDistance 3 100

GeometryTemplate.create StandardMesh Forklift_Steering_M1
GeometryTemplate.file ../bf1942/levels/AAA/standardMesh/Forklift/Forklift_str_M1
geometryTemplate.cullFactor 0.4
GeometryTemplate.setLodDistance 0 0
GeometryTemplate.setLodDistance 1 20
GeometryTemplate.setLodDistance 2 60
GeometryTemplate.setLodDistance 3 100

GeometryTemplate.create StandardMesh Forklift_Fork_M1
GeometryTemplate.file ../bf1942/levels/AAA/standardMesh/Forklift/Forklift_Fork
GeometryTemplate.setLodDistance 0 0
GeometryTemplate.setLodDistance 1 10
GeometryTemplate.setLodDistance 2 15
GeometryTemplate.setLodDistance 3 30
GeometryTemplate.setLodDistance 4 50
GeometryTemplate.setLodDistance 5 100

GeometryTemplate.create StandardMesh 1P_Forklift_str_M1
GeometryTemplate.file ../bf1942/levels/AAA/standardMesh/Forklift/1P_Forklift_str_M1
GeometryTemplate.cullFactor 2
renderer.endGlobalCluster

GeometryTemplate.create StandardMesh Forklift_Hull_L1
GeometryTemplate.file ../bf1942/levels/AAA/standardMesh/Forklift/Forklift_Hul_L1
GeometryTemplate.hasDynamicShadow 1

GeometryTemplate.create StandardMesh Wreck_Forklift_M1
GeometryTemplate.file ../bf1942/levels/AAA/standardMesh/Forklift/Wreck_Forklift_M1
GeometryTemplate.setLodDistance 0 0
GeometryTemplate.setLodDistance 1 150
GeometryTemplate.setLodDistance 2 200
GeometryTemplate.setLodDistance 3 250
GeometryTemplate.setLodDistance 4 300
GeometryTemplate.setLodDistance 5 500

Image
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Aid in transplanting Forklift

Post by Swaffy »

Is the forklift mapside or in your main RFAs?
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
GoodDayToDie!!
Posts: 226
Joined: Mon Dec 13, 2010 7:59 am
Location: Bat Country, California
Contact:

Re: Aid in transplanting Forklift

Post by GoodDayToDie!! »

In the main RFA
it is also mentioned in the following places:
StandardMesh folder
texture folder
init.con(run objects/objects) (textureManager.alternativePath bf1942\levels\AAA\texture)
Objects folder + Object.con

and .lst file reads: Forklift=StandardMesh(Forklift)


Stumped :oops:

The map is named AAA just for this test copy.
Image
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Aid in transplanting Forklift

Post by Swaffy »

Code: Select all

GeometryTemplate.file ../bf1942/levels/AAA/standardMesh/Forklift/Forklift_Hull_m1
I think this is your issue. Well, try it. Trying to read files from a map RFA seems pretty sketchy. In my opinion, just put all of the vehicle's files in the RFA files in the Archive directory and read those. I'm just not sure if the game file system works like that, reading files from map RFAs.

If the StandardMesh files are in the Textures.rfa file, the line would say this:

Code: Select all

GeometryTemplate.file Forklift_Hull_m1
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
GoodDayToDie!!
Posts: 226
Joined: Mon Dec 13, 2010 7:59 am
Location: Bat Country, California
Contact:

Re: Aid in transplanting Forklift

Post by GoodDayToDie!! »

I haven't tried that...

I normally don't keep custom objects(including vehicles) in the Textures folder...Rather, I create a texture folder in the root folder and place everything custom there.

I intend to use this Forklift in 2 upcoming maps for is82....both can be finished in a week if i get this puppy working!!

I'll let u know the result sir....
Image
User avatar
Apache Thunder
Posts: 1213
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Aid in transplanting Forklift

Post by Apache Thunder »

You only need to path through the level folders in the geometry templates if you are running the map unpacked with the debugger. (chances are you likely aren't. :P )

So you don't need to point all the Geometry Templates through the long path to the map rfa.

Also are you loading the object.con files for the vehicle in the map's init.con file? Unlike the main rfas, the game won't load con files automatically excect for the specific con files pertaining to game modes etc. So for example, your custom object con files need to be "loaded" via run commands:

This is an example. Filenames/path may be different depending on your map:

Init.con of map: (with the run command, you don't need to specify the con file extension. That's only required when using the include command.)

Code: Select all

run Objects/Vehicles/Forklift/Geometries
run Objects/Vehicles/Forklift/Network
run Objects/Vehicles/Forklift/Objects
rem etc etc
Any con files you put in for your object must be loaded in a manner similar to this. The only exception is the SSC files since those area loaded via the sound script command. Just make sure you check the paths of any SSC files to make sure you copy over any SSC files that are loaded via the include command inside each SSC file. (not all SSC files use include commands. Most don't. But some weapons and most engine SSC files do use them!)

Some SSCs like the engine sound scripts use include commands to load in a SSC that contains the engine map and the like. If you fail to modify the paths for those include commands and copy over the SSC files they reference, the engine sounds may not work.

This may also present an issue if you are working with any custom weapons as well. Some weapons like the stationary browning and the like use SSC files that use include commands. Thus if you ever wondered why copying over the SSC of a browning into a custom vehicle results in the weapon sound not working right (fires once then endless looping) then that means there was an include command in that weapon's SSC file that is no longer able to load the needed SSC files since the paths changed. So keep an eye on that. ;)

Also note that texture paths in the RS files also do not need to path all the way to the level folders, So usually you don't have to alter that. Just replicate the folder paths in the texture folder as if it was being loaded from the main rfa. You only need to alter the RS files if you decide to move the textures into a different subfolder. If they were already in a sub folder like "DesertCombat/Forklift" for example, just replicate that folder path in the texture folder in your map RFA and it will work just fine. :D
ImageImageImage
I have cameras in your head!
GoodDayToDie!!
Posts: 226
Joined: Mon Dec 13, 2010 7:59 am
Location: Bat Country, California
Contact:

Re: Aid in transplanting Forklift

Post by GoodDayToDie!! »

Apache Thunder wrote:You only need to path through the level folders in the geometry templates if you are running the map unpacked with the debugger. (chances are you likely aren't. :P )

So you don't need to point all the Geometry Templates through the long path to the map rfa.

Also are you loading the object.con files for the vehicle in the map's init.con file? Unlike the main rfas, the game won't load con files automatically excect for the specific con files pertaining to game modes etc. So for example, your custom object con files need to be "loaded" via run commands:
The only rfa in question is the map/level name/rfa. I do not use the texture,standardmesh, or object rfa's... When I add something custom to a map, what I do is create an "Objects" folder in the root of my unpacked map. Then place the custom object itself directly inside this new folder. I also add an"objects.con" text file so I can "run custom_object/run"(as long as I create a "run.con" file inside the custom object's root folder.) In this case it's, "run Forklift/Forklift"...
You can use any name u want to run it...I prefer "run".


Apache Thunder wrote:Init.con of map: (with the run command, you don't need to specify the con file extension. That's only required when using the include command.)

Code: Select all

run Objects/Vehicles/Forklift/Geometries
run Objects/Vehicles/Forklift/Network
run Objects/Vehicles/Forklift/Objects
rem etc etc


Also note that texture paths in the RS files also do not need to path all the way to the level folders, So usually you don't have to alter that. Just replicate the folder paths in the texture folder as if it was being loaded from the main rfa. You only need to alter the RS files if you decide to move the textures into a different subfolder. If they were already in a sub folder like "DesertCombat/Forklift" for example, just replicate that folder path in the texture folder in your map RFA and it will work just fine. :D
I have kept a trained eye on my "texture" folder. In my maps, I always create a new folder(within the root folder) called, "texture". Any custom texture(s) goes inside this folder.

Also, in the map's RFA root folder, I make a "StandardMesh" folder. Here, any custom object's StandardMesh will be placed. I do make sure in the RS file that it's directed to the "texture" folder.

Furthermore, in the map's RFA root, inside the "init.con" file, I make sure to include the line,"run objects/objects" and edit the textureManager.alternativePath line to read: "textureManager.alternativePath bf1942\levels\AAA\texture" It reads "texture", instead of "Textures" because I have every custom texture in my new "texture folder".

I tried moving the Forklift's textures into the "Texture" folder and changed the path in the Init.con to read,"textureManager.alternativePath bf1942\levels\AAA\Textures"....Now the Forklift DOES APPEAR!!...Except it's only the body with no wheels and no textures...

I'm getting closer!!
Image
User avatar
Apache Thunder
Posts: 1213
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Aid in transplanting Forklift

Post by Apache Thunder »

The alternate path command shouldn't be needed. For my latest map and the 16 Squares map, I didn't need it at all for my custom objects and vehicle.

If you want, you can PM me an unpacked version of your map. I bet I could find the issue real quick. :D

I recall modding the forklift in my DCU mod. Mainly fixing the crappy UVMapping that was done on the wheels. (the tread area wasn't uvmapped at all) I can probably pack the slightly improved version of it with your files. :D
ImageImageImage
I have cameras in your head!
Post Reply