DotP 2014: Best Practices
Due to Duels of the Planeswalkers 2014 not being released yet, these are Best Practices for modding based on what we learned from DotP 2013. This will change once the game is released and we figure out what needs to be done to prevent conflicts and make sure things work well together.
Regarding prefixes and ids we have started a prefix/id registry here (to prevent prefix/id clashing): DotP 2014: Prefix/Id Registry
Card Coding
Prefix your Cards
Best Practice: Prefix your created cards (or the multiverse id in the card filename) with a prefix unique to yourself.
Reasoning: Due to the way we anticipate the game will read files, if two or more cards have the same filename the game will pick one (probably the last loaded) to be the one it uses. Since it is possible that two or more modders may make the same card and one may be buggy modders should make sure that their filenames are unique so that they do not override each other (except through mod patches) so that a deck made with a specific card will always use that specific card even if someone else makes the same card it should continue to use the version you intended.
Prefix your Functions and Files
Best Practice: Prefix both your functions and your function files.
Reasoning: Due to the way we anticipate the game reads functions and function files, to prevent conflicts with code from other modders any functions you make should be uniquely prefixed. If you do not prefix your functions then they may be overridden by someone else's mod and the cards in your mod that use that function will cease to work. The same is true of function file names if you create a GENERAL_FUNCTIONS.LOL file and some other modder creates a function file with the same name the two mods will conflict.
If you create a CountSomething() function and another modder creates another function named CountSomething() and the two functions either take different parameters, give different output, or do something different in the function itself then more than likely they will conflict and result in non-working cards. However, if you create a function KFP_CountSomething() and another modder makes a function GT_CountSomething() then they will not conflict.
