I have opened this thread to collect requests of functions / interfaces for the API. So, no requests here for mods.
table ShroudGetTextSize(string) - this function get a text and return a table containing width and height of the text. So we know how much space this text uses. This helps positioning the labels.
ShroudOnCombatDeck(bool) - is invoked when combat deck is opened (true) or closed (false) or bool ShroudPlayerIsInCombat() Maybe we need to open or close windows/mods when player enters combat or leave combat
Also, "ShroudGetCombatDeck()" returns the name of the active combat deck. Also, I would favor ShroudOnCombatDeck getting invoked when. switching decks.
can also return nil, "none" or "". To get the info the player is not in combat. ---- table ShroudClientInfo() - returns a table containing the content of Language.txt and gameversion.txt. The language can help for localisation and the game version to enable/disable API calls if they are supported/not supported in this version. And maybe other infos, a table is extendable.
Hooks for the presence of harvestable resources nearby. Perhaps something like one or more of the following: * bool ShroudNearbyHarvestableResource( ) * lua iterator ShroudListNearbyHarvestableResource( ) * string ShroudGetNearbyHarvestableResource( ) ShroudNearbyHarvestableResource simply returns true if there is at least one nearby resource. ShroudListNearbyHarvestableResource returns a complete list of all of the nearby resources, but not necessarily the count of each. ShroudGetNearbyHarvestableResource returns the type of the nearest nearby resource. In no case do they give any indication on where the resources are. This is mostly for reagents in the wild, but could also report on trees, ore or gems.
Can we have a drawing surface. Something to draw lines on. It is used to draw controls and borders. Also i want to ask, is this the right place to ask for api additions? @Chris
How about a Friend interface. Or at least a log message when someone makes a friend request that Lua could make note of using the existing "ShroudOnConsoleInput". I get friend requests and have no idea where they came from .... Kind of like getting a phone call from an unknown number, I tend to ignore both ... If I have no idea on the "context" of a friend request, I'll just let it sit there until I see that person again in game. But, if I could track that friend request via Lua, it would allow some context. By "context" I mean name, zone, coordinates and time.
I would very much like a function which can tell me what level my avatar's skills are. Something like: int MySkillLevel(char* skillName) I would like to use this to calculate the base attunement in all 9 magic trees, i.e. the contribution to attunement from the average of one's ten highest skills.
Some new proposed "ShroudOn" event handlers: ShroudOnAttack( int TargetID, string TargetName, int Damage, string DamageType ) "TargetID" is a unique ID number - which I'm assuming there must already be. This would allow us to track how much damage is inflicted to which target "TargetName" is a generic description or name of the target - the same name that gets put into the logs "Damage" is the amount of damage inflicted. A float type might be more appropriate? "DamageType" is the source of the damage - the same as what is logged. If the attacker is a player, perhaps the "ID" could be obfuscated or nil. ShroudOnAttacked( int AttackerID, string AttackerName, int Damage, string DamageType ) "AttackerID" is a unique ID number - which I'm assuming there must already be. This would allow us to track how much damage was inflicted by which hostile "AttackerName" is a generic description or name of the target - the same name that gets put into the logs "Damage" is the amount of damage inflicted. A float type might be more appropriate? "DamageType" is the source of the damage - the same as what is logged. If the attacker is a player, perhaps the "ID" could be obfuscated or nil. ShroudOnLoot( int TargetID, string TargetName, string LootName ) "TargetID" is the same as with "ShroudOnAttack" "TargetName" is the same as with "ShroudOnAttack" "LootName" is what was just looted. Healing and other non-damaging spells would also fire the two "Attack" events, even though they are not exactly "attacks". Most of this data can be culled from the logs - except for the "ID", which allows us to distinguish one Lich from another Lich.