VFX in StarterMod are now Broken until A23! (Sorry!)

Hey Folks!

TLDR: StarterMod Fountain VFX are now “Broken”.
All "Duration"s are now in MilliSeconds, and all color "Overtime"s have been combined to a single array value.

Due to some updates with the VFX system (see the last stream I did for specifics: Stonehearth Dev Stream 292: SHED's VFX Editor Additions (part 2)), I had to update some VFX in the startermod before the tech which supports those changes actually gets out there to make it work. There have been no changes to the VFX system (yet), so any VFX you make now will still work as always.

However, once A23 comes out, the changes mentioned in the TLDR will come into effect, and all VFX will need to be updated. The StarterMod fountains should be a good example of what to do, and in a few days (hopefully) SHED will be updated to produce VFX in the new style - which will also be broken for the current engine. But once A23 comes along, everything will fit back into place : D.

If you have any questions or issues with the new VFX changes (or VFX in general), please let me know and I’ll try to help you out!

Thank you all for your patience!

2 Likes

Don’t worry, if it is for better, than break it.
For me, more backward compatibility means less forward improvements. The good thing about having the unstable branch is that we can all be warned before hand and adapt before the stable release is dropped.

Edit:

    "origin": {
         "surface": "RECTANGLE",
         "values": [0.1, 0.1, 0, 0]
    }

The first two values are the size, and the last two? Is it the rectangle position?

4 Likes

Nope, position is a separate field. Those are negative volume values, so (X, Y, negvolX, negvolY) - so you can create a box or two rectangles. We also added an offset to the volumes, and they would look something like this:

  "translation_x": {
     "kind": "CONSTANT",
     "values": [0]
  },
  "rotation_x": {
     "kind": "CONSTANT",
     "values": [0]
  },
  "scale_x": {
     "kind": "CONSTANT",
     "values": [0]
  }

If you use shed at all, it explains all the different fields and values. Otherwise, it will be really confusing - especially when looking at sphere or cylinder.

Sorry I didn’t respond to this earlier, I didn’t get a notification that you responded.

Don’t worry, I actually got the answer by review the stream.
I had missed that part the first time because as I explained there, I was super lag, (not exaggerating) it was 3 minutes behind everyone else. people in chat talking about things while the stream was showing “the past” hahaha.

Oh weird : /. Yeah, that stream was somewhat of a nightmare for multiple reasons.

Hey @Malley, the above means only the rgb values right? The alpha is still overtime_a?

And I got the most recent shed but the gui is not working for me, I can only see the json, not the graphs and html fields. The gui only appears in the lights tab.

Correct, alpha must be separate to avoid a lot of nightmare situations.

Hmm… Shed may have gone out broken somehow… I’ll check with the engineers.

Are you running shed with the platform set to 32/64-bit or is it ANY_CPU? Also, do the VFX load up for any cubemitters in the stonehearth mod, or is it just broken for the starter mod ones?

Do you mean when building it in VS? I chose the 64bit.
I can only see the gui for light effects, not the cubemitter effects, for any mod.

Cubemitters tab:

Lights tab:

Oh, one more error, is that at the recipe editor, it only shows stonehearth and rayya mods, and clicking on the hide external mods button raise an error popup

Can you try Rebuilding the solution? If you click the Cef Dev Tools and then Console, do you see any errors there? What is the error popup that shows up when you click Hide External Mods?

Console error:

Popup error from recipe tab:

System.NullReferenceException: Referência de objeto não definida para uma instância de um objeto.
   em StonehearthEditor.Recipes.RecipesView.LoadRecipesForJob(String jobAlias) na C:\Users\Bruno\Downloads\stonehearth-editor\StonehearthEditor\Recipes\RecipesView.cs:linha 347
   em StonehearthEditor.Recipes.RecipesView.LoadAllRecipes() na C:\Users\Bruno\Downloads\stonehearth-editor\StonehearthEditor\Recipes\RecipesView.cs:linha 277
   em StonehearthEditor.Recipes.RecipesView.LoadColumnsData() na C:\Users\Bruno\Downloads\stonehearth-editor\StonehearthEditor\Recipes\RecipesView.cs:linha 169
   em StonehearthEditor.Recipes.RecipesView.Reload() na C:\Users\Bruno\Downloads\stonehearth-editor\StonehearthEditor\Recipes\RecipesView.cs:linha 123
   em StonehearthEditor.Recipes.RecipesView.baseModsButton_CheckedChanged(Object sender, EventArgs e) na C:\Users\Bruno\Downloads\stonehearth-editor\StonehearthEditor\Recipes\RecipesView.cs:linha 950
   em System.Windows.Forms.ToolStripButton.OnCheckedChanged(EventArgs e)
   em System.Windows.Forms.ToolStripButton.set_CheckState(CheckState value)
   em System.Windows.Forms.ToolStripButton.set_Checked(Boolean value)
   em System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
   em System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   em System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   em System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   em System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   em System.Windows.Forms.Control.WndProc(Message& m)
   em System.Windows.Forms.ToolStrip.WndProc(Message& m)
   em System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Oh, looking at it I see it is looking at my downloads folder, where I build it, But I moved it to the game folder later, where I running it now. Maybe that is the cause? I will try build it again using the new commit available.

Edit:
I got the commit from today, rebuild it, and it works now. But the recipes tab still lists only stonehearth and rayya. And same popup appear when clicking on the hide button.

Which external mods do you have? Sounds like it’s expecting a value that isn’t there in some json

I narrowed the problem to the swamp_goblins mod I’m creating. Removing it from my mod folders solved the errors. Here the current version if needed: GitHub - BrunoSupremo/swamp_goblins: Swamp biome and Goblin kingdom mod for the game Stonehearth

But my recipes tab still only shows stonehearth and rayya items, with the button active or deactivated. For example, archipelago items are not listed there.

Sorry for derailing your topic Malley!

Here is another small bug, not really related to shed, but I got it while using it.
I was trying to tilt/rotate my cubemitter emission using this:

  "rotation_y": {
     "kind": "CONSTANT",
     "values": [90]
  },

But it only worked when I also added the other axis, with this:

  "rotation_x": {
     "kind": "CONSTANT",
     "values": [0]
  },
  "rotation_y": {
     "kind": "CONSTANT",
     "values": [90]
  },
  "rotation_z": {
     "kind": "CONSTANT",
     "values": [0]
  }

Can you pull and try archipelago again? I fixed an exception and it seems to be showing the entities at least in the recipes view

Yes, in the entities list it is ok now.
image

No worries, as long as stuff is getting fixed ; D.

That should definitely work regardless of the other ones being there or not. I’ll take a look and see if I can replicate this : ).

