Jump to content

[WIP] RealScience - Say good bye to whack-a-mole style "science"...


Agathorn

Recommended Posts

Hi Agathorn

Could you write a example experiment with an example science def file ? I'm quite confused how much files i need for one part and how i start to write the sciene file.

Thanks!

No science def is needed, since RealScience interacts directly with the underlying R&D system. All you need to do is define the experiment on the part(s) you want to be involved. Here are two examples, one for a very simple one condition experiment, and another for a much more complex multi-condition, multi-part experiment.

http://pastebin.com/QSUdGQT3

http://pastebin.com/MBCC0jp0

Link to comment
Share on other sites

Hi

I wrote this. Goal: Work when on Kerbin landed. Experiment does take 4 seconds. Does this look right ? It is not working! Also the Part gets added a second time.

If i want to define more things like a special binome i would just put that into the condition group right ?

Also how could i make it that the experiment is not loaded if someone has not installed Real Science. I suppose it will not load but will give an error right ?

@PART[sensorTime]:FIRST

{

MODULE

{

name = RealScienceExperiment

experimentName = SimpleRSTest

experimentTitle = RealScience simple experiment test

description = This is just a very simple experiment example

requiredData = 100

maximumData = 0

researchDataRate = 1

analysisTime = 4 // 2 sec time

scienceValuePerData = 0.5

dataPerPacket = 1

// Landed at kerbin.

conditionGroup {

type = and

conditions = Planet,Landed

condition

{

conditionType = Situation

name = Landed

situation = landed

}

condition

{

conditionType = Body

name=Planet

body = kerbin

}

} // con. group

conditionGroup

{

groupType = "and"

condition

{

conditionType = Resource

resourceName = ElectricCharge

initialConsumption = 5

validIfEmpty = false

}

}

}//Module

} // Part

Edited by ManuxKerb
Link to comment
Share on other sites

Sorry I meant to look into your problem last night but I didn't get off work until late. I will try again tonight to see what's up. Its possible my example is just wrong, as I didn't test it.

Link to comment
Share on other sites

Hi

I wrote this. Goal: Work when on Kerbin landed. Experiment does take 4 seconds. Does this look right ? It is not working! Also the Part gets added a second time.

If i want to define more things like a special binome i would just put that into the condition group right ?

Also how could i make it that the experiment is not loaded if someone has not installed Real Science. I suppose it will not load but will give an error right ?

Ok so a couple things here.

1) Remove the conditions = Planet,Landed line. You don't need that. It shouldn't break anything, but it isn't used either so just nix it.

2) In the first conditionGroup it should be groupType = and, you have it listed as just type = and which is wrong.

3) In the second group, remove the quotes around "and". You don't need those, and i'm not sure if that causes problems or not.

Those are the only errors I see at the moment. If it still doesn't work, remove the second group entirely. It should work, but I have had a few bugs related to the Resource condition, so might still be some left? Also, both the Situation and Body conditions should have mouse overs that will tell you why they fail, so might check that to see if anything silly is happening if all of the above fails.

As for what happens if RealScience isn't installed, it would just throw a benign error. However if you want, instead of doing :FIRST (which i'm not sure why you would use that anyway?) you can do something like :AFTER[RealScience] in which case, ModuleManager will completely skip it if RealScience isn't installed.

Link to comment
Share on other sites

Hi

Thanks for the help.

Here is the new code:

@PART[sensorTime]:FIRST

{

MODULE

{

name = RealScienceExperiment

experimentName = SimpleRSTest

experimentTitle = RealScience simple experiment test

description = This is just a very simple experiment example

requiredData = 100

maximumData = 0

researchDataRate = 1

analysisTime = 4 // 2 sec time

scienceValuePerData = 0.5

dataPerPacket = 1

// Landed at kerbin.

conditionGroup {

groupType = and

condition

{

conditionType = Situation

name = Landed

situation = landed

}

condition

{

conditionType = Body

name=Planet

body = kerbin

}

} // con. group

}//Module

} // Part

Ans sadly it is not working. Only the normal experiment shows up. not the Real science one at the part.

Edited by ManuxKerb
Link to comment
Share on other sites

Hi

Thanks for the help.

