Jump to content

[1.11.+] ESLD Jump Beacons Revived (1.4.0)


Booots

Recommended Posts

1 minute ago, Electr0ninja said:

Is it possible to allow the karborundum tanks to be fillable in the editor. for those of us without the mod that collects karborundum? Or is said mod required?

No the mod isn't required but the Community Resource Pack is as Karborundum is CRP managed.  With the latest version of CRP and ESLD you should have Karborundum tweakable in the VAB/SPH now.  RoverDude changed the resource to tweakable in his most recent pass...be warned - it's STUPIDLY expensive. :D 

Edited by rasta013
Link to comment
Share on other sites

I just installed it like 2 minutes ago and it is not a tweakable resource, is the spacedock packaged mod not the newest version?

 

edit: checking CRP versions now

 

It seems the spacedock upload has an old version of CRP bundled with it I snagged the newest version and all is well

 

Edited by Electr0ninja
Link to comment
Share on other sites

1 minute ago, Electr0ninja said:

I just installed it like 2 minutes ago and it is not a tweakable resource, is the spacedock packaged mod not the newest version?

 

I honestly couldn't tell you.  I install in manually from the GitHub repo.  I do know that the latest version of ESLD on GitHub has the latest CRP too so you might start there.  Not sure about SpaceDock though.

Community Resource Pack

ESLD Beacons

Link to comment
Share on other sites

ok i got the resources tweakable, but the cost is a bit messed up, and as soon as I get to my last stage the beacon tries to constantly activate and shut off using all the electric charge.

By "the cost is a bit messed up" I mean the objects show negative cost until I add the karborundum.

any tips?

ps. I am using 0.8 ESDL and 5.4 CRP

 

also I have some programming skill if you need help ever, I can always give it a go.

 

Fixes:

1)I got the resource cost to work appropriately by having the part configs that contain the karborundum resource start full, instead of empty.

2) I got the part cost to work by increasing to starting cost in the config file by the cost of the contained karborundum.

 

 

 

Edited by Electr0ninja
Link to comment
Share on other sites

44 minutes ago, Electr0ninja said:

ok i got the resources tweakable, but the cost is a bit messed up, and as soon as I get to my last stage the beacon tries to constantly activate and shut off using all the electric charge.

By "the cost is a bit messed up" I mean the objects show negative cost until I add the karborundum.

any tips?

ps. I am using 0.8 ESDL and 5.4 CRP

Ah, good catch! Silly Squad and how they implemented part costs. I'll fix that now and upload a fix in the next half hour.

Can you go into more detail about what you mean about the beacon constantly activating?

Edited by Booots
Link to comment
Share on other sites

I figured out the fix for the part cost if you want to see how I fixed it, also once hit reach stage 0 using the standard staging method the beacon attempts to initialize all on its own and then shutdown down until it had enough electric charge, then does it again

without my consent.

 

I looked over your initialization and shutdown code, and I don't see anything wrong with them so I am unsure.

I will run another test and grab a screenshot for you.

 

Edited by Electr0ninja
Link to comment
Share on other sites

4 minutes ago, Electr0ninja said:

I figured out the fix for the part cost if you want to see how I fixed it, also once hit reach stage 0 using the standard staging method the beacon attempts to initialize all on its own and then shutdown down until it had enough electric charge, then does it again

without my consent.

 

I looked over your initialization and shutdown code, and I don't see anything wrong with them so I am unsure.

I will run another test and grab a screenshot for you.

 

I'll have a look at the cfgs, see if those might be causing it. Which beacon is on the vessel in question?

Link to comment
Share on other sites

LB-15

 

 

ok I have a screenshot and the logs open it almost has to be in here, https://github.com/DBooots/ESLDBeacons/blob/master/Source/ESLDBeacon.cs

screenshot:

http://imgur.com/XKVIAY7

 

this line seems funny, but I cannot be sure without a build setup on my end.

if (bool.TryParse(node.GetValue("activated"), out tempbool))

activated = tempbool;

Edited by Electr0ninja
Link to comment
Share on other sites

the only other currently active mod is kerbal joint reninforcement, and I can test without it, if you prefer, well and scansat.

 

But it is very unlikely scansat is causing the issue.

I am gonna regenerate all my module manager configs and give it another go. ( well that wasnt the issue)

I have removed all mods but ESDL, giving it another go.( No effect, this is not a mod conflict)

Edited by Electr0ninja
Link to comment
Share on other sites

15 minutes ago, Electr0ninja said:

this line seems funny, but I cannot be sure without a build setup on my end.

if (bool.TryParse(node.GetValue("activated"), out tempbool))

activated = tempbool;

That's part of one of the constructor overloads and shouldn't be involved now. It is funny, though, but one of the only ways I could create a functioning module class instance from a protomodule config node.

The more likely culprit is in the part actions or events. Somehow either an event or action to shut it down is being called repeatedly when the event or action should really be disabled. It's weird that it showed up on staging. I'll try and see if I can replicate it. What happens if you're above the gravity cutoff for that beacon? (Ie. in a situation where the beacon actually can activate).

EDIT: Looking at the code again it seems the KSPEvent BeaconInitialize is likely being triggered. Normally this would take a click in the right-click menu so I'm confused.

Edited by Booots
Link to comment
Share on other sites

1 minute ago, Booots said:

That's part of one of the constructor overloads and shouldn't be involved now. It is funny, though, but one of the only ways I could create a functioning module class from a protomodule config node.