Hehe, so, rotation in y of 90° says ‘spin around the axis perpendicular to the ground’ - meaning there will basically be no change. Though I’m not sure what change you see when you add rotation of 0 to X and Z… it should look exactly the same. Could you please send screen shots of the different results?

Can you pull and try it with the swamp_goblins again?

Without the other axis:
screenshot 2017_12_04__21_27_07

With the other axis:
screenshot 2017_12_04__21_26_20

It is supposed to be a explosion. The brown pole is there just so I could have the effect up in the air.
It is a half sphere (I could go for a full one, but then I would be wasting half the cubemitters in the ground)

The code for it is this one:

{
   "name": "explosion",
   "duration": 1000,
   "material": "materials/cubemitter.material.json",
   "loops": false,
   "emission": {
      "rate": {
         "kind": "BURST",
         "values": [
            [0, 100]
         ]
      },
      "angle": {
         "kind": "CONSTANT",
         "values": [0]
      },
      "origin": {
         "surface": "SPHERE",
         "values": [5, 3, 180]
      },
      "rotation_x": {
         "kind": "CONSTANT",
         "values": [0]
      },
      "rotation_y": {
         "kind": "CONSTANT",
         "values": [90]
      },
      "rotation_z": {
         "kind": "CONSTANT",
         "values": [0]
      }
   },
   "particle": {
      "lifetime": {
         "start": {
            "kind": "CONSTANT",
            "values": [1000]
         }
      },
      "speed": {
         "start": {
            "kind": "CONSTANT",
            "values": [0]
         }
      },
      "scale": {
         "start": {
            "kind": "RANDOM_BETWEEN",
            "values": [0.7, 1]
         },
         "over_lifetime": {
            "kind": "RANDOM_BETWEEN_CURVES",
            "values": [
               [
                  [0, 1],
                  [1, 5]
               ],
               [
                  [0, 2],
                  [1, 7]
               ]
            ]
         }
      },
      "color": {
         "start": {
            "kind": "RANDOM_BETWEEN",
            "values": [
               [1, 0.8, 0, 1],
               [1, 0.3, 0, 1]
            ]
         },
         "over_lifetime_a": {
            "kind": "CURVE",
            "values": [
               [0, 0.8],
               [0.8, 0.2],
               [1, 0]
            ]
         }
      }
   }
}

If you remove the other axis (x and z), it will not rotate. It is like it had no rotation in any axis.

1 Like