[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4668: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4670: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4671: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4672: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
Battlefield Modding Tutorials BFMODS :: View topic - Random Vehicle Skin
Battlefield Modding Tutorials BFMODS
https://battlefieldmodding.com/ssm/phpBB3/

Random Vehicle Skin
https://battlefieldmodding.com/ssm/phpBB3/viewtopic.php?f=3&t=4789
Page 1 of 2

Author:  Sheppard [ Thu Mar 26, 2009 8:20 pm ]
Post subject:  Random Vehicle Skin

Ok, So I've found quite a few really cool vehicle skins...unfortunately, Obviously, I can't use all of them. So how can I make it randomly load a different skin for each one? In this case its the Tiger (I have 3 skins I'd like to use + original). I know random soldier skins are possible, but I don't know how that is done, but is this similar? Or even possible?
I'm guessing any changes would be in the .rs file for the standardmesh, but I'm not sure how to tell it to load different .dds files randomly.

Author:  Archimonde0_0 [ Thu Mar 26, 2009 9:28 pm ]
Post subject:  Re: Random Vehicle Skin

Yea, its possible, you'd have to do it for each part though, using the random geometries code.

You clone the parts of the car, renaming them like:

Car1
Car2
Car3
Car4.sm

Cartire1
Cartire2
Cartire3
Cartire4.sm

Editing the .rs files attached to those .sm files so that each one uses a different texture. Then you use the random geometries code, which can be found in the Soldier files, and just apply it to the parts of the car and tada! random vehicle skins. It doesn't work perfectly, but it works good enough.

Author:  Senshi [ Thu Mar 26, 2009 9:50 pm ]
Post subject:  Re: Random Vehicle Skin

Archimonde has it right, but check out the FH objects.rfa if you want a very good example. E.g. their T34 has up to eight random turret versions if I remember correctly.

Author:  Apache Thunder [ Wed Apr 01, 2009 12:41 am ]
Post subject:  Re: Random Vehicle Skin

Just a tib bit of info here. The "random" goemtry code isn't truely random. It loads the next one in sequence each time another instance of the object is created/spawned. I found this out when I made a TV that played videos.I set it up with this code so that I can "change channels" by shooting it and it will die and respawn with the next geometry. It is very predictable so therefor it isn't random at all.

...Though this shouldn't adversely effect your attempts at multiple skins. :P

Author:  Sheppard [ Wed Apr 01, 2009 12:46 am ]
Post subject:  Re: Random Vehicle Skin

The problem with random geometries code is that couldn't by some fluke it load a turret and body that don't go together. Meaning, the entire tank uses one texture file (except for the wheels). Couldn't it try loading 2 different texture files at once and have a conniption of some sort? Although I imagine that spawning them in sequence as you said it does would preclude this from happening.

Author:  Apache Thunder [ Wed Apr 01, 2009 12:48 am ]
Post subject:  Re: Random Vehicle Skin

Since it isn't random, I don't think that would be a problem. As long as there is the SAME amount of random geometries for both the tank body and the turret, they should match up as long as you got each on the same object number.

For example you got three of each:

ObjectTemplate.create Bundle Turret1
ObjectTemplate.create Bundle Turret2
ObjectTemplate.create Bundle Turret3

Then you must have the same amount of tank hulls:

ObjectTemplate.create Bundle M1A1Complex1
ObjectTemplate.create Bundle M1A1Complex2
ObjectTemplate.create Bundle M1A1Complex3

So that Turret1 will always match with M1A1Complex1. The above code is example only, so forgive the lack of extra stuff like geometries and such. :P

Author:  Sheppard [ Wed Apr 01, 2009 12:49 am ]
Post subject:  Re: Random Vehicle Skin

I do find it strange though that they share a texture file, although it simplifies replacing skins I suppose. (Not that EA cares about us lowly modders)

Author:  Apache Thunder [ Wed Apr 01, 2009 12:57 am ]
Post subject:  Re: Random Vehicle Skin


Page 1 of 2 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/