Jump to content

[KSP1.8] DMagic Module Science Animate V0.22 (11/2/19)


DMagic

Recommended Posts

  • 1 month later...
33 minutes ago, lagcity613 said:

Any chance you could update this, since you updated Orbital Science? Quite a few mods that add science parts depend on this, like BlueDog Design Bureau. It would be greatly appreciated!

He'll get around to it eventually. BDB doesn't officially support 1.1 yet anyways. I think the only other two users (that I know of???) of DMSA are people I conned into using it, so it's not something that a thousand mods depend on.

Link to comment
Share on other sites

I might not update this until after 1.1 is out; but it should be very soon after that.

@CobaltWolf You expressed some interest in something like the disappearing transforms I have for the spy telescopes in the latest version of DMOS. Do you have anything specific in mind?

I'm thinking there are two basic forms of how this could work.

One is like it does for my parts: the transforms disappear whenever data is taken on EVA or transmitted; a lab reset makes the transforms appear again.

The other is to make transforms appear only when an experiment is conducted. So you would have some kind of empty sample holder that would fill up when you collect something.

Either or both could be used at the same time.

These two forms would be fairly simple to implement. There would be a flag for each in the config file. Then you would just have to specify the name of the transform, and if you have the experiment set to collect more than one sample at the same time you would need transforms for each sample. The way that I'm doing it now is to use a base transform name ("canister") then the code appends the numbers on the end for each sample when trying to assign the transforms internally. So in the model I have four canisters name "canister.000, canister.001, canister.002, canister.003".

Link to comment
Share on other sites

5 minutes ago, DMagic said:

I might not update this until after 1.1 is out; but it should be very soon after that.

@CobaltWolf You expressed some interest in something like the disappearing transforms I have for the spy telescopes in the latest version of DMOS. Do you have anything specific in mind?

I'm thinking there are two basic forms of how this could work.

One is like it does for my parts: the transforms disappear whenever data is taken on EVA or transmitted; a lab reset makes the transforms appear again.

The other is to make transforms appear only when an experiment is conducted. So you would have some kind of empty sample holder that would fill up when you collect something.

Either or both could be used at the same time.

These two forms would be fairly simple to implement. There would be a flag for each in the config file. Then you would just have to specify the name of the transform, and if you have the experiment set to collect more than one sample at the same time you would need transforms for each sample. The way that I'm doing it now is to use a base transform name ("canister") then the code appends the numbers on the end for each sample when trying to assign the transforms internally. So in the model I have four canisters name "canister.000, canister.001, canister.002, canister.003".

They both sound useful! I have a variety of science stuff that's bouncing around in my head - it's a bit hard to remember them right now (I'm also at work and sleep deprived, I probably shouldn't be posting) so I can't provide specific feedback. They sound easy enough to work with though, keeping track of what I name the transforms shouldn't be too hard.

EDIT: Also, the update schedule is fine. I'm behind on my own work to bring everything up. 

Edited by CobaltWolf
Link to comment
Share on other sites

  • 2 weeks later...

hi DMagic! great work and great fun for me with your mods... tried yesterday to put orbital science for 1.0.5 in 1.1 (as I read in forums it works) but no experiments runnable... right click on parts and no window open... any hint? is my fault or i there something still  to work on ? thanks a lot! Keil

Link to comment
Share on other sites

The latest version should work fine under the final KSP 1.1 release.

I'll see about making a few fixes to science labs soon, and about getting some options for making specific transforms appear and/or disappear when conducting experiments.

Link to comment
Share on other sites

1 hour ago, DMagic said:

@CobaltWolf Hold off a few minutes. There are one or two things I should fix first.

OK, this version should have working science labs and EVA science resets.

Ok, thanks. I'm still waiting/working on a few things so I wasn't about to release immediately, was just wondering if that was the release version. In any case, thanks! I've downloaded it now.

Link to comment
Share on other sites

48 minutes ago, jpinard said:

Dmagic do I need this if I have your normal science package?  I wasn't sure if these animations were included in that.

These aren't animations, it's a plugin to give parts a more complicated experiment 'module', which is the script that makes the game make the part have an experiment. So it lets modders create more complicated animations for their parts, and trigger them correctly.

