[Help]

Making or wanting help making your own asset? Check in here
Post Reply
Onil
Posts: 1232
Joined: 2007-08-19 09:50

[Help]

Post by Onil »

Anyone here knows if it is possible to load a vehicle configuration (*.con or *.tweak) file from within the map folder (objects_client.zip or objects_server.zip) like it is currently done with custom textures?

The idea is not having to add such files to the BF2 or mod objects zips since it is to be used on only one map.

Any idea if this is possible and how it can be done?

Thanks in advance.
Image
AfterDune
Retired PR Developer
Posts: 17094
Joined: 2007-02-08 07:19

Re: [Help]

Post by AfterDune »

The map's server.zip has those client/server archives.con files. You might want to look at those :) .
Image
Onil
Posts: 1232
Joined: 2007-08-19 09:50

Re: [Help]

Post by Onil »

Thanks Afterdune

I already used those plus the init.con to add custom vehicle skins directly from the objects zips that i placed inside the map folder. The problem is using the same procedure but for vehicle tweaks instead of vehicle textures.

The textures method of loading from inside the map folder uses this code:
if v_arg1 == BF2Editor
LevelSettings.CustomTextureSuffix "suffix"
else
texturemanager.customTextureSuffix "suffix"
endIf
i don't know if there is a way of using the same method to load a *.tweak or *.con

Anyone did this before?
Image
ballard_44
Retired PR Developer
Posts: 1204
Joined: 2007-05-30 22:47

Re: [Help]

Post by ballard_44 »

try cloning the vehicle in which all you would need to create is a new con and tweak file.

same principle of how the PR team 'cloned' some of their weapons.
Like the ushgr_m67 grenade...there is the original and the ushgr_m67_q4.
Just look at what they changed in the respective con and tweaks.

Then place your new files into the object_server.zip for the map using the correct folder placement.

You'll also have to rename a vehicle or add yours manually in the gameplayobjects.con to whatever you called it so it actually appears ingame.
Onil
Posts: 1232
Joined: 2007-08-19 09:50

Re: [Help]

Post by Onil »

Already tried that but it didn't load the vehicle.

It needs some lines of code in the init.con as the example above for the custom textures, right?
Image
ballard_44
Retired PR Developer
Posts: 1204
Joined: 2007-05-30 22:47

Re: [Help]

Post by ballard_44 »

Onil wrote: It needs some lines of code in the init.con as the example above for the custom textures, right?
No.

You have the serverarchives.con file included in your maps server.zip?
Should read something like...

Code: Select all

fileManager.mountArchive Levels/yourmapnamehere/Objects_Server.zip Objects
And you did add your vehicle into the GamePlayObjects.con file?
Onil
Posts: 1232
Joined: 2007-08-19 09:50

Re: [Help]

Post by Onil »

yep did all that, still didn't work.

But i think i may have found the problem. Thanks for the help though.

Is it possible to add a custom kit to a maps objects.zip ?
Image
ballard_44
Retired PR Developer
Posts: 1204
Joined: 2007-05-30 22:47

Re: [Help]

Post by ballard_44 »

custom kit meaning a selectable one on the spawn screen (yes, you can) or custom meaning a pick up kit (yes, also)
Onil
Posts: 1232
Joined: 2007-08-19 09:50

Re: [Help]

Post by Onil »

thanks for the answer Ballard

The vehicle tweaks work fine on the mod's objects zips but are not loaded if on the map's objects zips. It does load the custom textures but not the tweak file.

It is not a new file, it's just some tweaks to an existing one. Do i need to duplicate it to make it work and be loaded through the map's objects instead of the main ones?

Right now it just doesn't load my changes on the tweak file. Do i need to have the same suffix on the tweak file? and do i add it aswell to the other tweak files that the vehicle file loads?
Image
ballard_44
Retired PR Developer
Posts: 1204
Joined: 2007-05-30 22:47

Re: [Help]

Post by ballard_44 »

Onil wrote:thanks for the answer Ballard
The vehicle tweaks work fine on the mod's objects zips but are not loaded if on the map's objects zips. It does load the custom textures but not the tweak file.
I've found that if I (for example) change the number of clips the M4 has from 6 to 106 and use the server archive method, I don't see the change.

For some reason (and maybe someone more knowledgeable knows why) the core/original M4 file keeps overriding the 106 clip M4 i made for my map.

I've found the only way to change that is to clone the M4.
The game then see's it as a 'new' gun and loads it fine.
It is not a new file, it's just some tweaks to an existing one. Do i need to duplicate it to make it work and be loaded through the map's objects instead of the main ones?
So yes, if you want to keep the original vehicle, then make a duplicate and make your changes on that one.

As i mentioned before, look at some of the cloned vehicles the PR team made.
Now that I think of it, the British Scimitar is a vehicle that they have cloned. There is a caged and non-caged version.
Should tell you what needs to be changed in the .con and .tweak

Here is an article on a way to do it, also

Copying Existing Objects And Renaming Them - Official BF Editor Forums

After that it is up to you on how you want to .zip your cloned vehicle.
You can use the core game server.zip or use a map specific objects_server.zip
Onil
Posts: 1232
Joined: 2007-08-19 09:50

Re: [Help]

Post by Onil »

Hey man thanks a lot for the help.

I have found that you can also include the objects inside the map's server and client zips directly instead of having 2 more zips with them. This is possible if you run the new objects on the tmp.con file.
Image
Post Reply

Return to “PR:BF2 Community Modding”