Ludeon Forums

RimWorld => Mods => Help => Topic started by: Architect on March 29, 2014, 05:43:39 PM

Title: Can anyone explain the <surfaceNeeded> tag?
Post by: Architect on March 29, 2014, 05:43:39 PM
I still can't figure this out, what exactly does the <surfaceNeeded> tag refer to? It either has Heavy or Light associated with it, but I cannot for the life of me figure out what it's all about.

I'm putting a fair amount of effort in getting the finer details of everything from shadows to costs to be as accurate as possible, but I can't really do that without understanding all of the tags, and this is one of the few left I cannot understand XD
Title: Re: Can anyone explain the <surfaceNeeded> tag?
Post by: Cala13er on March 30, 2014, 03:27:10 AM
The surfaces needed are :
   Any,
   Light,
   Heavy,
   GrowSoil,
   Diggable,
   SmoothHard,
   SmoothableStone.

These all have a number set to them.
   Any = 0
   Light = 1
   Heavy = 2
   GrowSoil = 3
   Diggable = 4
   SmoothHard = 5
   SmoothableStone = 6

And from what I've been going on is that this is where <PathCost></PathCost> Comes in, defining what surface type it represents.
Title: Re: Can anyone explain the <surfaceNeeded> tag?
Post by: Architect on March 30, 2014, 07:37:30 AM
Quote from: Cala13er on March 30, 2014, 03:27:10 AM
The surfaces needed are :
   Any,
   Light,
   Heavy,
   GrowSoil,
   Diggable,
   SmoothHard,
   SmoothableStone.

These all have a number set to them.
   Any = 0
   Light = 1
   Heavy = 2
   GrowSoil = 3
   Diggable = 4
   SmoothHard = 5
   SmoothableStone = 6

And from what I've been going on is that this is where <PathCost></PathCost> Comes in, defining what surface type it represents.

I think I understand, but not how path cost is then tied in? Thats an individual integer?
Title: Re: Can anyone explain the <surfaceNeeded> tag?
Post by: Cala13er on March 30, 2014, 08:13:33 AM
Yeah the surfaces supported are the surfaces it can be placed over. And the path cost is the type of surface itself. At least that's what I've been going by :).
Title: Re: Can anyone explain the <surfaceNeeded> tag?
Post by: mrofa on March 30, 2014, 03:26:24 PM
But pathcost mostly is set to 60, so whats the point ?
Title: Re: Can anyone explain the <surfaceNeeded> tag?
Post by: Architect on March 30, 2014, 03:43:12 PM
Quote from: mrofa on March 30, 2014, 03:26:24 PM
But pathcost mostly is set to 60, so whats the point ?

It's set to whatever you want it to be set to, but yeah, I don't see how it ties into the surfaceNeeded in anyway. It doesn't make sense.
Title: Re: Can anyone explain the <surfaceNeeded> tag?
Post by: Cala13er on March 31, 2014, 12:41:31 AM
Quote from: mrofa on March 30, 2014, 03:26:24 PM
But pathcost mostly is set to 60, so whats the point ?

I can't find any pathcosts worth 60?
Title: Re: Can anyone explain the <surfaceNeeded> tag?
Post by: Cala13er on March 31, 2014, 12:42:40 AM
Quote from: Architect on March 30, 2014, 03:43:12 PM
Quote from: mrofa on March 30, 2014, 03:26:24 PM
But pathcost mostly is set to 60, so whats the point ?

It's set to whatever you want it to be set to, but yeah, I don't see how it ties into the surfaceNeeded in anyway. It doesn't make sense.

I'll look into it now.
Title: Re: Can anyone explain the <surfaceNeeded> tag?
Post by: mrofa on March 31, 2014, 12:44:42 AM
Quote from: Cala13er on March 31, 2014, 12:41:31 AM
Quote from: mrofa on March 30, 2014, 03:26:24 PM
But pathcost mostly is set to 60, so whats the point ?

I can't find any pathcosts worth 60?

Check the Buildings_Furniture.xml in core
Title: Re: Can anyone explain the <surfaceNeeded> tag?
Post by: Tynan on April 03, 2014, 02:39:08 AM
surfaceNeeded is the kind of surface that has to be present to build the item.

It used to be the case that you couldn't build some things on sand. Since this was irritating, I removed it. However, surfaceNeeded is still there. For example, you can't do a smooth stone build on anything but rough stone.

pathCost is just the additional # of ticks something causes a pawn to take while passing through each square, when passing over the item. It's irrelevant for unwalkable things, but affects the slowness of going over sandbags, tables, and the like.
Title: Re: Can anyone explain the <surfaceNeeded> tag?
Post by: Architect on April 03, 2014, 07:13:17 AM
Quote from: Tynan on April 03, 2014, 02:39:08 AM
surfaceNeeded is the kind of surface that has to be present to build the item.

It used to be the case that you couldn't build some things on sand. Since this was irritating, I removed it. However, surfaceNeeded is still there. For example, you can't do a smooth stone build on anything but rough stone.

pathCost is just the additional # of ticks something causes a pawn to take while passing through each square, when passing over the item. It's irrelevant for unwalkable things, but affects the slowness of going over sandbags, tables, and the like.

Ohhh, I did not realise that it affected the speed of the crossing too. I'll have to come up with some imaginative uses for that XD