Save Our SOTS2 - A Fan Made Patch

Moderator: Makail

Post Reply
sqw82
Posts: 28
Joined: Sun Jul 08, 2018 7:54 am

Re: Save Our SOTS2 - A Fan Made Patch

Post by sqw82 » Fri Nov 22, 2019 3:06 pm

Hey, I know this isn't the right thread but it's just a quick question.

My query is if it is possible to edit the stats of a grand menace that has already spawned.
I really should have turned off the GM. =(

User avatar
Rossinna-Sama
Posts: 1787
Joined: Sun Nov 11, 2012 5:38 am

Re: Save Our SOTS2 - A Fan Made Patch

Post by Rossinna-Sama » Sat Nov 23, 2019 2:01 am

sqw82 wrote:
Wed Nov 20, 2019 11:32 pm
Rossinna-Sama wrote:
Wed Nov 20, 2019 2:12 pm
Technically, SoS will function even if the only thing you install is the .dll file. You'll miss out on section changes, UI changes and so on, but the primary AI stuff and other fixes are inside the .dll.
Speaking of AI, did anyone change anything in the tactical AI? Sometimes, an invading AI fleet into an empty system will head straight to the sun, park there and let me pelt it with missiles within sensor range and doesn't do anything.

I recall the vanilla tactical AI would also not respond to Polaris super long range missiles either but it's been too long to remember if the above also happened.
There were changes to the tactical AI, though I'm not sure if there was anything done to combat in systems which are not currently owned by anyone. Typically they should just go right for your fleet and not try and hug the sun. Do you know what mission the fleet was doing?
sqw82 wrote:
Fri Nov 22, 2019 3:06 pm
Hey, I know this isn't the right thread but it's just a quick question.

My query is if it is possible to edit the stats of a grand menace that has already spawned.
I really should have turned off the GM. =(
Yes and no. Structure (and armor as far as I am aware) is stored in the save file itself so any changes to its health will not be applied. So if the GM has 10,000 structure and you lower it to 1000, then in the current save it'll still have 10,000 structure but it'll never be able to go over the new limit of 1000 if it gets repaired somehow. New GMs which spawn like Locusts will have the new ratings.

Depending on which menace you're having issues with, things like changing its FTL speed may help as those do take effect instantly.
Sword of the Stars 2 : Project Hiver Modder
Creator of the Work-In-Progress Seimei Visual Novel series.
My dream game: Combination of Sword of the Stars 2, Angels Fall First, Conquest: Frontier Wars and Warzone 2100.

sqw82
Posts: 28
Joined: Sun Jul 08, 2018 7:54 am

Re: Save Our SOTS2 - A Fan Made Patch

Post by sqw82 » Sat Nov 23, 2019 4:20 am

I messed around in the faction/grandmenace folder and apparently, editing armor/health does take affect an already-spawned system killer in the following turn. I changed the SK's armor to 10 and health to 20 and well, it ended quickly. =P

I think it was a Default_Patrol fleet with one DN and several CRs. We both entered a neutral system so there's no radar data on both sides. I didn't make contact before it hugged the sun either. Overall, the tactical AI does make a beeline for you so that incident stuck in my mind. Will keep an eye out if something similar happens again.

User avatar
Rossinna-Sama
Posts: 1787
Joined: Sun Nov 11, 2012 5:38 am

Re: Save Our SOTS2 - A Fan Made Patch

Post by Rossinna-Sama » Sat Nov 23, 2019 4:31 am

Odd. It should not have applied. Perhaps there's some edge cases I was running to, such as it not applying if it had already been in combat, damaged or... /shrugs.

Patrol fleet. Mmm, I can take a look at that when I get time.
Sword of the Stars 2 : Project Hiver Modder
Creator of the Work-In-Progress Seimei Visual Novel series.
My dream game: Combination of Sword of the Stars 2, Angels Fall First, Conquest: Frontier Wars and Warzone 2100.

sqw82
Posts: 28
Joined: Sun Jul 08, 2018 7:54 am

Re: Save Our SOTS2 - A Fan Made Patch

Post by sqw82 » Sat Nov 23, 2019 8:59 am

Rossinna-Sama wrote:
Sat Nov 23, 2019 4:31 am
Odd. It should not have applied. Perhaps there's some edge cases I was running to, such as it not applying if it had already been in combat, damaged or... /shrugs.

Patrol fleet. Mmm, I can take a look at that when I get time.
It's default_combat fleet. Just check - the AI didn't put DNs in patrol fleets.

User avatar
Slashman
Posts: 2210
Joined: Sat Jul 21, 2012 1:39 am

Re: Save Our SOTS2 - A Fan Made Patch

Post by Slashman » Sat Nov 23, 2019 1:45 pm

I'm getting a weird thing going on in system combat.

The timer seems to stall when transitioning between real time and accelerated time. It also takes a while to go to accelerated time. So I'll see what should be the 3 second countdown sometimes stall for several seconds to go to 2 and then several more to go to three.

Also sometimes when I'm in combat and switch between the tactical and strategic view, it just freezes for a while. Its quite odd.
If you want a different perspective, stand on your head.

User avatar
Rossinna-Sama
Posts: 1787
Joined: Sun Nov 11, 2012 5:38 am

Re: Save Our SOTS2 - A Fan Made Patch

Post by Rossinna-Sama » Sat Nov 23, 2019 2:53 pm

Which version are you using? If its the one I put out, that's a very weird thing to be occurring since nothing has been touched in regards to stuff like that. Indeed, I'd not even know how right now.
Sword of the Stars 2 : Project Hiver Modder
Creator of the Work-In-Progress Seimei Visual Novel series.
My dream game: Combination of Sword of the Stars 2, Angels Fall First, Conquest: Frontier Wars and Warzone 2100.

User avatar
Slashman
Posts: 2210
Joined: Sat Jul 21, 2012 1:39 am

Re: Save Our SOTS2 - A Fan Made Patch

Post by Slashman » Sat Nov 23, 2019 3:27 pm

Yeah it is the one you put out and your million colors mod. I just don't know what is causing it.

I'll wipe the SOTS2 folder and install from scratch again and see what happens.
If you want a different perspective, stand on your head.

Zerk
Posts: 5
Joined: Fri Nov 01, 2019 9:38 pm

Re: Save Our SOTS2 - A Fan Made Patch

Post by Zerk » Sat Nov 23, 2019 3:36 pm

Slashman wrote:
Sat Nov 23, 2019 1:45 pm
I'm getting a weird thing going on in system combat.

The timer seems to stall when transitioning between real time and accelerated time. It also takes a while to go to accelerated time. So I'll see what should be the 3 second countdown sometimes stall for several seconds to go to 2 and then several more to go to three.

Also sometimes when I'm in combat and switch between the tactical and strategic view, it just freezes for a while. Its quite odd.
Can you upload a save file created before the combat?

User avatar
Slashman
Posts: 2210
Joined: Sat Jul 21, 2012 1:39 am

Re: Save Our SOTS2 - A Fan Made Patch

Post by Slashman » Sat Nov 23, 2019 5:57 pm

Annnd I just wiped that folder.

If it happens again after I reinstall I will upload the file.

So after a wipe and reinstall from scratch, I'm not getting the issue in combat anymore that I have seen. I also updated my graphics drivers but I don't know how much effect that had. The only thing I didn't re-add was your million colors mod.
If you want a different perspective, stand on your head.

Desolator
Posts: 24
Joined: Thu Jun 19, 2014 10:57 am

Re: Save Our SOTS2 - A Fan Made Patch

Post by Desolator » Wed Dec 11, 2019 12:46 pm

How do I install this? copy files individually or just overwrite the whole map?

Bompa
Posts: 10
Joined: Wed Nov 16, 2011 8:36 am

Re: Save Our SOTS2 - A Fan Made Patch

Post by Bompa » Thu Dec 12, 2019 8:02 am

been messing about with the diplomacyweight.xml files.
got the AI lobbying themselves, which i told to start doing once they reach the "Indiffrence" diplomatic state. (player with AI enabled towards other faction!)
also have reason to assume that the graph in diplomacy shows YOUR relation to the faction in question. not theirs. (console tells me that their relation is 1150 towards me, and mine 900 to them, and the graph hovers below the middle-line)
this explains why i kept seeing the "smaller empire" reaction of my faction instead of theirs

since the creator of this patch was interested in diplomacy ;)

edit:
nevermind, the game crashes with a
System.NullReferenceException: Object reference not set to an instance of an object.
at Kerberos.Sots.PlayerFramework.DiplomacyActionWeights.<>c__DisplayClass6_0.<GetWeight>b__0(DiplomacyActionWeight x) in D:\Program Files (x86)\Steam\steamapps\common\sword of the stars ii\Kerberos\Sots\PlayerFramework\DiplomacyActionWeights.cs:line 141

edit2:
spent some time in that file and decided to rewrite the function in a way i could actually understand, since my coding knowledge is severely lacking.
will keep you posted if i can fix the issue.

edit 3:
the function itself isn't the problem as the error still occured. what did fix it was the removel of the DiplomaticReaction "Love" in the xml i edited...
error always occured about 20 turns into the game.
this leads to the assumption that the diplomatic state "love" causes an issue when figuring out what to do about their feelings. just like real humans!

User avatar
Rossinna-Sama
Posts: 1787
Joined: Sun Nov 11, 2012 5:38 am

Re: Save Our SOTS2 - A Fan Made Patch

Post by Rossinna-Sama » Fri Dec 13, 2019 1:30 pm

Slashman wrote:
Sat Nov 23, 2019 5:57 pm
Annnd I just wiped that folder.

If it happens again after I reinstall I will upload the file.

So after a wipe and reinstall from scratch, I'm not getting the issue in combat anymore that I have seen. I also updated my graphics drivers but I don't know how much effect that had. The only thing I didn't re-add was your million colors mod.
Don't see why the color mod would impact things like that, but its good news that the problem got resolved.
Desolator wrote:
Wed Dec 11, 2019 12:46 pm
How do I install this? copy files individually or just overwrite the whole map?
You overwrite everything. SoS's installation should be as simple as extracting everything to a separate folder and then copying everything in one go to where they need to be, or by just extracting it.
Bompa wrote:
Thu Dec 12, 2019 8:02 am
been messing about with the diplomacyweight.xml files.
got the AI lobbying themselves, which i told to start doing once they reach the "Indiffrence" diplomatic state. (player with AI enabled towards other faction!)
also have reason to assume that the graph in diplomacy shows YOUR relation to the faction in question. not theirs. (console tells me that their relation is 1150 towards me, and mine 900 to them, and the graph hovers below the middle-line)
this explains why i kept seeing the "smaller empire" reaction of my faction instead of theirs

since the creator of this patch was interested in diplomacy ;)

