Jelajahi Sumber

[fixed] npc_rel for the school related npcs are now set from variables in npcstatic instead of using 'gschool_lessons', 'npc_data'

CroWke 5 tahun lalu
induk
melakukan
65b6fc0526
2 mengubah file dengan 48 tambahan dan 54 penghapusan
  1. 43 48
      locations/preSYS.qsrc
  2. 5 6
      locations/preSYS2.qsrc

+ 43 - 48
locations/preSYS.qsrc

@@ -40,14 +40,8 @@ if $ARGS[0] = 'CSBStart':
 	gs 'npcstatic4'
 	gs 'npcstatic5'
 	
-	gs 'gschool_lessons', 'npc_data'
-
-	r = 1
-	:default_friendship_loop
-	$school_static_num = $school_static_num[r]
-	if grupTipe[r] ! 5:npc_rel[$school_static_num] = 30
-	r += 1
-	if r <= 65:jump 'default_friendship_loop'
+	! Set all schoolkids to 30 rel except for outcasts
+	gs 'preSYS', 'defaultfriendship'
 
 	npc_rel['A11'] = 40
 	npc_rel['A28'] = 60
@@ -367,15 +361,10 @@ if $ARGS[0] = 'SGStart3':
 	npc_rel['A33'] = 70
 	npc_rel['A34'] = 50
 
-	gs 'gschool_lessons', 'npc_data'
+	!gs 'gschool_lessons', 'npc_data'
 
 !!default friendship is 30 for all students, except Vasily Shulgin who starts at 60
-	r = 1
-	:default_friendship_loop1
-	$school_static_num = $school_static_num[r]
-	if grupTipe[r] ! 5:npc_rel[$school_static_num] = 30
-	r += 1
-	if r <= 65:jump 'default_friendship_loop1'
+	gs 'preSYS', 'defaultfriendship'
 
 	npc_rel['A11'] = 60
 
@@ -1270,22 +1259,21 @@ if $ARGS[0] = 'socialgroup_setting':
 	if ARGS[6] ! 0:grup5 = ARGS[6]
 	r = 1
 	:socialgroup_loop
-	$school_static_num = $school_static_num[r]
-	if grupTipe[r] = 1 and grup0 ! 0:
-		npc_rel[$school_static_num] += grup0
-	elseif grupTipe[r] = 2 and grup1 ! 0:
-		npc_rel[$school_static_num] += grup1
-	elseif grupTipe[r] = 3 and grup2 ! 0:
-		npc_rel[$school_static_num] += grup2
-	elseif grupTipe[r] = 4 and grup3 ! 0:
-		npc_rel[$school_static_num] += grup3
-	elseif grupTipe[r] = 5 and grup4 ! 0:
-		npc_rel[$school_static_num] += grup4
-	elseif grupTipe[r] = 6 and grup5 ! 0:
-		npc_rel[$school_static_num] += grup5
-	end
-	r += 1
-	if r <= 65:jump 'socialgroup_loop'
+		if npc_grupTipe['A<<r>>'] = 1 and grup0 ! 0:
+			npc_rel['A<<r>>'] += grup0
+		elseif npc_grupTipe['A<<r>>'] = 2 and grup1 ! 0:
+			npc_rel['A<<r>>'] += grup1
+		elseif npc_grupTipe['A<<r>>'] = 3 and grup2 ! 0:
+			npc_rel['A<<r>>'] += grup2
+		elseif npc_grupTipe['A<<r>>'] = 4 and grup3 ! 0:
+			npc_rel['A<<r>>'] += grup3
+		elseif npc_grupTipe['A<<r>>'] = 5 and grup4 ! 0:
+			npc_rel['A<<r>>'] += grup4
+		elseif npc_grupTipe['A<<r>>'] = 6 and grup5 ! 0:
+			npc_rel['A<<r>>'] += grup5
+		end
+		r += 1
+	if r <= aarraynumber :jump 'socialgroup_loop'
 end
 
 if $ARGS[0] = 'socialgroup_setting_boys':
