Welcome Guest ( Log In / Register ) |
Quick Lists Top RatedTutorials Living World Map G… Ultimate beginner'… Arrow scaling bug… Raising Heroes max… Creating an asset.… Proper Fire Arrow… Simple Structure B… Making a simple Ma… Quick and easy sno… Making patrols nea… Mods The Dwarf Holds The Peloponnesian… RJ - RotWK The Elven Alliance… Helm's Deep Last H… The Elven Alliance Special Extended E… Kings of the West… RC Mod The Wars of Arda Downloads BFME1 1.06 Widescr… Enhanced W3D Impor… Fudge's Map Pack LotR/BfME HD Logos Osgiliath Shellmap Crystals Of Ancien… 2v1 Wold The forests of Dru… Converted BFME2 an… ROTWK animations f… |
|||||||||||||||||||||||||||||
Register and log in to move these advertisements down Easy reskin and random skin codingTutorial for BFME, BFME 2, ROTWK
I have been using 2 very useful pieces of code lately that help in randomising units and reskining, so I thought I'd make a double mini tutorial for beginner coders. Hope this helps out those starting off and anyone else. RandomTexture The first is probably well known to a lot of experienced coders, the all powerful RandomTexture code. This line of code is used to add random textures to units which is why the Rohirrim units look different. It is a very common code but it can also be used to reskin units without adding a new model or replacing the original art. First up make your skin. For the purposes of this tutorial I'll use Legolas as an example. Once you've made the skin, add it to the game with the usual method (if you don't know how there are plenty of tutorials here). Now go to legolas.ini and add the following code to the Draw Module, preferably above the DefaultModel line so it is easy to find.
The game will now replace the original texture with your new one, without the need to edit a model or create a new one. To randomise between textures simply add multiple copies as follows:
Random Object I was recently going through the ent coding when I found this. I had known about the Ent variation coding. I found a great use for it so I thought post it up. This is very simple but very useful code I have often overlooked, as have others, but this code is very useful for randomising hordes, heroes, buildings and units. The way this code works is setting a unit that can build different units from one button. This allows the different versions of the ents and also the peasants. It also works for heroes and I imagine also for buildings. It'ss useful if you want to make alternate versions of a hero or unit and have them randomised. Rather then just using different skins you can have to very different units or heroes for instance. I used this to build 2 different versions of Thranduil for the Lone Wolf Mod. One uses a bow the other using melee this also allows you to have different buttons for each version. I've named the object 'dummy'. First up it's good to have a model there so it will show up in World Builder (the randomisation only happens in the game, in WB you just see the main object). The ent coding for the object didn't have a buttonimage so make sure you add one so it will show up in Worldbuilder. If you are making a Hero making sure it has the HERO KindOf. In the BuildVariation line add the name of the Heroes/Units you want to use. By adding the Dummy to BuildableHeroes Line in PlayerTemplate.ini it will now randomise between the BuildVariations, or if you are making a unit build the unit from a button. This should also work for building Hordes (haven't tested that yet) and the coding should also work for units going into a horde. Just add the unit to the horde, which will be good if you want use different animations for a unit, like having some units use a Sword and Shield and others an axe, and possibly combining different tyoes of units in one horde, like Pikes and Melee or Crossbows and Archers. I should also mention with the BuildVariation units/Heroes if you want the unit to count as the same unit/Hero as the other versions add this line to your coding.
Here is the example code for the main object
CommentsDisplay order: Newest first drogoth232 - Tuesday July 28, 2009 - 10:29 Thanks Rad I use it for every new model I acquire which has no skin. The Dark Lord of Mordor - Thursday May 28, 2009 - 20:15 interesting LinkFan (Banned) - Sunday August 3, 2008 - 11:59 Really Nice tutorial!!! :) jimiojoe - Sunday October 14, 2007 - 7:54 oooh Bart (Administrator) - Tuesday April 24, 2007 - 1:32 Nice tutorial, but next time please try to use proper markup, interpunction and capitalisation ;-) I edited it for you. |
|||||||||||||||||||||||||||||
"One site to rule them all, one site to find them, © All Rights Reserved Eric Edwards ©2013. |