View Single Post
Old June 17, 2012, 01:05   #8
ekolis
Knight
 
ekolis's Avatar
 
Join Date: Apr 2007
Location: Cincinnati, OH, USA
Age: 35
Posts: 911
ekolis is on a distinguished road
Send a message via AIM to ekolis Send a message via MSN to ekolis Send a message via Yahoo to ekolis
Quote:
Originally Posted by Narvius View Post
Make it one option per bit in the number. xD
Heh, reminds me of something I did in a Space Empires 5 mod... I wanted to assign rankings to a bunch of weapons (low tech weapons get low rankings, high tech weapons get high rankings, but the ranking is also affected by whether the weapon is light or heavy) so that the higher-ranked weapons require more research into weapon enhancement techs (heavy mount, extended range, etc.) to be able to use the enhancements.

But apparently the requirements formulas for the enhancements wouldn't let me grab the value of some arbitrary ability from the weapons, only whether or not they HAD the arbitrary ability or not, so I couldn't assign the rankings directly!

So what did I do? Since I happened to need four rankings, I used two separate abilities, and in the requirements formula, I took a zero, and added one if the first ability was present, and added two if the second ability was present. Then I compared that to the level of the weapon enhancement, and if the weapon enhancement level is greater than the sum I just calculated (which was the ranking which I couldn't set directly) then the requirement succeeds (can use this enhancement on this weapon), otherwise it fails (can't use this enhancement on this weapon)!
__________________
You read the scroll labeled NOBIMUS UPSCOTI...
You are surrounded by a stasis field!
The tengu tries to teleport, but fails!
ekolis is offline   Reply With Quote