Komplexity (KPLX)

Komplexity (KPLX)

3.4k Downloads

[Bug ๐Ÿž]: Administration building compatibility issue with Strategia

chrbkr opened this issue ยท 16 comments

commented

Brief description of your issue

With Strategia (and JNSQ, if that matters) installed, the administration building shows up as "Fully Upgraded" at Level 3, but with only 3 strategies available. When hovering over the (inactive) upgrade button, the info box shows "Max Active Strategies: 4", but I can't click it.

Steps to reproduce

  • have Strategia installed
  • upgrade administration building to level 3
  • try to upgrade administration building to level 4

Expected behavior

It should be possible to upgrade to level 4 (and beyond), with an according number of available strategies

Actual behavior

It's impossible to upgrade beyond level 3

Environment

Mod: 1.0.1.0
KSP: 1.12.3

How did you download and install this?

CKAN (auto install with dependencies)

commented

The limit issue has been fixed now. The behavior is:

  • Level 1 (initial status): 1 at right click, 0 from inside. BUT: I can still activate a strategy (didn't test this before, as I didn't see it was possible due to not enough reputation)
  • Level 2: 2 at right click, 2 from inside
  • Level 3: 3 at right click, 2 from inside, but again: I can actually activate 3
  • Level 4: 4 at right click, 2 from inside, actually still 3
  • Level 5: 5 at right click, 3 from inside, actually 4
  • Level 6: 6 at right click, 3 from inside, actually 4
  • Level 7: 7 at right click, 4 from inside, actually 5
  • Level 8: 8 from right click, 5 from inside, actually 6
  • Level 9: 9 on right click, 6 from inside, actually 7
  • Level 10: 10 on right click, 7 from inside, actually 8

To clarify: by "from inside" I mean the y at "Active Strategies: x [Max: y]"

Apparently, the value from the right click comes from the level. I remember reading something about the wrong number in the Strategia thread. No idea where the right-click value comes from, but the actual limits seem to be those from your patch.

Interestingly, some strategies are unavailable (I guess due to some inner logic of Strategia) and show an incorrect number in the "The Administration Facility cannot support more than x active strategies at this level". I.E. x is 7 for a specific strategy, but I can select a different one without a problem. I guess this is a Strategia bug, though.

commented

@chrbkr you are correct. I had intended to remove the !Strategia - but it was missed.

These should be patching correctly now:

Komplexity-1.0.3.0-patch2-CF.zip
Komplexity-1.0.3.0-patch2.zip

If the differences still exist - then the issues must lie with Strategia (@jrossignol)

Again, kindly test (with above listed caveats) and please do what you did - tell me what happened. ๐Ÿฅ‡

If this doesn't work - then I will ask for your ModuleManager.ConfigCache and KSP.Log and the MMPatch.log

commented

Excellent and thank you @chrbkr ! will pack and ship, noting the issue is with Strategia and not Komplexity.

๐Ÿฆƒ

issue here in Strategia:
jrossignol/Strategia#66 activeStrategyLimit too low #66
Schnobs opened this issue on Oct 28, 2017

commented

Thank you. Kindly read contributiing.md, code_of_conduct.md and styleguide.md. These are boilerplate.

commented

First step is to see if Strategia can handle the additional levels.
The reason the current admin/mission control configs don't patch those two buildings when Strategia is installed is because of this unknown. Marked compatible because in it's current state it is.
will ping @jrossignol on the KSP forums as well.

@jrossignol

commented

Strategia CBK patch:

@CUSTOMBARNKIT:FOR[Strategia]
{
	@ADMINISTRATION
	{
		@strategyCommitRange = 1, 1, 1
		@activeStrategyLimit = 2, 3, 4
	}

	@MISSION
	{
		@reputationKerbalRecovery = 2.5
	}
}

Komplexity Administration CBK configs

