Jump to content

[1.10.1+] Contract Configurator [v1.30.5] [2020-10-05]


nightingale

Recommended Posts

Just wondering when you're going to release the latest fixes? I want post some contract changes to RP-0 but figure I should wait until 1.7.7 releases. :)

- - - Updated - - -

This may simply be that I haven't researched enough but is there a way to select a random biome on a given planet/moon? I want to create a contract for manned lunar landings in RP-0 but rather than letting you land any old place, I wanted to increase the stacks by having the contract require you land in a specific biome. I see that the "ReachState" parameter can take the "biome" attribute. So now I just need to pull a ranomd biome from those available on the indicated targetBody.

Link to comment
Share on other sites

Just wondering when you're going to release the latest fixes? I want post some contract changes to RP-0 but figure I should wait until 1.7.7 releases. :)

- - - Updated - - -

This may simply be that I haven't researched enough but is there a way to select a random biome on a given planet/moon? I want to create a contract for manned lunar landings in RP-0 but rather than letting you land any old place, I wanted to increase the stacks by having the contract require you land in a specific biome. I see that the "ReachState" parameter can take the "biome" attribute. So now I just need to pull a ranomd biome from those available on the indicated targetBody.

I thought there was something to get the biomes for a celestial body, but couldn't find it. Raised [#329].

I'll try to get a release out tonight or tomorrow.

Link to comment
Share on other sites

I thought there was something to get the biomes for a celestial body, but couldn't find it. Raised [#329].

I'll try to get a release out tonight or tomorrow.

Closest things I've found so far:

Under "CelestialBody" there is a "List < Biome > Biomes()"

Under "List" there is a "T Random()"

Trouble I'm having is can't seem to make the first work. I tried the following:

DATA

{

type = List

SelectBiome = List < Biome > Biomes()

}

But I'm getting an error about "Value is not a convertible object". The full error from KSP.log is as follows:

[ERR 09:46:39.926] ContractConfigurator.ContractType: CONTRACT_TYPE 'HSFLandingMoon1Repeatable': Error parsing SelectBiome

[EXC 09:46:39.927] InvalidCastException: Value is not a convertible object: System.String to Boo.Lang.List

System.Convert.ToType (System.Object value, System.Type conversionType, IFormatProvider provider, Boolean try_target_to_type)

System.String.System.IConvertible.ToType (System.Type targetType, IFormatProvider provider)

System.Convert.ToType (System.Object value, System.Type conversionType, IFormatProvider provider, Boolean try_target_to_type)

System.Convert.ChangeType (System.Object value, System.Type conversionType)

