Jump to content

Reentry Effects and Plasma


Do you want squad to turn the feature/mod listed below on?  

70 members have voted

  1. 1. Like the poll title/thread title says, should Squad turn the feature on

    • Yes
    • No
    • Other/Could Not Care Less - If other say below please

This poll is closed to new votes


Recommended Posts

53 minutes ago, AlamoVampire said:

@The_Rocketeer How long would it take @SQUAD or any dev to turn the ALREADY existing code from off to on? A few minutes? Faster than a coffee break. It absolutely ABSOLUTELY would reduce drag on a players resources to have it enabled and no longer a mod. Especially it would give players on baked potatos a chance to get a visual enhancement that the "its a mod, good enough" mentalities prohibits them from getting. 

This why I wish someone from the devs would say something. The silence is not helping us.

Op 13:41:30

Before claiming that something just needs to be turned on you may want to have a look at the code of the mod. It creates the whole code to handle that effect. The only things that's already in stock KSP is the particle effect definition. i.e. a few sprites, a shader and particles animation. There is NO code in the game that handles that effect.

But hey, Squad may need more armchair devs to explain how things should be done. So please, Go on

 

Link to comment
Share on other sites

@sarbian 1. The effect is hard coded into stock, @pizzaoverhead the fine fellow who brings us the mod clearly states on the mod page that his mod activates "Unused stock code"

2. Although I cannot find the post where it happens squelch himself states that the effect is defaulted off and is a stock extension of the launch smoke trail. 

So the majority of the work has been done by @SQUAD years ago and should be trivial to activate.

op 19:33:30

Link to comment
Share on other sites

7 minutes ago, AlamoVampire said:

The effect is hard coded into stock, @pizzaoverhead the fine fellow who brings us the mod clearly states on the mod page that his mod activates "Unused stock code"

Yes, but unless 1. you are a programmer, and 2. you've actually read the code, then you don't know exactly what that means, or exactly what that would entail.

7 minutes ago, AlamoVampire said:

should be trivial to activate.

Again:  If you're not a programmer, you really can't say that and have any idea what you're talking about.  Of course, I don't work for Squad and am therefore not privy to the KSP internals or why various development decisions were made... but I have been doing this for a living for a few decades and I can offer you this protip:  Almost nothing in programming is "trivial".

Things tend to be a lot harder than you expect, for various reasons.  Apply a simple piece of logic, here:

  1. If it really were "trivial", and if it really were an unambiguously better experience for the user, then they would have done it already.
  2. They have not done so.
  3. Therefore there's some reason why not, and it's not as trivial as you think it is.

I'm not trying to argue against all suggestions by saying "if it were good they would have done it already"-- just that every development change comes with a cost in time and effort, and that cost is typically much higher than non-programmers likely think it is.  So if it hasn't been done, it means that the cost (in engineering time for the company) exceeds the perceived benefit (in terms of player experience).  Or even if the cost-benefit ratio comes out positive... it might be less positive than other potential features to work on, so it would go to the back of the queue even if the company likes the idea of implementing it.

Link to comment
Share on other sites

@Snark Fair points but the works laid out is it not? The hard works done if what squelch said so long ago is true that its an extension of the smoke trail, so riddle me then in the grand scope: is it not far more trivial to activate this effect as stock than say put a new part or dlc or even fold say asteroid day into stock? But bottom line no matter anyones pov on this issue is: until official word on this appears we are only going in circles on a what if x y z race track.

My ultimate bottom line point stands thusly: I wish this was finally turned on stock and wish for anyone from squad to make some statement on this, even if it means a "no son go use the mod" know what I mean? I have laid out pictographically and word wise why I feel its a good idea for unused stock code to get turned on and globally reduce our mod usage by 1. 

op 19:56:30

Link to comment
Share on other sites

2 hours ago, AlamoVampire said:

@sarbian 1. The effect is hard coded into stock, @pizzaoverhead the fine fellow who brings us the mod clearly states on the mod page that his mod activates "Unused stock code"

