nightingale

[1.6.x+] Contract Configurator [v1.27.1] [2018-12-28]

Recommended Posts

Hmm, ok thats what I thought you'd have to do.

Aww, you can't just snap your fingers and put in a FOR/EACH loop? :P

Share this post


Link to post
Share on other sites
Hmm, ok thats what I thought you'd have to do.

Aww, you can't just snap your fingers and put in a FOR/EACH loop? :P

Sorry, not on this one. ;)

Share this post


Link to post
Share on other sites

Would the following PARAMETER fail to show up if the target doesn't have a surface? Assuming there is a PARAMETER for say orbiting, would the contact be completable?

Trying to figure out the best way to have a contract that could target a gas giant, but if it targets something with a surface it gets a landing PARAMETER as well.



PARAMETER
{
name = landing
type = ReachState
situation = LANDED

REQUIREMENT
{
name = Expression
type = Expression
Expression = @targetBody.HasSurface() == true
}
}

Share this post


Link to post
Share on other sites
Would the following PARAMETER fail to show up if the target doesn't have a surface? Assuming there is a PARAMETER for say orbiting, would the contact be completable?

Trying to figure out the best way to have a contract that could target a gas giant, but if it targets something with a surface it gets a landing PARAMETER as well.



PARAMETER
{
name = landing
type = ReachState
situation = LANDED

REQUIREMENT
{
name = Expression
type = Expression
Expression = @targetBody.HasSurface() == true
}
}

That looks fine. As long as there's one parameter, a contract will be valid, and this will remove the landing parameter for bodies without a surface.

Share this post


Link to post
Share on other sites

New release with a handful of bug fixes. Download now!

Contract Configurator 1.6.6

  • Fixed exception in Science sub-system (happens in latest FieldResearch release).
  • Added additional check conditions for ReturnHome (thanks Lewtz and Jirnsum).
  • Fixed another rare exception when removing a planet pack (thanks Hlaford).
  • Fixed exception when recovering a vessel completes a contract (thanks AccidentalDisassembly).

Share this post


Link to post
Share on other sites

I'm getting deeper into my contract pack and I found something that I'd like to be able to do that isn't strictly NECESSARY, but would be cool. You have functionality to spawn .craft files in the world. Would it be possible to - using a behavior - gift the craft files to the player? The player shouldn't be able to use them without having unlocked the parts or anything like that. Essentially I'd like to just copy the craft file from my ContractPacks folder into the currently running game's ships\VAB or ships\SPH folder. That way when the player collects a vessel, it's kind of putting that vessel in their garage so they can use it later. My thought would be that the file would be gifted after the contract was completed.

This doesn't need done with parts like the change I requested for SpawnVessel, just actual .craft files. And like I said it's not a biggie, it would just be cool :D

Edited by 5thHorseman

Share this post


Link to post
Share on other sites
I'm getting deeper into my contract pack and I found something that I'd like to be able to do that isn't strictly NECESSARY, but would be cool. You have functionality to spawn .craft files in the world. Would it be possible to - using a behavior - gift the craft files to the player? The player shouldn't be able to use them without having unlocked the parts or anything like that. Essentially I'd like to just copy the craft file from my ContractPacks folder into the currently running game's ships\VAB or ships\SPH folder. That way when the player collects a vessel, it's kind of putting that vessel in their garage so they can use it later. My thought would be that the file would be gifted after the contract was completed.

This doesn't need done with parts like the change I requested for SpawnVessel, just actual .craft files. And like I said it's not a biggie, it would just be cool :D