ContractConfigurator.ConfigNodeUtil.ParseSingleValue

  • (System.String key, System.String stringValue, Boolean allowExpression)
    ContractConfigurator.ConfigNodeUtil.ParseValue
    • (.ConfigNode configNode, System.String key, Boolean allowExpression)
      ContractConfigurator.ConfigNodeUtil.ParseValue
      • (.ConfigNode configNode, System.String key, System.Action`1 setter, IContractConfiguratorFactory obj, Boo.Lang.List defaultValue, System.Func`2 validation)
        UnityEngine.Debug:LogException(Exception)
        ContractConfigurator.LoggingUtil:LogException(Exception)
        ContractConfigurator.ConfigNodeUtil:ParseValue(ConfigNode, String, Action`1, IContractConfiguratorFactory, List, Func`2)
        ContractConfigurator.ConfigNodeUtil:ParseValue(ConfigNode, String, Action`1, IContractConfiguratorFactory)
        System.Reflection.MethodBase:Invoke(Object, Object[])
        ContractConfigurator.ExpressionParser.DataNode:ParseDataNodes(ConfigNode, IContractConfiguratorFactory, Dictionary`2, Dictionary`2)
        ContractConfigurator.ContractType:Load(ConfigNode)
        ContractConfigurator.<LoadContractConfig>d__1e:MoveNext()
        ContractConfigurator.<ContractConfiguratorReload>d__13:MoveNext()
Link to comment
Share on other sites

Closest things I've found so far:

Under "CelestialBody" there is a "List < Biome > Biomes()"

Under "List" there is a "T Random()"

Trouble I'm having is can't seem to make the first work. I tried the following:

DATA

{

type = List

SelectBiome = List < Biome > Biomes()

}

But I'm getting an error about "Value is not a convertible object". The full error from KSP.log is as follows:

[ERR 09:46:39.926] ContractConfigurator.ContractType: CONTRACT_TYPE 'HSFLandingMoon1Repeatable': Error parsing SelectBiome

[EXC 09:46:39.927] InvalidCastException: Value is not a convertible object: System.String to Boo.Lang.List

System.Convert.ToType (System.Object value, System.Type conversionType, IFormatProvider provider, Boolean try_target_to_type)

System.String.System.IConvertible.ToType (System.Type targetType, IFormatProvider provider)

System.Convert.ToType (System.Object value, System.Type conversionType, IFormatProvider provider, Boolean try_target_to_type)

System.Convert.ChangeType (System.Object value, System.Type conversionType)

ContractConfigurator.ConfigNodeUtil.ParseSingleValue

  • (System.String key, System.String stringValue, Boolean allowExpression)
    ContractConfigurator.ConfigNodeUtil.ParseValue
    • (.ConfigNode configNode, System.String key, Boolean allowExpression)
      ContractConfigurator.ConfigNodeUtil.ParseValue
      • (.ConfigNode configNode, System.String key, System.Action`1 setter, IContractConfiguratorFactory obj, Boo.Lang.List defaultValue, System.Func`2 validation)
        UnityEngine.Debug:LogException(Exception)
        ContractConfigurator.LoggingUtil:LogException(Exception)
        ContractConfigurator.ConfigNodeUtil:ParseValue(ConfigNode, String, Action`1, IContractConfiguratorFactory, List, Func`2)
        ContractConfigurator.ConfigNodeUtil:ParseValue(ConfigNode, String, Action`1, IContractConfiguratorFactory)
        System.Reflection.MethodBase:Invoke(Object, Object[])
        ContractConfigurator.ExpressionParser.DataNode:ParseDataNodes(ConfigNode, IContractConfiguratorFactory, Dictionary`2, Dictionary`2)
        ContractConfigurator.ContractType:Load(ConfigNode)
        ContractConfigurator.<LoadContractConfig>d__1e:MoveNext()
        ContractConfigurator.<ContractConfiguratorReload>d__13:MoveNext()
        That's the one. The syntax you're using is wrong. Try something like this:

DATA
{
type = CelestialBody
cb = HomeWorld()
}

DATA
{
type = Biome
biome = @cb.Biomes().Random()
}
Link to comment
Share on other sites

That's the one. The syntax you're using is wrong. Try something like this:


DATA
{
type = CelestialBody
cb = HomeWorld()
}

DATA
{
type = Biome
biome = @cb.Biomes().Random()
}

Just needed the correct syntax. Thanks Nightingale. :)

Link to comment
Share on other sites

I know this kind of report is next to useless but there still seems to be some kind of problem with duration. I'm running the 3/LEO contract from RP-0. I have my Apollo CSM in the proper orbit and the contract says "Orbiting.... 7 days, 23:56:38" and counting. Problem is, it said that 6 days ago when I first got into orbit. Rather then just staying with the craft for the last 6 days, I jumped to several other craft, plus launched one. I only came back to this flight to check on the Life Support and noticed that the timer got reset. I don't know what actually happened for the timer to reset itself.

Link to comment
Share on other sites

I know this kind of report is next to useless but there still seems to be some kind of problem with duration. I'm running the 3/LEO contract from RP-0. I have my Apollo CSM in the proper orbit and the contract says "Orbiting.... 7 days, 23:56:38" and counting. Problem is, it said that 6 days ago when I first got into orbit. Rather then just staying with the craft for the last 6 days, I jumped to several other craft, plus launched one. I only came back to this flight to check on the Life Support and noticed that the timer got reset. I don't know what actually happened for the timer to reset itself.

Can you provide a link in GitHub to the actual 3/LEO contract (or paste the relevant content here)? That'll help me dig a bit deeper.

Link to comment
Share on other sites

Can you provide a link in GitHub to the actual 3/LEO contract (or paste the relevant content here)? That'll help me dig a bit deeper.