Here is the new code:

Ans sadly it is not working. Only the normal experiment shows up. not the Real science one at the part.

Where are you looking? IT isn't on the part menu, and this is my bad for not putting more information in the first post. You should have a RealScience toolbar item, and if you click that it opens the RealScience interface, which lists all the experiments on the craft. Is it listed there at all or is that window blank?

Link to comment
Share on other sites

Hi

It is kinda working now. BUT it said NaN on transmit field. And even worse, after recover of the craft it sais NaN in the science field. Also i did not get any science points from it as far as i can see.

How to fix?

Edited by ManuxKerb
Link to comment
Share on other sites

Hi

It is kinda working now. BUT it said NaN on transmit field. And even worse, after recover of the craft it sais NaN in the science field. Also i did not get any science points from it as far as i can see.

How to fix?

Logs please?

Link to comment
Share on other sites

FYI everyone i'm going to be doing some major refactoring of RealScience to clean things up, and to be able to satisfy some of the feature requests people have been asking for. The current codebase has kind of grown out of hand with things being added in, and just needs to be re-worked.

So expect changes in configuration and what not. More details when I have them.

Link to comment
Share on other sites

Looks awesome.

Do you want me to work/start work/be lazy about adding support for this with Crowd Sourced Science?

To be fair, I am not sure how Crowd Sourced Science would work with it. RealScience doesn't use ScienceDefs, nor does it uses the stock science window. The Conditions system in RealSciece allows for for more flexible and complex experiments to be created than allowed by stock science, and therefor covered by the result messages.

I am open to suggestions on how it might work, but at the moment I don't really see a way for generic messages to really have any relation at all to the actual experiments defined. Maybe some sort of tag system where the experiment author could define a series of tags and any result messages that have those tags could then be picked up?

Link to comment
Share on other sites

Perhaps the stock science message could apear on experiment completion? Or is that not possible with the current system?

Physically displaying the stock message isn't the problem. The problem is that they are really irrelevant and not necessarily at all related to the actual experiment. RealScience doesn't just duplicate the basic experiments, but gives designers the ability to create much more complex and in depth experiments using multiple conditions and what not. Its closer to contracts than stock science really.

Link to comment
Share on other sites

The stock science results display is really bad. It's difficult to customize, you have problems if the message is too long, controlling the buttons can be difficult, etc...

If you want some kind of results display it would be best to come up with something new. Or better yet, incorporate results into a single science control window so that everything (deploying, collecting data, transferring, transmitting, etc...) can be controlled from there, instead of those horrendous right-click menus.

Link to comment
Share on other sites

Then why not add the stock science display, and then leave it to the part maker to write up some more relevant scientifically plausible experiment results (Not "The goo jiggles and wobbles as the craft flies).
The stock science results display is really bad. It's difficult to customize, you have problems if the message is too long, controlling the buttons can be difficult, etc...

If you want some kind of results display it would be best to come up with something new. Or better yet, incorporate results into a single science control window so that everything (deploying, collecting data, transferring, transmitting, etc...) can be controlled from there, instead of those horrendous right-click menus.

This is what I have pretty much already done, and it is all being re-worked now to be better. @Spacepetscompany the discussion started about, I thought, Crowd Sourced Science and my point being that it doesn't make sense to hook into random stock science results. Instead RealScience experiments have their own designed defined completion message.

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 months later...
  • 1 year later...
  • 3 years later...

Yes, stock science is a very strange.

IRL humans have build Saturn V without collecting ground and making atmosphere probes on Mars.

Actually all the tech tree and "science" is not a science at all. I think science is smth like measure atmosphere properties and flying dynamics (using kOS for logging) on different planets and create your own precise landing system. And so on.

 

Link to comment
Share on other sites

I think it would be great if real numerical data sets were available from ScanSat and such and your science module required people to enter things like the standard deviation of the Altimetry HiRes scan to get the science points for it.  They'd have to crack a book, heh heh.  What would make it more interesting is if there were sometimes hints and clues to some ancient alien civilization buried in the raw science data.  And if enough clues are gathered the player can triangulate on a giant Squad monolith and KAL9000 can try to kill them.  An easter egg of all easter eggs!

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