123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588 |
- # body_structure
- ! Get the bmi-strength class
- ! bs_class = func('body_structure', 'get_class', pcs_bmi, strenbuf)
- if $ARGS[0] = 'get_class':
- ! bmi
- if ARGS[1] < 16:
- result = 0
- elseif ARGS[1] < 19:
- result = 100
- elseif ARGS[1] < 22:
- result = 200
- elseif ARGS[1] < 25:
- result = 300
- elseif ARGS[1] < 30:
- result = 400
- elseif ARGS[1] < 35:
- result = 500
- elseif ARGS[1] < 40:
- result = 600
- elseif ARGS[1] < 45:
- result = 700
- else
- result = 800
- end
- ! strenbuf
- if ARGS[2] <= 5:
- result += 0
- elseif ARGS[2] <= 10:
- result += 1
- elseif ARGS[2] <= 15:
- result += 2
- elseif ARGS[2] <= 25:
- result += 3
- elseif ARGS[2] <= 35:
- result += 4
- elseif ARGS[2] <= 50:
- result += 5
- elseif ARGS[2] <= 70:
- result += 6
- elseif ARGS[2] <= 100:
- result += 7
- elseif ARGS[2] <= 110:
- result += 8
- elseif ARGS[2] <= 120:
- result += 9
- elseif ARGS[2] <= 130:
- result += 10
- elseif ARGS[2] <= 140:
- result += 11
- elseif ARGS[2] <= 150:
- result += 12
- elseif ARGS[2] <= 160:
- result += 13
- elseif ARGS[2] <= 170:
- result += 14
- elseif ARGS[2] <= 180:
- result += 15
- elseif ARGS[2] <= 190:
- result += 16
- else
- result += 17
- end
- end
- if $ARGS[0] = 'body_img_totals':
- if ARGS[0] = 000:
- result = 2
- elseif ARGS[0] = 006:
- result = 2
- elseif ARGS[0] = 100:
- result = 4
- elseif ARGS[0] = 106:
- result = 3
- elseif ARGS[0] = 200:
- result = 2
- elseif ARGS[0] = 206:
- result = 4
- elseif ARGS[0] = 207:
- result = 3
- elseif ARGS[0] = 208:
- result = 1
- elseif ARGS[0] = 210:
- result = 1
- elseif ARGS[0] = 213:
- result = 1
- elseif ARGS[0] = 215:
- result = 1
- elseif ARGS[0] = 300:
- result = 3
- elseif ARGS[0] = 306:
- result = 3
- elseif ARGS[0] = 307:
- result = 1
- elseif ARGS[0] = 308:
- result = 1
- elseif ARGS[0] = 400:
- result = 2
- elseif ARGS[0] = 406:
- result = 2
- elseif ARGS[0] = 500:
- result = 3
- elseif ARGS[0] = 506:
- result = 2
- elseif ARGS[0] = 600:
- result = 1
- elseif ARGS[0] = 700:
- result = 2
- elseif ARGS[0] = 800:
- result = 1
- end
- end
- if $ARGS[0] = 'Body_img_transform':
- if ARGS[1] < 006:
- result = 000
- elseif ARGS[1] < 100:
- result = 006
- elseif ARGS[1] < 106:
- result = 100
- elseif ARGS[1] < 200:
- result = 106
- elseif ARGS[1] < 206:
- result = 200
- elseif ARGS[1] = 206:
- result = 206
- elseif ARGS[1] = 207:
- result = 207
- elseif ARGS[1] < 210:
- result = 208
- elseif ARGS[1] < 213:
- result = 210
- elseif ARGS[1] < 215:
- result = 213
- elseif ARGS[1] < 300:
- result = 215
- elseif ARGS[1] < 306:
- result = 300
- elseif ARGS[1] = 306:
- result = 306
- elseif ARGS[1] = 307:
- result = 307
- elseif ARGS[1] < 310:
- result = 308
- elseif ARGS[1] < 313:
- result = 210
- elseif ARGS[1] < 315:
- result = 213
- elseif ARGS[1] < 400:
- result = 215
- elseif ARGS[1] < 406:
- result = 400
- elseif ARGS[1] < 500:
- result = 406
- elseif ARGS[1] < 506:
- result = 500
- elseif ARGS[1] < 600:
- result = 506
- elseif ARGS[1] < 700:
- result = 600
- elseif ARGS[1] < 800:
- result = 700
- else
- result = 800
- end
- end
- ! ARGS[1] = bs_class
- if $ARGS[0] = 'default_set_class_transform':
- result = ARGS[1]
- if cheatVars['fix_bi_set'] mod 10 = 0:
- result = 100 * (result / 100) + 2
- elseif cheatVars['fix_bi_set'] mod 10 = 1:
- result = 100 * (result / 100) + 6
- elseif cheatVars['fix_bi_set'] mod 10 = 2:
- result = 100 * (result / 100) + 8
- end
- if cheatVars['fix_bi_set'] / 10 mod 10 ! 9:
- result = (cheatVars['fix_bi_set'] / 10 mod 10) * 100 + result mod 100
- end
- end
- ! Get the body shape image
- ! $bodyVars['img'] = func('body_structure', 'body_img', pcs_bmi, strenbuf, PregChem)
- if $ARGS[0] = 'body_img':
- if arrsize('ARGS') = 1: ARGS[1] = pcs_bmi
- if arrsize('ARGS') = 2: ARGS[2] = strenbuf
- if arrsize('ARGS') = 3: ARGS[3] = PregChem
- ! ======= Pregnant ======= !
- if cheatVars['fix_bodyimg'] = 0 and (knowpreg = 1 or (preg = 1 and (thinkpreg = 1 or ARGS[3] > 3600))):
- if ARGS[3] <= 2687:
- $result = 'images/pc/body/shape/preg/0/0.jpg'
- elseif ARGS[3] <= 6215:
- $result = 'images/pc/body/shape/preg/0/<<((ARGS[3] - 2184)/504)>>.jpg'
- else
- $result = 'images/pc/body/shape/preg/0/8.jpg'
- end
- exit
- end
- bs_temp_bs_class = func('body_structure', 'get_class', ARGS[1], ARGS[2])
- if cheatVars['fix_bodyimg'] = 1:
- if cheatVars['fix_bi_set'] < 10:
- $result = func('body_structure', 'custom_body_img', bs_temp_bs_class)
- killvar 'bs_temp_bs_class'
- exit
- else
- bs_temp_bs_class = func('body_structure', 'default_set_class_transform', bs_temp_bs_class)
- end
- end
- $result = func('body_structure', 'body_img_from_class', bs_temp_bs_class)
- killvar 'bs_temp_bs_class'
- end
- if $ARGS[0] = 'body_img_from_class':
- $result = 'images/pc/body/shape/'
- ARGS[1] = func('body_structure', 'Body_img_transform', ARGS[1])
- if ARGS[1] < 100:
- $result += '0_starving/'
- elseif ARGS[1] < 200:
- $result += '1_underweight/'
- elseif ARGS[1] < 300:
- $result += '2_slender/'
- elseif ARGS[1] < 400:
- $result += '3_healthy/'
- elseif ARGS[1] < 500:
- $result += '4_overweight/'
- elseif ARGS[1] < 600:
- $result += '5_modobese/'
- elseif ARGS[1] < 700:
- $result += '6_sevobese/'
- elseif ARGS[1] < 800:
- $result += '7_vsevobese/'
- else
- $result += '8_morobese/'
- end
- if ARGS[1] mod 100 = 0:
- $result += '0_low_'
- elseif ARGS[1] mod 100 = 6:
- $result += '6_mid_'
- elseif ARGS[1] mod 100 = 7:
- $result += '7_high_'
- elseif ARGS[1] mod 100 = 8:
- $result += '8_strong_'
- elseif ARGS[1] mod 100 = 10:
- $result += '10_vstrong_'
- elseif ARGS[1] mod 100 = 13:
- $result += '13_bbuilder_'
- elseif ARGS[1] mod 100 = 15:
- $result += '15_hulk_'
- end
- temp_img_totals = func('body_structure', 'body_img_totals', ARGS[1])
- if arrsize('ARGS') <= 2:
- temp_img_chosen = rand(0, temp_img_totals-1)
- elseif ARGS[2] < 0:
- temp_img_chosen = 0
- elseif ARGS[2] < temp_img_totals:
- temp_img_chosen = ARGS[2]
- else
- temp_img_chosen = temp_img_totals - 1
- end
- $result += '<<temp_img_chosen>>.jpg'
- killvar 'temp_img_totals'
- killvar 'bs_temp_bs_class'
- end
- if $ARGS[0] = 'custom_body_img':
- ARGS[1] = ARGS[1] / 100
- $temp_img_name = $cheatVars['fix_biset_<<cheatVars[''fix_bi_set'']>>_img_<<ARGS[1]>>']
- if $temp_img_name = '':
- $result = func('body_structure', 'body_img_from_class', ARGS[1] * 100)
- killvar '$temp_img_name'
- exit
- end
- $temp_base_folder = 'images/pc/body/shape/' + $cheatVars['fix_biset_<<cheatVars[''fix_bi_set'']>>_folder']
- $result = '<<$temp_base_folder>>/<<$temp_img_name>>.jpg'
- killvar '$temp_base_folder'
- killvar '$temp_img_name'
- end
- ! Get the body description
- ! $bodyVars['desc'] = func('body_structure', 'body_desc', pcs_bmi, strenbuf, PregChem)
- if $ARGS[0] = 'body_desc':
- if arrsize('ARGS') = 1: ARGS[1] = pcs_bmi
- if arrsize('ARGS') = 2: ARGS[2] = strenbuf
- if arrsize('ARGS') = 3: ARGS[3] = PregChem
- if knowpreg = 1 or (preg = 1 and (thinkpreg = 1 or ARGS[3] > 3600)):
- if ARGS[3] <= 2687:
- $result = 'pregnant, but not showing'
- elseif ARGS[3] <= 3191:
- $result = 'glowing'
- elseif ARGS[3] <= 3695:
- $result = 'starting to show'
- elseif ARGS[3] <= 4199:
- $result = 'clearly showing'
- elseif ARGS[3] <= 4703:
- $result = 'fairly pregnant'
- elseif ARGS[3] <= 5207:
- $result = 'quite pregnant'
- elseif ARGS[3] <= 5711:
- $result = 'very pregnant'
- elseif ARGS[3] <= 6215:
- $result = 'extremely pregnant'
- else
- $result = 'ready to pop'
- end
- exit
- end
- bs_temp_bs_class = func('body_structure', 'get_class', ARGS[1], ARGS[2])
- if cheatVars['fix_bodyimg'] = 1:
- if cheatVars['fix_bi_set'] < 10:
- $result = func('body_structure', 'custom_body_desc', bs_temp_bs_class)
- killvar 'bs_temp_bs_class'
- exit
- else
- bs_temp_bs_class = func('body_structure', 'default_set_class_transform', bs_temp_bs_class)
- end
- end
- $result = func('body_structure', 'body_desc_from_class', bs_temp_bs_class)
- killvar 'bs_temp_bs_class'
- end
- if $ARGS[0] = 'body_desc_from_class':
- ! ======= starving ======= !
- ! ----- bmi < 16 ----- !
- if ARGS[1] <= 17:
- ! 0 <= strenbuf <= 200
- $result = 'starving'
- ! ======= underweight ======= !
- ! ----- 16 <= bmi < 19 ----- !
- elseif ARGS[1] <= 105:
- ! 0 <= strenbuf <= 50
- $result = 'underweight'
- elseif ARGS[1] <= 107:
- ! 51 <= strenbuf <= 100
- $result = 'slight'
- elseif ARGS[1] <= 117:
- ! 101 <= strenbuf <= 200
- $result = 'wiry'
- ! ======= slender ======= !
- ! ----- 19 <= bmi < 22 ----- !
- elseif ARGS[1] <= 205:
- ! 0 <= strenbuf <= 50
- $result = 'slender'
- elseif ARGS[1] <= 207:
- ! 51 <= strenbuf <= 100
- $result = 'skinny'
- elseif ARGS[1] <= 217:
- ! 101 <= strenbuf <= 200
- $result = 'lean'
- ! ======= healthy ======= !
- ! ----- 22 <= bmi < 25 ----- !
- elseif ARGS[1] <= 305:
- ! 0 <= strenbuf <= 50
- $result = 'healthy'
- elseif ARGS[1] <= 307:
- ! 51 <= strenbuf <= 100
- $result = 'toned'
- elseif ARGS[1] <= 317:
- ! 101 <= strenbuf <= 200
- $result = 'ripped'
- ! ======= overweight ======= !
- ! ----- 26 <= bmi < 30 ----- !
- elseif ARGS[1] <= 405:
- ! 0 <= strenbuf <= 50
- $result = 'overweight'
- elseif ARGS[1] <= 407:
- ! 51 <= strenbuf <= 100
- $result = 'curvy'
- elseif ARGS[1] <= 417:
- ! 101 <= strenbuf <= 200
- $result = 'heavy set'
- ! ======= moderately obese ======= !
- ! ----- 30 <= bmi < 35 ----- !
- elseif ARGS[1] <= 517:
- ! 0 <= strenbuf <= 200
- $result = 'moderately obese'
- ! ======= severely obese ======= !
- ! ----- 35 <= bmi < 40 ----- !
- elseif ARGS[1] <= 617:
- ! 0 <= strenbuf <= 200
- $result = 'severely obese'
- ! ======= very severely obese ======= !
- ! ----- 40 <= bmi < 45 ----- !
- elseif ARGS[1] <= 717:
- ! 0 <= strenbuf <= 200
- $result = 'very severely obese'
- ! ======= morbidly obese ======= !
- ! ----- 45 <= bmi ----- !
- else
- ! 0 <= strenbuf <= 200
- $result = 'morbidly obese'
- end
- end
- if $ARGS[0] = 'custom_body_desc':
- ARGS[1] = ARGS[1] / 100
- $temp_bs_body_desc = $cheatVars['fix_biset_<<cheatVars[''fix_bi_set'']>>_desc_<<ARGS[1]>>']
- if $temp_bs_body_desc = '':
- $temp_bs_body_desc = func('body_structure', 'body_desc_from_class', ARGS[1] * 100)
- end
- $result = $temp_bs_body_desc
- killvar '$temp_bs_body_desc'
- end
- ! Get the bmi description:
- ! $bodyVars['bmi_desc'] = func('body_structure', pcs_bmi)
- if $ARGS[0] = 'bmi_desc':
- if arrsize('ARGS') = 1: ARGS[1] = pcs_bmi
- bs_temp_bs_class = func('body_structure', 'get_class', ARGS[1], 30)
- $result = func('body_structure', 'bmi_desc_from_class', bs_temp_bs_class)
- killvar 'bs_temp_bs_class'
- end
- if $ARGS[0] = 'bmi_desc_from_class':
- if ARGS[1] < 100:
- $result = 'You are severely underweight.'
- elseif ARGS[1] < 200:
- $result = 'You are underweight'
- elseif ARGS[1] < 300:
- $result = 'You have a normal, healthy weight.'
- elseif ARGS[1] < 400:
- $result = 'You have a normal, healthy weight.'
- elseif ARGS[1] < 500:
- $result = 'You are overweight.'
- elseif ARGS[1] < 600:
- $result = 'You are moderately obese.'
- elseif ARGS[1] < 700:
- $result = 'You are severely obese.'
- elseif ARGS[1] < 800:
- $result = 'You are very severely obese.'
- else
- $result = 'You are morbidly obese.'
- end
- end
- ! Get the appearance bonus
- ! Appearance_bonus = func('body_structure', 'appearance_bonus', pcs_bmi, strenbuf)
- if $ARGS[0] = 'appearance_bonus':
- if arrsize('ARGS') = 1: ARGS[1] = pcs_bmi
- if arrsize('ARGS') = 2: ARGS[2] = strenbuf
- bs_temp_bs_class = func('body_structure', 'get_class', ARGS[1], ARGS[2])
- result = func('body_structure', 'appearance_bonus_from_class', bs_temp_bs_class)
- killvar 'bs_temp_bs_class'
- end
- if $ARGS[0] = 'appearance_bonus_from_class':
- if ARGS[1] < 100:
- ! starving: bmi < 16
- result = -10
- elseif ARGS[1] < 200:
- ! underweight: 16 <= bmi < 16
- result = 25
- elseif ARGS[1] < 300:
- ! slender: 19 <= bmi < 21
- result = 50
- elseif ARGS[1] < 400:
- ! healthy: 21 <= bmi < 25
- result = 50
- elseif ARGS[1] < 500:
- ! overweight: 26 <= bmi < 30
- result = 25
- elseif ARGS[1] < 600:
- ! moderately obese: 30 <= bmi < 35
- result = 10
- elseif ARGS[1] < 700:
- ! severely obese: 35 <= bmi < 40
- result = -15
- elseif ARGS[1] < 800:
- ! very severely obese: 40 <= bmi < 45
- result = -40
- else
- ! morbidly obese: 45 <= bmi
- result = -80
- end
- ARGS[1] = ARGS[1] mod 100
- if ARGS[1] = 0:
- ! 0 <= strenbuf <= 5
- result -= 30
- elseif ARGS[1] = 1:
- ! 5 < strenbuf <= 10
- result -= 20
- elseif ARGS[1] = 2:
- ! 10 < strenbuf <= 15
- result -= 15
- elseif ARGS[1] = 3:
- ! 15 < strenbuf <= 25
- result -= 10
- elseif ARGS[1] = 4:
- ! 25 < strenbuf <= 35
- result -= 5
- elseif ARGS[1] = 5:
- ! 35 < strenbuf <= 50
- result += 0
- elseif ARGS[1] = 6:
- ! 50 < strenbuf <= 70
- result += 5
- elseif ARGS[1] = 7:
- ! 70 < strenbuf <= 100
- result += 10
- elseif ARGS[1] = 8:
- ! 100 < strenbuf <= 110
- result += 5
- elseif ARGS[1] = 9:
- ! 110 < strenbuf <= 120
- result += 0
- elseif ARGS[1] = 10:
- ! 120 < strenbuf <= 130
- result -= 5
- elseif ARGS[1] = 11:
- ! 130 < strenbuf <= 140
- result -= 15
- elseif ARGS[1] = 12:
- ! 140 < strenbuf <= 150
- result -= 30
- elseif ARGS[1] = 13:
- ! 150 < strenbuf <= 160
- result -= 45
- elseif ARGS[1] = 14:
- ! 160 < strenbuf <= 170
- result -= 60
- elseif ARGS[1] = 15:
- ! 170 < strenbuf <= 180
- result -= 75
- elseif ARGS[1] = 16:
- ! 180 < strenbuf <= 190
- result -= 100
- else
- ! 190 < strenbuf <= 200
- result -= 130
- end
- end
- --- body_structure ---------------------------------
|