@@ -1303,24 +1291,31 @@ if $ARGS[0] = 'socialgroup_setting_boys':
 	if ARGS[6] ! 0:grup5 = ARGS[6]
 	r = 1
 	:socialgroup2_loop
-	$school_static_num = $school_static_num[r]
-	if npcPol[r] = 0:
-		if grupTipe[r] = 1 and grup0 ! 0:
-			npc_rel[$school_static_num] += grup0
-		elseif grupTipe[r] = 2 and grup1 ! 0:
-			npc_rel[$school_static_num] += grup1
-		elseif grupTipe[r] = 3 and grup2 ! 0:
-			npc_rel[$school_static_num] += grup2
-		elseif grupTipe[r] = 4 and grup3 ! 0:
-			npc_rel[$school_static_num] += grup3
-		elseif grupTipe[r] = 5 and grup4 ! 0:
-			npc_rel[$school_static_num] += grup4
-		elseif grupTipe[r] = 6 and grup5 ! 0:
-			npc_rel[$school_static_num] += grup5
+		if npc_gender['A<<r>>'] = 0:
+			if npc_grupTipe['A<<r>>'] = 1 and grup0 ! 0:
+				npc_rel['A<<r>>'] += grup0
+			elseif npc_grupTipe['A<<r>>'] = 2 and grup1 ! 0:
+				npc_rel['A<<r>>'] += grup1
+			elseif npc_grupTipe['A<<r>>'] = 3 and grup2 ! 0:
+				npc_rel['A<<r>>'] += grup2
+			elseif npc_grupTipe['A<<r>>'] = 4 and grup3 ! 0:
+				npc_rel['A<<r>>'] += grup3
+			elseif npc_grupTipe['A<<r>>'] = 5 and grup4 ! 0:
+				npc_rel['A<<r>>'] += grup4
+			elseif npc_grupTipe['A<<r>>'] = 6 and grup5 ! 0:
+				npc_rel['A<<r>>'] += grup5
+			end
 		end
-	end
-	r += 1
-	if r <= 65:jump 'socialgroup2_loop'
+		r += 1
+	if r <= aarraynumber :jump 'socialgroup2_loop'
+end
+
+if $ARGS[0] = 'defaultfriendship':
+	r = 1
+	:default_friendship_loop
+		if npc_grupTipe['A<<r>>'] = 1 or npc_grupTipe['A<<r>>'] = 2 or npc_grupTipe['A<<r>>'] = 3 or npc_grupTipe['A<<r>>'] = 4 or npc_grupTipe['A<<r>>'] = 5: npc_rel['A<<r>>'] = 30
+		r += 1
+	if r <= aarraynumber :jump 'default_friendship_loop'
 end
 
 --- preSYS ---------------------------------

+ 5 - 6
locations/preSYS2.qsrc

@@ -795,12 +795,11 @@ if $ARGS[0] = 'pol_grup_set':
 	!!ARGS[1] 0 is boys, 1 is girls. ARGS[2] 1nerd 2jock 3cool 4gopnik 5outcast 6teachers. ARGS[3] is changes to value
 	r = 1
 	:pol_grup_set_loop
-	$school_static_num = $school_static_num[r]
-	if npcPol[r] = ARGS[1] and grupTipe[r] = ARGS[2]:
-		npc_rel[$school_static_num] = ARGS[3]
-	end
-	r += 1
-	if r <= 61:jump 'pol_grup_set_loop'
+		if npc_gender['A<<r>>'] = ARGS[1] and grupTipe['A<<r>>'] = ARGS[2]:
+			npc_rel['A<<r>>'] = ARGS[3]
+		end
+		r += 1
+	if r <= aarraynumber :jump 'pol_grup_set_loop'
 end
 
 --- preSYS2 ---------------------------------