If you actually read the OP of his thread, you would see that it says "This mod activates an unused stock particle effect for reentry, featuring a plasma trail and sparks.". A particle affect ≠ code.

Also, why haven't you opened an issue on the tracker, it's much more likely to receive an official response (https://bugs.kerbalspaceprogram.com/projects/ksp/issues)

Link to comment
Share on other sites

2 hours ago, AlamoVampire said:

@Snark Fair points but the works laid out is it not? The hard works done if what squelch said so long ago is true

Like I said:  practically nothing in shipping software is as simple as you seem to think it is, if you don't actually do it yourself.  "Laying out work" is only one piece of the puzzle.  I could type out another lengthy wall of text here enumerating the many, many ways a feature could suck up a lot of time and resources even if it's "already laid out" (which we don't actually know, because if you just read a sentence or two from Squelch, that's no way to know the full picture; he didn't give you a multi-page treatise on every aspect of the thing, did he?).  I could lay out such a thing, but honestly, I'm not sure how much you'd prefer to slog through.

I'll just summarize it by saying:  it's harder than you think, for reasons you don't understand, and it would take an extraordinarily large amount of words just to explain why that should be so, and you still probably wouldn't understand.  I'm not saying that as a statement about you, personally, just that technical professions are really hard and people who aren't in a profession don't know what it takes.  Really.

2 hours ago, AlamoVampire said:

riddle me then in the grand scope: is it not far more trivial to activate this effect as stock than say put a new part or dlc or even fold say asteroid day into stock?

Yup, that's what I'm telling you.  It's not.  Without knowing the technical specifics, you don't have the slightest, teensiest clue how much work it would be.  You may think you do, but you don't, honest.  And there are a lot of other variables too, besides just "how hard would it be", which are germane to "would it make sense for the company to do this thing."

3 hours ago, AlamoVampire said:

until official word on this appears we are only going in circles on a what if x y z race track.

Absolutely, I'm in 100% agreement with you there.  :)

 

Link to comment
Share on other sites

@TheRagingIrishman <takes a deep long and slow breath> I honestly did not think I would need to diagram whats going thru my head on my word choices, but, I guess I must.

1. A lot of what I am saying is drawn from what I saw <no clue if he still works for squad or not, I cant seem to make the forum show me his page> Squelch say. Those posts seem to be lost from when we changed forums.

2. Last I checked this game is made up of countless lines of code, as are all computer programs. As an extension of this, those who have the expertise to manipulate the code are permitted to do so to make modifications to this game in the form of downloadable mods. These are also made up of lines of code. In order for @pizzaoverhead to have known about this particle effect, he had to have seen the line or lines of code that directly reference it. Squelch himself stated that this effect is an extension of the launch rocket exhaust plumes we see during ascent, a fact we all agree on. SO TRI, the aforementioned: "This mod activates an unused stock particle effect for reentry, featuring a plasma trail and sparks." is in fact a round about way of saying with out being techno-babbled (to borrow a turn of phrase from the writers of ST:TNG) to death, that he took what was already CODED INTO the game and turned it on. SO, I formally repudiate you sir by stating that, my assertion of: this is hard coded into the game already, is in fact a statement of truth. 

EDIT, forgot this point: Also, how exactly is a feature THEY placed into the game that THEY have not turned on a BUG report worthy thing? Way I see it, it isnt. 

op 23:36:30

Edited by AlamoVampire
Link to comment
Share on other sites

@AlamoVampire, I think most of us would like something like that to be stock. The results of your poll are quite telling in that respect. But did you know that @sarbian was one of the developers until recently? Though he left a little while ago, I think his response is quite informative and maybe as close to official as we can reasonably expect.

Here's the source code for the mod:

Quote

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;

namespace ReentryParticleEffect
{
    [KSPAddon(KSPAddon.Startup.Flight, false)]
    public class ReentryParticleEffect : MonoBehaviour
    {
        public Vector3 velocity;
        public int MaxParticles = 3000;
        public int MaxEmissionRate = 400;
        // Minimum reentry strength that the effects will activate at.
        // 0 = Activate at the first sign of the flame effects.
        // 1 = Never activate, even at the strongest reentry strength.
        public float EffectThreshold = 0.5f;

        private void Start()
        {
            GameEvents.onVesselDestroy.Add(OnVesselDestroy);
        }

        public class ReentryEffect
        {
            public ReentryEffect(ParticleSystem trail, ParticleSystem sparks)
            {
                Trail = trail;
                Sparks = sparks;
            }
            public ParticleSystem Trail;
            public ParticleSystem Sparks;
        }

        public ReentryEffect GetEffect()
        {
            GameObject effect = (GameObject)GameObject.Instantiate(Resources.Load("Effects/fx_reentryTrail"));
            ParticleSystem[] particleSystems = effect.GetComponentsInChildren<ParticleSystem>();
            ReentryEffect reentryFx = new ReentryEffect(particleSystems[0], particleSystems[1]);
            reentryFx.Trail.playbackSpeed = 5;
            reentryFx.Sparks.playbackSpeed = 5;
            return reentryFx;
        }

        public Dictionary<Guid, ReentryEffect> VesselDict = new Dictionary<Guid, ReentryEffect>();

        private void FixedUpdate()
        {
            float effectStrength = (AeroFX.FxScalar * AeroFX.state - EffectThreshold) * (1 / EffectThreshold);
            List<Vessel> vessels = FlightGlobals.Vessels;
            for (int i = vessels.Count - 1; i >= 0; --i)
            {
                Vessel vessel = vessels;
                ReentryEffect effects  = null;
                if (VesselDict.ContainsKey(vessel.id))
                    effects = VesselDict[vessel.id];
                else
                {
                    if (vessel.loaded)
                    {
                        effects = GetEffect();
                        VesselDict.Add(vessel.id, effects);
                    }
                    else
                        continue;
                }

                if (!vessel.loaded)
                {
                    if (effects != null)
                    {
                        Destroy(effects.Sparks);
                        Destroy(effects.Trail);
                    }
                    effects = null;
                    continue;
                }

                if (effects == null || effects.Trail == null || effects.Sparks == null)
                    continue;

                if (AeroFX != null)
                {
                    // FxScalar: Strength of the effects.
                    // state: 0 = condensation, 1 = reentry.
                    if (effectStrength > 0)
                    {
                        // Ensure the particles don't lag a frame behind.
                        effects.Trail.transform.position = vessel.CoM + vessel.rb_velocity * Time.fixedDeltaTime;
                        effects.Trail.enableEmission = true;
                        effects.Sparks.transform.position = vessel.CoM + vessel.rb_velocity * Time.fixedDeltaTime;
                        effects.Sparks.enableEmission = true;

                        velocity = AeroFX.velocity * (float)AeroFX.airSpeed;

                        effects.Trail.startSpeed = velocity.magnitude;
                        effects.Trail.transform.forward = -velocity.normalized;
                        effects.Trail.maxParticles = (int)(MaxParticles * effectStrength);
                        effects.Trail.emissionRate = (int)(MaxEmissionRate * effectStrength);

                        // startSpeed controls the emission cone angle. Greater than ~1 is too wide.
                        //reentryTrailSparks.startSpeed = velocity.magnitude;
                        effects.Sparks.transform.forward = -velocity.normalized;
                        effects.Sparks.maxParticles = (int)(MaxParticles * effectStrength);
                        effects.Sparks.emissionRate = (int)(MaxEmissionRate * effectStrength);
                    }
                    else
                    {
                        effects.Trail.enableEmission = false;
                        effects.Sparks.enableEmission = false;
                    }
                }
                else
                {
                    effects.Trail.enableEmission = false;
                    effects.Sparks.enableEmission = false;
                }
            }
        }

        public void OnVesselDestroy(Vessel vessel)
        {
            if (VesselDict.ContainsKey(vessel.id))
            {
                ReentryEffect effects = VesselDict[vessel.id];
                if (effects != null)
                {
                    Destroy(effects.Trail);
                    Destroy(effects.Sparks);
                }
                VesselDict.Remove(vessel.id);
            }
        }

        private AerodynamicsFX _aeroFX;
        AerodynamicsFX AeroFX
        {
            get
            {
                if (_aeroFX == null)
                {
                    GameObject fxLogicObject = GameObject.Find("FXLogic");
                    if (fxLogicObject != null)
                        _aeroFX = fxLogicObject.GetComponent<AerodynamicsFX>();
                }
                return _aeroFX;
            }
        }
    }
}

 

I know it isn't huge, and I'm no programmer, but it doesn't look completely trivial to me.

Either way, I think it's a nice suggestion to add the functionality to stock. Let's see what happens.

EDIT: Additionally, the mod contains three files:
ReentryParticleEffect.dll
ReentryParticleEffect.dll.mdb
ReentryParticleEffect.pdb

Summary: This mod appears to be more than a simple activation switch.

Link to comment
Share on other sites

2 hours ago, AlamoVampire said:

In order for @pizzaoverhead to have known about this particle effect, he had to have seen the line or lines of code that directly reference it.

That's not how thing work. Others told you so, and I am telling you so. As a modder on KSP for more than 4 years and en ex member of the dev team I think my word has some weight.

But why do I even bother? You clearly do not care about answers. You just want the narrative of your story to be the one you decided to be: Squad is lazy.

Edited by sarbian
Link to comment
Share on other sites

Dude @sarbian Really? The entire narrative is, has been, forever will be: @pizzaoverhead saw the text in the code, made a mod to turn what is code in the base game on, squelch stated it is an extension of the smoke plume, i made THIS thread asking the above poll. I then said it would be nice for ALL of us players to see it turned on to reduce ALL of our mod needs by 1. I then point out this would give a visual enhancement to all who want it and to all who want it but couldn't or wouldn't run the mod. I have also stated it would be divine to have @SQUAD or a developer chime in in an official capacity. I have also stated that the lack of official word is disheartening. op 03:00:30

Edited by AlamoVampire
Link to comment
Share on other sites

7 hours ago, AlamoVampire said:

SO TRI, the aforementioned: "This mod activates an unused stock particle effect for reentry, featuring a plasma trail and sparks." is in fact a round about way of saying with out being techno-babbled (to borrow a turn of phrase from the writers of ST:TNG) to death, that he took what was already CODED INTO the game and turned it on. SO, I formally repudiate you sir by stating that, my assertion of: this is hard coded into the game already, is in fact a statement of truth.

Technically, when you claim that he activated unused code in the stock assets, you are right, because Shaders and Particle Effects are code too. But without the C# side (that pizzaoverhead coded) they are useless in most cases.
Also, pizzaoverhead says that his mod activates an unused effect. That is true, but the logic when the effect should get activated was written by pizzaoverhead. So the mod isn't just a simple activation switch, it contains logic that
Squad would need to integrate into the game logic, since adding a mod to a game is a bit more difficult than just copy-pasting the source code. In fact, they can't even do that, because the mod is GPL-licensed which would force them to opensource KSP.

4 hours ago, AlamoVampire said:

I then point out this would give a visual enhancement to all who want it and to all who want it but couldn't or wouldn't run the mod.

I would like to point out that the difference between "gets activated by a well-made mod" and "gets activated by well-made stock code" is minimal. You are even giving contradicting arguments here: If the code of the mod is trivial (as you claim), it's impact would be minimal, and the "users who can't run the mod" argument is null and void. And if the code was non-trivial, nothing would change if that code was moved to stock (unless the modder did something very bad and Squad does something very good).

I am not opposed against making this a stock option (if it is done right), but your argumentation is just wrong.

P.S: Here is an example of an activator mod that would be trivial

using UnityEngine;

[KSPAddon(KSPAddon.Startup.MainMenu, true)]
class ActivateMe : MonoBehaviour
{
    void Start() 
    {
    	GameEffects.Instance.enableNewEffect = true;
        Destroy(this);
    }
}

 

Edited by Thomas P.
Link to comment
Share on other sites

If I understand correctly, @AlamoVampire is essentially rebutting the common argument against most suggestions here: "there's a mod for that". 

Some things should be stock (for reasons that we don't need to go into now because it would be off topic) and some should remain mods. The choice is subjective, but this thread is a suggestion that the functionality of this mod be made stock.

Some say it would be easy, others say not, and I say it's probably somewhere in between, but I think at this point it is probably best to leave the discussion of how easy or not it would be to implement and focus on the main suggestion, which is: should this visual effect (which is at least partly already finished in the game) be made stock? 

Link to comment
Share on other sites

2 hours ago, Thomas P. said:

So the mod isn't just a simple activation switch, it contains logic that
Squad would need to integrate into the game logic, since adding a mod to a game is a bit more difficult than just copy-pasting the source code. In fact, they can't even do that, because the mod is GPL-licensed which would force them to opensource KSP.

Actually, you're wrong.  The mod is licensed under the GPL, but there is nothing preventing @pizzaoverhead from giving a different license to it.  He owns that code, he can change the license anytime he wants to.  The license prevents Squad from just taking it and using it, but if they want, they could license it from @pizzaoverhead in a different manner.

Link to comment
Share on other sites

^^^^ What LGG said. Owner of the copyright can re-license, sublicense and +n-license to his/her liking.
This is why there was a lot of buzz about CLA few years ago. Essentially, you can contribute under GPL - and if you signed the CLA, your contribution can end up distributed at any license. You are essentially giving away all rights.
This is neither bad, nor good* , its just something to keep in mind. In no CLA was signed, then copyright owner has to contact every contributor and ask for permission for license change/addition/revoke.
* Free software may end up closed. Closed source may end up free. Differently licensed software may be integrated under common nominator license, and so on.

But lets get back on topic. :)

Link to comment
Share on other sites

I would quite like to see better graphics all round, clouds, better water, more evidence that kerbals live on kerbin, and of course particle effects and plasma.

I voted in favour of the suggestion to make the stock graphics a bit better. I will always do so because players with good computers will turn it on, those with a potato will turn it off, and part count will remain the largest factor in slowing down any machine.

Link to comment
Share on other sites

@Thomas P. The argument of it would help those couldn't or wouldn't run the mod is NOT null or void. Why or more to how? 1: pureists who want a 100% stock game may want a visual enhancement so making it stock helps the get that. 2: console players CANNOT mod the game thus they by default fall to cant use the mod. Thus my arguments are neither wrong nor conflicting at all. Thus you are repudiated on your claim there. 

 

2 hours ago, Deddly said:

If I understand correctly, @AlamoVampire is essentially rebutting the common argument against most suggestions here: "there's a mod for that". 

Some things should be stock (for reasons that we don't need to go into now because it would be off topic) and some should remain mods. The choice is subjective, but this thread is a suggestion that the functionality of this mod be made stock.

Some say it would be easy, others say not, and I say it's probably somewhere in between, but I think at this point it is probably best to leave the discussion of how easy or not it would be to implement and focus on the main suggestion, which is: should this visual effect (which is at least partly already finished in the game) be made stock? 

This right here.

Op: 11:33:30

Link to comment
Share on other sites

Can we go back to the 'if it's a mod it will be slower than if it's stock' discussion? I'll admit I don't really know the difference between how KSP operates the core game to how it operates mods, but I'm struggling to see why this would be noticable, if it's even true at all.

Link to comment
Share on other sites

1 hour ago, The_Rocketeer said:

Can we go back to the 'if it's a mod it will be slower than if it's stock' discussion? I'll admit I don't really know the difference between how KSP operates the core game to how it operates mods, but I'm struggling to see why this would be noticable, if it's even true at all.

It would perhaps be better to make a new thread for that discussion, if that's ok? That question would apply to mods in general, so would be useful for more people than the ones reading this thread. 

Link to comment
Share on other sites

A suggestion has been put forth. I myself do not know how hard it would be to put in effect, but by now all sides have had a chance to express their wishes and feedback on the subject, which Squad may or may not opt to heed. And since the discussion is becoming acrimonious, it's time to move on. 

Thread closed. 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...