Here's the actual file that I'm using. It's slightly altered from what is on RP-0's github since I'm waiting for 1.7.7 to post my alterations. I should also point out. I gave my craft enough life support to run for another 6 days (what I "lost" when the contract reset) then advanced time until the contract said I'd completed the time. Then I change the orbit I was in, moved to another craft, then back and found that the timer had been reset again. Though, strangely, now that I am no longer in the proper oribt, the timer is still counting down and it's acting as if I was in the correct orbit. (hopefuly that makes sense).

////////////////////////////

CONTRACT_TYPE

{

name = HSFOrbitalLEO3Repeatable

group = HumanContracts

title = Human Orbital (3/LEO)

description = Launch a crewed spacecraft capable of supporting at least three people into orbit for a routine mission (must orbit for @/DurationText days) and return safely home.

synopsis = Fly a three-person LEO Orbital mission.

completedMessage = Crew alive and well after the mission--congratulations!

cancellable = true

declinable = true

deadline = 720 // 6 months *4

prestige = Trivial

targetBody = HomeWorld()

maxSimultaneous = 1

// reward block

advanceFunds = 100000 * (1 + (2 * @DurationText / 10))

rewardReputation = 100.0 * (1 + (2 * @DurationText / 10))

rewardFunds = 100000 * (1 + (2 * @DurationText / 10))

failureReputation = 1000.0 * (1 + (2 * @DurationText / 10))

failureFunds = 150000 * (1 + (2 * @DurationText / 10))

REQUIREMENT

{

name = ReqCapsules

type = TechResearched

tech = commandModules

}

REQUIREMENT

{

name = CompleteContractHSFOrbit

type = CompleteContract

contractType = HSFOrbitalLEO2Repeatable

}

DATA

{

type = Duration

Duration = Round(Random(7d, 14d), 1d)

}

DATA

{

type = int

DurationText = double(@Duration) / 86400

}

DATA

{

type = int

startPeA = 150000 + Round(Random(0, 55000), 10000)

}

DATA

{

type = int

startApA = 300000 + Round(Random(0, 100000), 25000)

}

DATA

{

type = double

Eccentricity = (1000.0 - Reputation() ) / 10000.0

}

PARAMETER

{

name = VesselGroup

type = VesselParameterGroup

title = Crewed Orbital

define = orbitalCrewedSpacecraft

PARAMETER

{

name = NewVessel

type = NewVessel

}

PARAMETER

{

name = HasCrew

type = HasCrew

minCrew = 3

}

PARAMETER

{

name = Orbit

type = Orbit

minPeA = @/startPeA

maxApA = @/startApA

maxEccentricity = @/Eccentricity

targetBody = HomeWorld()

disableOnStateChange = true

}

PARAMETER

{

name = Duration

type = Duration

duration = @/Duration

preWaitText = Reach specified orbit.

waitingText = Orbiting...

completionText = Orbits completed, you may fire retros when ready.

}

PARAMETER

{

name = ReturnHome

type = ReturnHome

completeInSequence = true

}

}

}

Link to comment
Share on other sites

Here's the actual file that I'm using. It's slightly altered from what is on RP-0's github since I'm waiting for 1.7.7 to post my alterations. I should also point out. I gave my craft enough life support to run for another 6 days (what I "lost" when the contract reset) then advanced time until the contract said I'd completed the time. Then I change the orbit I was in, moved to another craft, then back and found that the timer had been reset again. Though, strangely, now that I am no longer in the proper oribt, the timer is still counting down and it's acting as if I was in the correct orbit. (hopefuly that makes sense).

<snip>

Okay, raised [#330]. The plan is to introduce a small delay before allowing the state to get reset - that should cover off any scenarios where the states of the other parameters are still in flux. Still planning for 1.7.7 to go out tonight with this change - we'll see if I can hit that or not. :)

Link to comment
Share on other sites

Question about parameters. In the 1/LEO, 2/LEO and 3/LEO RP-0 contracts, there is (amongst others) an Orbit Parameter and a Duration Parameter:

Parameter

{

...

type=Orbit

...

}

Parameter

{

...

type=Duration

...}

In the Lunar Orbit contract, the Duration Parameter is inside the Orbit Parameter:

Parameter

...

type=orbit

...

Parameter

{

...

type=Duration

...

}

}

