I know maps can save certain data across games, but what kind and how much I would like to know (I assume variables, is there a limit?)
It is done by the bank system. This stores data of certain primitive types and units (it will store properties of the unit such as items etc). This data can come from variables or be returned by other functions. When returned by the load function it can be stored in variables or passed directly to functions.
The limit on the amount of data you can store is defined by the amount of time BattleNet 2.0 is willing to allow you to upload banks and distribute them. This means that the limit is lower the more players in the game. Something simple like a WC3 style code is trivial, it is only a problem if you plan to store a few hundred or thousand data elements.
I've seen custom UI's, however how customized can you go? For example, could you adjust the command card to 9x9, or create a UI similar to D2's Inventory screen.
I think the command card is hard coded in size (the data does not support more than the standard number of buttons). However you can relocate elements of the command card freely as well as move every UI element from minimap to control goups anywhere you want. A D2 style inventory system is possible with some trigger support, check out the map "Dia blo" which recreates Diablo I to some degree which has a system similar to what you want.
Is there an equivalent to gameplay constants? (I looked and couldn't find anything) Is there a way to change max food to 10,000?
In the data editor to some degree under the data type for constants and race. You can always use triggers if nescescary. I know you can exceed 300 supply as I have seen it in some maps.
Can you modify any Object editor field in-game via scripting?
Yes you most certainly can using the catalog natives. Even on a player by player basis. However you are limited to only "upgradeable" fields such as those upgrades can affect.
Can abilities, have a resource cost other than energy (life, minerals, gas, shield?)
Yes they can. You can even make them cost 70% life, energy and shield of a unit.
Can all abilities have a counter on them like spider mines, that gains charges over time?
Yes most abilities support charges, those that do not are more obscure and probably do not need charges.
Is there an equivalent to the spellbook in wc3.
No. You can give units multiple command cards however (up to 4?, of which one is the default). This is shown off with workers for construction of different building types (basic and advanced).
Can the camera, and mouse be tracked?
Yes they can. The camera is even tracked automatically as an anti-cheat measure (it is dumped in replay files). The mouse can be tracked using triggers however it will increase network bandwidth and will always have a lag associated with it (network latency so it will always report the mouse position a fraction of a second later than when it was actually there from a user perspective).
I would apreciate any other limitations you know that could seriously break a games development..
Map size is limited to that which you can choose in the editor. Trying a JNGP style hack to make maps bigger than that limit results in broken path finding behaviour in game (the game physically cannot support larger).
The reals used by trigger script are actually 32 bit fixed point. This means that they have considerably less range than the integer type. Trying to convert a large integer to a real will result in an overflow and probably some garbage negative number. The only work around to this is to store both an integer and a real for large fractional numbers. As a result the maximum numbers you can represent in game are defined by the c/c++ int32_t. Larger numbers will need a chain of integers and your own interpretation functions.
You are limited in the amount of variables and script your map can have. This limit is huge so mostly not an issue but will cause problems if you are using huge arrays of data (several megabytes).
There are no dynamic arrays in trigger scripting. All arrays have to be declared with a size and attempts to access indices outside this size range will throw a run time scripting error (game will still run, but an error will be logged).
There is a limit to the number of dialog elements that can be attached to the trigger script system at the same time. Using templates and only attaching when required can work around the limit to some extent.
The smallest quantisation of deterministic time in SC2 is 1/16 of a game second. Out side of visual effects (actor system) it is not possible to run anything faster than this. It also means that the maximum attack speed, periodic effect and trigger wait/timer is limited to 1/16 of a game second.
There is a limit to how much data you can publish on your account. You can work around this by using public mods published on other player's accounts.
The game does not natively support complex armor types and damage types like WC3. It is possible to simulate with a variety of behaviours but this is quite a hassle to do.
Both items and missiles are units. It is perfectly valid to equip a marine if it is made into an item (it can even move to you!) and also to fire a missile that itself fires more missiles. Although not really a limit, it does mean that care must be taken as to ownership and vulnerability of items.
The game is limited to at most 14 human players, slot 0 and 15 are reserved neutral.