Jump to content


Photo

Applying random effects to .CRE files


1 reply to this topic

#1 subtledoctor

subtledoctor
  • Modders
  • 1949 posts
  • Gender:Male

Posted 12 March 2017 - 04:16 PM

I have five fighter combat techniques - two melee hit effects, and three AC bonuses (vs. different weapon types). The player can learn the techniques over the course of the game, but I would like to simulate enemy creatures knowing the techniques and using them against the player.

Easy enough with ADD_CRE_EFFECT, since the techniques all consist of permanent spell effects. So I want to go through every .CRE and, if the class = fighter, apply one of these five effects.

Should I just repeat a counter from 1 to 5 as Weidu goes over each .CRE, so that the randomness is down the the alphabetical sorting of the files? Or is there is way to actually randomly pick one of the five effects for each .CRE?

Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE


#2 argent77

argent77
  • Modders
  • 616 posts
  • Gender:Male

Posted 12 March 2017 - 04:21 PM

You can also use WeiDU's RANDOM function.





Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users