123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354 |
- # npc_set_preference
- !! npc_code = 'A***', 'B***', 'C***', etc.
- !! Full reset of npc preferences:
- !! gs 'npc_set_preference', 'reset', npc_code
- !!
- !! Add a preference to an npc:
- !! gs 'npc_set_preference', $npc_code, $trait, [$amount/amount]
- !! npc_code = 'A12', 'A51', 'B13', 'C1', etc
- !! trait: = 'body_strong', 'cum_face', 'body_tits_big', 'body_ass_bubble', etc.
- !!
- !! you can either use a string or number for amount:
- !! $amount = 'hate', 'dislike', 'neutral', 'like', 'love'
- !! amount is the change in appearance that this preference causes.
- !!
- !! examples:
- !! gs 'npc_set_preference', 'A12', 'body_tits_big', 'like'
- !! gs 'npc_set_preference', 'B1', 'body_bmi_overweight', -50
- if $ARGS[0] = 'reset':
- $npc_preferences[$ARGS[1]] = ''
- end
- !! $ARGS[0] = 'A***', 'B***', 'C***', etc.
- if isnum(mid($ARGS[0], 2)):
- !!Dynamically create the $npc_pref_traits and npc_trait_values arrays
- dynamic $npc_preferences[$ARGS[0]]
- !! Example of these created arrays.
- !!$npc_pref_traits: npc_pref_traits[i] = 'strong'
- !!npc_trait_values: npc_trait_values['strong'] = -15
- if $ARGS[2] = '':
- temp_set_preference_trait_value = ARGS[2]
- else
- !! Translate 'hate, dislike, etc. into a number and store it.'
- temp_set_preference_trait_value = func('npc_set_preference', 'get_value', $ARGS[1], $ARGS[2])
- end
- !! This block of code is here to find the index of the preferences.
- skip_check_preferences_loop = 0
- :check_preference_loop_start
- !! Escape the preference loops if we found the index of the preferences
- if skip_check_preferences_loop = 0:
- if arrsize('$npc_pref_traits') > 0:
- preference_loop_index = 0
- :check_preferences_loop
- if $npc_pref_traits[preference_loop_index] = $ARGS[1]:
- skip_check_preferences_loop = 1
- jump 'check_preference_loop_start'
- end
- preference_loop_index += 1
- if preference_loop_index < arrsize('$npc_pref_traits'): jump 'check_preferences_loop'
- end
- end
- if temp_set_preference_trait_value ! 0:
- if arrsize('$npc_pref_traits') = 0:
- !!replace(..., ' ', '') is there to remove the tabs from the string.
- $npc_preferences[$ARGS[0]] = replace({killvar '$npc_pref_traits'
- killvar 'npc_trait_values'
- $npc_pref_traits[] = } + "'<<$ARGS[1]>>'" + {
- npc_trait_values} + "['<<$ARGS[1]>>'] = <<temp_set_preference_trait_value>>" + {
- }, ' ', '')
- else
- if preference_loop_index < arrsize('$npc_pref_traits'):
- !!The npc already has a preference for the trait.
- !!We overwrite the trait and then escape the preference_loop
- npc_trait_values[$ARGS[1]] = temp_set_preference_trait_value
- !!Rebuild the $npc_pref....[$ARGS[0]] strings from the grounds up
- gs 'npc_set_preference', 'rebuild_preferences', $ARGS[0]
- else
- !!We have checked that the npc has no preference for the trait.
- !!We add the preference to the npc.
- $npc_preferences[$ARGS[0]] += replace({$npc_pref_traits[] = } + "'<<$ARGS[1]>>'" + {
- npc_trait_values} + "['<<$ARGS[1]>>'] = <<temp_set_preference_trait_value>>" + {
- }, ' ', '')
- end
- end
- else
- !! The trait exists and we are setting it to 0. Best just remove it entirely
- if temp_preference_loop_index < arrsize('$npc_pref_traits'):
- killvar '$npc_pref_traits', temp_preference_loop_index
- gs 'shortgs', 'remove_array_element', 'npc_trait_values', $ARGS[1]
- !!Rebuild the $npc_pref....[$ARGS[0]] strings from the grounds up
- gs 'npc_set_preference', 'rebuild_preferences', $ARGS[0]
- end
- end
- killvar '$npc_pref_traits'
- killvar 'npc_trait_values'
- killvar 'preference_loop_index'
- killvar 'temp_set_preference_trait_value'
- end
- !! Called as gs 'npc_set_preference', 'rebuild_preferences', $npc_code
- if $ARGS[0] = 'rebuild_preferences':
- !!Rebuild the $npc_pref....[$ARGS[1]] strings from the grounds up
- $temp_npc_preferences = {killvar '$npc_pref_traits'
- killvar 'npc_trait_values'
- }
- !!Loop over every preference and add it to the $npc_pref....[$ARGS[1]] strings.
- rebuild_preferences_index = 0
- :rebuild_preferences_loop
- $temp_npc_preferences += {$npc_pref_traits[] = } + "'<<$npc_pref_traits[rebuild_preferences_index]>>'" + {
- npc_trait_values} + "['<<$npc_pref_traits[rebuild_preferences_index]>>'] = <<npc_trait_values[rebuild_preferences_index]>>" + {
- }
- rebuild_preferences_index += 1
- if rebuild_preferences_index < arrsize('$npc_pref_traits'): jump 'rebuild_preferences_loop'
- !!Overwrite the $npc_pref....[$ARGS[1]] strings with the rebuild string.
- $npc_preferences[$ARGS[1]] = replace($temp_npc_preferences, ' ', '')
- killvar '$temp_npc_preferences'
- killvar 'rebuild_preferences_index'
- end
- !! Called as gs 'npc_set_preference', 'remove_prefence', $npc_code, $pref_trait
- if $ARGS[0] = 'remove_preference':
- dynamic $npc_preferences[$ARGS[1]]
- if arrsize('$npc_pref_traits') > 0:
- !! Check the position of the preference in the preference array.
- temp_set_preferences_trait_position = arrpos('$npc_pref_traits', $ARGS[2])
- !! If the preference exists:
- if temp_set_preferences_trait_position ! -1:
- !! Remove the preference from the array.
- killvar '$npc_pref_traits', temp_set_preferences_trait_position
- gs 'shortgs', 'remove_array_element', 'npc_trait_values', $ARGS[2]
- !! Then rebuild the dynamic string.
- gs 'npc_set_preference', 'rebuild_preferences', $ARGS[1]
- end
- killvar 'temp_set_preferences_trait_position'
- end
- end
- !!====================================!!
- !! !!
- !! Calculate pref_value !!
- !! !!
- !!====================================!!
- !! gs 'npc_set_preference', 'get_value', $PREFERENCE, $VALUE
- !! $PREFERENCE: body_fit, clothes_style_bimbo, etc.
- !! $VALUE: 'love', 'like', 'neutral', 'dislike', or 'hate'
- if $ARGS[0] = 'get_value':
- temp_pref_values['love'] = 10
- temp_pref_values['like'] = 3
- temp_pref_values['neutral'] = 0
- temp_pref_values['dislike'] = -3
- temp_pref_values['hate'] = -10
- if $ARGS[1] = 'body_bmi_starving':
- temp_pref_values['love'] = 60
- temp_pref_values['like'] = 40
- temp_pref_values['dislike'] = -5
- temp_pref_values['hate'] = -10
- elseif $ARGS[1] = 'body_bmi_underweight':
- temp_pref_values['love'] = 10
- temp_pref_values['like'] = 5
- temp_pref_values['dislike'] = -25
- temp_pref_values['hate'] = -35
- elseif $ARGS[1] = 'body_bmi_normal':
- temp_pref_values['love'] = 5
- temp_pref_values['like'] = 2
- temp_pref_values['dislike'] = -50
- temp_pref_values['hate'] = -70
- elseif $ARGS[1] = 'body_bmi_overweight':
- temp_pref_values['love'] = 10
- temp_pref_values['like'] = 5
- temp_pref_values['dislike'] = -25
- temp_pref_values['hate'] = -35
- elseif $ARGS[1] = 'body_bmi_obese':
- temp_pref_values['love'] = 60
- temp_pref_values['like'] = 40
- temp_pref_values['dislike'] = -5
- temp_pref_values['hate'] = -10
- elseif $ARGS[1] = 'body_skin_bad':
- temp_pref_values['love'] = 2
- temp_pref_values['like'] = 1
- temp_pref_values['dislike'] = -1
- temp_pref_values['hate'] = -2
- elseif $ARGS[1] = 'body_skin_normal':
- temp_pref_values['love'] = 2
- temp_pref_values['like'] = 1
- temp_pref_values['dislike'] = -1
- temp_pref_values['hate'] = -2
- elseif $ARGS[1] = 'body_skin_good':
- temp_pref_values['love'] = 2
- temp_pref_values['like'] = 1
- temp_pref_values['dislike'] = -1
- temp_pref_values['hate'] = -2
- end
- if $ARGS[2] ! '':
- result = temp_pref_values[$ARGS[2]]
- else
- if ARGS[2] = temp_pref_values['neutral']:
- $result = 'neutral'
- elseif ARGS[2] < (temp_pref_values['hate'] + temp_pref_values['dislike']) / 2:
- $result = 'hate'
- elseif ARGS[2] > (temp_pref_values['love'] + temp_pref_values['like']) / 2:
- $result = 'love'
- elseif ARGS[2] < (temp_pref_values['dislike'] + temp_pref_values['neutral']) / 2:
- $result = 'dislike'
- elseif ARGS[2] > (temp_pref_values['like'] + temp_pref_values['neutral']) / 2:
- $result = 'like'
- else
- $result = 'neutral'
- end
- end
- killvar 'temp_pref_values'
- end
- !! Preferences:
- !!
- !! body:
- !! ass:
- !! body_ass_flat
- !! body_ass_average
- !! body_ass_big
- !! body_ass_heart
- !! body_ass_bubble
- !! bmi:
- !! body_bmi_starving
- !! body_bmi_underweight
- !! body_bmi_normal
- !! body_bmi_overweight
- !! body_bmi_obese
- !! eyes:
- !! body_eyes_brown
- !! body_eyes_grey
- !! body_eyes_green
- !! body_eyes_blue
- !! lips:
- !! body_lips_thin
- !! body_lips_normal
- !! body_lips_plump
- !! body_lips_big
- !! body_lips_pillowy
- !! skin:
- !! body_skin_bad
- !! body_skin_normal
- !! body_skin_good
- !! strength:
- !! body_strength_weak
- !! body_strenght_normal
- !! body_strenght_athletic
- !! body_strenght_strong
- !! body_strenght_manly
- !! sweat:
- !! body_sweat_none
- !! body_sweat_sweaty
- !! body_sweat_stinky
- !! tits:
- !! body_tits_small
- !! body_tits_average
- !! body_tits_big
- !! body_tits_huge
- !! body_fit
- !! body_pregnant
- !! body_tan
- !! body_tan_not
- !!
- !! clothes:
- !! exposed:
- !! clothes_exposed_ass
- !! clothes_exposed_bra
- !! clothes_exposed_panties
- !! clothes_exposed_pussy
- !! clothes_exposed_tits
- !! skirt:
- !! clothes_skirt_long
- !! clothes_skirt_normal
- !! clothes_skirt_short
- !! style:
- !! clothes_style_bimbo
- !! clothes_style_goth
- !! clothes_style_punk
- !! clothes_thin
- !!
- !! cosmetics:
- !! cosmetics_deodorant
- !! cosmetics_makeup
- !! cosmetics_piercing
- !! cosmetics_tattoo
- !!
- !! cum:
- !! cum_clothes
- !! cum_face
- !!
- !! hair:
- !! color:
- !! hair_color_black
- !! hair_color_brown
- !! hair_color_red
- !! hair_color_blonde
- !! hair_color_dyed
- !! length:
- !! hair_length_veryshort
- !! hair_length_short
- !! hair_length_chin
- !! hair_length_shoulder
- !! hair_length_bra
- !! hair_length_long
- !! pubes:
- !! hair_pubes_shaven
- !! hair_pubes_grown
- !! hair_pubes_styled
- !! hair_leg
- !! hair_leg_not
- !! hair_curly
- !! hair_straight
- --- npc_set_preference ---------------------------------
|