Ludeon Forums

RimWorld => Mods => Help => Topic started by: Loki88 on June 30, 2015, 08:40:27 PM

Title: Link Flags [Answered]
Post by: Loki88 on June 30, 2015, 08:40:27 PM
How does one go about creating a new link flag?

I'm wanting to create a new link flag for my LED light ropes called "LED" (simple for me to remember) mod so that they will link to one another and no longer link to power conduits because with the new texture I made it looks goofy.

Cheers!
Title: Re: Link Flags
Post by: mipen on July 01, 2015, 02:11:52 AM
Unfortunately you can't define new link flags, as it is an enum :(


[Flags]
public enum LinkFlags
{
None,
MapEdge,
Rock,
Wall,
Sandbags,
PowerConduit,
Custom1,
Custom2,
Custom3,
Custom4,
Custom5,
Custom6,
Custom7,
Custom8,
Custom9,
Custom10
}


Those are the values you can use, from None (which I assume will either link to nothing, or everything) to Custom10. Using one of the 'Custom' LinkFlags will do what you are wanting, but you'll just have to hope there isn't another mod out there that uses the same one because then they would link together. Hopefully Tynan will change this, maybe use a string instead which would be a lot easier (I think)
Title: Re: Link Flags
Post by: Loki88 on July 01, 2015, 02:39:47 AM
Quote from: mipen on July 01, 2015, 02:11:52 AM
Unfortunately you can't define new link flags, as it is an enum :(


[Flags]
public enum LinkFlags
{
None,
MapEdge,
Rock,
Wall,
Sandbags,
PowerConduit,
Custom1,
Custom2,
Custom3,
Custom4,
Custom5,
Custom6,
Custom7,
Custom8,
Custom9,
Custom10
}


Those are the values you can use, from None (which I assume will either link to nothing, or everything) to Custom10. Using one of the 'Custom' LinkFlags will do what you are wanting, but you'll just have to hope there isn't another mod out there that uses the same one because then they would link together. Hopefully Tynan will change this, maybe use a string instead which would be a lot easier (I think)

Thank you very much mipen!!!
Title: Re: Link Flags [Answered]
Post by: cuproPanda on July 01, 2015, 08:25:07 PM
Yeah use one of the customs. I used Custom4 and Custom5 for my zen garden mod, and it worked like a charm. I chose to skip to 4/5 just in case there were others, but I don't think anyone uses them yet. The closest mod I found was Clutter fences, and they used the sandbags linkFlags.

BTW nice job on the rope lights mod, it seems like such an obvious thing to do using the power conduits, I'm surprised nobody thought of it!
Title: Re: Link Flags [Answered]
Post by: Loki88 on July 02, 2015, 02:13:55 AM
Quote from: cuproPanda on July 01, 2015, 08:25:07 PM
Yeah use one of the customs. I used Custom4 and Custom5 for my zen garden mod, and it worked like a charm. I chose to skip to 4/5 just in case there were others, but I don't think anyone uses them yet. The closest mod I found was Clutter fences, and they used the sandbags linkFlags.

BTW nice job on the rope lights mod, it seems like such an obvious thing to do using the power conduits, I'm surprised nobody thought of it!

I used Custom8 ( lucky number  :P )

And thank you very much! It was originally something I made for my own use then had that moment of "I bet someone else would like to use this!" I can't even remember what made me think of it originally though. Oh well, I'm just glad people are enjoying it  ;D
Title: Re: Link Flags [Answered]
Post by: ItchyFlea on July 02, 2015, 06:14:47 AM
I use custom1 and custom2 in Modular Tables and custom2 again in Extended Woodworking.
Title: Re: Link Flags [Answered]
Post by: Shinzy on July 02, 2015, 06:41:03 AM
Well I call dibs on custom 3 just cause it's my favourite number and all my Nintendo save files are on slot #3

not that I'm going to make a mod that needs ... well. gotta love sudden ideas ;D
Title: Re: Link Flags [Answered]
Post by: cuproPanda on July 02, 2015, 08:54:59 AM
OK, so far we have 1,2,3,4,5, and 8 being used. This sounds like a very important thing to have stickied. Can I request an admin make such a thread? It could be a list of other conflicting things, too, not just linkFlags. It would be useful for mod devs and players experiencing issues alike. I'd make it, but I don't spend much time on the forums.
Title: Re: Link Flags [Answered]
Post by: Ninefinger on July 02, 2015, 10:45:09 PM
Quote from: cuproPanda on July 02, 2015, 08:54:59 AM
OK, so far we have 1,2,3,4,5, and 8 being used. This sounds like a very important thing to have stickied. Can I request an admin make such a thread? It could be a list of other conflicting things, too, not just linkFlags. It would be useful for mod devs and players experiencing issues alike. I'd make it, but I don't spend much time on the forums.
Superior crafting uses custom 7 i think.