Jump to content

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


nightingale

Recommended Posts

On 12/24/2015 at 10:37 PM, nightingale said:

 

 

On 12/24/2015 at 10:37 PM, nightingale said:

 

 

Sorry for the includes above, the editor messed up and I can't seem to delete them

 

Is it possible to have a mod edit an existing mod to be able to extend a contract's duration for some sort of payment in either cash or rep?

Also, can the duration be set up to start at a mission launch?  This is harder, I'm sure, but figured I'd ask.

 

LGG

Edited by linuxgurugamer
Link to comment
Share on other sites

2 hours ago, linuxgurugamer said:

Is it possible to have a mod edit an existing mod to be able to extend a contract's duration for some sort of payment in either cash or rep?

The PM, forum post and GitHub issues raised on the same topic is extremely excessive.  My availability is a little bit more limited due to the holidays, but I will respond to inquiries as promptly as I'm able.  I've responded to this via issue [#414].

10 minutes ago, smjjames said:

@nightingale On my main install, at the start, it's 2615, after declining about 20 contracts, it goes up to 2641, after waiting about two minutes, it goes up to 2659.

I haven't seen anything that's of concern yet.  The numbers you've given seem like the memory jump is more with stock (although the numbers are so small it's hard to tell).  Also, some stuff would get cleaned up over a scene change.  At this point unless I'm seeing really big jumps I'm not going to do much in the way of investigation on this one.

Link to comment
Share on other sites

1 hour ago, nightingale said:

The PM, forum post and GitHub issues raised on the same topic is extremely excessive.  My availability is a little bit more limited due to the holidays, but I will respond to inquiries as promptly as I'm able.  I've responded to this via issue [#414].

Sorry, I won't do that again.  I wasn't sure where you would be looking.

Consider that I've been lashed 3x with a wet noodle  :-)

I responded on the issue, thanks

Edited by linuxgurugamer
Link to comment
Share on other sites

7 hours ago, linuxgurugamer said:

Sorry, I won't do that again.  I wasn't sure where you would be looking.

Consider that I've been lashed 3x with a wet noodle  :-)

I responded on the issue, thanks

No worries.  I'll get PMs and GitHub issues emailed, so I'll see those first, but unless it's something urgent like "the last release of Contract Configurator is completely broken", I'm not likely to action it any faster than a forum post.  And if it's a question that others can answer, a forum post may get your what you need quicker.

Link to comment
Share on other sites

Is there a way for a DATA node to be aware if KAX is installed?

For https://github.com/inigmatus/GAP/issues/70

I want to add awareness in the contract description if a player has KAX installed, to mention specific KAX parts.

 

is something like this possible?

DATA

{

type = bool

stringPartBool = needs:KAX ? 0 : 1

}

DATA

{

type = List<string>

stringPartList = [ "Aerosport Engine" , "Basic Jet Engine" ]

}

DATA

{

type = string

stringPart = @/stringPartList.ElementAt(@/stringPartBool)

}

 

description = Use the @/stringPart to construct a helicopter for this contract.

Edited by inigma
Link to comment
Share on other sites

51 minutes ago, inigma said:

Is there a way for a DATA node to be aware if KAX is installed?

For https://github.com/inigmatus/GAP/issues/70

I want to add awareness in the contract description if a player has KAX installed, to mention specific KAX parts.

 

is something like this possible?

DATA

{

type = bool

stringPartBool = needs:KAX ? 0 : 1

}

DATA

{

type = List<string>

stringPartList = [ "Aerosport Engine" , "Basic Jet Engine" ]

}

DATA

{

type = string

stringPart = @/stringPartList.ElementAt(@/stringPartBool)

}

 

description = Use the @/stringPart to construct a helicopter for this contract.

That's why I use config nodes - to harness the power of Module Manager:

DATA:NEEDS[KAX]
{
    type = AvailablePart
    partName = Aerosport Engine
}

DATA:NEEDS[!KAX]
{
    type = AvailablePart
    partName = Basic Jet Engine
}

Or something like that (I didn't test it).

EDIT: AvailablePart instead of string

Edited by nightingale
Link to comment
Share on other sites

Working on my Rovercontracts, I need to set the minimum crew based on whether the selected rover has any crew capacity or not.

So, I think this will work, except for the calcMinCrew line.  I want it to be either 1 or 0, depending on whether the CrewCapacity is 0 or greater than 0

  

  DATA
    {
        type = Vessel
        requiredValue = true
        targetVessel = AllVessels().Where(v => v.VesselType() == Rover && v.IsLanded() == true).Random()
    }
    DATA
    {
        type = int
        calcMinCrew = @/targetVessel.CrewCapacity() > 0
    }
    PARAMETER
    {
        name = HasCrew
        type = HasCrew
        minCrew = @/calcMinCrew
    }

 

Any suggestions?

Thanks
   

Link to comment
Share on other sites

16 minutes ago, linuxgurugamer said:

Working on my Rovercontracts, I need to set the minimum crew based on whether the selected rover has any crew capacity or not.

So, I think this will work, except for the calcMinCrew line.  I want it to be either 1 or 0, depending on whether the CrewCapacity is 0 or greater than 0

  


  DATA
    {
        type = Vessel
        requiredValue = true
        targetVessel = AllVessels().Where(v => v.VesselType() == Rover && v.IsLanded() == true).Random()
    }
    DATA
    {
        type = int
        calcMinCrew = @/targetVessel.CrewCapacity() > 0
    }
    PARAMETER
    {
        name = HasCrew
        type = HasCrew
        minCrew = @/calcMinCrew
    }

 

Any suggestions?

Thanks
   

Should be something like:

        calcMinCrew = @/targetVessel.CrewCapacity() > 0 ? 1 : 0
Link to comment
Share on other sites

Trying to program a reach state for submarines. 

 

        PARAMETER
        {                        
            name = ReachState   
            type = ReachState

            situation = SPLASHED
            maxAltitude = -50.0
            
            completeInSequence = true
            disableOnStateChange = true
            hideChildren = true
            hidden = true
            
        }

 

the negative value is invalid. Suggestions?

Link to comment
Share on other sites

41 minutes ago, inigma said:

Trying to program a reach state for submarines. 

<snip>

the negative value is invalid. Suggestions?

I changed it to allow negative values, give the dev version a try.  I'm not able to test it tonight, so if it doesn't work as advertised, raise a GitHub issue and I'll look at it soon...ish.

Link to comment
Share on other sites

32 minutes ago, nightingale said:

I changed it to allow negative values, give the dev version a try.  I'm not able to test it tonight, so if it doesn't work as advertised, raise a GitHub issue and I'll look at it soon...ish.

Contract loads now, but apparently it's not triggering a completion on the parameter. I dive to -53m and it doesn't trip the maxAltitude = -50. I'll raise a github.

Link to comment
Share on other sites

Im currenty working on a new mission pack. Somewhat bassed on real life where some sort of caution and care for kerbals is present, and more robotic exploration before we send kerbals al over the place (although Jebediah will probably challenge this :cool:). Also I like a more structured approach like they also do in real life (Mercury program then Gemini then Apollo, etc)

http://forum.kerbalspaceprogram.com/index.php?/topic/128807-wip105-contractpack-ksp-campaign-28122015/

I would like to know if there are any suggestions, ideas, bottleneck or issues I can run into and most important how you think about the whole idea.

Thanx in advance

Link to comment
Share on other sites

Have a problem.  The following code:

 

 DATA
    {
        type = Vessel
        requiredValue = true
        targetVessel = AllVessels().Where(v => v.VesselType() == Rover && v.IsLanded() == true).Random()
    }
    DATA
    {
        type = int
        calcMinCrew = @/targetVessel.CrewCapacity() > 0? 1:0
    }
    PARAMETER
    {
        name = HasCrew
        type = HasCrew
        minCrew = @/calcMinCrew
    }

works, but when a contract was generated for an unmanned probe, and I try to do it, I see the following in the contract window as unfulfilled:

Crew: At least 0 Kerbals

So I can never finish the contract  because of this.

I also see the following in the contract window:

Scientist Lenus Kerman would like you to go investigate [ "Marker", "Memorial", "Milestone", "Monument", "Museum", "Tree", "Battleground", "Benchmark", "Bend", "Blaze" ].Random()

Here is the code for that:

    DATA
    {
        type = string
        k1 = RandomKerbalName(Male)

        a1 = [ "Marker", "Memorial", "Milestone", "Monument", "Museum", "Tree", "Battleground", "Benchmark", "Bend", "Blaze" ].Random()
    }

...

            PARAMETER
            {
                name = Location1Arrival
                type = VisitWaypoint
                index = 1
                title = Scientist @/k1 would like you to go investigate @/a1
            }

I'm not even sure how to post this as an issue right now :-(

   

 

 

 

 

 

Link to comment
Share on other sites

The expression I added fixed the crew problem, but there is still an issue with the waypoints.

I also see the following in the contract window, and Waypoint Manager is showing all 5 waypoints, even though the Contract windows is only showing the next one (as intended)

Scientist Lenus Kerman would like you to go investigate [ "Marker", "Memorial", "Milestone", "Monument", "Museum", "Tree", "Battleground", "Benchmark", "Bend", "Blaze" ].Random()

Here is the code for that:

    DATA
    {
        type = int
        numWaypoints = Random(1, 5)
        calcMinCrew = @/targetVessel.CrewCapacity() > 0 ? 1:0
    }

    DATA
    {
        type = string
        k1 = RandomKerbalName(Male)
        //k2,k3,k4,k5 also defined

        a1 = [ "Marker", "Memorial", "Milestone", "Monument", "Museum", "Tree", "Battleground", "Benchmark", "Bend", "Blaze" ].Random()
        //a2, a3, a4, and a5 also defined
    }

...

            PARAMETER
            {
                name = Location1Arrival
                type = VisitWaypoint
                index = 1
                title = Scientist @/k1 would like you to go investigate @/a1
            }
...
        hiddenParameter = Location2AllObjectives
    
        PARAMETER
        {
            name = Location2AllObjectives
            type = Sequence
            disableOnStateChange = false
            title = Rover Expedition
            hiddenParameter = Location2AllResearch
....

 

Link to comment
Share on other sites

12 hours ago, linuxgurugamer said:

The expression I added fixed the crew problem, but there is still an issue with the waypoints.

I also see the following in the contract window, and Waypoint Manager is showing all 5 waypoints, even though the Contract windows is only showing the next one (as intended)

Scientist Lenus Kerman would like you to go investigate [ "Marker", "Memorial", "Milestone", "Monument", "Museum", "Tree", "Battleground", "Benchmark", "Bend", "Blaze" ].Random()

<snip>

It's due to the loose string parsing rules.  One of these days I'll find some way to revisit that.  In the meantime, break it into two:

DATA
{
    type = List<string>
    names = [ "Marker", "Memorial", "Milestone", "Monument", "Museum", "Tree", "Battleground", "Benchmark", "Bend", "Blaze" ]
}

DATA
{
    type = string
    theName = @names.Random()
}

 

Link to comment
Share on other sites

6 minutes ago, nightingale said:

It's due to the loose string parsing rules.  One of these days I'll find some way to revisit that.  In the meantime, break it into two:


DATA
{
    type = List<string>
    names = [ "Marker", "Memorial", "Milestone", "Monument", "Museum", "Tree", "Battleground", "Benchmark", "Bend", "Blaze" ]
}

DATA
{
    type = string
    theName = @names.Random()
}

 

Thanks.

Will this fix the Waypoint Manager issue as well?

Link to comment
Share on other sites

4 minutes ago, linuxgurugamer said:

Thanks.

Will this fix the Waypoint Manager issue as well?

Sorry, missed that part of the question.

Unless you specify hidden = true on the waypoint in WaypointGenerator, it will be visible (on the map and in Waypoint Manager).  If you use a hidden waypoint, you can unhide it on completion of a specific parameter (referenced by name).  See the WaypointGenerator wiki page for more details.

Link to comment
Share on other sites

17 minutes ago, nightingale said:

Sorry, missed that part of the question.

Unless you specify hidden = true on the waypoint in WaypointGenerator, it will be visible (on the map and in Waypoint Manager).  If you use a hidden waypoint, you can unhide it on completion of a specific parameter (referenced by name).  See the WaypointGenerator wiki page for more details.

Ok.  According to the wiki, it says that the:
 

parameter = SomeParameterName

must be completed before the waypoint becomes visible.  If I specify this, do I still need to specify hidden=true?

Link to comment
Share on other sites

1 hour ago, linuxgurugamer said:

Ok.  According to the wiki, it says that the:
 


parameter = SomeParameterName

must be completed before the waypoint becomes visible.  If I specify this, do I still need to specify hidden=true?

Can't remember.  Suspect you do not.

Link to comment
Share on other sites

9 hours ago, nightingale said:

Can't remember.  Suspect you do not.

Making progress.

Contract window now works ( with both hidden = true and parameter = someparametername).  finished first part of mission, second part became visible.

However:

1.  In the mission control, where you select the missions, all parts of the mission are visible before

2.  Waypoint manager did not pick up the second waypoint when it became visible in the contract window.  Also, didn't see the icon anywhere on screen.

3.  I just noticed that the Contracts + window is working properly, but the stock contract window is not.  See this screenshot:

https://www.dropbox.com/s/xte0kxozse4t53f/screenshot_2015-12-30--09-27-07.png?dl=0

and this is the contract file:

https://www.dropbox.com/s/46osmqtic1gbo7i/RoverMissions.cfg?dl=0

 

Link to comment
Share on other sites

1 hour ago, linuxgurugamer said:

Making progress.

Contract window now works ( with both hidden = true and parameter = someparametername).  finished first part of mission, second part became visible.

However:

1.  In the mission control, where you select the missions, all parts of the mission are visible before

2.  Waypoint manager did not pick up the second waypoint when it became visible in the contract window.  Also, didn't see the icon anywhere on screen.

3.  I just noticed that the Contracts + window is working properly, but the stock contract window is not.  See this screenshot:

https://www.dropbox.com/s/xte0kxozse4t53f/screenshot_2015-12-30--09-27-07.png?dl=0

and this is the contract file:

https://www.dropbox.com/s/46osmqtic1gbo7i/RoverMissions.cfg?dl=0

 

I just tried removing the hidden = true line from the successive waypoints.

In the Mission control, 2 waypoints were visible
In the Space scene, the Contract+ window was ok
The Waypoint Manager now showed 5 waypoints (the contract has 5 parts, but only uses a certain number of them).
The standard contract window showed 1 which was correct (at the beginning of the contract).  When I fulfilled the first part, it properly showed the second one

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...