edit:
nevermind, the game crashes with a
System.NullReferenceException: Object reference not set to an instance of an object.
at Kerberos.Sots.PlayerFramework.DiplomacyActionWeights.<>c__DisplayClass6_0.<GetWeight>b__0(DiplomacyActionWeight x) in D:\Program Files (x86)\Steam\steamapps\common\sword of the stars ii\Kerberos\Sots\PlayerFramework\DiplomacyActionWeights.cs:line 141

edit2:
spent some time in that file and decided to rewrite the function in a way i could actually understand, since my coding knowledge is severely lacking.
will keep you posted if i can fix the issue.

edit 3:
the function itself isn't the problem as the error still occured. what did fix it was the removel of the DiplomaticReaction "Love" in the xml i edited...
error always occured about 20 turns into the game.
this leads to the assumption that the diplomatic state "love" causes an issue when figuring out what to do about their feelings. just like real humans!
Have you only worked on the diplomacyweight.xml or have you dipped into editing the .dll file? If its the prior, I'd be interested in seeing the results. If its the latter, perhaps seeing if you could get your changes merged with the version over on Github?

Still have not convinced myself to make an account over there, but ehh. One day, will force it. Would really rather there be one version instead of two after all.

PS. I'll take a quick look tonight into the area of the .dll which controls diplomacy and see if there's anything wrong with the love diplomatic relation.
Sword of the Stars 2 : Project Hiver Modder
Creator of the Work-In-Progress Seimei Visual Novel series.
My dream game: Combination of Sword of the Stars 2, Angels Fall First, Conquest: Frontier Wars and Warzone 2100.

