No such node (direction_count)

Place to get help with not working mods / modding interface.
Post Reply
Odynius
Inserter
Inserter
Posts: 21
Joined: Wed Feb 22, 2017 10:36 pm
Contact:

No such node (direction_count)

Post by Odynius »

Hey guys,

I'm currently working on my first mod, which is a little challenging, since the guides are all pretty old and don't really work with the current version. Nevertheless I think i got pretty far for my first try creating a car entity, which shall become an aircraft some day.
After solving a lot of problems, i can't solve this one: "no such node (direction_count). I don't really get it, because there IS a node with direction_count.

Code: Select all

  animation = 
	{
		layers =
		{
		width = 300,
		height = 200,
		frame_count = 1,
		direction_count = 32,
		animation_speed = 8,
		max_advance = 0.2,
		stripes =
			{
			filename = "__BattleCruiserMod_0.1.1__/graphics/Battlecruiser1.png",
			width_in_frames = 4,
			height_in_frames = 8
			}
		},
Is there a problem you can see?

Thx!

User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1636
Joined: Sun Oct 18, 2015 11:52 am
Contact:

Re: No such node (direction_count)

Post by Arch666Angel »

You are using the "stripes" definition so the sheets you input have to be stripes:
At the moment your sprite sheet is 4 by 8 frames, what the game wants is 1 by 32 frames. If you extend the width, the additional frames are the animation that is run for each direction.

Odynius
Inserter
Inserter
Posts: 21
Joined: Wed Feb 22, 2017 10:36 pm
Contact:

Re: No such node (direction_count)

Post by Odynius »

Thanks for your answer!

So should i simply cut the sprite into 4 stripes and put them underneath?

EDIT: Why does the Hauler Mod work when it's 8x8 then?

User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1636
Joined: Sun Oct 18, 2015 11:52 am
Contact:

Re: No such node (direction_count)

Post by Arch666Angel »

Odynius wrote:Thanks for your answer!

So should i simply cut the sprite into 4 stripes and put them underneath?

EDIT: Why does the Hauler Mod work when it's 8x8 then?
Yes.

Probably defining it differently, maybe "directions". You would have to take a look into the mod and see.

Odynius
Inserter
Inserter
Posts: 21
Joined: Wed Feb 22, 2017 10:36 pm
Contact:

Re: No such node (direction_count)

Post by Odynius »

I made a 1 by 32 stripe now, but still the same error occurs. I also checked the mods skript and it was totally identical to mine in that way ...

User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1636
Joined: Sun Oct 18, 2015 11:52 am
Contact:

Re: No such node (direction_count)

Post by Arch666Angel »

Odynius wrote:I made a 1 by 32 stripe now, but still the same error occurs. I also checked the mods skript and it was totally identical to mine in that way ...
Maximum Size per Sheet is 2048x2048 px at the moment, they are going to change that with 0.15 but for now that's the hard limit for sprite sheets.

Odynius
Inserter
Inserter
Posts: 21
Joined: Wed Feb 22, 2017 10:36 pm
Contact:

Re: No such node (direction_count)

Post by Odynius »

Okay, i'm gonna fix that too then.

EDIT: I now have two stripes with 120x1440, but it didn't help with the direction_count error...

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2904
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: No such node (direction_count)

Post by darkfrei »

Odynius wrote:Okay, i'm gonna fix that too then.

EDIT: I now have two stripes with 120x1440, but it didn't help with the direction_count error...
Which prototype type are you used?

Odynius
Inserter
Inserter
Posts: 21
Joined: Wed Feb 22, 2017 10:36 pm
Contact:

Re: No such node (direction_count)

Post by Odynius »

I used the "car" entity, if thats what you mean

User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1636
Joined: Sun Oct 18, 2015 11:52 am
Contact:

Re: No such node (direction_count)

Post by Arch666Angel »

I'll post you an example layer from one of my mods:
Each frame is 256x256 px (width, hight), there are 2 animation frames per direction (frame_count), it has frames/animations for 64 directions (direction_count), each strip contains 8 directions (with 2 animation frames each (width_in_frames, hight_in_frames), so each strip is 2048 px high and 512 px wide.
Frame and direction count have to be the same for every layer you add

Code: Select all

        {
          width = 256,
          height = 256,
          frame_count = 2,
          direction_count = 64,
          shift = {0, 0},
          animation_speed = 8,
          max_advance = 1,
          stripes = 
          {
            {
             filename = "__angelsexploration__/graphics/entity/crawler/base-1.png",
             width_in_frames = 2,
             height_in_frames = 8,
            },
            {
             filename = "__angelsexploration__/graphics/entity/crawler/base-2.png",
             width_in_frames = 2,
             height_in_frames = 8,
            },
            {
             filename = "__angelsexploration__/graphics/entity/crawler/base-3.png",
             width_in_frames = 2,
             height_in_frames = 8,
            },
            {
             filename = "__angelsexploration__/graphics/entity/crawler/base-4.png",
             width_in_frames = 2,
             height_in_frames = 8,
            },
            {
             filename = "__angelsexploration__/graphics/entity/crawler/base-5.png",
             width_in_frames = 2,
             height_in_frames = 8,
            },
            {
             filename = "__angelsexploration__/graphics/entity/crawler/base-6.png",
             width_in_frames = 2,
             height_in_frames = 8,
            },
            {
             filename = "__angelsexploration__/graphics/entity/crawler/base-7.png",
             width_in_frames = 2,
             height_in_frames = 8,
            },
            {
             filename = "__angelsexploration__/graphics/entity/crawler/base-8.png",
             width_in_frames = 2,
             height_in_frames = 8,
            }
          }
        },...

Odynius
Inserter
Inserter
Posts: 21
Joined: Wed Feb 22, 2017 10:36 pm
Contact:

Re: No such node (direction_count)

Post by Odynius »

Okay, I went thorugh it and this is where I'm at now:

Code: Select all

layers =
		{
		width = 120,
		height = 90,
		frame_count = 1,
		direction_count = 32,
		animation_speed = 16,
		max_advance = 0.2,
		stripes =
			{
			filename = "__BattleCruiserMod_0.1.1__/graphics/bc1.png",
			width_in_frames = 1,
			height_in_frames = 16
			},
			{
			filename = "__BattleCruiserMod_0.1.1__/graphics/bc2.png",
			width_in_frames = 1,
			height_in_frames = 16
			},
		}
This is one of my two stripes:

https://uploadpie.com/CYI4uP

I divided the stripe into 16 times 120x90. There is obviously only one frame (which should be fine, right?) per direction and i have a direction_count = 32, which the games says doesn't exist ...

I really don't see the problem ...

User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: No such node (direction_count)

Post by prg »

layers needs to be a table of tables. You're just missing some {}.
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!

Odynius
Inserter
Inserter
Posts: 21
Joined: Wed Feb 22, 2017 10:36 pm
Contact:

Re: No such node (direction_count)

Post by Odynius »

prg wrote:layers needs to be a table of tables. You're just missing some {}.
Thanks, fixed it...

EDIT: Guys, I did it! After a few more problems I got it running! I couldn't have done it without you, so thank you very much. My first mod, i can't believe it. :D

Post Reply

Return to “Modding help”