Aelixander Posted October 4, 2015 Share Posted October 4, 2015 (edited) Hey there everybody!I have successfully started down the road to make anti-gravity parts!However.... right now, I can only reduce the mass of the parts themselves to 0. While this is great(!), I need help having them affect other parts too...Right now, the 1 part I have would reduce the mass of the whole ship by its own mass (so from .5t to .5t per part.)If I can get this last problem fixed, I can design a whole line of mass-reducing parts!Specifically, I have 1 part.It converts Electric Charge to "AntiGravitons".If I can get this unlocked, I'd build an "AntiGraviton" tank, which should hold more of these negative-mass particles.But I do have plans. Thanks to anyone that can help me with this project!- A Edited October 4, 2015 by Aelixander Link to comment Share on other sites More sharing options...
hab136 Posted October 4, 2015 Share Posted October 4, 2015 Reducing mass is not anti-gravity; it's reducing mass. They're both useful, but different things.If you want to change the mass of all the parts on the ship, just loop through vessel.Parts and set the mass on each part.EditorLogic editor = EditorLogic.fetch;ShipConstruct ship = editor.ship;List<Part> parts = ship.parts;foreach (Part p in parts) { p.mass = 0;}You probably want to save the mass of each part so you can restore it later.If you wanted to counteract the force of gravity (anti-gravity) instead of changing mass, you'd use rigidbody.AddForceAtPosition(), which is what Anti-gravity room does. Link to comment Share on other sites More sharing options...
Aelixander Posted October 4, 2015 Author Share Posted October 4, 2015 Reducing mass is not anti-gravity; it's reducing mass. They're both useful, but different things.Oops! Sorry.Fixed the title.Thanks for the code!We'll see what happens! Link to comment Share on other sites More sharing options...
More Boosters Posted October 4, 2015 Share Posted October 4, 2015 How would reducing mass help if your fuel's mass is lowered too? Your mass fraction and hence Delta-V would be the same. Link to comment Share on other sites More sharing options...
Aelixander Posted October 4, 2015 Author Share Posted October 4, 2015 How would reducing mass help if your fuel's mass is lowered too? Your mass fraction and hence Delta-V would be the same.Lower mass, but the same amount of thrust would result in greater thrust, yes?Easier to push a light thing, than a heavy thing? Link to comment Share on other sites More sharing options...
Mecripp Posted October 4, 2015 Share Posted October 4, 2015 (edited) Why not just make a MM to change the mass of all the parts ?Edit- If, I get it right you are changing the Mass = 0 on all parts you would just write a MM like @PART[*]:Final{ @mass = 0}EDIT- For Anti-gravity your going to need a plugin there are a couple of mods you can pick from there as posted above Anti-gravity room http://forum.kerbalspaceprogram.com/threads/105904 or there was this Kerbal Foundries http://forum.kerbalspaceprogram.com/threads/84102-%28On-Hiatus%29-1-0-x-V1-9f-Kerbal-Foundries-wheels-anti-grav-repulsors-and-tracks it has moved here http://forum.kerbalspaceprogram.com/threads/134654-Plugin-Parts-Kerbal-Foundries-Continuation-Latest-1-9g or HooliganLabs http://forum.kerbalspaceprogram.com/threads/53961-Airships-in-1-0-2-HooliganLabs-Mods?highlight=HooliganLabs and sure there are more. Edited October 4, 2015 by Mecripp2 Link to comment Share on other sites More sharing options...
that1steve Posted October 4, 2015 Share Posted October 4, 2015 I actually made a part i call the mass oscillator module, or m.o.m, that can change its mass. I put one on the top of my ships and another on the bottom, now i can always keep my CoM where i want it. Still fine tuning it though. Link to comment Share on other sites More sharing options...
NathanKell Posted October 4, 2015 Share Posted October 4, 2015 Be warned: You will break physics. Especially thermo. Link to comment Share on other sites More sharing options...
TK421d Posted October 4, 2015 Share Posted October 4, 2015 Be warned: You will break physics. Especially thermo.the world is flat and my flipflops let me walk on water. try it out! Link to comment Share on other sites More sharing options...
Aelixander Posted October 5, 2015 Author Share Posted October 5, 2015 Okay, so I have build up, mass reduction, and decay all worked out.Works GREAT.However, I am coming across an issue:I can only reduce the parts that have access to my Anti-Graviton resource.Is there a way I can give the Anti-graviton resource to all parts attached to the ship?And preferably give them a "max" of it, equal to the mass? Link to comment Share on other sites More sharing options...
Aelixander Posted October 26, 2015 Author Share Posted October 26, 2015 Okay all, so...I still need a lot of help, but I have gotten some.So here is what I want to do, and what I have done:Anti-Mass Generator "Graviton"- Radially Mounted Part (Alpha Done)- Creates negative-mass resource "AntiGravitons" (Done)Anti-Mass Plugin- Adds a non-tweakable AntiGravitons resource to all parts (with a capacity = mass)With these two bits, we have the core of the mod done! Extra (round 1)Resource Decay- Makes the AntiGravitons 'decay' - so ships will gain mass back if they are not constantly spending energy to make more AntiGravitons.-- This is a plug-in so the decay can't simply be ejected away.AntiGravitons "Holding Tank" - with this part the "Decay" above can be off-set since the tank will hold extra AntiGravitons and spread them to the rest of the ship, so you can turn off the generators for a while and not instantly start getting heavy again. - these are in-line.[The first of these is in Alpha]Extras: (round 2)AntiGravitons Engine; - consumes AntiGravitons and points "Up" - high degree of gimble (45 degrees). -- Story-wise it projects a black-hole above it, re-defining what "Down" is and the ship falls "up"AntiGravitons RCS;- consumes AntiGravitons - has a high degree of gimble (180 degrees)-- preferably, it clamps directly atop a generator.And there it is, the 6 basic parts I'm wanting to make with this mod.I want to make sure the code works well, before I start to break out Blender, Unity, and Photo-shop. Besides, I need more help with code.Anyone willing and able to help, please post below or send me a private message.Thank you,- A Link to comment Share on other sites More sharing options...
Mecripp Posted October 26, 2015 Share Posted October 26, 2015 You can use NearFuture plugin look at Near Future Electrical http://forum.kerbalspaceprogram.com/threads/52042-0-21-Near-Future-Propulsion-Pack you can make your own Resource that will Decay over time or you can use JDiminishingRTG Realistic configurable radioisotope decay pretty sure you can make you own Resource with it too http://forum.kerbalspaceprogram.com/threads/115938-1-0-2-JDiminishingRTG-Realistic-configurable-radioisotope-decay!-v1-3a-%28hotfix%29-3-May-2015 Link to comment Share on other sites More sharing options...
Aelixander Posted November 2, 2015 Author Share Posted November 2, 2015 Update: Thanks to some help, things are under-way again.But, I do have an idea to possibly simplify something:How would I go about, without using custom resources, create 'exclusivity'?Like... You cannot use part A without part B being in the ship? Then if you take off B later, it gives a wanting that parts wont work (like if you launch without controls, etc.)Or, is that over-thinking things?Basically, what I am thinking about doing is:making a command pod, which will have all the base code of what I want anti-gravitons to do (spread through all the parts of the attached ship, decay, etc.)-- but, some how, make the anti-graviton generators, not be able to turn on unless the command pod, or a drone pod (or some other part - a "gravity computer" etc.) is attached as well.Thoughts? Comments? Helpful code?Please.And thank you!- A Link to comment Share on other sites More sharing options...
Darth Jeb Posted September 18, 2016 Share Posted September 18, 2016 (edited) I think that you are working on a great project. Also as a side note, i wanted to have the anti gravity room mod but kerbalstuff is down and the author banned. So does someone knows how it worked (i have no experience with c#, but have experience in other languages). I would want to recreate something of that sort. Thanks ! Edited September 18, 2016 by Darth Jeb Link to comment Share on other sites More sharing options...
Tex Posted September 18, 2016 Share Posted September 18, 2016 Unfortunately, this thread is getting on for almost a year old since it's last post. It's pretty safe to say the topic at hand has moved on. Be sure to check the dates of threads you post in, @Darth Jeb Link to comment Share on other sites More sharing options...
Recommended Posts