Bompa
Posts: 10
Joined: Wed Nov 16, 2011 8:36 am

Re: Save Our SOTS2 - A Fan Made Patch

Post by Bompa » Fri Dec 13, 2019 2:00 pm

Rossinna-Sama wrote:
Fri Dec 13, 2019 1:30 pm
Bompa wrote:
Thu Dec 12, 2019 8:02 am
...
Have you only worked on the diplomacyweight.xml or have you dipped into editing the .dll file? If its the prior, I'd be interested in seeing the results. If its the latter, perhaps seeing if you could get your changes merged with the version over on Github?

Still have not convinced myself to make an account over there, but ehh. One day, will force it. Would really rather there be one version instead of two after all.

PS. I'll take a quick look tonight into the area of the .dll which controls diplomacy and see if there's anything wrong with the love diplomatic relation.
the only code i added right now are some "StrategicAI.TraceVerbose" in the strategic AI under OfferTreaties. to show it is attempting to do a diplomatic action and towards which player.
in the method below that (TryDiplomaticAction) i added one too so it tells me it has gathered the weights for the various actions. but it crashes when it shows
T (2019/12/13 14:48:59) [ai] >10 attempt offering treaty to 2,Djutmeos the Savage ...
T (2019/12/13 14:48:59) [ai] diplomatic action DECLARATION ...
T (2019/12/13 14:48:59) [ai] diplomatic action REQUEST ...
T (2019/12/13 14:48:59) [ai] diplomatic action DEMAND ...
T (2019/12/13 14:48:59) [ai] diplomatic action TREATY ...
W (2019/12/13 14:48:59) [game] System.NullReferenceException: Object reference not set to an instance of an object.
(the >10 i added to show which function leads in to this. as there is a function which only offers treaties to playerslot 0 when turntime between 5 and 9, and one that kicks in after 10 turns with a 10% risk of not proceeding with the attempt)