In response to your actual question (instead of blabbing about under the hood stuff) no, anything that needs this needs this. DMagic Orbital Science uses a 'non-generic' version of the plugin, that has a different name and such.

Actually, I never really understood the need for two different ones?

Link to comment
Share on other sites

18 minutes ago, CobaltWolf said:

These aren't animations, it's a plugin to give parts a more complicated experiment 'module', which is the script that makes the game make the part have an experiment. So it lets modders create more complicated animations for their parts, and trigger them correctly.

In response to your actual question (instead of blabbing about under the hood stuff) no, anything that needs this needs this. DMagic Orbital Science uses a 'non-generic' version of the plugin, that has a different name and such.

Actually, I never really understood the need for two different ones?

Great thanks for clearing that up for me!

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

Having both this plugin and Orbital Science mod breaks the career mode. After completing the four starter contracts, they just stop refreshing when you decline them. You can get three or four contracts if you change scene or exit to main menu.

I have the following error:

[EXC 09:54:37.442] MissingMethodException: Method not found: 'FinePrint.Utilities.CelestialUtilities.GenerateOrbit'.
	Contracts.Contract.Generate (System.Type contractType, ContractPrestige difficulty, Int32 seed, State state)
	Contracts.ContractSystem.GenerateContract (Int32 seed, ContractPrestige difficulty, System.Type contractType)
	Contracts.ContractSystem.GenerateContract (System.Int32& seed, ContractPrestige difficulty)
	Contracts.ContractSystem.GenerateContracts (System.Int32& seed, ContractPrestige difficulty, Int32 count)
	Contracts.ContractSystem.RefreshContracts ()
	Contracts.ContractSystem+<UpdateDaemon>c__Iterator81.MoveNext ()

Edit: Sorry, scratch that. I have only DMOS in my Gamedata and am still getting this error.

Edited by biohazard15
Link to comment
Share on other sites

  • 3 months later...

Thanks for the update! I thought I'd give it a go for adding some extra functionality to my mod's science part, but I've been having some trouble with the animation segment; although the module can control the part's animation as it should, I'm finding that when selecting the part/clicking launch, the experiment deploys, but when I then right click, it gives me the option to deploy, and when clicking it, it repeats the animation again. I have verified that this isn't a mistake in my animation, as it seems to work fine in ModuleAnimateGeneric. The rest of the module seems to work, so I'm not sure if I got a setting wrong or something. Here is a video of it happening:

And here is my cfg:

MODULE
	{
    name = DMModuleScienceAnimateGeneric			//Name of the module - don't change this
	
	--------------------------
	
	//Animation Fields**** Similar to ModuleAnimateGeneric (default values shown)
	
	animationName = Deploy_Rack			//Name of your animation - get the name from Unity scene
	animSpeed = 1						//Speed to play animation
	endEventGUIName = Retract				//Title of retract animation event/action group
	showEndEvent = true					//Do you want to show the retract event/action group - only displayed in-flight after deploy event triggered
	startEventGUIName = Deploy				//Title of deploy animation event/action group
	showStartEvent = true					//Do you want to show the deploy event/action group
	toggleEventGUIName = Toggle 				//Title of toggle animation event/action group - Plays deploy or retract animation based on current state - Is reversible while playing
	showToggleEvent = false					//Do you want to show the toggle event/action group - not recommended to be used together with deploy/retract events, too many unnecessary buttons
	showEditorEvents = true					//Do you want to be able to preview the animation in the VAB/SPH
	
	*****\\
	
	--------------------------
	
	//Science Experiment Fields**** The same as ModuleScienceExperiment (default values shown)
		
	collectActionName = Collect Data			//Name of the EVA data collection event
	dataIsCollectable = true				//Allow EVA Kerbals to collect science reports from the part
	experimentActionName = Collect Data			//Name for action group and right-click data collection function
	experimentID = mm_exposuretest			//Experiment name - from the "id = " field in your ScienceDefs.cfg for this experiment
	hideUIwhenUnavailable = false				//Hide the right-click data collection buttons when experiment cannot be used
	interactionRange = 1.2					//Range for EVA interaction in meters
	rerunnable = true					//Can the part be used more than once
	resettable = true					//Does nothing???
	resettableOnEVA = true					//Allow EVA Kerbals to reset the part - removes any existing science reports
	resourceResetCost = 1					//Multiplier for the resource cost to reset the experiment with a science lab
	resourceToReset = ElectricCharge			//Can't change????
	resetActionName = Reset Experiment			//Name for action group and right-click reset function
	reviewActionName = Review Data				//Name for action group and right-click review data function
	transmitWarningText = The R&D teams wants to see this in person!			//Warning text when transmitting data - only applicable for non-rerunnable parts - do not add anything here unless you want the warning to show
	useActionGroups = True					//Are the VAB/SPH action groups available - does not affect the availability of right-click functions
	useStaging = False					//Control experiment activation through staging (may not actually work)
	xmitDataScalar = 0					//Transmission data value, determines the percentage of the baseValue (from your ScienceDefs.cfg) recovered from a transmission
	usageReqMaskExternal = 8				//Bit Mask to define external usage conditions; 8 specifies that the EVA kerbal must be a scientist to deploy the experiment; 4 will allow any Kerbal to deploy from EVA; -1 means nothing can use the experiment externally
	
	*****\\
	
	--------------------------
	
	//Science Experiment - Animation Fields**** (fields are from my magnetometer setup)
	
	customFailMessage = Cannot conduct an exposure experiment here!
						//Default = Can't conduct experiment here
								//Message to be displayed when you attempt an experiment in an unsuitable situation - from the situationMask in your ScienceDefs.cfg file
	deployingMessage = Exposing instruments...
						//Default = empty string	//Message to be displayed when you try to conduct experiment with the part undeployed
	experimentAnimation = true		//Default = true		//Do you want your experiment to be dependent on the animation playing/already being deployed - why else would you be using this plugin?
	experimentWaitForAnimation = true	//Default = false		//Do you want to wait for the animation to complete before you begin the experiment (or any other arbitrary amount of time)
	keepDeployedMode = 1			//Default = 0			//Determines when to play the retract animation
									//Value of 0 is the stock behavior (mostly) - Parts retract when the experiment is reset or the data is transmitted 
									//Value of 1 - Retracts the part immediately after conducting the experiment - i.e. when the experiment results page appears - *probably better to set up a one way animation
									//Value of 2 - Part will not retract - only manual controls can retract the part
	waitForAnimationTime = -1		//Default = -1 (value set to the length of the animation)
									//Amount of time to wait after deploying the animation before the experiment begins - 0 will begin immediately, -1 waits for the animation to complete (this does take into account animSpeed specified above)
	oneWayAnimation = false			//Default = false		//Do you want the animation to only play in one direction - The animation should begin and end in the same position
	asteroidReports = true			//Default = false		//Do you want to be able to collect results while landed on and/or near an asteroid
									//Asteroid reports in the ScienceDefs.cfg file follow the format: "AsteroidSrfLandedClassA" or "AsteroidInSpaceLowClassA" for each asteroid class, A-E
									//Only SrfLanded and InSpaceLow experimental situations are allowed
	planetaryMask = 524287			//Default = 524287	//Bitmask defining which planets the experiment can be performed on/around, works everywhere by default
	planetFailMessage = Can't conduct experiment here	//Default = Can't conduct experiment here 		//Message to be displayed if the experiment can't be performed on the current planet/moon
	storageFullMessage = Onboard data storage is full...transfer the data elsewhere first //Message to play when you can't collect any more data
	experimentsLimit = 1          	//Default = 1		//Sets the limit for how many experiments can be collected and stored by an individual part
	externalDeploy = true			//Default = false	//Allow the experiment to be triggered by an EVA Kerbal; still requires power if applicable
	resetLevel = 0				//Default = 0 		//Level of scientist required to reset a used experiment on EVA
		
	*****\\
	}

 

Link to comment
Share on other sites

12 minutes ago, DMagic said:

Does the animation start without any input? That's what it looks like. Do you have the "Play Automatically" box ticked in your Unity setup?

D'oh! Sorry, I'm new to this :P that fixed it. Thank you

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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