Browse Source

[cahnged] New exp calculations. Be prepared to a much slower increase in stats. Any feed back will be appriciated.

bgkjdgbizgblzdgbr 1 month ago
parent
commit
83825ae484
4 changed files with 55 additions and 10 deletions
  1. 6 2
      locations/exp_gain.qsrc
  2. 2 2
      locations/saveg.qsrc
  3. 41 0
      locations/saveupdater.qsrc
  4. 6 6
      locations/stat_sklattrib.qsrc

+ 6 - 2
locations/exp_gain.qsrc

@@ -55,8 +55,12 @@ if ARGS[1] > 0:
 		end
 	end
 
-!!	EXP Assignment
-	dynamic "<<$ARGS[0]>>_exp += <<ARGS[1]>>"
+!!	EXP Assignment. If at max just extends the period before degeneration of the stat starts.
+	if dyneval('RESULT = <<$ARGS[0]>>_lvl ') < dyneval('RESULT = 100 + <<$ARGS[0]>>_muta'):
+		dynamic "<<$ARGS[0]>>_exp += <<ARGS[1]>>"
+	else
+		dynamic "<<$ARGS[0]>>_deg = 2 + <<$ARGS[0]>>_muta"
+	end
 end
 
 --- exp_gain ---------------------------------

+ 2 - 2
locations/saveg.qsrc

@@ -15,7 +15,7 @@
 
 version_major = 0
 version_minor = 9
-version_revision = 2
-version_patch = 2
+version_revision = 3
+version_patch = 0
 --- saveg ---------------------------------
 

+ 41 - 0
locations/saveupdater.qsrc

@@ -2624,6 +2624,47 @@ end
 
 !!------------------------------------!!Version 0.9.3.0!!-----------------------------------------------!!
 if temp_current_save_version < 00090300:
+	!!updates the exp to the new scale so you don''t go down in stat
+	gs 'stat_sklattrib'
+
+	i = 0 & x = 1
+	:rstloop
+	expadj = func('_difficulty','getexpadj')	
+	tl = 0
+	:trtrstloop
+	tltp = 0
+	:trtrstinsdlp
+!!	Note this loop is done with a flag set in the dynamic that is checked outside; this is because testing showed inconsistent results when jumping from inside the dynamic and with the whole loop in the dynamic.
+	dynamic "
+		if <<$traitattskl[tl]>> > 0 and <<$traitattskl[tl]>>[tltp + 1] = x and <<$traitattskl[tl]>>[tltp + 2] = i and <<$traitattskl[tl]>>[tltp + 3] ! 0: expadj += <<$traitattskl[tl]>>[tltp + 3]
+		if <<$traitattskl[tl]>>[tltp + 11] ! 0: insdlpflag = 1
+		"
+	if insdlpflag = 1: tltp += 10 & insdlpflag = 0 & jump 'trtrstinsdlp'
+	tl += 1
+	if tl < arrsize ('$traitattskl'): jump 'trtrstloop'
+	killvar 'tl' & killvar 'tltp' & killvar 'insdlpflag'
+
+	if x = 1:
+		$attskltmp = $att_name[i]
+	else
+		$attskltmp = $skl_name[i]
+	end
+
+	dynamic "
+		if <<$attskltmp>>_lvl > 0:
+			<<$attskltmp>>_exp -= (expadj * (<<$attskltmp>>_lvl - 1) * (<<$attskltmp>>_lvl - 1) / 180) 
+			<<$attskltmp>>_exp += (expadj *73* (<<$attskltmp>>_lvl - 1) * (<<$attskltmp>>_lvl - 1) / 2730) 
+			<<$attskltmp>>_mem = <<$attskltmp>>_exp
+		end
+	"
+	killvar 'expadj' & killvar '$attskltmp'
+	i += 1
+	if (x = 1 and i < arrsize ('$att_name')) or (x = 2 and i < arrsize ('$skl_name')): jump 'rstloop'
+	i = 0 & x += 1
+	if x < 3: jump 'rstloop'
+	killvar 'i' & killvar 'x'
+
+
 	!! Drugs variable migration
 	if NarkImmune				> 0:	drugVars['cheat_immune']			= NarkImmune			& killvar 'NarkImmune'
 	if SNarkPriton				> 0:	drugVars['city_drugden']			= SNarkPriton			& killvar 'SNarkPriton'

