Jump to content

hargn

Members
  • Posts

    103
  • Joined

  • Last visited

Everything posted by hargn

  1. That could make it, I will test that, but its true that waiting near 3x8h to see that the contract is rejected by the last satellite. And what happens if the user switch its spaceship? Are the timers reset? And as I intend to create GNSS constellation contracts, that could become very heavy to write and overvall, to be unserstood by the user. But it requires some testing. Thanks
  2. Hello, Does someone know how (or if there is a way) to specify the time separation between satellites placed on the same orbit? As example, like for the RemoteTech contract pack, I want to specify a contract to place a train of 3 or 4 satellites on a specific orbit (molniya, tundra or geostationnary in my case), and each orbit must be separated by a period of 8h (for 3 sat) or 6h (4 sats). Playing with argument of periapsis may work for the geostationary/synchronous orbits (or other circular orbits) but : - It actually cannot be retrieved by using the CC's Orbit accessors - It cannot work for the molniya and tundra orbits as they are elliptical and then the angular speed and then the absolute angle between satellites varies - For circular orbit, the AOP could vary due to inaccuracy to place two sats on exactly the same orbit, especially with equatorial and circular orbit (AOP et LAN become inaccurate). - So the Epoch values should be taken into account, but it is not accessible via CC and that will lead to (relatively) complex calculations that require math functions (trigonometry, sqrt, modulo) that are not available in CC.
  3. The weather satellite contract missions should be fixed in the next RP-0 release. For the second issue, I've found a bug with the duration parameter in contract configurator, and there is an issue for that. It is linked to the HasResource parameter but maybe this bug is coming from the same error. But I think that the fix should not be released before the KSP 1.2's release.
  4. Ok, thank you @nightingale I'll try to upload screenshots on the github issue.
  5. Hi There, I've another issue with CC while testing my contracts : it seems that the HasResource parameter is bugged. PARAMETER { name = HasResource type = HasResource resource = ElectricCharge minQuantity = 1 PARAMETER { name = Duration type = Duration duration = 10d preWaitText = The first communication satellite demonstrator should live 10 days at least. waitingText = The demonstrator must live 10 days. completionText = The demonstrator has lived long enough to validate the experiment. } } This parameter properly appears as usual in the Contract Center, when the contract is offered or active. But in the contract list of the stock toolbar, the DMagic's Contract Window + or the CapCom dialog, this parameter is not listed. According to the log (verbose mod in the ContractConfigurator.cfg.default), the contract is loaded without error. The contract never succeed. Here are my contract (this is the ComSatFirst contract into the MilestoneComSatContracts.cfg) and the log : https://drive.google.com/file/d/0B2RjcW4lKwZLdk9DeDhORlZrWFU/view?usp=sharing Thanks for your help
  6. The contracts belongs to a group ComSat I've written, and the max Simultaneous contracts for this group is 5. So only a Milestone contracts, two (the max) polar comsat and two (the max) SSO comsat are proposed. It seems that the molniya and tundra Comsat unlocked after the first ones are never proposed. I'll look around this with more contracts, and play with weights, to confirm this really is an issue or not. EDIT : I tried with maxSimultaneous = 8 in the group and with 5 kind of satellite contracts that are unlocked successively by milestone contracts : Polar, Sunsynchrous, Molniya, Tundra and GEO, each having a maxSimultaneous = 2. CC generate contracts in the order of unlocking, so I get 2xPolar, 2xSSO, 2xMolniya and 2xTundra contracts available in the mission control and the GEO contracts are never available. So I think that the contract generation seems randomless. This is maybe an issue with the RP-0 techtree, after it is generated by ModuleManager. I believe that this issue appears when calling MaxTechLevelUnlocked() when CC try to generated new contracts. The returned value is always 0. But I let you investigate this, here are my full log and the related tech tree : https://drive.google.com/file/d/0B2RjcW4lKwZLQVVLcjBPZVJ0TVU/view?usp=sharing
  7. Hi, I'm just coming to notice an exception with the latest CC release. I'm using RP-0, but I didn't investigate if the issue was coming from that : [WRN 18:28:04.113] File 'GameData/ModuleManager.TechTree' does not exist [ERR 18:28:04.113] ContractConfigurator.Tech: Couldn't load tech tree from GameData/ModuleManager.TechTree Else, I maybe have an issue or an enhancement request : the maximum number of available contracts for a group prevents the Mission Control to offer all different contracts it should propose. It seems that that only the same contracts are proposed (the first unlocked or loaded from config files). Is there some random when the list of available contracts are generated?
  8. Sorry, I should have read your code first to see that it uses KSP API to load this field, and as I don't use to look into my save files... The KSP API documentation is not very clear about all these fields, and as I don't find the document for ConfigNodUtil.ParseValue<Orbit>, I'm not sure for the fields LPE and EPH. I assume that LPE is Longitude of PEriapsis (that is usually named as argument of periapsis), but I dont see what could be EPH. The last parameter for the Orbit constructor is the true anomaly. But I think that this field isn't used for the generation of contract orbits. The functions need to calculate inclination of orbit for a given altitude/period are arcos and sqrt. You could give the possibility to use advanced math functions in expression, but that will lead to a more complicated parser and it could be a source of bugs or instability (at the beginning). So I think it may be better to improve the random orbit generator.
  9. @nightingale your fix is working well! Thanks for you fix. And if I may add another request, could you please update the wiki page of the orbit generator ? I think that misses informations for the FIXED_ORBIT properties (SMA, ECC, ...) : real property name, unit and range would be welcomed. Or, even KSP does not implement orbit's precession, I will be greatly happy with a Sun-Synchronous random orbit generator, but it could be hard to have a generic implementation for all celestial bodies (when they can have it).
  10. Hello, I think there is an issue with resources stored in a list. When I want to set a HasResource parameter like this : PARAMETER { name = HasMonoPropellant type = HasResource resource = @RP0:monoPropellant.Random() minQuantity = Round(Random(20.0, 100.0), 10.0) } Look my previous post here to see the definition of the resource list. That give me this error : [ERR 08:16:54.781] ContractConfigurator.HasResourceFactory: CONTRACT_TYPE 'repeatableEPOComSatContract', PARAMETER 'HasMonoPropellant' of type 'HasResource': Error parsing resource [EXC 08:16:54.782] InvalidOperationException: Operation is not valid due to the current state of the object System.Linq.Enumerable.First[PartResourceDefinition] (IEnumerable`1 source)^M ContractConfigurator.ConfigNodeUtil.ParseResourceValue (System.String name)^M ContractConfigurator.ConfigNodeUtil.ParseSingleValue[PartResourceDefinition] (System.String key, System.String stringValue, Boolean allowExpression)^M ContractConfigurator.ConfigNodeUtil.ParseValue[PartResourceDefinition] (.ConfigNode configNode, System.String key, Boolean allowExpression)^M ContractConfigurator.ConfigNodeUtil.ParseValue[PartResourceDefinition] (.ConfigNode configNode, System.String key, System.Action`1 setter, IContractConfiguratorFactory obj, .PartResourceDefinition defaultValue, System.Func`2 validation)^M UnityEngine.Debug:LogException(Exception)^M ContractConfigurator.LoggingUtil:LogException(Exception)^M ContractConfigurator.ConfigNodeUtil:ParseValue(ConfigNode, String, Action`1, IContractConfiguratorFactory, PartResourceDefinition, Func`2)^M ContractConfigurator.ConfigNodeUtil:ParseValue(ConfigNode, String, Action`1, IContractConfiguratorFactory)^M ContractConfigurator.HasResourceFactory:Load(ConfigNode)^M ContractConfigurator.ParameterFactory:GenerateParameterFactory(ConfigNode, ContractType, ParameterFactory&, ParameterFactory)^M ContractConfigurator.ParameterFactory:GenerateParameterFactory(ConfigNode, ContractType, ParameterFactory&, ParameterFactory)^M ContractConfigurator.ContractType:Load(ConfigNode)^M ContractConfigurator.<LoadContractConfig>d__26:MoveNext()^M ContractConfigurator.ContractConfigurator:Update() Seems that the PartResourceDefinition is not the expected type for the resource. The problem doesn't appear if I first store the resource into a temporary DATA node in my contract.
  11. Ok, I'll investigate what's wrong in my code. Thanks
  12. You're right, apologies. I've cleaned the files to help to find the previous issues and I forgot to reset all of my stuff. All is working well now. But if I may ask a question (because what I want to do is not working now), what does the function MaxTechLevelUnlocked() function ? I thought it was the depth of the deepest unlocked tech node in the tech graph, but I'm not sure of that anymore. That is to implement some kind of progression : more the player is advanced into the tech tree, less the prestige of the contract is great.
  13. Hello, It seems that the fix for the data node in child groups has broken something. I just have tried the last dev ContractConfigurator.dll with contracts and I get the error message Unknown identifier '@/ComSatContracts:maxUnlockedTechLevel'. while my config file contains : @ComSatContracts:maxUnlockedTechLevel The presence of the @/ is realy weird, it does appear anywhere in my contract. Here are my log and config file if you want ot investigate it : https://drive.google.com/file/d/0B2RjcW4lKwZLRlhPV1F1ZUhMS1k/view?usp=sharing Thanks
  14. Fine, all my data are now working fine. I'll start to test the contracts I developp Thanks a lot for your quick responses @nightingale
  15. Agree that it can be hard to redesign the parser. I'm realy looking foward the new version in order that I can test my contracts. Thanks
  16. Here is the log file : https://drive.google.com/file/d/0B2RjcW4lKwZLRU9fTV8yS0lyUjg/view?usp=sharing First, the resource NitrousOxyde didn't exist, so the monoPropelant data couldn't be properly generated. I've fixed that (the real name was NitrousOxide), but the contract are still not generated. The log shows that for each contract that belongs in an under-group of the CONTRACT_GROUP RP0 the data is not found. For example, the contract recordCrewedAlt belongs to the group Records, that is defined inside the group RP0. Then the log shows that the data Records:monoPropellant doesn't exist (even if the contract doesn't use it) and then the contract is not generated. I know that you won't implement some sort of inheritance of the data between contract groups, @nightingale, but this issue may force you to do it. If you fix this issue in this way, I would request that you give us the ability to modify the data in an under-contract : I've already requested that, and I'll use it.
  17. @nightingale Where I should write this debug config?
  18. It's working very well with your tip, I agree. Thanks. But maybe @nightingale should explain why the contracts was not generated without this field. The documentation explains that it should prevent the contract generation if the value of the data is null, that should not be the case in my example.
  19. @pap1723 You mean requiredValue = false ? There are no required field described in the documentation. It's weird if that allows the contracts to work, I think the value of this list is not null, so the contracts should be generated, no?
  20. Hello, I'm experiencing an issue while creating a new RP-0 carreer with my Groups.cfg modified to include (my previous) DATA node containing the monoPropellant list. I've just added a DATA node into the main RP-0 CONTRACT_GROUP, and as a result, no contracts are loading when a create a new carreer. I know that there was a very similar issue that has been fixed into the last CC version 1.17.0 (that is the version I use), but it could be not completely resolved. The DATA node I've been added is DATA { type = List<Resource> monoPropellant = [ Hydrazine, Helium, UH25, Aerozine50, HTP, Nitrogen, Aniline, IWFNA, Nitrogen, NitrousOxyde ] } If you want to see the two Groups.cfg (stock RP-0 and mine), as well as the logs for the working one and mine that is not working : https://drive.google.com/file/d/0B2RjcW4lKwZLWXlqN0FHelZQekU/view?usp=sharing I've already make a diff between the two logs but I saw no differences for the contracts loading part. Thanks for your help.
  21. I did a 'grep "name = " CommonResources.cfg' there : https://github.com/BobPalmer/CommunityResourcePack/blob/master/FOR_RELEASE/GameData/CommunityResourcePack/CommonResources.cfg and I found no other characters. So it's good for me (and for most of contracts writers I believe). Thanks also for the better exception message.
  22. Hi there, I'm looking to dress the list of monopropellants available in RO. So I dress the list like this : DATA:NEEDS[RealFuels] { type = List<Resource> monoPropellant = [ Hydrazine, Helium, UH25, Aerozine50, HTP, Nitrogen, Aniline, IWFNA, IRFNA-III, IRFNA-IV, Nitrogen, NitrousOxide ] } But I get an exception saying that the '-' in IRFNA-III and IRFNA-IV are interpreted as the minus operator. Trying to use the Resource constructor Resource(string identifier) like this : DATA:NEEDS[RealFuels] { type = List<Resource> monoPropellant = [ Hydrazine, Helium, UH25, Aerozine50, HTP, Nitrogen, Aniline, IWFNA, Resource("IRFNA-III"), Resource("IRFNA-IV"), Nitrogen, NitrousOxide ] } Then I got an exception telling me that a string cannot be casted to a Resource object. I tried also to expand the minus with a backquote, but that doesn't work too. What's the way to get it to work? Thanks
  23. You're right @nightingale, there was something missing in my last commit. If I believe you, as the data maxUnlockedTechLevel is into the group RP0/ComSatContracts I need to write @/RP0/ComSatContracts:maxUnlockedTechLevel to see it into a contract? Otherwise, I don't know if this feature is implemented into CC : I would use some sort of inheritance between contract groups in order to specialize data. If you want an example, look for the comSatPrestigeLevel data that is (in the same Groups.cfg file) defined into the ComSatContracts group with a default value, but that I want to redefine into some more specialized contract group (like EPOComSatContracts or SSOComSatContracts). This example isn't working, but it can help you to see what I would request. Another question I have is : Are the different kind of orbit (KOLNIYA, TUNDRA, STATIONARY, ...) that are available into the OrbitGenerator working for RSS? Thanks for your answer.
  24. @nightingale, @linuxgurugamer You will find the two files here : https://github.com/hargn/RP-0/blob/ComSatContracts/GameData/RP-0/Contracts/Groups.cfg https://github.com/hargn/RP-0/blob/ComSatContracts/GameData/RP-0/Contracts/Satellite/ComSat/MilestoneComSatContracts.cfg And the KSP.log Thanks for your help
×
×
  • Create New...