nightingale

[1.5.x] Strategia [v1.7.3] [2018-12-12]

Recommended Posts

On 22/12/2016 at 8:50 AM, billybob579 said:
11 hours ago, nightingale said:

I'll have to double check on what's needed to support Galactic Neighborhood, it's likely very similar to supporting barycenters

I don't think this issue is strictly related with GN itself, I think it's more an issue in the assumptions you make when generating strategies.

(I haven't played with this mod so I'm going to do some guesswork here, if I am wrong feel free to correct me)

What I think is happening is that you assume the center of the universe is the "home star" which in GN case is false.

most planet packs keep the layout of the ksp stock system so you wouldn't notice any issues, but there are some mods that change the layout that require some failproofing.

as far as I know there are 4 possible layouts:

  1. The home planet orbits a star, that star is the center of the galaxy (Stock KSP, and most mods are here)
  2. The home planet orbits a planet, that planet orbits a star, that star is the center of the galaxy (Alternis Kerbol and NH)
  3. The home planet orbits a star, that star orbits the center of the galaxy (GN and most galaxy mods)
  4. The home planet orbits a planet which orbits a star which orbits the center of the galaxy (none that I know of, but could be achieved by using Alternis/NH as the home system in GN)

 

I think the most sensible way to approach the generation of strategies would be to define different priority "groups"

in stock these groups would be

a- Kerbin's moons
b- Planets
c- moons of other planets

(which I assume is already what you are doing)

 

if the home planet orbits a planet, then move all the children of that planet into group "a", groups "b" and "c" remain the same

since the home star is not guaranteed to be the center of the galaxy, you cannot assume that getting the center's children will give you the planets (I guess this is where the issue quoted above comes from)

you'll need to find the home star, I use this code, possibly not the best way, but it works:

        static void HomeStar(CelestialBody body)
        {
            Renderer renderer = body.scaledBody.GetComponent<Renderer>();
            if (renderer != null && renderer.material != null && renderer.material.shader != null && renderer.material.shader.name == "Emissive Multi Ramp Sunspots")
            {
                // body is the home star
            }
            else if (body.referenceBody != null && body.referenceBody != body)
            {
                HomeStar(body.referenceBody);
            }
        }

 

you have to trigger it with   HomeStar(lightGlobals.GetHomeBody().referenceBody)

so now that you have the home star you can assign priorities like this:

a. home planet's moons
b. planets orbiting the home star
c. moons of planets in group b
d. other celestial bodies

you will still need to check if the home planet is a moon, and edit group a accordingly

hope this helped

 

Edited by Sigma88

Share this post


Link to post
Share on other sites
9 hours ago, Rusk said:

I don't know what happened but Strategia popped up in "my" CKAN now. With "CustomBarnKit" no longer being flagged as outdated by CKAN I was able to easily install everything fully automated.

This is what it looks like.

8VQlkO2.jpg

 

I am havign a similar problem right now with CKan, the Strategia mod is not showung up... It's probably somethign for the CKAN maintainers.

Share this post


Link to post
Share on other sites

I keep having Walt and Gus disappearing and re-appearing again in the Administration building. Their photos and their whole column of strategies disappear together. For the strategy named "Stagnated Research I" when Walt is visible and when selected says just

Quote

?      Strategy title