How does that make the duration parameter work differently?

Link to comment
Share on other sites

Question about parameters. In the 1/LEO, 2/LEO and 3/LEO RP-0 contracts, there is (amongst others) an Orbit Parameter and a Duration Parameter:

Parameter

{

...

type=Orbit

...

}

Parameter

{

...

type=Duration

...}

In the Lunar Orbit contract, the Duration Parameter is inside the Orbit Parameter:

Parameter

...

type=orbit

...

Parameter

{

...

type=Duration

...

}

}

How does that make the duration parameter work differently?

The first one will stop the parent parameter (orbit) from completing until the timer reaches zero. The second will start the timer after the previous sibling (orbit) completes. It becomes significant when used with the disableOnStateChange attribute - the first one allows you to specify the player hits and orbit, keeps it for the duration, and then move on to other parameter (like the ReturnHome).

- - - Updated - - -

New version out, with a few bug fixes. Download now!

Contract Configurator 1.7.7

  • Fixed issues with PartTest parameter not making the "Run Test" option show up on parts to be tested (thanks Sticky32).
  • Fixed issue with double() and other cast functions not working when casting from a non-numeric type (thanks chrisl).
  • Fixed issue with disabled contracts not actually staying disabled (thanks DeCi & Svm420).
  • Additional fixes to Duration reset issues (thanks chrisl).
  • Additional error handling in string parsing for expressions.

Link to comment
Share on other sites

Any idea why the duration timer is sometimes not starting when it's meant to on this contract?


CONTRACT_TYPE
{
name = RepairFaultyModule
title = Repair a faulty Power Module on @/targetVessel1
description = Telemetry indicates that the power module on @/targetVessel1 is malfunctioning, send an engineer to repair it.
synopsis = Send an Engineer on EVA to repair the faulty power module.
completedMessage = Telemetry seems to be all ok. The faulty module is repaired!
minExpiry = 1
maxExpiry = 7
group = UsefulSpaceStations
deadline = Random(500, 1000)
cancellable = true
declinable = true
rewardScience = 0
rewardReputation = Random(1.0, 20.0)
rewardFunds = Random(40000, 60000.0)
failureReputation = Random(1.0, 10.0)
failureFunds = Random(1.0, 10000.0)
advanceFunds = Random(1.0, 10000.0)
weight = 0.5
targetBody = @targetBody1

DATA
{
type = Vessel
uniqueValue = True
requiredValue = true
targetVessel1 = AllVessels().Where(v => v.VesselType() == Station && v.CrewCount()>0).Random()
}
DATA
{
type = CelestialBody
requiredValue = true
targetBody1 = @/targetVessel1.CelestialBody()
}

PARAMETER
{
name = Sequence
type = Sequence
hiddenParameter = Engineer
PARAMETER
{
name = VesselParameterGroup
type = VesselParameterGroup

vessel = @/targetVessel1

PARAMETER
{
name = HasCrew
type = HasCrew
trait = Engineer
title = Kerbal must be an engineer and on board @/targetVessel1
}
}
PARAMETER
{
name = Engineer
type = All

PARAMETER
{
name = VesselIsType
type = VesselIsType
vesselType = EVA
}
PARAMETER
{
name = HasCrew
type = HasCrew
trait = Engineer
}
}
}
PARAMETER
{
name = Duration
type = Duration
duration = 2m
preWaitText = Waiting for an Engineer.
waitingText = Repair in progress
completionText = Module repaired! Get back to the station.
completeInSequence = true
}

REQUIREMENT
{
name = Tier3
type = CompleteContract
contractType = RepairFaultyModule
minCount = 0
cooldownDuration = 10d
}

REQUIREMENT
{
name = StationCheck
type = Expression

expression = (@/targetVessel1.IsOrbiting())
}
}

Link to comment
Share on other sites

