Aller au contenu

Photo

Is there a script that randomly equips armor and weapons from a selected list?


  • Veuillez vous connecter pour répondre
5 réponses à ce sujet

#1
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
Either a stock script or one from the vault.  I'm looking to save time in making large groups of enemies look heterogeneous. 

#2
kamal_

kamal_
  • Members
  • 5 260 messages
If not, it wouldn't be especially hard to do. Take a look at the NpcEquipRight function in my commoner AI/Uncle FB's code. All you'd have to do is make
int nItem = d10();
switch (nItem)
{
case 1: //equips item 1.
.....
}

With that script, they don't even have to have the items in inventory first. The items are created when the function is called. Just put the functionality in their onSpawn script.

Modifié par kamal_, 22 avril 2012 - 12:42 .


#3
Kaldor Silverwand

Kaldor Silverwand
  • Members
  • 1 603 messages
The ginc_item function EquipRandomArmorFromInventory() will equip a random clothing item from inventory. In King's Festival in the module load script I set the campaign level creature spawn modification script to bb_kingsfestival_sp so that everything spawned in with the standard spawn script also goes through my extra logic. In the script I randomize the height, the skin tone, and the clothing of both commoners and thugs. It is easier to put a few variables on your blueprints and then use a script to determine what to do.

Regards

#4
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
Hey, kaldor, that is pretty sweet. I'll check that out!

#5
Morbane

Morbane
  • Members
  • 1 883 messages
I did check it out - the scripting involved is even set up to be expanded upon and easy to understand. The appearances variables are done with .sef files so you may want to either use Kaldors or make your own (for expanding on).

#6
Kaldor Silverwand

Kaldor Silverwand
  • Members
  • 1 603 messages
Yes, the .sef files for the skin tones are all located in the campaign skintones folder. You can easily add others. There are also 17 blueprints (.UTI files) in the campaign folder for various clothing, all start with bb_it_cloth_

Hope it is useful. I find having a campaign spawn script to be pretty useful for a number of things.

Regards