Vehicle Material Number

Ask questions, discuss ideas, get answers
Post Reply
Waldek
Posts: 49
Joined: Thu Mar 08, 2012 12:09 pm

Vehicle Material Number

Post by Waldek »

HI
As the topic's title says. Various posts notice that I can adjust projectile strength but I can not do that, as there would be too much to edit. So is it possible to change Collision material number of vehicle by server side? My overall goal is to make the vehicle weaker; presently it is immune to any kind of fire what makes the map unbalanced. Thanks in advance.
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: Vehicle Material Number

Post by freddy »

Waldek wrote:HI
As the topic's title says. Various posts notice that I can adjust projectile strength but I can not do that, as there would be too much to edit. So is it possible to change Collision material number of vehicle by server side? My overall goal is to make the vehicle weaker; presently it is immune to any kind of fire what makes the map unbalanced. Thanks in advance.
Yes its possible but not easy viewtopic.php?f=6&t=887
Waldek
Posts: 49
Joined: Thu Mar 08, 2012 12:09 pm

Re: Vehicle Material Number

Post by Waldek »

Thanks for guiding me. So I need to change coll Mat ID?? That's weird as I thought it's not allowed to edit any meshes via ssm
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: Vehicle Material Number

Post by freddy »

Waldek wrote:Thanks for guiding me. So I need to change coll Mat ID?? That's weird as I thought it's not allowed to edit any meshes via ssm
Hm i didn´t notice the ssm prefix in the thread title, but it shold work fine to change Mat ID as long its just in the serverfiles. Perhaps try with something small and easy first like say a landmine or wait and see if theres any modder here that would like to share their wisdom.

You could also take a look in the old forum, there are many years of modding knowledge there. http://battlefieldmodding.com/ssm/phpBB ... 8b13325139

edit: now when i come to think about it perhaps you could just use a mesh from another vehicle instead of going throw all the troubble of changing Mat ID.

Code: Select all

GeometryTemplate.active Hueyatk_fus_m1
GeometryTemplate.file ve_oh6a_main_m1
http://battlefieldmodding.com/ssm/phpBB ... 8b13325139
Waldek
Posts: 49
Joined: Thu Mar 08, 2012 12:09 pm

Re: Vehicle Material Number

Post by Waldek »

freddy wrote:Perhaps try with something small and easy first like say a landmine or wait and see if theres any modder here that would like to share their wisdom.
Actually editing collision meshes is an easy task for me, since I'm familiar with 3DS Max.

So I tweaked COL ID in 3ds max and reexported. As far as I know game ignores _xxx patches for game.rfa and standardmesh.rfa and Reuploading and restarting the server ten of times is not a solution for me since our mod's standardmesh.rfa is 360mb large, so I thought I'll create additional minimod in mods folder. However the game seems to ignore that too :x Maybe is there something that I forgot about?

minimod fodler name:
mod_tweak

files inside:
init.con
Archives/standardmesh.rfa


init.con content:

Code: Select all

game.SetCustomGameName FHSW
game.addmodPath Mods/mod_tweak
game.addmodPath Mods/FHSW/
game.addModPath Mods/FH/
game.addModPath Mods/Bf1942/
game.customGameFlushArchives 0
game.setCustomGameVersion 0.1
game.setCustomGameUrl "http://wbmuse.blog89.fc2.com/"
game.setCustomGameInfo "mod_t"
---------

And what about ForceMatID command (even is there such one, or that's a tool's name only?) Would that work when added to map's object spawner? Actually the vehicle which I want to be edited, has only 1 coll mat id assigned to.
Moreover my vehicle uses an exclusive col ID, never used in any other vehicle. Maybe that's the clue? Would it allow me to edit collision definition in game.rfa then, if .sm tweak couldn't work ?
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: Vehicle Material Number

Post by freddy »

I guess there is no good way around the problem, you could put the new mesh in a map with the _xxx method and make a call for it from your other maps where its needed, something like

Code: Select all

GeometryTemplate.create StandardMesh Ve_Cobra_Main_m1  <-- or objecttemplate.active StandardMesh  (im not sure)
GeometryTemplate.file ../bf1942/levels/Chopper_Coral/CustomMeshes/Cobra/Ve_Cobra_Main_m1
But it would still need a lot of testing to get it all right.
Waldek wrote: Moreover my vehicle uses an exclusive col ID, never used in any other vehicle. Maybe that's the clue? Would it allow me to edit collision definition in game.rfa then, if .sm tweak couldn't work ?
This would propably be the best way to go, you could simply copy the settings from another material fast and easy using the find and replace function in for example wordpad.
Waldek
Posts: 49
Joined: Thu Mar 08, 2012 12:09 pm

Re: Vehicle Material Number

Post by Waldek »

Thank you freddy, I'll try my best.

I got one more question though. The spoken vehicle spawns when allied team captures a certain flag but I I want to prevent allies from entering that machine. In other words Allies must not drive it, only Axis.
So I typed ObjectTemplate.TeamOnVehicle 1 in map's ObjectsSpawnTemapltes.con, assuming that 2 value belongs to to allied team.
The result is, it gets disabled for Axis instead of Allies, same for value 2..... Why??
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: Vehicle Material Number

Post by freddy »

Waldek wrote: I got one more question though. The spoken vehicle spawns when allied team captures a certain flag but I I want to prevent allies from entering that machine. In other words Allies must not drive it, only Axis.
So I typed ObjectTemplate.TeamOnVehicle 1 in map's ObjectsSpawnTemapltes.con, assuming that 2 value belongs to to allied team.
The result is, it gets disabled for Axis instead of Allies, same for value 2..... Why??
It is either on or off, 0=off. 1 or higher= on it works along with the spawner to set the team that can use it

Code: Select all

ObjectTemplate.create ObjectSpawner AAGunSpawner
ObjectTemplate.setObjectTemplate 2 willy  <--- only team 2 can use
ObjectTemplate.setObjectTemplate 1 BlackMedal  <----- only team 1 can use
ObjectTemplate.teamOnVehicle 1 
Waldek
Posts: 49
Joined: Thu Mar 08, 2012 12:09 pm

Re: Vehicle Material Number

Post by Waldek »

Ah, okay. Why mdt knowledge base says about 1, 2 arguments then? http://bfmods.com/mdt/scripting/ObjectT ... hicle.html
Is there any other method or command of disabling vehicles then?
Post Reply