Raised [#294]. I'm sure you already know this, but I do feel the need to point out that players won't be able to use the craft unless they've researched all parts that are used in the craft file.

Share this post


Link to post
Share on other sites

Can I do this as a vessel define?

define = "moonorbiter"+"@targetBody"

Just to make it so that the vehicle name is unique to a target body?

Also, what would be the best way to grab that value for another part of the contract? Assuming it is the same contract.

I thought I saw something in the docs, but not seeing it right now.

~edit: @VesselParameterxys/define looks to be it assuming they have the same parent node.

Edited by Nori

Share this post


Link to post
Share on other sites
Can I do this as a vessel define?

define = "moonorbiter"+"@targetBody"

Just to make it so that the vehicle name is unique to a target body?

Also, what would be the best way to grab that value for another part of the contract? Assuming it is the same contract.

I thought I saw something in the docs, but not seeing it right now.

~edit: @VesselParameterxys/define looks to be it assuming they have the same parent node.

Hmm.... I suspect that'll complain about casting from string to VesselIdentifier. Could you describe what you're doing in more detail (or post up the config). I may be able to suggest other ways of accomplishing it.

Share this post


Link to post
Share on other sites
Hmm.... I suspect that'll complain about casting from string to VesselIdentifier. Could you describe what you're doing in more detail (or post up the config). I may be able to suggest other ways of accomplishing it.

Ok, but it's a doozy...

Code is below. But the basic idea is to generate contracts that target planets with a SMA lower than Kerbin's (stole the idea from your remotetech pack).

In stock this is 2 planets, in New Horizon I think it is 3. So this contract could theoretically be triggered a few times.

Anyway, I was discovering that optional parameters get hidden if the parent is completed. So I decided I would setup to VesselParameterGroups. The first one is the basics of the contract. In this case, have min crew of 1, orbit for 60m with a maxApa of 2x the space threshold.

Then once that is complete the next VesselParameterGroup triggers. Depending on the planet it will have a optional science collection and then a return home. If the planet has a surface it also shows a optional landing parameter with surface science collection.

Ok, so back to why I was trying to use define/vessel. Since these are two seperate VesselParameterGroups I wanted to make sure that the same vehicle was completing them both. But since the contract could trigger for multiple planets I thought using the planet as a portion of the vessel name might be a nifty way to get around that.

I did notice that there is a dissassociateVesselsOnContractCompletion option and that might work too.


//--Inner Planet Orbit and Landing
CONTRACT_TYPE
{
name = InnerOrbits
group = FarExplorer

title = Orbit and Explore @targetBody
description = ...
synopsis = ...
completedMessage = ...

agent = Experimental Astrophysics Group

prestige = Exceptional
targetBody = @/validTarget
weight = 2.0
maxSimultaneous = 2
rewardScience = 8.0
rewardReputation = 16.0
rewardFunds = 40000
failureFunds = 20000
failureReputation = 8.0
advanceFunds = 20000

DATA
{
type = bool
homeIsPlanet = HomeWorld().Parent() == Sun
}

DATA
{
type = double
sma = @homeIsPlanet ? HomeWorld().SemiMajorAxis() : HomeWorld().Parent().SemiMajorAxis()
}

DATA
{
type = CelestialBody
activeUniqueValue = true
validTarget = AllBodies().Where(cb => cb.SemiMajorAxis() < @/sma && cb.IsPlanet() && cb.HaveReached() && cb.HaveLandedOn() == false).Random()
}

REQUIREMENT
{
name = Any
type = Any

REQUIREMENT
{
name = CompleteContract
type = CompleteContract
contractType = EscapeHomeWorld
}

REQUIREMENT
{
name = CompleteContract
type = CompleteContract
contractType = UMEscapeHomeworld
}
}

REQUIREMENT
{
name = Any
type = Any

REQUIREMENT
{
name = CompleteContract
type = CompleteContract
contractType = FirstOrbits
}

REQUIREMENT
{
name = CompleteContract
type = CompleteContract
contractType = FirstLandings
}
}

PARAMETER
{
name = innerorbit
type = VesselParameterGroup
define = "innerorbiter"+"@targetBody"
duration = 60m
title = Achieve orbit of @targetBody

PARAMETER
{
name = HasCrew
type = HasCrew
minCrew = 1
}

PARAMETER
{
name = Orbit
type = Orbit
maxApA = @targetBody.SpaceAltitudeThreshold() * 2
}
}

PARAMETER
{
name = innerhome
type = VesselParameterGroup
vessel = @innerorbit/define
title = xyz
notes = xyz123

completeInSequence = true

PARAMETER
{
name = ForLanding
type = Any
optional = true
notes = Optionally land and collect science.

REQUIREMENT
{
name = Expression
type = Expression
expression = @targetBody.HasSurface() == true
}

PARAMETER
{
name = landing
type = ReachState
situation = LANDED
rewardFunds = 30000
rewardReputation = 10
}

PARAMETER
{
name = SurfaceScience
type = CollectScience
rewardFunds = 10000
rewardReputation = 5

location = Surface
experiment = evaReport
experiment = temperatureScan
experiment = crewReport
experiment = mobileMaterialsLab
experiment = mysteryGoo

recoveryMethod = RecoverOrTransmit
}
}

PARAMETER
{
name = SpaceScience
type = CollectScience
optional = true
rewardFunds = 5000

location = Space
notes = Optionally collect several science experiements for a bonus.
experiment = evaReport
experiment = temperatureScan
experiment = crewReport
experiment = mysteryGoo

recoveryMethod = RecoverOrTransmit
}

PARAMETER
{
name = ReturnHome
type = ReturnHome
}
}


BEHAVIOUR
{
name = AwardExperience
type = AwardExperience

parameter = ForLanding
experience = 4 / @targetBody.Multiplier()
}
}

Share this post


Link to post
Share on other sites
New release with a handful of bug fixes. Download now!

Contract Configurator 1.6.6

  • Fixed exception in Science sub-system (happens in latest FieldResearch release).
  • Added additional check conditions for ReturnHome (thanks Lewtz and Jirnsum).
  • Fixed another rare exception when removing a planet pack (thanks Hlaford).
  • Fixed exception when recovering a vessel completes a contract (thanks AccidentalDisassembly).

Is there a way to salvage my save file or is it gone? Thanks. Nevermind. I fixed it....I'm not sure how. Thank you

Edited by Hlaford

Share this post


Link to post
Share on other sites
Ok, but it's a doozy...

Code is below. But the basic idea is to generate contracts that target planets with a SMA lower than Kerbin's (stole the idea from your remotetech pack).

In stock this is 2 planets, in New Horizon I think it is 3. So this contract could theoretically be triggered a few times.

Anyway, I was discovering that optional parameters get hidden if the parent is completed. So I decided I would setup to VesselParameterGroups. The first one is the basics of the contract. In this case, have min crew of 1, orbit for 60m with a maxApa of 2x the space threshold.

Then once that is complete the next VesselParameterGroup triggers. Depending on the planet it will have a optional science collection and then a return home. If the planet has a surface it also shows a optional landing parameter with surface science collection.

Ok, so back to why I was trying to use define/vessel. Since these are two seperate VesselParameterGroups I wanted to make sure that the same vehicle was completing them both. But since the contract could trigger for multiple planets I thought using the planet as a portion of the vessel name might be a nifty way to get around that.

I did notice that there is a dissassociateVesselsOnContractCompletion option and that might work too.


//--Inner Planet Orbit and Landing
CONTRACT_TYPE
{
name = InnerOrbits
group = FarExplorer

title = Orbit and Explore @targetBody
description = ...
synopsis = ...
completedMessage = ...

agent = Experimental Astrophysics Group

prestige = Exceptional
targetBody = @/validTarget
weight = 2.0
maxSimultaneous = 2
rewardScience = 8.0
rewardReputation = 16.0
rewardFunds = 40000
failureFunds = 20000
failureReputation = 8.0
advanceFunds = 20000

DATA
{
type = bool
homeIsPlanet = HomeWorld().Parent() == Sun
}

DATA
{
type = double
sma = @homeIsPlanet ? HomeWorld().SemiMajorAxis() : HomeWorld().Parent().SemiMajorAxis()
}

DATA
{
type = CelestialBody
activeUniqueValue = true
validTarget = AllBodies().Where(cb => cb.SemiMajorAxis() < @/sma && cb.IsPlanet() && cb.HaveReached() && cb.HaveLandedOn() == false).Random()
}

REQUIREMENT
{
name = Any
type = Any

REQUIREMENT
{
name = CompleteContract
type = CompleteContract
contractType = EscapeHomeWorld
}

REQUIREMENT
{
name = CompleteContract
type = CompleteContract
contractType = UMEscapeHomeworld
}
}

REQUIREMENT
{
name = Any
type = Any

REQUIREMENT
{
name = CompleteContract
type = CompleteContract
contractType = FirstOrbits
}

REQUIREMENT
{
name = CompleteContract
type = CompleteContract
contractType = FirstLandings
}
}

PARAMETER
{
name = innerorbit
type = VesselParameterGroup
define = "innerorbiter"+"@targetBody"
duration = 60m
title = Achieve orbit of @targetBody

PARAMETER
{
name = HasCrew
type = HasCrew
minCrew = 1
}

PARAMETER
{
name = Orbit
type = Orbit
maxApA = @targetBody.SpaceAltitudeThreshold() * 2
}
}

PARAMETER
{
name = innerhome
type = VesselParameterGroup
vessel = @innerorbit/define
title = xyz
notes = xyz123

completeInSequence = true

PARAMETER
{
name = ForLanding
type = Any
optional = true
notes = Optionally land and collect science.

REQUIREMENT
{
name = Expression
type = Expression
expression = @targetBody.HasSurface() == true
}

PARAMETER
{
name = landing
type = ReachState
situation = LANDED
rewardFunds = 30000
rewardReputation = 10
}

PARAMETER
{
name = SurfaceScience
type = CollectScience
rewardFunds = 10000
rewardReputation = 5

location = Surface
experiment = evaReport
experiment = temperatureScan
experiment = crewReport
experiment = mobileMaterialsLab
experiment = mysteryGoo

recoveryMethod = RecoverOrTransmit
}
}

PARAMETER
{
name = SpaceScience
type = CollectScience
optional = true
rewardFunds = 5000

location = Space
notes = Optionally collect several science experiements for a bonus.
experiment = evaReport
experiment = temperatureScan
experiment = crewReport
experiment = mysteryGoo

recoveryMethod = RecoverOrTransmit
}

PARAMETER
{
name = ReturnHome
type = ReturnHome
}
}


BEHAVIOUR
{
name = AwardExperience
type = AwardExperience

parameter = ForLanding
experience = 4 / @targetBody.Multiplier()
}
}

Oh right, forgot about dissassociateVesselsOnContractCompletion. This is the exact scenario that it was intended for. If you need to allow multiple simultaneous versions of this contract it won't do though...

- - - Updated - - -

Is there a way to salvage my save file or is it gone? Thanks. Nevermind. I fixed it....I'm not sure how. Thank you

No problem - let me know if you see further issues, and try to get an immediate log... I'm still concerned that I never found the real root cause.

Share this post


Link to post
Share on other sites

Yeah I do want to have multiples be available. I mean when you consider a transfer to a outer planet could take years... So yeah I don't think that would work either, thus the unique value per contract instance.

And yes, I am stalking this thread.

Share this post


Link to post
Share on other sites
Raised [#294]. I'm sure you already know this, but I do feel the need to point out that players won't be able to use the craft unless they've researched all parts that are used in the craft file.

Not only understood, but expected. And as always, thanks.

That's why I said "The player shouldn't be able to use them without having unlocked the parts or anything like that."

I figure this is the best place to post this, as people into the mod are more likely to read this here than anywhere else. I'm at the point where I'd like people to test the pack. Should only take a half hour or so, and it's right now in pre-alpha. Once you've played for a half hour or so on a brand new save, you'll have to stop because there's nothing left to do. I just would like to know first off if everything is explained well enough, and if anybody can break anything or feels anything is too hard or too easy.

Edited by 5thHorseman

Share this post


Link to post
Share on other sites
That's why I said "The player shouldn't be able to use them without having unlocked the parts or anything like that."

Yep... you caught me doing the "only reading half the post" thing that I sometimes do. :)

I figure this is the best place to post this, as people into the mod are more likely to read this here than anywhere else. I'm at the point where I'd like people to test the pack. Should only take a half hour or so, and it's right now in pre-alpha. Once you've played for a half hour or so on a brand new save, you'll have to stop because there's nothing left to do. I just would like to know first off if everything is explained well enough, and if anybody can break anything or feels anything is too hard or too easy.

I'd probably be willing to take a peek (although I'm more likely to just look at the config than play in-game too much). Post or PM a link and I'll have a look.

