[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

Battlefield Modding Tutorials
It is currently Mon Jun 16, 2025 8:37 pm

All times are UTC




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 12 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Random Vehicle Skin
PostPosted: Thu Mar 26, 2009 8:20 pm 
Offline
User avatar

Joined: Sat May 10, 2008 3:00 am
Posts: 1877
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.

_________________
Image


Top
 Profile Send private message E-mail  
 
 Post subject: Re: Random Vehicle Skin
PostPosted: Thu Mar 26, 2009 9:28 pm 
Offline

Joined: Mon Oct 09, 2006 12:51 pm
Posts: 782
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.


Top
 Profile Send private message E-mail  
 
 Post subject: Re: Random Vehicle Skin
PostPosted: Thu Mar 26, 2009 9:50 pm 
Offline
User avatar

Joined: Thu Feb 05, 2009 7:54 pm
Posts: 487
Location: Germany
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.

_________________
Kampagne XI - Vereinte Achsenmächte


xFire: wgpsenshi


Top
 Profile Send private message E-mail  
 
 Post subject: Re: Random Vehicle Skin
PostPosted: Wed Apr 01, 2009 12:41 am 
Offline
User avatar

Joined: Fri Oct 03, 2008 4:37 pm
Posts: 513
Location: Levelland, Texas
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

_________________
ImageImage
I have cameras in your head!


Top
 Profile Send private message E-mail  
 
 Post subject: Re: Random Vehicle Skin
PostPosted: Wed Apr 01, 2009 12:46 am 
Offline
User avatar

Joined: Sat May 10, 2008 3:00 am
Posts: 1877
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.

_________________
Image


Top
 Profile Send private message E-mail  
 
 Post subject: Re: Random Vehicle Skin
PostPosted: Wed Apr 01, 2009 12:48 am 
Offline
User avatar

Joined: Fri Oct 03, 2008 4:37 pm
Posts: 513
Location: Levelland, Texas
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

_________________
ImageImage
I have cameras in your head!


Last edited by Apache Thunder on Wed Apr 01, 2009 12:51 am, edited 1 time in total.

Top
 Profile Send private message E-mail  
 
 Post subject: Re: Random Vehicle Skin
PostPosted: Wed Apr 01, 2009 12:49 am 
Offline
User avatar

Joined: Sat May 10, 2008 3:00 am
Posts: 1877
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)

_________________
Image


Top
 Profile Send private message E-mail  
 
 Post subject: Re: Random Vehicle Skin
PostPosted: Wed Apr 01, 2009 12:57 am 
Offline
User avatar

Joined: Fri Oct 03, 2008 4:37 pm
Posts: 513
Location: Levelland, Texas

_________________
ImageImage
I have cameras in your head!


Top
 Profile Send private message E-mail  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 12 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 50 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group