Log in

DotP 2013 Modding Best Practices

This page is meant to be a collection of best practices regarding modding for DotP 2013 based on all that we know. This page is subject to change as we learn more about modding the game and encounter more problems.

Contents

Card Coding

Prefix your Functions and Files

Best Practice: Prefix both your functions and your function files.

Reasoning: Due to the way the game reads functions and function files in globally 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.

Note: Examples use randomly selected prefixes and function names, it is unknown whether the functions actually exist or the prefixes are actually used by some modder. Any resemblance to anything any particular modder uses is purely coincidence

Packaging of Files

APPID_LINKING.TXT

Best Practice: Include APPID_LINKING.TXT in a separate WAD from the rest of the mod.

Reasoning: The game will only read one of these files no matter how many mods they are in so if you include APPID_LINKING.TXT in with your mod it should be included in a separate WAD. This makes it easy to remove a conflicting APPID_LINKING.TXT without any knowledge of WAD editing and without removing the entirety of the mod.

Unlocks

Use Promo Unlocks

Best Practice: Keep to 10 unlocks and make them Promo Unlocks.

Reasoning: Unlocking cards in the game can be a real pain due to the 21 deck limit (18 deck limit for cracked versions) in saving deck configurations to the profile. So the easiest way to keep decks and unlocks (if any are included) is to limit the number of unlocks per deck to 10 cards and make them promo unlocks. Promo Unlocks only require that the user enter the promo unlock codes once, then the cards will be forever unlocked. The downside is that this method only supports up to 10 cards as promo unlocks. The upside means that the end-user will not have to mess with APPID_LINKING.TXT files and entries for your mod and won't complain about not being able to unlock cards from your mod.

Images

Compress Images

Best Practice: Compress images you create using either DXT1 (no transparency) or DXT5 (transparency) when converting to TDX.

Reasoning: If card images are left uncompressed some users will experience an extreme glow on cards while playing which makes them virtually impossible to read. However, if the images are compressed then this extreme glow does not appear and everything works as intended.

Note: This does not apply to iPad mods, because those MUST be compressed using PVR texture compression to work.