@CUSTOMBARNKIT:NEEDS[CustomBarnKit,!Strategia]:FOR[Komplexity]
{
	@ADMINISTRATION
	{
		@levels = 10
		@upgradesVisual = 1, 1, 1, 2, 2, 2, 3, 3, 3, 3
		@upgrades = 38000, 10000, 15000, 25000, 50000, 75000, 95000, 115000, 150000, 190000
		@activeStrategyLimit = 1, 2, 3, 3, 4, 4, 5, 6, 7, 8
		@strategyCommitRange = 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0
	}
}

Komplexity Mission CBK configs

@CUSTOMBARNKIT:NEEDS[CustomBarnKit]:FOR[Komplexity]
{
	@MISSION
	{
		@levels = 10
		@upgradesVisual = 1, 1, 1, 2, 2, 2, 3, 3, 3, 3
		// @upgrades = 0, 25000, 50000, 65000, 80000, 95000, 110000, 125000, 150000, 300000
		@upgrades = 19000, 10000, 15000, 20000, 25000, 35000, 45000, 55000, 75000, 100000
		@unlockedFlightPlanning = 5
		@activeContractsLimit = 2, 3, 4, 5, 6, 7, 8, 9, 10, -1
	}
}
commented

@chrbkr
Here are the patch files (experimental) to try. Kindly tell me if they resolve your issues and if Strategia/KSP has any issue going above 3 contracts - and if that is balanced.

Manual Installation directions are included in the archives.

Komplexity-1.0.3.0-patch.zip
Komplexity-1.0.3.0-patch-CF.zip

commented

The problem actually got worse.

Max strategies available:

  • Level 1 (initial status): showing 1 when right clicking on building, actually 0 when inside (in stock, it should be 1)
  • Level 2: 2 both on right click and from within (in stock, it should be 3)
  • Level 3: 3 on right click, 4 from within (in stock, it should be 5)
  • Still no upgrades possible beyond level 3

In Komplexity/Config/Administration.cfg, only the version was changed, but there's still the !Strategia modifier - so I'm not surprised the administration building only has 3 levels. But it seems very strange to me that the number is different between right-click and from within the building. It looks like right-click uses the config from Komplexity. I have no idea where 0, 2, 4 comes from, though.

commented

@chrbkr would you try something else for me?

I compiled (private compile) Strategia for 1.12.3 and made one small change - attempted to fix this display error.

I will remove these files within twenty-four hours out of respect to @jrossignol.

commented

The patch for Strategia fixed the outside, right click info. The internal one is still broken. Thanks for the fix in Komplexity!

commented

The patch for Strategia fixed the outside, right click info. The internal one is still broken. Thanks for the fix in Komplexity!

You are most certainly welcome! ๐Ÿ™‡ Thank you for the report and the assistance @chrbkr!

commented

Just FYI: I just realized that your Strategia patch does not really fix the outside info. Maybe it was working only for lower levels. But. e.g. for Facility Level 6, it shows "Max Active Strategies: 7" from outside, while in reality it's 4, as it should. But I guess any further discussion should be continued over at the Strategia issue.

commented

@chrbkr thank you.
did you try the recompile of Strategia I posted previously/above (removed)?

@chrbkr would you try something else for me?

I compiled (private compile) Strategia for 1.12.3 and made one small change - attempted to fix this display error.

I will remove these files within twenty-four hours out of respect to @jrossignol.

commented

@zer0Kerbal yes, this is what I meant by Strategia patch. The Komplexity patch that closes this bug is fine. I found some other quirks with Strategia when there are multiple levels, I guess Strategia could use some rework in order to improve compatibility with Komplexity. A lot seems to be hardcoded or based on assumptions about facility levels (who could have known someone would ever change the number of levels ;)

commented

@chrbkr thank you for the clarification and for the beta test.

yes Strategia needs some โค๏ธ - I might consider it, however would also need to do contract configurator (which is a massive rebuild) - just not yet.

Agree - and I know the person for the job - just he is busy with his day job and several other code mods at this point.