As of 1.7.7 I've started to get a "Contract Configurator 1.7.7 Exception". I know it's not CC that is causing the error. I'm almost positive it's an issue in RSS though I can't figure out what needs to be corrected in RSS to fix it. Basically, the error is a result of the RP-0 contract, flybyUranus. The error is apparently connected to the fact that for some reason CelestialBody is relating "Eeloo" to "Uranus". I've looked in the RSS file that relabels the planets and moons but from what I can find, Eeloo was relabeled as "Europa" and Jool was relabeled as "Uranus". So I don't understand why CelestialBody is seeing Eeloo instead of Uranus. If you've encountered this and know how to fix it, that would be great. Barring that, is there any way to "auto-ignore" the exceptions?

Link to comment
Share on other sites

Any idea why the duration timer is sometimes not starting when it's meant to on this contract?


CONTRACT_TYPE
{
name = RepairFaultyModule
title = Repair a faulty Power Module on @/targetVessel1
description = Telemetry indicates that the power module on @/targetVessel1 is malfunctioning, send an engineer to repair it.
synopsis = Send an Engineer on EVA to repair the faulty power module.
completedMessage = Telemetry seems to be all ok. The faulty module is repaired!
minExpiry = 1
maxExpiry = 7
group = UsefulSpaceStations
deadline = Random(500, 1000)
cancellable = true
declinable = true
rewardScience = 0
rewardReputation = Random(1.0, 20.0)
rewardFunds = Random(40000, 60000.0)
failureReputation = Random(1.0, 10.0)
failureFunds = Random(1.0, 10000.0)
advanceFunds = Random(1.0, 10000.0)
weight = 0.5
targetBody = @targetBody1

DATA
{
type = Vessel
uniqueValue = True
requiredValue = true
targetVessel1 = AllVessels().Where(v => v.VesselType() == Station && v.CrewCount()>0).Random()
}
DATA
{
type = CelestialBody
requiredValue = true
targetBody1 = @/targetVessel1.CelestialBody()
}

PARAMETER
{
name = Sequence
type = Sequence
hiddenParameter = Engineer
PARAMETER
{
name = VesselParameterGroup
type = VesselParameterGroup

vessel = @/targetVessel1

PARAMETER
{
name = HasCrew
type = HasCrew
trait = Engineer
title = Kerbal must be an engineer and on board @/targetVessel1
}
}
PARAMETER
{
name = Engineer
type = All

PARAMETER
{
name = VesselIsType
type = VesselIsType
vesselType = EVA
}
PARAMETER
{
name = HasCrew
type = HasCrew
trait = Engineer
}
}
}
PARAMETER
{
name = Duration
type = Duration
duration = 2m
preWaitText = Waiting for an Engineer.
waitingText = Repair in progress
completionText = Module repaired! Get back to the station.
completeInSequence = true
}

REQUIREMENT
{
name = Tier3
type = CompleteContract
contractType = RepairFaultyModule
minCount = 0
cooldownDuration = 10d
}

REQUIREMENT
{
name = StationCheck
type = Expression

expression = (@/targetVessel1.IsOrbiting())
}
}

I found a minor bug where the timer text doesn't update (only affects the stock window, Contract Window+ is fine). In the background, the timer is still ticking down. I suspect that's the problem. Give a the dev version a try and see if that fixes the issue.

- - - Updated - - -

As of 1.7.7 I've started to get a "Contract Configurator 1.7.7 Exception". I know it's not CC that is causing the error. I'm almost positive it's an issue in RSS though I can't figure out what needs to be corrected in RSS to fix it. Basically, the error is a result of the RP-0 contract, flybyUranus. The error is apparently connected to the fact that for some reason CelestialBody is relating "Eeloo" to "Uranus". I've looked in the RSS file that relabels the planets and moons but from what I can find, Eeloo was relabeled as "Europa" and Jool was relabeled as "Uranus". So I don't understand why CelestialBody is seeing Eeloo instead of Uranus. If you've encountered this and know how to fix it, that would be great. Barring that, is there any way to "auto-ignore" the exceptions?

Assuming the RSS config is all correct, and the RP-0 contracts are all correct, then do a search for Eeloo in your persistence file and change it to Uranus. This assumes that the problem was a bug in the contract that someone has since fixed, and you've got something leftover in your save causing a problem.