i didn't dare adding a traceverbose further in the loop, since i believe it would crash before telling me which specific treaty crashes. (or they all do)

edit: included the WAY to heavy diplomacyweight file i used for testing. (on the morrigi with a initial relation towards other morrigi of 2000)

Code: Select all

<DiplomacyActionWeights>
	<DiplomacyReaction value="Hatred">
		<Action id="DEMAND" type="SavingsDemand" value="2"/> 
		<Action id="DEMAND" type="SystemInfoDemand" value="2"/> 
		<Action id="DEMAND" type="ProvinceDemand" value="1"/> 
		<Action id="DEMAND" type="WorldDemand" value="1"/> 
		<Action id="DEMAND" type="SurrenderDemand" value="1"/> 
		</DiplomacyReaction>
	<DiplomacyReaction value="Hostility">
		<Action id="DEMAND" type="SavingsDemand" value="2"/> 
		<Action id="DEMAND" type="SystemInfoDemand" value="2"/> 
		<Action id="TREATY" type="LimitationFleetSize" value="7"/> 
		<Action id="TREATY" type="LimitationShipClass" value="2"/> 
		</DiplomacyReaction>
	<DiplomacyReaction value="Distrust">
 		<Action id="REQUEST" type="SavingsRequest" value="2"/> 
		<Action id="REQUEST" type="SystemInfoRequest" value="2"/>  
		<Action id="TREATY" type="LimitationFleetSize" value="3"/> 
		<Action id="TREATY" type="LimitationShipClass" value="2"/> 
	</DiplomacyReaction>
	<DiplomacyReaction value="Indifference">
 		<Action id="REQUEST" type="SavingsRequest" value="1"/> 
		<Action id="REQUEST" type="SystemInfoRequest" value="1"/>  
		<Action id="TREATY" type="LimitationFleetSize" value="2"/> 
		<Action id="TREATY" type="LimitationShipClass" value="1"/>
		<Action id="LOBBY" type="LobbySelf" value="1"/>
		<Action id="LOBBY" type="LobbyFriendly" value=".5"/>
	</DiplomacyReaction>
	<DiplomacyReaction value="Trust">
 		<Action id="REQUEST" type="SavingsRequest" value="0.5"/> 
		<Action id="REQUEST" type="SystemInfoRequest" value="0.5"/>  
		<Action id="TREATY" type="LimitationFleetSize" value="1"/> 
		<Action id="TREATY" type="LimitationShipClass" value="0.5"/>
		<Action id="LOBBY" type="LobbySelf" value="2"/>
		<Action id="LOBBY" type="LobbyFriendly" value="1"/>
	</DiplomacyReaction>
	<DiplomacyReaction value="Friendship">
 		<Action id="REQUEST" type="SavingsRequest" value="0.5"/> 
		<Action id="REQUEST" type="SystemInfoRequest" value="0.5"/>  
		<Action id="TREATY" type="LimitationFleetSize" value="1"/> 
		<Action id="TREATY" type="LimitationShipClass" value="0.5"/>
		<Action id="TREATY" type="Trade" value="1"/>
		<Action id="LOBBY" type="LobbySelf" value="3"/>
		<Action id="LOBBY" type="LobbyFriendly" value="2"/>
	</DiplomacyReaction>
