Game secretly allows negative rep far <<-100

Find any bugs in Vega Strike? See if someone has already found it, or report them here!
Post Reply
Kuemmel
Insys Pilot
Insys Pilot
Posts: 2
Joined: Tue Jun 20, 2023 3:13 pm

Game secretly allows negative rep far <<-100

Post by Kuemmel »

Hi there, I am confident to have detected a probably easily fixed, yet rather game-breaking bug in python function `VS.AdjustRelation(..)`. While this function seems to cap reputation changes for not being larger than `abs(val)==1.0`, and also caps the top to be 1.0 (AKA "friendly (100)"), there seems to be no bottom to a bad reputation (even though the game never displays worse than "hostile (-100)"), making it extremely hard to ever recover from a bad rep.

I have no access to that function. However, the log lines led me to `modules/campain_lib.py:462, class ClearFactionRecord`, which is called when buying a record wipe from Roman Lynch at Basque in the Pyrenees star system. The effect seems capped at "2.0". Which seems sensible for a value which by right has only a range of 2.0. Experimenting with the inputs to `VS.AdjustRelation(..)` led me to no simple single-call solution. As it stands, not even Mr. Lynch could repair my very bad reputation. Paying him twice made at least the merchants friendly again, from which one can reliably run away using a fast ship, not being tempted to murder them all the time.

So while unable to get to the real bug, I at least can offer a workaround fix for Mr. Lynch. Introducing the following into the code will set all effected factions to "neutral (0)", which seems sensible for a general "rm -rf burrows/offenses/" done by a Gemini hacker for the expense of 200k Credits.

Code: Select all

class ClearFactionRecord(Script):
	def __init__(self,fac,newrelation,nextscript=None):
		Script.__init__(self,nextscript)
		self.faction=fac
		self.newval=newrelation
	def __call__(self,room,subnodes):
		Script.__call__(self,room,subnodes)
		import VS
		c=100
		while (c>0) or VS.GetRelation(self.faction,"privateer")<0.0:
			c -= 1
			rel=VS.GetRelation(self.faction,"privateer")
			nv = self.newval if rel < -1.0 else 0.0
			VS.AdjustRelation(self.faction,"privateer",nv-rel,1.0)
		# [This second half turns the attitudes from 0 up to 100. Won't do. Deactivated it. Is it necessary?]
		# rel=VS.GetRelation("privateer",self.faction)
		# VS.AdjustRelation("privateer",self.faction,self.newval-rel,1.0)
P.S.: I found this after first repeating the call to `ClearRecord.FixRelation(..)`'s `ClearFactionRecord(..)` twelve times (! yes, I was such a bad guy) to finally make them all my space buddies again. This simplest of hacks works, but it is smelly and tends to set everything to `friendly (100)` which is too much.

P.P.S.: Checking my digital watch tells me, we have 2023 already. I think it is cool, that this forum still exists! :-)
ThinkSome
Merchant
Merchant
Posts: 53
Joined: Mon Apr 27, 2020 1:56 pm

Re: Game secretly allows negative rep far <<-100

Post by ThinkSome »

I do seem to recall from a decade ago that it was a pain to get some negative rep up. However, you can't expect blowing a few ships up and then being friends with that faction?
Kuemmel
Insys Pilot
Insys Pilot
Posts: 2
Joined: Tue Jun 20, 2023 3:13 pm

Re: Game secretly allows negative rep far <<-100

Post by Kuemmel »

> You cannot expect to kill some ships and be friends.

Of course not. That why it is a pain to go as far as -100 and come back again. However, the bug is to obviously allow a rep far below -100. To the point that, e.g., Roman Lynch's function to fix your rep with, e.g., the militia, in Righteous Fire is outright broken. -100 should be the lowest value that may be attained. The way it is in the current game clearly is a bug.
Post Reply