Jump to content

linuxgurugamer

Bug Hunter
  • Posts

    24,896
  • Joined

  • Last visited

Everything posted by linuxgurugamer

  1. Ok. I've made a lot of good progress, but am stuck. Here are the issues: in the RandomWaypointNear, the parameter doesn't seem to work, I've tried a number of permutations. Probably as a result of the above, Waypoint Manager shows all waypoints, and on the map, will show them until they have been investigated Experiments seem to only be complete-able one time. After completing an experiment at the first location, it appears to be fulfilled when going to the next location This isn't a problem, just wondering if there is a better way: I'm using the following line to make sure that unused waypoints aren't shown at all: hidden = @/numWaypoints >= 5? false:true When in the middle of a contract, I see by using the alt-F10, that the parameter line looks correct, but it always says "deterministic = true". See the screenshot in the zip file which also has the contract for an example. The RANDOM_WAYPOINT_NEAR nodes in the posted contract show three different attempts to get the parameter to work, none of them do. Here is a link to the zip file which contains the rover contract and the 3 screenshots I took: https://www.dropbox.com/s/xkcdpmdy1do2cdu/RoverContract.zip?dl=0
  2. Is there a plugin which would have CKAN run an external script before doing any changes, and then run another script after all changes are complete?
  3. I'm not sure if this is possible yet: when generating a RANDOM_WAYPOINT, I'd like the name to be unique for each. I have a number of strings in a list, which I'd like to use for this Also. the "parameter =", would be useful if it could refer to a generated parameter name, so that a number of waypoints can be generated, each dependent on a different parameter. Finally, the nearIndex, would be nice if, instead of all the waypoints being near a single one, if each could be near the previous one. This isn't critical, for now I'm just putting in 5 RANDOM_WAYPOINT seconds, but would be nice if I could make that smaller.
  4. I'm very embarrassed. I've been programming for more than 40 years. In that time, I've learned many lessons, one of which I totally forgot. I made a minimal contract, and immediately the syntax error I was doing was obvious. I'm sorry for the past several posts, all I can say is that I'm out of practice, having been in system administration for the past 10 years. Let me say that I went down the ITERATOR path after the problems with the massive script-built set of contracts, in the hope it would solve some of the problems I was having. Instead it caused a whole bunch of problem, mostly my fault. I would like to thank you for your patience and the answers, some of them were very useful. I would like to request that you continue to allow an expression for a name, for the following reason: If the names aren't unique, then there would be no way to reference it in the Random_waypoint_near section in the parameter = line Now that it compiles, I can test. The issues I raised on github were raised by a contract (which I can send you if you like) which did not do any iteration. I'll update them with the results from my next set of tests. LGG
  5. I did post it earlier, but to make it easier to debug, I'm going to make a minimal contract to show the problem. I'll have it up later. If you don't want an expression for a name, then, inside an iterative parameter, there will be multiple names with the same value. I suppose it's ok, but can get confusing when debugging
  6. I tried that: PARAMETER { name = Sequence type = Sequence completeInSequence = true PARAMETER { name = ReachState type = ReachState failWhenUnmet = true maxTerrainAltitude = 1000 } PARAMETER { name = PARAM1 @id type = All ITERATOR { type = int id = @/nums } PARAMETER { name = Sequence type = Sequence disableOnStateChange = false title = Investigate @/currentLocs.ElementAt(@../../id) hiddenParameter = Location @/currentLocs.ElementAt(@../../id) AllResearch and I got: ContractConfigurator.SequenceFactory: CONTRACT_TYPE 'RoverExplore', PARAMETER 'Sequence' of type 'Sequence': Error parsing title (Filename: C:/buildslave/unity/build/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56) Exception: Unknown identifier '@/Sequence/id' I'm curious about your suggesting the double .., since as I read this, with the ../ is the current paraneter, and one ../ is the immediate parent. The id is defined in the immediate parent. According to your docs: Identifiers created in a ITERATOR node are accessed as if they were a part of the parent node (by referencing them as @<identifier> within that node). You can see that I added @id to the PARAM1 and that didn't generate an error, but inside any of the child parameters, it doesn't seem to be accessable
  7. I had tried that, but did again, here is the first error in the log file: ContractConfigurator.VisitWaypointFactory: CONTRACT_TYPE 'RoverExplore', PARAMETER 'Location @/currentLocs.ElementAt(@../id) Arrival' of type 'VisitWaypoint': Error parsing name (Filename: C:/buildslave/unity/build/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56) Exception: Unknown identifier '@/Sequence/PARAM1/Sequence/id'. UnityEngine.Debug:Internal_LogException(Exception, Object) UnityEngine.Debug:LogException(Exception) ContractConfigurator.LoggingUtil:LogException(Exception) ContractConfigurator.ConfigNodeUtil:ParseValue(ConfigNode, String, Action`1, IContractConfiguratorFactory, String, Func`2) ContractConfigurator.ConfigNodeUtil:ParseValue(ConfigNode, String, Action`1, IContractConfiguratorFactory, Func`2) ContractConfigurator.DeferredLoadUtil:ExecuteLoad(DeferredLoadObject`1) System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&) System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo) System.Reflection.MethodBase:Invoke(Object, Object[]) ContractConfigurator.ConfigNodeUtil:ExecuteDeferredLoads() ContractConfigurator.ContractType:Load(ConfigNode) ContractConfigurator.<LoadContractConfig>d__1e:MoveNext() ContractConfigurator.ContractConfigurator:Update()
  8. Sarbian, Just installed your latest version, and am comparing it to what GPU-Z is showing me For some reason, GCMonitor is consistently underreporting the usage as compared to GPUZ, although, after thinking about it, I wonder if the discrepency is due to other stuff on the system (non-ksp) putting some stuff into the memory. For example, when I loaded KSP with openGL, I saw the following: GPU-Z 1800Mb GCMon 1200MB and, a simple startup: GPU-Z 836Mb GC 636Mb So the discrepency seems to get larger the more memory is used.
  9. This is what happens when I don't do a cutnpaste, because I actually did it that way, just screwed up in making the post. To be clearer, here is a fragment of code: DATA { type = List<int> nums = [1,2,3,4,5] } .... PARAMETER { name = Sequence type = Sequence completeInSequence = true PARAMETER { name = ReachState type = ReachState failWhenUnmet = true maxTerrainAltitude = 1000 } PARAMETER { name = PARAM1 type = All ITERATOR { type = int id = @/nums } PARAMETER { name = Sequence type = Sequence disableOnStateChange = false title = Investigate @/currentLocs.ElementAt(@..id) hiddenParameter = Location @/currentLocs.ElementAt(@..id) AllResearch and this is from the error log: ContractConfigurator.SequenceFactory: CONTRACT_TYPE 'RoverExplore', PARAMETER 'Sequence' of type 'Sequence': Error parsing title (Filename: C:/buildslave/unity/build/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56) Exception: Unknown identifier '@/Sequence/PARAM1/Sequence/'. I did try the following alternative, with the same error: title = @/currentLocs.ElementAt(@..id)
  10. Is there any way an Iterator value can be used as a data value, like this: PARAMETER { type = ReachState ITERATOR { type = CelestialBody targetBody = AllBodies().Where(cb => cb.IsPlanet()) } } PARAMETER { name = Location Arrival type = VisitWaypoint index = 1 title = test title referencing @..targetBody } I'm actually trying to use it with a list of ints, but can't seem to reference the value defined inside the Iterator
  11. So, I'm trying to make this a little simpler (ha) by using Iterators instead of generating the entire thing in one large file. I can't figure out the following: DATA { type = int numWaypoints = Random(1, 5) } DATA { type = List<int> nums = [ 1,2,3,4,5,6,7,8,9,10] } The following is throwing an error. I've tried the following lines: id = nums.Where(b +> b <= @/numWaypoints) id = nums.Where(b +> b() <= @/numWaypoints) id = nums.Where(b +> b.int() <= @/numWaypoints) ITERATOR { type = int id = nums.Where (b => b <= @/numWaypoints) } From the error log: NotSupportedException: Can't parse identifier for type System.Int32 in class ContractConfigurator.ExpressionParser.NumericValueExpressionParser`1[System.Int32] - not supported! at ContractConfigurator.ExpressionParser.ExpressionParser`1[System.Int32].ParseIdentifier (ContractConfigurator.ExpressionParser.Token token) [0x00000] in <filename unknown>:0 at ContractConfigurator.ExpressionParser.NumericValueExpressionParser`1[System.Int32].ParseIdentifier (ContractConfigurator.ExpressionParser.Token token) [0x00000] in <filename unknown>:0 at ContractConfigurator.ExpressionParser.ExpressionParser`1[System.Int32].ParseVarOrIdentifier (ContractConfigurator.ExpressionParser.Token token) [0x00000] in <filename unknown>:0 at ContractConfigurator.ExpressionParser.ExpressionParser`1[System.Int32].ParseSimpleStatement[Int32] () [0x00000] in <filename unknown>:0 Rethrow as Exception: Error parsing statement. Error occurred near '*': nums.Where (i => i <= @/numWayPoints) ....* <-- HERE
  12. If you are referring to the settings.cfg file, yes, and I didn't change anything in it.
  13. :-( Sad face. I just found another problem: Each contract has 5 main PARAMETERS inside a Sequence PARAMETER. Data node: DATA { hasTherm = @/targetVessel.Parts().Where(p => p == sensorThermometer).Count() > 0 } Each paramter has the following sub parameter: PARAMETER { name = Location1AllResearch type = All title = Conduct research at the @/a1 PARAMETER { name = Location1TemperatureScan type = CollectScience experiment = temperatureScan recoveryMethod = None rewardScience = 0.25 REQUIREMENT { name = Location1TemperatureScanRequirement type = Expression expression = @/hasTherm } } Only difference is that the @/a1 is a2/a3/a4/a5 for each succeeding, the name is Location[12345]TemperatureScan It only requires the temperature to be collected at the first waypoint Here is a link to the complete contract: https://www.dropbox.com/s/46osmqtic1gbo7i/RoverMissions.cfg?dl=0
  14. Did you miss my follow-up message? #3 was solved when I removed the "hidden = true" line. re. Waypoint manager saving/loading, do you want me to totally exit the game and then reenter it? Did you see this comment, after I removed the "hidden = true" line: The Waypoint Manager now showed 5 waypoints (the contract has 5 parts, but only uses a certain number of them). Here is a picture inside the Mission Control: https://www.dropbox.com/s/vweyu25adwh3jus/screenshot_2015-12-30--15-31-54.png?dl=0 I see the following exception in the log, after loading: ArgumentException: Getting control 0's position in a group with only 0 controls when doing Repaint Aborting at UnityEngine.GUILayoutGroup.GetNext () [0x00000] in <filename unknown>:0 at UnityEngine.GUILayoutUtility.BeginLayoutGroup (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options, System.Type LayoutType) [0x00000] in <filename unknown>:0 at UnityEngine.GUILayout.BeginVertical (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) [0x00000] in <filename unknown>:0 at UnityEngine.GUILayout.BeginVertical (UnityEngine.GUILayoutOption[] options) [0x00000] in <filename unknown>:0 at ContractsWindow.contractsWindow.DrawWindow (Int32 id) [0x00000] in <filename unknown>:0 at ContractsWindow.DMC_MBW.DrawWindowInternal (Int32 id) [0x00000] in <filename unknown>:0 at UnityEngine.GUILayout+LayoutedWindow.DoWindow (Int32 windowID) [0x00000] in <filename unknown>:0 at UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style) [0x00000] in <filename unknown>:0
  15. It probably was since orange immunity is now off by default, let me know if you see more jinkiness But, they were on the pad. Not in space. New vehicle. Why would they be hungry if they just went there from the VAB?
  16. Big ships, while their top speed may be faster than a fighter, would turn much more slowly. Ditto with the big guns. So a fighter would be able to be effective against a honking big Capitol ship. Now you have to add antifighter defensive weaponry, etc, etc.
  17. Hi there, While I don't understand various people's issues with CKAN, I'd be happy to take over that part of the project. In other words, I'll do what's necessary to make CKAN work properly. I would suggest that you add a .version file for the AVC mod to work, and again, I'd be happy to do that for you. The only thing I would suggest is to change the version number from the current thing with letters to a #.#.# This would let AVC work with it (it only works with numbers) and makes it easier for CKAN to work. Other than that. there would be nothing you would need to do I've done this for a few other mods already, as well as my own Linuxgurugamer
  18. somewhat related, in Waypoint Manager, while the distance to the waypoint was correct, the heading to it was totally off. I'm comparing it to the heading in the navball when I'm heading to a waypoint. For example, while the navball said I was heading at 267 degrees, the Waypoint Manager said the heading to the waypoint was 12 degrees Waypoint manager version 2.4.4 Contract Configurator 1.9.1
  19. 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
  20. 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
  21. More details: The crew who was refusing to work was Jebedia and Valentina, both of whom had several missions under their belts. I wonder if the mod isn't resetting the time since their last meal? I just looked in the save file, and I'm guessing that's the problem. Here is the status data, when no one is in space. Neselle was the kerbal I recruited, notice the last meal values: LIFE_SUPPORT_SETTINGS { STATUS_DATA { KerbalName = Jebediah Kerman LastMeal = 2797139.62094199 IsGrouchy = False OldTrait = Pilot LastUpdate = 2797139.62094199 } STATUS_DATA { KerbalName = Valentina Kerman LastMeal = 2420403.18696142 IsGrouchy = False OldTrait = Pilot LastUpdate = 2420403.18696142 } STATUS_DATA { KerbalName = Neselle Kerman LastMeal = 3832232.72435278 IsGrouchy = False OldTrait = Pilot LastUpdate = 3832300.04435284
×
×
  • Create New...