<DiplomacyReaction value="Love">
 		<Action id="REQUEST" type="SavingsRequest" value="1"/> 
		<Action id="REQUEST" type="SystemInfoRequest" value="1"/> 
 		<Action id="REQUEST" type="ResearchPointsRequest" value="1"/> 
		<Action id="REQUEST" type="GatePermissionRequest" value="0"/> 
		<Action id="REQUEST" type="EstablishEnclaveRequest" value="2"/> 
		<Action id="REQUEST" type="MilitaryAssistanceRequest" value="1"/> 
		<Action id="TREATY" type="LimitationFleetSize" value="0"/> 
		<Action id="TREATY" type="LimitationShipClass" value="0"/>
		<Action id="TREATY" type="Trade" value="3"/>
		<Action id="TREATY" type="LimitationWeapon" value="1"/>
		<Action id="TREATY" type="LimitationResearchTree" value="1"/>
		<Action id="TREATY" type="LimitationResearchTech" value="1"/>			
		<Action id="TREATY" type="LimitationEmpireSize" value="1"/>	
		<Action id="TREATY" type="LimitationForgeGemWorlds" value="1"/>	
		<Action id="TREATY" type="LimitationStationType" value="1"/>
		<Action id="TREATY" type="Protectorate" value="1"/>
		<Action id="TREATY" type="Incorporate" value="1"/>
		<Action id="LOBBY" type="LobbySelf" value="-1"/>
		<Action id="LOBBY" type="LobbyFriendly" value="-1"/>
	</DiplomacyReaction>
	
</DiplomacyActionWeights>
as you can see, i even set the weights of lobby to -1 as i assumed the ai tried to lobby with max relation, but that's not the case.
also, should you ask why the protectorate and incorporate treaties are in there, removing will crash just the same.

User avatar
Rossinna-Sama
Posts: 1787
Joined: Sun Nov 11, 2012 5:38 am

Re: Save Our SOTS2 - A Fan Made Patch

Post by Rossinna-Sama » Fri Dec 13, 2019 2:40 pm

Hmm. Could be wrong, but it looks to me after digging though the .dll again combined with what you just posted that it's probably the treaty which is crashing or its an issue with LobbySelf.

So far, it seems there's no support for AI actually knowing how\when to:
Request a trade enclave - there's no entry for it.
Request military aid - there's no entry for it.
Demand World, Province or Empire surrender - there's no entry for them again.

The treaty area is entirely blank, there's literally nothing there but a break line. Considering I've never seen them offer any treaty on their own volition, this seems to be why. This is also the case for the things the AI doesn't have entries for, since their weights have been set to 0.

Lobby seems fine at first glance, but I did notice there's no entry for LobbySelf down in the GetLobbyViability area - only LobbyEnemy and LobbyFriendly.

There's also no code for Spin, Declaration, Surprise Attack and Give that I can spot pretty much anywhere.
Sword of the Stars 2 : Project Hiver Modder
Creator of the Work-In-Progress Seimei Visual Novel series.
My dream game: Combination of Sword of the Stars 2, Angels Fall First, Conquest: Frontier Wars and Warzone 2100.

Post Reply

Return to “Modding”

Who is online

Users browsing this forum: No registered users and 2 guests