Strategy description
asdf asdf asdf asdf asdf asdf ..... (3 lines of asdf's)


in the right hand pane.

A bit more detail is provided at raised Github issue #53

I installed Strategia to try for the first time in a brand new career this week and when it works properly it is awesome :D (but you knew that already :cool:).

Edited by Kaa253

Share this post


Link to post
Share on other sites

Dang it why didnt I install this on my new career. Time to start again. This looks like an amazing mod. Tyvm @nightingale for this. You are one creative minded son of a kerbal.

Just a small question, I don't see it in the OP. But this isn't going to throw up any problems with the following contract packs is it?

Field Research.

Kerbal Academy.

Kerbin Space station.

Spacetux (grand tours and rovers).

Tourism.

Ty in advance.

Share this post


Link to post
Share on other sites

Coding barbarian here-previous changelogs say Strategia has SigmaBinary compatibility, but none of the binary-enabled planets are showing up in the missions selector. Did the compat break recently or something?

Share this post


Link to post
Share on other sites

Great mod! Old strategy system was just screaming to change it.
A question about "<planet_name> Probes" strategy - do rovers count? A bit silly one, because it's PROBES strategy, but still it makes sense if rovers do count as probes. 

Share this post


Link to post
Share on other sites

I have a bug report. I have found that the Jupiter through Neptune missions are glitched. Could I have a patch please? It would probably just take a categorization of the gas planets from being planets to gas giants. Another wierd thing is that RSS Extrasolar works with your mod as you can see in the screenshot.

http://imgur.com/a/H3zDM

Share this post


Link to post
Share on other sites

I am struggling with a MM cfg to disable all Strategia strategies. anybody have an example i can steal? :P if its possible?

I'm asking because i am writing my own strategies for GPP and i just want to use Strategia as the framework.

I understand the basics of Module Manager but not enough to just make the changes needed, I would rather just write my own and disable the default ones in Strategia

Edited by Galileo

Share this post


Link to post
Share on other sites

I'm going to install this on my master career save tonight, ooo new things to play with:cool:

Share this post


Link to post
Share on other sites

Far be it from me to ask for anything, but I was wondering at the possibility of adding an entry into the 'Crewed Missions' list:

The Kerbin Program.

This would allow a re-creation of the Mercury Program, and give a quick strategy players can pick up right out of the box, for a quick shot of cash and reputation.

Share this post


Link to post
Share on other sites

Apologies to everyone for the delay in getting back to things on the thread, I'm slowly catching up on everything.

@SmashBrown - Yup, should work with any/all contract packs, as far as I know.

@voicey99 - Raised #54.

@Verloren - Probes count.

@rohanguard1 - Raised #55.  If I had to take a guess, RSS needs to be changed to set the hasSurface flag that was introduced in KSP 1.2.0.  Only a guess though.

@Galileo - Not sure if this is still an issue (might have better luck on the MM thread, but I'd say you need to delete all the strategia nodes before galileo runs and then add yours after that.  My wild guess is:

-STRATEGY_LEVEL_EXPAND,*:BEFORE[Galileo] {}
-STRATEGY_BODY_EXPAND,*:BEFORE[Galileo] {}

STRATEGY_LEVEL_EXPAND:FOR[Galileo]
{
    ...
}

Let me know if you need anything on my end to better support disabling the strategies (or any other hooks, etc.).

@MailletC - Good idea, worth looking into (but not until I've caught up on bugs).  Raised #56.

Share this post


Link to post
Share on other sites

Hello @nightingale

Sorry, just popping in for my bi-monthly grumble xD  I'm getting a bug with the <body> programs when combining Strategia and @Galileo's planet pack, namely if I choose the one to plant a flag, then it becomes unavailable the moment a ship reaches that planet's orbit.

For example, turn on the Ceti Program, send a probe, get 400% milestone reward as expected. Launch a crewed ship, immediately upon entering the SoI, get a message telling me that the program is no longer available. It also doesn't remove itself from my active strategies, so I lose funds and rep to manually kick it out :(  

Any thoughts?

Share this post


Link to post
Share on other sites
6 minutes ago, eddiew said:

Hello @nightingale

Sorry, just popping in for my bi-monthly grumble xD  I'm getting a bug with the <body> programs when combining Strategia and @Galileo's planet pack, namely if I choose the one to plant a flag, then it becomes unavailable the moment a ship reaches that planet's orbit.

For example, turn on the Ceti Program, send a probe, get 400% milestone reward as expected. Launch a crewed ship, immediately upon entering the SoI, get a message telling me that the program is no longer available. It also doesn't remove itself from my active strategies, so I lose funds and rep to manually kick it out :(  

Any thoughts?

I'm also interested in this as all I changed was the icons of the programs. I tested this and got the same problem.

Share this post


Link to post
Share on other sites

Well at least it's not just me :)  For now I just edit the save file and refund the lost rep/funds due to cancelling. The 400% milestone with the first probes is still a bonus ^^

That said, I just got a massive amount of bonus money for doing a spacewalk around Ceti... it's possible that the program is still active. Will confirm when I do a landing.

Edited by eddiew

Share this post


Link to post
Share on other sites

I'm pretty sure this is intended behaviour.  It may look a bit odd, but what Strategia is telling you is that once you have done a crewed flyby, you can't begin that strategy. The strategy should however still be active until you plant a flag on the body in question. You should have a contract active in mission control from Strategia confirming this. Once you plant the flag, the contract and strategy both complete.

Share this post


Link to post
Share on other sites

Yeah, the strategy is definitely active, I'm still getting the funds bonus. 

Pretty sure the Iota strat did not complete itself after planting a flag though... will see how this next one goes.

Share this post


Link to post
Share on other sites
12 minutes ago, eddiew said:

Pretty sure the Iota strat did not complete itself after planting a flag though... will see how this next one goes.

Huh. That would definitely NOT be intended. The strategy should cease to be active (and remain unavailable) once you plant a flag on the target body. 

Out of curiosity, do you see an active contract in Mission Control from Strategia telling you to plant a flag? Picking the strategy should have automatically created and accepted a "plant a flag" contract with the same rewards and penalties as the strategy. Planting the flag should complete this contract, which then completes the strategy. If that contract is missing, then something's gone wrong. 

Share this post


Link to post
Share on other sites

Whelp, this strategy did indeed complete itself once a flag was planted... not sure what happened on the first run, but I definitely came back from Iota (first moon) with it still active and had to cancel it after vessel recovery.

There was a contract on this run. Not sure about the first, sorry...

Maybe I'd maxed out my active strats the first time around?

Share this post


Link to post
Share on other sites
30 minutes ago, eddiew said:

Whelp, this strategy did indeed complete itself once a flag was planted... not sure what happened on the first run, but I definitely came back from Iota (first moon) with it still active and had to cancel it after vessel recovery.

There was a contract on this run. Not sure about the first, sorry...

Maybe I'd maxed out my active strats the first time around?

Well, I'm glad it worked this time around, though I'm now really curious as to what happened the first time...

Active strategies shouldn't be an issue, but I wonder if it's possible if maxing out your total available contracts before selecting the strategy would prevent that contract from appearing in the Mission Control centre. I thought I did this once and the game just let me go over my limit, but I could be remembering incorrectly. 

I think @nightingale has Strategia set up so that you have one more strategy "slot" than you see. This is done so that you can accept an upgraded version of a current strategy without having to cancel the lower level one. You go over your apparent maximum temporarily while strategia lets you accept the new strategy, then immediately cancels the lower tier one. I thought that there was a similar mechanic used with the special contract generated by celestial body programs, too. 

On 1/26/2017 at 2:47 PM, Galileo said:

I'm also interested in this as all I changed was the icons of the programs. I tested this and got the same problem.

Would you mind having a quick read of the last few posts between eddiew and myself? Since you mentioned that you had the same problem, I'm curious as to what you saw when you tried it (i.e., did you have a strategia contract in the Mission Control centre, was the strategy still active even though you got the message saying it was unavailable, etc.). Also, have you tried any other celestial body-based strategies since? 

Share this post


Link to post
Share on other sites
1 hour ago, Merkov said:

... but I wonder if it's possible if maxing out your total available contracts before selecting the strategy would prevent that contract from appearing in the Mission Control centre...

Sorry, that's what I meant to say but it got garbled between my brain and the keyboard ^^;

Share this post


Link to post
Share on other sites

Hey, I have a quick question: how does Strategia decide if a planet is a gas giant or rocky planet for the purposes of the celestial body strategies? The reason I'm asking is because I have @The White Guardian's fantastic Planet Cyran pack installed, seen here:

Strategia very helpfully offered me strategies to land probes in three biomes and plant a flag there. The problem is that Cyran is a gas giant. It has many moons, so it would be perfect for a Cyran IX program (nine moons, unless I'm just awful at counting, which IS possible...). I know that the OPM planets are all recognized as gas giants, so I know it's possible, I just don't know how that's done :)

Also, I have a bit of a suggestion: is it possible for the Eve and Duna probes/program to boost the funds from milestone gains of their respective moons? Full disclosure, I haven't actually completed either of these yet, so I'm just going off what the strategy says in the Admin building, but from the descriptions it looks like taking either program/probe program boosts gains from Eve/Duna, but lowers the gains from all other celestial bodies, which I take it includes their respective moons? It just seems odd that you would take a strategy that encourages you to send several probes to Duna, but heaven forbid any of them approach Ike. Depending on how you want to balance it, I would suggest either including the moons in the milestone gain boosts for their parent bodies (sort of like with the Jool strategies), or at least exempting them from the milestone penalties. Is this something that can be done? 

Regardless, I am loving the strategies. They are simply brilliant. 

Share this post


Link to post
Share on other sites
10 hours ago, Merkov said:

Hey, I have a quick question: how does Strategia decide if a planet is a gas giant or rocky planet for the purposes of the celestial body strategies? The reason I'm asking is because I have @The White Guardian's fantastic Planet Cyran pack installed, seen here:

Strategia very helpfully offered me strategies to land probes in three biomes and plant a flag there. The problem is that Cyran is a gas giant. It has many moons, so it would be perfect for a Cyran IX program (nine moons, unless I'm just awful at counting, which IS possible...). I know that the OPM planets are all recognized as gas giants, so I know it's possible, I just don't know how that's done :)

Also, I have a bit of a suggestion: is it possible for the Eve and Duna probes/program to boost the funds from milestone gains of their respective moons? Full disclosure, I haven't actually completed either of these yet, so I'm just going off what the strategy says in the Admin building, but from the descriptions it looks like taking either program/probe program boosts gains from Eve/Duna, but lowers the gains from all other celestial bodies, which I take it includes their respective moons? It just seems odd that you would take a strategy that encourages you to send several probes to Duna, but heaven forbid any of them approach Ike. Depending on how you want to balance it, I would suggest either including the moons in the milestone gain boosts for their parent bodies (sort of like with the Jool strategies), or at least exempting them from the milestone penalties. Is this something that can be done? 

Regardless, I am loving the strategies. They are simply brilliant. 

I'm flattered!

Though, you might want to postpone those plans for a bit longer as I'm working on a second graphical overhaul, this time focused on Glacia and Dres. I'm also still not 100% happy with the way Sennim looks but that's a worry for later as it works like a charm. The two aforementioned moons resemble each other way too closely in my opinion though, plus, there seems to be a glitch with Glacia where some areas of the terrain are below an altitude of 0 meters which causes the terrain to go invisible while the hitboxing remains.

Share this post


Link to post
Share on other sites

@Merkov@The White Guardian:

I'm not @nightingale, but I've been looking at this mod and poking it a bit so until you get the official word, I may be able to help you.  Back around page 20, this came up with respect to RSS and Jupiter.  Here's a relevant link that I hope works.  Perhaps the two issues are related; the short version is that some configurations make it impossible for Strategia to tell whether a planet is a rocky body or a gas giant, but nightingale mentioned being able to hardcode gas giants by planet names; something to try is to duplicate the information involving Jupiter and Saturn in the file CrewedMissions-3-GasGiantProgram.cfg in the Strategia directory (just add a line referring to Cyran--maybe call it the Furnace Program) and see whether that solves the problem.

 

Edited by Zhetaan

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.