linuxgurugamer

[1.2] FTL Drive Continued

82 posts in this topic

I feel,maybe FTL Drive part can list that how can we calculate that the Ni number everywhere and every mass in the introduction of FTL Drive . That can help us to know how many parts we will need

Share this post


Link to post
Share on other sites

@linuxgurugamer I'm having a problem where the force a FTL Drive can generate, how much power it draws etc. is no longer shown the the GetInfo() menu in the VAB. It just says 0iN and electric charge 0.00 /s.

It does so on all the parts, which makes sense if it is the plugin which have a minor bug. Is this something you can confirm is not just my modded install playing tricks on me?

Share this post


Link to post
Share on other sites

It would be helpful if you could test this in a clean install, I may not have time to set up a test for a whie

Share this post


Link to post
Share on other sites
Just now, linuxgurugamer said:

It would be helpful if you could test this in a clean install, I may not have time to set up a test for a whie

That is fair. I'm fixing something in my own mod right now, but maybe later.

Share this post


Link to post
Share on other sites
5 hours ago, linuxgurugamer said:

It would be helpful if you could test this in a clean install, I may not have time to set up a test for a whie

Instead of testing I looked at the code instead.... More fun than creating new clean install etc.......

I think I know why the getinfo() does not yield valid results in the VAB. The first line and third, i.e. for the force and required EC, these are calculated in the referenced methods by getting the combined max values in the vessel. However, there is no vessel as far as the getinfo() is concerned, and this apparently calculates to "0" in that case. I think that these should just be the values from the CFG.

        public override string GetInfo()
        {
            var str = new StringBuilder();

            str.AppendFormat("Maximal force: {0:0.0}iN\n", MaxCombinedGeneratorForce());            // MaxCombinedGeneratorForce <-- This is only relevant on vessel, not for getinfo()
            str.AppendFormat("Maximal charge time: {0:0.0}s\n\n", maxChargeTime);
            str.AppendFormat("Requires\n");
            str.AppendFormat("- Electric charge: {0:0.00}/s\n\n", totalRequiredElectricalCharge);   // totalRequiredElectricalCharge <-- This is only relevant on vessel, not for getinfo()
            str.Append("Navigational computer\n");
            str.Append("- Required force\n");
            str.Append("- Success probability\n");

            return str.ToString();
        }

I think that these should just be the values from the CFG. Like this.

        public override string GetInfo()
        {
            var str = new StringBuilder();

            str.AppendFormat("Maximal force: {0:0.0}iN\n", maxGeneratorForce);            // MaxCombinedGeneratorForce <-- This is only relevant on vessel, not for getinfo()
            str.AppendFormat("Maximal charge time: {0:0.0}s\n\n", maxChargeTime);
            str.AppendFormat("Requires\n");
            str.AppendFormat("- Electric charge: {0:0.00}/s\n\n", requiredElectricalCharge);   // totalRequiredElectricalCharge <-- This is only relevant on vessel, not for getinfo()
            str.Append("Navigational computer\n");
            str.Append("- Required force\n");
            str.Append("- Success probability\n");

            return str.ToString();
        }

I do not think the is a problem aside from the isolated thing about the GetInfo() method.

I'll be happy to test it if you get the time to implement the fix. I'm confident that it was not my install that was the problem.

Share this post


Link to post
Share on other sites

I'll look into it when I get home, thanks for looking at it.

 

Share this post


Link to post
Share on other sites

New release, 0.1.8.1:

  • Fixed the display of power in the editore, thanks @Warezcrawler
     

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now