Edited by nightingale

Share this post


Link to post
Share on other sites
I'd probably be willing to take a peek (although I'm more likely to just look at the config than play in-game too much). Post or PM a link and I'll have a look.

Not sure how much you can tell from the configs, except my syntax preferences :D I know it functionally works. I want to know how hard it is to complete certain steps. In particular, nailing the final contract where you scavenge the plane.

Here's a link, which I should have put in the last post I guess :blush:http://pulpaudio.com/ksp/hmv/HMV_Scavenger_0.0.1.zip

You MUST have modulemanager (and contractconfigurator, obviously) installed. No other mods are required nor are they explicitly supported yet. Part mods in particular are not supported. I don't even currently support all Squad parts. Which is exactly why it's in pre-alpha.

And whatever you do, don't load this on an already-started save. I have no idea what it'd do :D

Edited by 5thHorseman

Share this post


Link to post
Share on other sites
Not sure how much you can tell from the configs, except my syntax preferences :D I know it functionally works. I want to know how hard it is to complete certain steps. In particular, nailing the final contract where you scavenge the plane.

Here's a link, which I should have put in the last post I guess :blush:http://pulpaudio.com/ksp/hmv/HMV_Scavenger_0.0.1.zip

You MUST have modulemanager (and contractconfigurator, obviously) installed. No other mods are required nor are they explicitly supported yet. Part mods in particular are not supported. I don't even currently support all Squad parts. Which is exactly why it's in pre-alpha.