Link to comment
Share on other sites

I found a minor bug where the timer text doesn't update (only affects the stock window, Contract Window+ is fine). In the background, the timer is still ticking down. I suspect that's the problem. Give a the dev version a try and see if that fixes the issue.

I suspect you are right, as I couldn't reproduce it, and I know the users who reported it were using the stock window, whereas I was using CW+. I'll report back to them - I don't think a full test of the dev version is needed in this case, but I'll let you know if anything else comes up. Cheers!

Link to comment
Share on other sites

Downloaded the new update, glad to see I could help. Finally figured out why my contracts wouldn't reload, turns out I needed to update module manager. Now update contracts will be much faster instead of reloading the whole game with every new change. I've started work on a new type of contract, this one requires you to rescue tourists and the pilots from various types of downed planes and recover them at the KSC. However I am having trouble figuring out the proper syntax for parsing the latitude, longitude, and altitude from the waypoint I've spawned in for the spawn vessel behavior, also how would you define a random set of coordinates? Just lat = Random()? Another issue was how do I define which vessel for the kerbals to spawn in with the spawnpassengers behavior? I tried making it a child node of the spawnvessel node, but that is clearly incorrect. Finally if I am able to get everything else working, I would like to make it so that after a set(random) amount of time the passengers start to die off from their injures, with all of them dieing past a certain time limit causing contract failure. So is there a killkerbal function? http://s000.tinyupload.com/index.php?file_id=36266335239728758307

Link to comment
Share on other sites

Downloaded the new update, glad to see I could help. Finally figured out why my contracts wouldn't reload, turns out I needed to update module manager. Now update contracts will be much faster instead of reloading the whole game with every new change.

Yup, that's a change from a while back, I now use the new module manager method for reloading contracts (which means if you do a module manager reload, it will also reload the Contract Configurator contracts).

I've started work on a new type of contract, this one requires you to rescue tourists and the pilots from various types of downed planes and recover them at the KSC. However I am having trouble figuring out the proper syntax for parsing the latitude, longitude, and altitude from the waypoint I've spawned in for the spawn vessel behavior, also how would you define a random set of coordinates? Just lat = Random()?

You can't get coordinates out of the SpawnVessel (but you can just reference the attributes within it). Just do something like this:


DATA
{
type = double
lat = Random() * 180 - 90
lon = Random() * 360
}

And then put those coordinates in for your spawn vessel. Of course, the method above is a bit silly, because it'll generate far more coordinates near the poles. You can instead generate a waypoint using SpawnWaypoint, and use @waypoint.Latitude() and @waypoint.Longitude() to get its location. Or

Another issue was how do I define which vessel for the kerbals to spawn in with the spawnpassengers behavior? I tried making it a child node of the spawnvessel node, but that is clearly incorrect.

