Bläddra i källkod

Merge remote-tracking branch 'Anjuna/master'

Kevin_Smarts 7 månader sedan
förälder
incheckning
f3c83cb307
2 ändrade filer med 24 tillägg och 5 borttagningar
  1. 4 4
      locations/npc_set_preference.qsrc
  2. 20 1
      locations/set_npc_attraction.qsrc

+ 4 - 4
locations/npc_set_preference.qsrc

@@ -178,11 +178,11 @@ end
 !!		$VALUE: 'love', 'like', 'neutral', 'dislike', or 'hate'
 
 if $ARGS[0] = 'get_value':
-	temp_pref_values['love']    = 15
-	temp_pref_values['like']    = 5
+	temp_pref_values['love']    = 10
+	temp_pref_values['like']    = 3
 	temp_pref_values['neutral'] = 0
-	temp_pref_values['dislike'] = -5
-	temp_pref_values['hate']    = -15
+	temp_pref_values['dislike'] = -3
+	temp_pref_values['hate']    = -10
 
 	if $ARGS[1] = 'body_bmi_starving':
 		temp_pref_values['love']    = 60

+ 20 - 1
locations/set_npc_attraction.qsrc

@@ -1,5 +1,17 @@
 # set_npc_attraction
 
+!! set_npc_attraction function.
+!! 
+!! Modify the attraction (analogous to appearance) and relative hotcat (analogous to hotcat) using the various preferences (set in npc_set_preference, standard preferences set in npcstatic stored in npc_standard_preferences)
+!! How to use:
+!! gs 'set_npc_attraction', $npc_code, max_hotcat_change
+!!     $npc_code: the code of the npc for which we calculate. Examles: 'A12', 'B3', 'C13'
+!!     max_hotcat_change: the maximum difference between npc_rel_hotcat and normal hotcat.
+!!         Defaults to 2. When set negative, it is unbounded instead.
+!!
+!! Sets the npc_attraction[$npc_code] and npc_rel_hotcat[$npc_code] variables
+
+
 !! We start with the player''s appearance and add modifiers based on the npc''s preferences.
 npc_attraction[$ARGS[0]] = pcs_apprnc
 
@@ -29,7 +41,6 @@ killvar 'npc_trait_values'
 killvar 'preferences_loop_start'
 
 
-
 if npc_attraction[$ARGS[0]] <= 40:
 	npc_rel_hotcat[$ARGS[0]] = 1
 
@@ -61,6 +72,14 @@ else
 	npc_rel_hotcat[$ARGS[0]] = 10
 end
 
+if ARGS[1] = 0: ARGS[1] = 2
+if ARGS[1] > 0:
+	if npc_rel_hotcat[$ARGS[0]] - hotcat > ARGS[1]:
+		npc_rel_hotcat[$ARGS[0]] = hotcat + ARGS[1]
+	elseif hotcat - npc_rel_hotcat > ARGS[1]:
+		npc_rel_hotcat[$ARGS[0]] = hotcat - ARGS[1]
+	end
+end