x5 awakening?

06/06/2014 06:09 kamoteshake#1
So I've been trying to have a x5 awakening. I changed the MAX_RANDOM_OPTION to 5 and some other stuff in the randomoption.cpp. I added two more parameter in the randomoption.inc for the x4 and x5 chance. compiled it no problem but when I tested it. I got 3 awakening and a -5 or -10 from the item level. I've been checking the code of deducting level. and I found this.


I've changed those to:

Now I'm getting this
[Only registered and activated users can see links. Click Here To Register...]


can anyone help me with this one? any help is greatly appreciated.. Thank you.
06/06/2014 08:00 alfredico#2
Try with 0x6000000000000000 and 0x12000000000000000
06/06/2014 10:43 Mognakor#3
Instead of trying random things and throwing wild answers, try to analyze what the actual problem is.

Do you even understand how this works? 0x6... and 0x12 is just as wrong as 0x1 and 0x2


As far as i see, adding more than 3 slots to awakenings is not easily possible, as all awakenings are saved in one variable, connected via bit-operations.

To achieve this, the best way would be changing the variable into a array, but this also requires editing the database.
06/06/2014 13:48 kamoteshake#4
that's why im asking for help.. I really dont get it.. I converted 64 to hex. which is 0x40 and 128 which is 0x80 so I thought if I double it up or something. it will give more space for 2 more slots for the awakening. that's why I changed it to 0x100 and 0x200 which is 256 and 512.. but. how will it know it's actually 0x100 and not just 0x1? im really confused. :(
06/06/2014 13:50 Mognakor#5
Please learn how things actually work instead of randomly assuming things.
06/06/2014 14:02 kamoteshake#6
uhmm.. well yeah. how does it work? I thought it's 64 cause there's a comment at the leveling down saying //64. could you tell me how this works?
06/09/2014 18:27 kamoteshake#7
any suggestions on how to get this x5 awakening working? I read about bitwise operation and bit manipulation. and started to try to mess with it again. but still no luck. is it possible to fit 5 awakes + the leveling deduction in just one variable? I was thinking about Mognakor's suggestion of making the variable into an array. but I dont know how to save it to the database and hot to fetch it. any other suggestion? thanks.
06/09/2014 21:14 Mognakor#8
It most likely is not, i'm not even sure if 4 slots work, you need 10 bit per slot just for the awakening amount (+1 +2 +3 etc.) and at least 6 bits for the type (ADOCH, Crit, Movementspeed etc.)

For 3 Slots this sums up to at least 48 Bit of a 64 bit variable, 2 bit are used for leveldown so this leaves 14 bit, which is allready not enough for a 4th slot, even with this optimistic thoughts.
06/09/2014 21:26 kamoteshake#9
yeah. that what I was thinking. so. if imma make the variable into an array. what is the best way of saving it to the database? or make another variable for the other 2 awakes? but I think that's more complicated than making it to an array.