+ 6 - 6
locations/stat_sklattrib.qsrc

@@ -146,7 +146,7 @@ if attsklupdate = 0:
 
 	dynamic "
 		if pcs_<<$attskltmp>> > 0 and <<$attskltmp>>_lvl = 0:
-			<<$attskltmp>>_exp = (expadj * (pcs_<<$attskltmp>> - 1) * (pcs_<<$attskltmp>> - 1) / 180) + 1
+			<<$attskltmp>>_exp = (expadj *73* (pcs_<<$attskltmp>> - 1) * (pcs_<<$attskltmp>> - 1) / 2730) + 1
 			<<$attskltmp>>_mem = <<$attskltmp>>_exp - 1
 			<<$attskltmp>>_lvl = pcs_<<$attskltmp>>
 			<<$attskltmp>>_lvlst = <<$attskltmp>>_lvl
@@ -228,13 +228,13 @@ if $ARGS[0] = 'daycall':
 		end
 
 		if <<$attskltmp>>_deg <= 0 and <<$attskltmp>>_lvl > <<$attskltmp>>_flr:
-			exptmp = <<$attskltmp>>_exp - (expadj * (<<$attskltmp>>_lvl - 1) * (<<$attskltmp>>_lvl - 1) / 180)
+			exptmp = <<$attskltmp>>_exp - (expadj * 73*(<<$attskltmp>>_lvl - 1) * (<<$attskltmp>>_lvl - 1) / 2730)
 			if exptmp < 0: exptmp = 0
 			<<$attskltmp>>_lvl -= 1
 			<<$attskltmp>>_deg = degtmp
-			<<$attskltmp>>_exp = (expadj * (<<$attskltmp>>_lvl - 1) * (<<$attskltmp>>_lvl - 1) / 180) + exptmp
+			<<$attskltmp>>_exp = (expadj *73* (<<$attskltmp>>_lvl - 1) * (<<$attskltmp>>_lvl - 1) / 2730) + exptmp
 !!			This will only do anything if the PC builds exp well in excess of what is needed to level
-			if <<$attskltmp>>_exp > (expadj * (<<$attskltmp>>_lvl) * (<<$attskltmp>>_lvl) / 180): <<$attskltmp>>_exp -= (2 * <<$attskltmp>> - 1) / 10
+			if <<$attskltmp>>_exp > (expadj * 73*(<<$attskltmp>>_lvl) * (<<$attskltmp>>_lvl) / 2730): <<$attskltmp>>_exp -= (2 * <<$attskltmp>> - 1) / 10
 		end
 		<<$attskltmp>>_lvlst = <<$attskltmp>>_lvl
 		<<$attskltmp>>_mem = <<$attskltmp>>_exp
@@ -274,9 +274,9 @@ end
 
 dynamic "
 	if <<$attskltmp>>_lvl ! <<$attskltmp>>_lvlst: <<$attskltmp>>_lvl = <<$attskltmp>>_lvlst
-	if <<$attskltmp>>_exp > (expadj * <<$attskltmp>>_lvl * <<$attskltmp>>_lvl / 180): <<$attskltmp>>_lvl += 1
+	if <<$attskltmp>>_exp > (expadj * 73*<<$attskltmp>>_lvl * <<$attskltmp>>_lvl / 2730): <<$attskltmp>>_lvl += 1
 	<<$attskltmp>>_lvlst = <<$attskltmp>>_lvl
-	<<$attskltmp>>_xpnxt = (expadj * <<$attskltmp>>_lvl * <<$attskltmp>>_lvl / 180) + 1
+	<<$attskltmp>>_xpnxt = (expadj * 73*<<$attskltmp>>_lvl * <<$attskltmp>>_lvl / 2730) + 1
 	if <<$attskltmp>>_lvl / 5 > <<$attskltmp>>_flr: <<$attskltmp>>_flr = <<$attskltmp>>_lvl / 5
 	if <<$attskltmp>>_lvl > (100 + (<<$attskltmp>>_muta * 50)): <<$attskltmp>>_lvl = (100 + (<<$attskltmp>>_muta * 50))
 	"