And whatever you do, don't load this on an already-started save. I have no idea what it'd do :D

Some fool Kerbal left a grabby-car in the sky!!

6950RSD.png

protip: leaving the altitude out in SpawnVessel will spawn it on the ground. If you need to make adjustments due to the vessel height not being properly detected, use the height attribute.

- - - Updated - - -

Okay, a couple of the Contract Configurator things:

  1. You can put the lists of coordinates into a DATA node in the contract group (so you don't have to define them over and over and over again).
  2. You can do @partToScavenge within a text string (like the contract description or title)... this'll make it easier for the player to identify the part that he's going to get.
  3. I'd recommend doing something on contract completion either via the completedMessage or Message behaviour (or the DialogBox that is coming in 1.7.0, more below on that) to communicate to the player what part(s) they've gained access to.
  4. Is it by design that you don't actually have to recover the vessel (I used it to accelerate my testing by skipping building my own grabby-car)?

And more subjective things, take with a dose of your favourite flavourant (extra u's in there, just for you):

  1. Grabby mission felt like the right difficulty, I have to reload a couple times to get the right angle to land a reasonable distance from it using the solid booster.
  2. I could see the "go grab a single part" thing getting old quickly. Some possible suggestions:

    1. Make the contract have multiple parts scattered within a 50m radius, and have the player grab all of them (maybe the equivalent to one tech's worth of parts).
    2. If a part is skipped, later contracts could give out that part as well (eg. getting the orange tank would also give the smaller tanks of the same radius).

    3. There's a requirement that allows you to have contract require a certain amount of funds/science/rep to fire. If you want to give science points a different meaning, you could use that to offer something special when the player does hit certain science thresholds.
    4. Overall I like the idea, because it's different. We need more different things. My concern would be that if I was playing this I might be bored/frustrated quickly, as it could start feeling like too much of a bunch of "fetch quests" tied together. This may not be a concern once you expand on the breadth of contracts.
    5. All you other people reading this are not off the hook - go give 5thHorseman your feedback. :D


      Oh, and you might be interested in the feature that I'm currently working on, it might fit well into your contract pack - rich text dialog boxes:
      5OGZ1xp.png

Share this post


Link to post
Share on other sites

Haha! I thought I tested the grabby car the last time I made a change to it. I think I will start leaving the altitude off and just setting the height for all of these.

I think if you get close enough to it, it'll fall. Though I also think it'll be too busted to complete the contract :D

Here's one I altered and tested. http://pulpaudio.com/ksp/hmv/HMV_Scavenger_0.0.2.zip

- - - Updated - - -

You can put the lists of coordinates into a DATA node in the contract group (so you don't have to define them over and over and over again).

Each contract category will have its own list, so I'm not sure that's a big deal. The starter rocket parts and plane parts share a list but that may change.

You can do @partToScavenge within a text string (like the contract description or title)... this'll make it easier for the player to identify the part that he's going to get.

Good idea. It says it in the contract, but in the title is a good idea as well.

I'd recommend doing something on contract completion either via the completedMessage or Message behaviour (or the DialogBox that is coming in 1.7.0, more below on that) to communicate to the player what part(s) they've gained access to.

Agreed. It's at least implied that you get all the parts that were on the thing you grabbed, but not actually ever said.

Is it by design that you don't actually have to recover the vessel (I used it to accelerate my testing by skipping building my own grabby-car)?

If "By design" you mean "I know about it" then yes :) I wasn't 100% sure how forcing recovery of the vessel that started out as 2 vessels would react. I'm not recovering "grabby car" but a conglomeration of the two. It's on my to-test list. :)

I could see the "go grab a single part" thing getting old quickly.

I agree. I have some plans for making them less grindy as a whole, including repurposing one of the science parts as a "remote scanner" so you can grab a part in orbit of Jool, scan it, and have it become available back home. Also, the three current "vessel" contracts are not all there will be of those, and those are kind of "part packs" with unique requirements. Like the next one: Go up and fetch the Kerbonational Space Station, and somehow bring it to the ground intact :D

If a part is skipped, later contracts could give out that part as well (eg. getting the orange tank would also give the smaller tanks of the same radius).

Oooh I like this idea. I've been trying to figure out how to give multiple parts with one recovery, without ending the entire contract pack in 5 quick grabs. :)

There's a requirement that allows you to have contract require a certain amount of funds/science/rep to fire. If you want to give science points a different meaning, you could use that to offer something special when the player does hit certain science thresholds.

The goal of this pack is that science doesn't matter. I don't touch it, but you never have to get it. I'm actually doing this as an alternative to the way parts are unlocked now.

My concern would be that if I was playing this I might be bored/frustrated quickly, as it could start feeling like too much of a bunch of "fetch quests" tied together. This may not be a concern once you expand on the breadth of contracts.

That's what I'm hoping. There is a (surprisingly large) minimum of parts you need to get going, and another minimum of parts you need to be able to get to LKO, Mun, Minmus, and beyond. So at the start I'm having a bit of fetch glut. But after that I'm hoping to spread the remaining parts throughout the system both in sets (like the 2 included, one of which actually works) of 2-4 per planet/moon, and in unique bases and stations here and there. I'm hoping that "OMG I get the NERVA!" excitement will outweigh the "OMG another fetch quest!" boredom.

All you other people reading this are not off the hook - go give 5thHorseman your feedback. :D

I wholeheartedly agree!

Oh, and you might be interested in the feature that I'm currently working on, it might fit well into your contract pack - rich text dialog boxes:

Iiiinteresting.

- - - Updated - - -

Actually I just looked at the documentation, and I don't see a way to specify that a vessel be recovered to end a contract. Is there a way to do this?

Share this post


Link to post
Share on other sites

One last thing, I'm having weird issues after completing a few of the contracts. I lose all ability to target, or even see the little HUD markers for nearby things. I had 3 grabby cars and a part scattered around KSC and couldn't see any of them. I went back to the Space Center screen and the markers had them up in the air and far away. I went to the tracking station and back and they came back to the correct positions. I went back to my grabby car, and could see the stuff visibly but still lacked the UI markers.

All in all it was weird. I don't know if it's in any way caused by your mod or I'm just experiencing Claw Weirdness, but without a solution I'm not sure how well the whole contract pack will work. Maybe I'll try it with Claw's stock bug fix for the Grabber.

Not sure if it'll help, but here's my output_log.txt from the session where that all happened. I had the full debug messages on if that helps. http://pulpaudio.com/ksp/output_log.zip

Edited by 5thHorseman

Share this post


Link to post
Share on other sites

Hey HMV!

I like the idea of achievement based part acquisition. So, I tried out your contracts.. brand new game/save stock +CC and MM

Javascript is disabled. View full album

Problems I experienced:

1. The car did not appear at first, after I ran to where it was, and it was not there, then I checked the tracking station and it was there after reloading from there.. Dunno what caused this?

2. The car was moving... I fixed this in my contract that spawns a plane at the edge of a cliff by editing the .craft file and changing the brakes to engaged = true on the 2 rear wheels. (they would go back to normal after toggling the brakes)

3.My car didn't have a kerbal - totally my bad.. operator error :D

4.The plane contract was unclear, and/or the plane was not functional. (I was not able to get engines to activate through staging in my contracts either, I got around that by assigning hotkeys to toggle the engines.)

Excellent pack! :D

*edit- I got it to work after getting a kerbal on board. :)

Edited by MrChumley

Share this post


Link to post
Share on other sites
Yeah I do want to have multiples be available. I mean when you consider a transfer to a outer planet could take years... So yeah I don't think that would work either, thus the unique value per contract instance.

Don't mean to be a nag, but was wondering if you had any ideas here.

Could I just define something in a DATA node or will that not translate over to VesselIdentifier?

Share this post


Link to post
Share on other sites
Don't mean to be a nag, but was wondering if you had any ideas here.

Could I just define something in a DATA node or will that not translate over to VesselIdentifier?

Whoops, glad you posted a reminder, because I completely lost your reply over the page break. Anyway, I made some changes so that the casting from string to VesselIdentifier will now work as expected. Give this dev dll a try. I pulled some stuff out to make it easier for me to play around with, but the way you posted it should work now. If not, here's what I tested with:



DATA
{
type = VesselIdentifier

theVessel = "innerorbiter"+"@targetBody"
}

PARAMETER
{
name = innerorbit
type = VesselParameterGroup
define = @/theVessel
...

PARAMETER
{
name = innerhome
type = VesselParameterGroup
vessel = @/theVessel
...

- - - Updated - - -

Actually I just looked at the documentation, and I don't see a way to specify that a vessel be recovered to end a contract. Is there a way to do this?

Huh... that's just one of those things I just assumed was there. I think I stayed away from it because the recovery stuff always scares me (if it goes wrong, the player could be forced to redo the whole contract). Anyway, makes sense in your scenario, so raised [#295].

- - - Updated - - -

One last thing, I'm having weird issues after completing a few of the contracts. I lose all ability to target, or even see the little HUD markers for nearby things. I had 3 grabby cars and a part scattered around KSC and couldn't see any of them. I went back to the Space Center screen and the markers had them up in the air and far away. I went to the tracking station and back and they came back to the correct positions. I went back to my grabby car, and could see the stuff visibly but still lacked the UI markers.

All in all it was weird. I don't know if it's in any way caused by your mod or I'm just experiencing Claw Weirdness, but without a solution I'm not sure how well the whole contract pack will work. Maybe I'll try it with Claw's stock bug fix for the Grabber.

Not sure if it'll help, but here's my output_log.txt from the session where that all happened. I had the full debug messages on if that helps. http://pulpaudio.com/ksp/output_log.zip

I'm glad you mention going to the space center and tracking station, as that helped me isolate where in the log this happened. In flight before you went to the space center, there's this fun little exception:

NullReferenceException
at (wrapper managed-to-native) UnityEngine.Transform:INTERNAL_CALL_TransformDirection (UnityEngine.Transform,UnityEngine.Vector3&)
at UnityEngine.Transform.TransformDirection (Vector3 direction) [0x00000] in <filename unknown>:0
at ActiveJoint.getControlOrt (Vector3 refAxis, PartSpaceMode mode) [0x00000] in <filename unknown>:0
at ActiveJoint.applyCoordsUpdate () [0x00000] in <filename unknown>:0
at ActiveJoint.onPartPack (.Part p) [0x00000] in <filename unknown>:0
at EventData`1[Part].Fire (.Part data) [0x00000] in <filename unknown>:0
at Part.Pack () [0x00000] in <filename unknown>:0
at Vessel.GoOnRails () [0x00000] in <filename unknown>:0
at FlightGlobals.setActiveVessel (.Vessel v, Boolean force) [0x00000] in <filename unknown>:0
at FlightGlobals.ForceSetActiveVessel (.Vessel v) [0x00000] in <filename unknown>:0
at VesselSwitching.Update () [0x00000] in <filename unknown>:0

The key part of the exception is ActiveJoint - that's used by the claw, so I have to pretty much write this one off as Claw Weirdnessâ„¢.

Share this post


Link to post
Share on other sites
Huh... that's just one of those things I just assumed was there. I think I stayed away from it because the recovery stuff always scares me (if it goes wrong, the player could be forced to redo the whole contract). Anyway, makes sense in your scenario, so raised [#295].

Amusingly, I've been warming up to the idea of simplifying things by spawning everything in one contract, and allowing the player to go from thing to thing, claw it, drop it, and then move on to the other thing. It'd save a lot of time on the player's part and not be any harder than it is now, just less grindy.

I'm glad you mention going to the space center and tracking station, as that helped me isolate where in the log this happened. In flight before you went to the space center, there's this fun little exception:

NullReferenceException
at (wrapper managed-to-native) UnityEngine.Transform:INTERNAL_CALL_TransformDirection (UnityEngine.Transform,UnityEngine.Vector3&)
at UnityEngine.Transform.TransformDirection (Vector3 direction) [0x00000] in <filename unknown>:0
at ActiveJoint.getControlOrt (Vector3 refAxis, PartSpaceMode mode) [0x00000] in <filename unknown>:0
at ActiveJoint.applyCoordsUpdate () [0x00000] in <filename unknown>:0
at ActiveJoint.onPartPack (.Part p) [0x00000] in <filename unknown>:0
at EventData`1[Part].Fire (.Part data) [0x00000] in <filename unknown>:0
at Part.Pack () [0x00000] in <filename unknown>:0
at Vessel.GoOnRails () [0x00000] in <filename unknown>:0
at FlightGlobals.setActiveVessel (.Vessel v, Boolean force) [0x00000] in <filename unknown>:0
at FlightGlobals.ForceSetActiveVessel (.Vessel v) [0x00000] in <filename unknown>:0
at VesselSwitching.Update () [0x00000] in <filename unknown>:0

The key part of the exception is ActiveJoint - that's used by the claw, so I have to pretty much write this one off as Claw Weirdnessâ„¢.

Yikes. I was afraid of that. I'll install the Stock Bug Fixes and - assuming it works - will make it a requirement. If it doesn't work... I'll have to rethink this whole thing. Maybe just require you to recover the parts after an EVA'd Kerbal gets within a couple meters of it.

1. The car did not appear at first, after I ran to where it was, and it was not there, then I checked the tracking station and it was there after reloading from there.. Dunno what caused this?

I think this is likely due to the problems described above. Hopefully the Stock Bug Fixes will correct it.

2. The car was moving... I fixed this in my contract that spawns a plane at the edge of a cliff by editing the .craft file and changing the brakes to engaged = true on the 2 rear wheels. (they would go back to normal after toggling the brakes)

I was having terrible troubles with forcing the breaks on in the .craft file. Like, they would not toggle back off ever. Especially if I then gift the craft to the player, I don't want any weirdness. Maybe also make TweakableEverything (which I believe includes a brake toggle) a required mod as well :D I *thought* I put the car in the low point of a valley, but have fiddled with it since (due to nightingale's sky car problems) so maybe it moved a bit.

4.The plane contract was unclear, and/or the plane was not functional. (I was not able to get engines to activate through staging in my contracts either, I got around that by assigning hotkeys to toggle the engines.)

I noticed this as well. I don't know what the problem with the engines is. I was going to try to add an empty stage before the engines but haven't gotten around to it. I was able to right click the engines and "Activate" them, and then fly the plane back to the KSC to claw it. Note, that is not strictly necessary. All that is necessary is getting a claw attached to the plane. The problem is, with the tools you have available getting a claw attached to the plane on the island is not very easy. I tried everything I could think of and gave up.

Side note, the plane used to be a "crashed plane" in the mountains. I made it a functional plane on the island specifically so you didn't have to get a claw to it.

Excellent pack! :D

Thanks :) I'm really enjoying making it.

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.