Yes, you can't nest behaviours like that, it won't do anything (and hopefully it'll output some warnings in the log). Aside from that, SpawnPassengers is for spawning passengers (like tourists) on the launchpad. You want to look at the CREW node in SpawnVessel.

Finally if I am able to get everything else working, I would like to make it so that after a set(random) amount of time the passengers start to die off from their injures, with all of them dieing past a certain time limit causing contract failure. So is there a killkerbal function? http://s000.tinyupload.com/index.php?file_id=36266335239728758307

Nothing like that is supported. Raise a feature request and I'll look into it when I can.

Link to comment
Share on other sites

Assuming the RSS config is all correct, and the RP-0 contracts are all correct, then do a search for Eeloo in your persistence file and change it to Uranus. This assumes that the problem was a bug in the contract that someone has since fixed, and you've got something leftover in your save causing a problem.

I tried but still get the errors. I did notice that in my savegame file there is a section "SCENARIO", "name=RemoteTechProgressTracker". In there I find a "CelestialBodyInfo" with "body=Eeloo" but when I delete that and reload the save, it gets recreated. So something looks like it was missed. I'll dig more but so far I just can't seem to figure out which file (presumably in RSS) needs to be corrected.

Link to comment
Share on other sites

I tried but still get the errors. I did notice that in my savegame file there is a section "SCENARIO", "name=RemoteTechProgressTracker". In there I find a "CelestialBodyInfo" with "body=Eeloo" but when I delete that and reload the save, it gets recreated. So something looks like it was missed. I'll dig more but so far I just can't seem to figure out which file (presumably in RSS) needs to be corrected.

Sounds like an RSS problem, but I can't say much more without the full stack trace.

Link to comment
Share on other sites

Problem is not with default contract panel as it's same with contract+. debug menu show that(if i read it properly, screenshot attached)

REQUIREMENT

{

name = StationCheck

type = Expression

expression = (@/targetVessel1.IsOrbiting())

}

cause problems. it's same whether my engineer is on eva or is on board of space station. space station is orbiting minmus 28K(apo)/26K(per)

http://imgur.com/aGD8KuL

Link to comment
Share on other sites

Thanks for the quick response, I was able to correct the crew spawning behavior with your help. However I think you misunderstood me about the one part, I am trying to get the lat/long/alt from the waypoint, not the spawn vessel. However I still can't seem to get it to call the name of the waypoint right, I've tried using: WaypointGenerator1, CrashLocation, waypoint, RANDOM_WAYPOINT but it says it's an unknown identifier.

// Using this(and many iterations of it) under spawn vessel to call it:

lat = @RANDOM_WAYPOINT.Latitude()

lon = @RANDOM_WAYPOINT.Longitude()

alt = @RANDOM_WAYPOINT.altitude()

// This is the waypoint I am tiring to get the coordinates from, for now just the top one, but eventually the bottom one, and two more just like it underneath.

BEHAVIOUR

{

name = WaypointGenerator1

type = WaypointGenerator

RANDOM_WAYPOINT

{

name = CrashLocation

parameter = ReachState1

hidden = true

icon = report

targetBody = Kerbin

waterAllowed = false

count = 1

altitude = 0.0

}

// count = Random(2,5)

RANDOM_WAYPOINT_NEAR

{

name = Crash Location Alpha

parameter = ReachState1

hidden = true

count = 1

nearIndex = 0

icon = sample

altitude = 0.0

waterAllowed = false

minDistance = 1500

maxDistance = 5000

}

Link to comment
Share on other sites

Problem is not with default contract panel as it's same with contract+. debug menu show that(if i read it properly, screenshot attached)

REQUIREMENT

{

name = StationCheck

type = Expression

expression = (@/targetVessel1.IsOrbiting())

}

cause problems. it's same whether my engineer is on eva or is on board of space station. space station is orbiting minmus 28K(apo)/26K(per)

http://imgur.com/aGD8KuL

The REQUIREMENT shouldn't have anything to do with it. Are you able to provide a KSP.log file? I wasn't able to reproduce this one.

- - - Updated - - -

Thanks for the quick response, I was able to correct the crew spawning behavior with your help. However I think you misunderstood me about the one part, I am trying to get the lat/long/alt from the waypoint, not the spawn vessel. However I still can't seem to get it to call the name of the waypoint right, I've tried using: WaypointGenerator1, CrashLocation, waypoint, RANDOM_WAYPOINT but it says it's an unknown identifier.


// Using this(and many iterations of it) under spawn vessel to call it:
lat = @RANDOM_WAYPOINT.Latitude()
lon = @RANDOM_WAYPOINT.Longitude()
alt = @RANDOM_WAYPOINT.altitude()

// This is the waypoint I am tiring to get the coordinates from, for now just the top one, but eventually the bottom one, and two more just like it underneath.
BEHAVIOUR
{
name = WaypointGenerator1
type = WaypointGenerator

RANDOM_WAYPOINT
{
name = CrashLocation
parameter = ReachState1
hidden = true
icon = report
targetBody = Kerbin
waterAllowed = false
count = 1
altitude = 0.0
}

RANDOM_WAYPOINT_NEAR
{
name = Crash Location Alpha
parameter = ReachState1
hidden = true

count = 1
nearIndex = 0
icon = sample
altitude = 0.0
waterAllowed = false
minDistance = 1500
maxDistance = 5000
}
}

You want something like this:


lat = @/WaypointGenerator1.Waypoints().ElementAt(0).Latitude()

Link to comment
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.

×
×
  • Create New...