The more likely culprit is in the part actions or events. Somehow either an event or action to shut it down is being called repeatedly when the event or action should really be disabled. It's weird that it showed up on staging. I'll try and see if I can replicate it. What happens if you're above the gravity cutoff for that beacon? (Ie. in a situation where the beacon actually can activate).

Hang on, boots, should this be (!activated) {which I read as not activated}, or (activated)? I might just be mistaking state checks for what it will be when that action goes off.

 


 
        // Startup sequence for beacon.
        [KSPEvent(name="BeaconInitialize", active = true, guiActive = true, guiName = "Initialize Beacon")]
        public void BeaconInitialize()
        {
            if (!activated)
            {
 

 
  [KSPEvent(name = "BeaconShutdown", active = false, guiActive = true, guiName = "Shutdown")]
        public void BeaconShutdown()
        {
            if (activated)
            {
 
 
 
I think I found the log spammer though:
 

 
       [KSPAction("Initialize Beacon")]
        public void BeaconInitializeAction(KSPActionParam param)
        {
            if (!activated)
                BeaconInitialize();
            else
                log.warning("Can only initialize when shut down!");
        }
        [KSPAction("Shutdown Beacon")]
        public void BeaconShutdownAction(KSPActionParam param)
        {
            if (activated)
                BeaconShutdown();
            else
                log.warning("Can only shut down when activated!");
        }
 
 
Link to comment
Share on other sites

once I get the notification too far from object in the action menu it ceases to spam the shutdown and initialization routines. and no longer consumes electric charge I will slowly lower my orbit to see what happens.

 

edit: once below once I got below 1,650,000ish  it begins to spam once more, I will now try to initialize the beacon.

edit: moved orbit to 2,060,000 and beacon will activate and function. it will no longer spam.

 

it displays lowest altitude 2057km

 

Ok I think I found the cause of all the spam, "public override void OnFixedUpdate()". it keeps running "BeaconShutdown();" in each conditional regardless of whether or not it was run before in that iteration.

 

But that may not be the reason for the insane electrical drain.

Edited by Electr0ninja
Link to comment
Share on other sites

13 minutes ago, Luxord52 said:

Hang on, boots, should this be (!activated) {which I read as not activated}, or (activated)? I might just be mistaking state checks for what it will be when that action goes off.

{SNIP}

 

I think I found the log spammer though:
 

I think the state checks are correct. The beacon should only activate if it is !activated (not activated) which makes sense.

The log spammer is either BeaconShutdown() or BeaconShutdownAction(). They both generate the same log message if they are called while the beacon is already shut down. Mea Culpa on poor logging.

I think I found the bug, though. The OnFixedUpdate() doesn't check if the beacon is activated before checking if it's in a situation where it needs to deactivate. This is why it's happening on staging because the part itself is activated then, triggering all its OnFixedUpdate() methods. This also explains why it's never shown up in my testing because I typically HyperEdit beacons into orbit without staging them.

Fixing this now! Check back for an update in half an hour.

EDIT: Ninja'd on the bug find by @Electr0ninja. Living up to his name.

Edited by Booots
Link to comment
Share on other sites

Done! Let me know if that fixed it for you!

I hope so or all the SpaceDock followers are going to get mad at me spamming them with updates...

Anyone should feel free to poke around the GitHub repo and send me pull requests. I'm new to this so I'm sure there are optimizations and improvements to be made all over the place. Also, if someone can get the orbit renderer for post non-AMU jump predictions working I'll send them virtual cookies.

Edited by Booots
Link to comment
Share on other sites

Seems to be working wonderfully, thank you for the fix. I will begin a transport test as soon as the receiving beacon is at duna.

edit: works great I got from kerbin to duna wormhole style, granted I had an escape velocity of 13,000m/s time to make some upgrades to my beacon.

edit: AMU test works perfectly

 

also you made the spacedock feature board.

Edited by Electr0ninja
Link to comment
Share on other sites

I did click the 'Add to CKAN' button when uploading the mod to SpaceDock. But looking at the CKAN metadata list I don't see it there either. Maybe it takes a few days to be processed?

Woohoo! SpaceDock featured within days of posting! That's pretty cool. :D Thanks guys!

Edited by Booots
Link to comment
Share on other sites

I already had installed this mod manually. But CKAN is very nice for mods-housekeeping.

To the processing-time: Maybe the zip is malformed for CKAN? I don't know..

A gameplay question: I've searched ~10 Asteroids by grabbing then and look at the surface-scanner. But none of then seems do have Karborundum. Is this right? The wiki says, "it can be found there"...

Link to comment
Share on other sites

3 minutes ago, Jasmir said:

I already had installed this mod manually. But CKAN is very nice for mods-housekeeping.

To the processing-time: Maybe the zip is malformed for CKAN? I don't know..

A gameplay question: I've searched ~10 Asteroids by grabbing then and look at the surface-scanner. But none of then seems do have Karborundum. Is this right? The wiki says, "it can be found there"...

To the CKAN issue, turn around time from mod up to on CKAN has always been terrible. To the Karborundum issue, according to the forum post"Karborundum. Valuable and incredibly fuel efficient, but also very hard to get. It can be harvested on the surfaces of Eeloo and Eve, or by a solar collector within approximately 2000 meters of the sun's surface..."

Note, the post I got that from was a year old, so that may have changed recently. It appears that you may have luck at Dres as well. Mostly just keep searching.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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.

×
×
  • Create New...