Default Error Messages alpha

Level 24
Joined
Feb 27, 2019
Messages
833
The technique: Display default error messages by giving a unit items that it cant use.

Sharing this technique and my progress of documenting as many errors as possible. I imagine the map becoming as a kind of library for the technique and for possible errors so one could just copy the error they need. Its still very primitive and a work in progress so it cant be used as is. My first goal is to collect errors.

Known issues:
1. Target abilities wont display the correct error message without first sharing vision of the error unit as it gets the item.
2. The error is a tiny bit delayed.

I am churning out a new system that I think can become a MUST USE for a lot of spells and systems. I couldnt find this idea posted anywhere else but if it exists please give me a link and humble me.

Errors so far:
1. Not enough mana
2. There are no usable corpses nearby
3. Summoned
4. Friendly living, enemy Undead
5. Enemy living, friendly Undead
6. Undead unit
7. Already at full mana
8. Hero has full health
9. Already at full health
10. Target inside minimum range
11. Unable to target there
12. No usable friendly corpses
13. Must target a unit with mana
14. Must target a corpse

Completed errors
Impossible errors?
Worthless errors?
Customizable errors?
Unreasearched errors

[Errors]
Emptycontrolgroup=Unable to form an empty control group.
Invalidcontrolgroup=Unable to form a control group with units you do not control.
Nonunitincontrolgroup=Control group can only be formed with units.
Nofood=Build more Farms to continue unit production.,Build more Burrows to continue unit production.,Summon more Ziggurats to continue unit production.,Create more Moon Wells to continue unit production.

Maxsupply=Unable to create unit due to maximum food limit.
Nogold=Not enough gold.
Nolumber=Not enough lumber.

Nomana=Not enough mana.
Cooldown=Spell is not ready yet.

Noroom=Cargo capacity unavailable.
Canttransport=Unable to load target.
Cantdevour=Unable to devour target.
Cantcyclone=Unable to cast Cyclone on this target.
Cantspiritwolf=Unable to cast Feral Spirit on this target.

Cantpossess=Unable to cast Possession on this target.
Cantmanaburn=Unable to cast Mana Burn on this target.
Onlyattackers=Must target a unit capable of attacking.

Notentangledmine=Unable to use an Entangled Gold Mine.
Notblightedmine=Unable to use a Haunted Gold Mine.
Alreadyentangled=That gold mine is already entangled.
Alreadyblightedmine=That gold mine is already haunted.
Targetwispresources=Must target a tree or an Entangled Gold Mine.
Targetblightedmine=Must target a Haunted Gold Mine.
Entangleminefirst=Must entangle gold mine first.
Blightminefirst=Must haunt gold mine first.
Entangledminefull=That gold mine can't support any more Wisps.
Blightringfull=That gold mine can't support any more Acolytes.
Acolytealreadymining=The selected Acolyte is already mining.
Nototherplayersmine=Unable to use a mine controlled by another player.
Targgetmine=Must target a gold mine.
Targgetresources=Must target resources.

Humanbuilding=Must target a Human building.
Undeadbuilding=Must target an Undead building.
Underconstruction=That building is currently under construction.
Alreadyrebuilding=The building is already under construction.
Creeptoopowerful=That creature is too powerful.
Hibernating=That unit is already hibernating.
Magicleashed=That unit is already leashed.
Immunetomagic=That unit is immune to magic.
Holybolttarget=Must target friendly living units or enemy Undead units.
Deathcoiltarget=Must target enemy living units or friendly Undead units.

Dispelmagictarget=Must target a unit or blighted ground.

Treeoccupied=That tree is occupied. Target a vacant tree.
Coupletarget=Unable to merge with that unit.
Mounthippogryphtarget=Must target a Hippogryph.
Archerridertarget=Must target an Archer.

Cantsee=Must explore there first.
Cantplace=Unable to build there.
Outofbounds=Targeted location is outside of the map boundary.
Offblight=Must summon structures upon Blight.
Tooclosetomine=Unable to build so close to the gold mine.
Tooclosetohall=Unable to create a gold mine so close to the town.
Notonshoreline=Unable to build away from a shoreline.
Buildingblocked=A newly constructed unit has no room to be placed.
Teleportfail=A unit could not be teleported.
Stumpblocked=Something is blocking that tree stump.
Cantland=Unable to land there.
Cantroot=Unable to root there.
Cantrootunit=Target is no longer rootable.
Mustroottoentangle=Must root adjacent to a gold mine to entangle it.
Mustbeclosertomine=Must root closer to the gold mine.

Minenotentangleable=Gold mine couldn't be entangled.
Notinrange=Target is outside range.
UnderRange=Target is inside minimum range.

Notthisunit=Unable to target this unit.
Targetunit=Must target a unit with this action.

Targetstructuretree=Must target a building or tree.
Targetground=Must target a ground unit.
Targetair=Must target an air unit.
Targetstructure=Must target a building.

Targetward=Must target a ward.
Targetitem=Must target an item.
Targettree=Must target a tree.

Targetrepair=Must target a building or a mechanical unit.
Targetbridge=Must target a bridge.
Targetnaval=Must target a naval unit.

Targetowned=Must target one of your own units.
Targetally=Must target a friendly unit.
Targetneutral=Must target a neutral unit.
Targetenemy=Must target an enemy unit.
Targetcontrol=Must target a unit you can control.

Targethero=Must target a Hero.
Targetenemyhero=Must target an enemy Hero.
Targetcorpse=Must target a corpse.
Targetfleshycorpse=Must target a fleshy corpse.
Targetbonecorpse=Must target a skeletal corpse.
Targetundead=Must target an Undead unit.
Targetmechanical=Must target a mechanical unit.
Targetmoveable=Must target moveable units.
Targetorganicground=Must target an organic ground unit.

Targetancient=Must target an Ancient.
Targetarmoredtransport=Must target an armored transport.

Targetmanauser=Must target a unit with mana.
Targetbunkerunit=Must target a Peon.
Targetwisp=Must target a Wisp.

Targetacolyte=Must target an Acolyte.
Targetpit=Must target a Sacrificial Pit.
Needemptytree=That tree is occupied by an owl.
Needowltree=That tree is not occupied by an owl.

Cantfindcorpse=There are no usable corpses nearby.
Cantfindfriendlycorpse=There are no corpses of friendly units nearby.

Nounits=Unable to target units.
Noground=Unable to target ground units.
Noair=Unable to target air units.
Nostructure=Unable to target buildings.

Noward=Unable to target wards.
Noitem=Unable to target items.
Nodebris=Unable to target debris.
Notree=Unable to target trees.
Nowall=Unable to target walls.
Nobridge=Unable to target bridges.
Notfrozenbldg=Target building has been frozen.
Nonaval=Unable to target naval units.

Nottownhall=Must target friendly Town Hall.,Must target friendly Great Hall.,Must target friendly Town Hall.,Must target friendly Town Hall.
Notownportalhalls=There are no friendly Town Halls to Town Portal to.,There are no friendly Great Halls to Town Portal to.,There are no friendly Town Halls to Town Portal to.,There are no friendly Town Halls to Town Portal to.
Notself=Unable to target self.
Notowned=Unable to target your own units.
Notfriendly=Unable to target friendly units.
Notneutral=Unable to target neutral units.
Notenemy=Unable to target enemy units.
Notcargo=Unable to target units inside a building or transport.
Nothidden=That target is not visible on the map.
Nothiddenitem=Unable to target carried items.

Notinvulnerable=That target is invulnerable.
Nohero=Unable to target Heroes.
Notcorpse=Target must be living.
Notfleshycorpse=Unable to target fleshy corpses.
Notbonecorpse=Unable to target skeletal corpses.
Notmechanical=Must target organic units.
Notorganic=Unable to target organic units.
Notdisabled=Caster movement has been disabled.

Cantattackloc=Unable to attack there.
Canttargetloc=Unable to target there.

Inventoryfull=Inventory is full.
Inventoryinteract=Select a unit with an inventory.
NeedInventory=Only units with an inventory can pick up items.
Needretrainablehero=Only Heroes that have learned spells not in cooldown can use this item.
Neednearbyhero=A hero must be nearby.
Neednearbypatron=A valid patron must be nearby.

Notsapper=Unable to target Sappers.
Notancient=Unable to target Ancients.
Notsummoned=Unable to target summoned units.
Nottransport=Unable to target transports or bunkers.
Notunsummoned=Target is being unsummoned.
Notillusion=Unable to target illusions.
Notmorphing=Unable to target morphing units.
Notdot=Unable to target a Druid of the Talon.

Illusionscantharvest=Illusions are unable to harvest.
Illusionscantpickup=Illusions cannot pick up items.

Cantpolymorphunit=This unit is immune to Polymorph.

Notundead=Unable to target an Undead unit.
Heromaxed=Hero is at max level.
HPmaxed=Hero has full health.
Manamaxed=Already at full mana.

HPmanamaxed=Already at full mana and health.

UnitHPmaxed=Already at full health.
UnitManaMaxed=Already at full mana.

RepairHPmaxed=Target is not damaged.

Alreadybeinghealed=Target is already being healed.
Alreadybeingrepaired=Target is already being repaired.
Pitalreadysacrificing=Sacrificial Pit is already sacrificing an Acolyte.
Outofstock=Out of stock
Cooldownstock=Out of stock
Cantdrop=Item must remain in your inventory.
Cantpawn=Item cannot be pawned.

Calltoarms=No Peasants could be found.
Calltoarmspeasant=No Town Halls could be found that can convert Peasants into Militia.
Backtowork=No Militia could be found.
Backtoworkmilitia=No Town Halls could be found that can convert Militia into Peasants.
BattleStations=No Peons could be found.

Replaceme=Replace this error message with something meaningful!

Notliquidfirebldg=Target building has liquid fire.
Notethereal=Ethereal units can only be hit by spells and Magic damage.

Needstealbuff=Target has no stealable buffs.

Needmeleeattacker=Must target a melee attacker.
Needrangedattacker=Must target a ranged attacker.
Needspecialattacker=Must target a special attacker.
Needattacker=Must target an attack unit.
Needcaster=Must target a caster.
Needattackerorcaster=Must target an attack unit or a caster.

Nopreservationtarget=No structures are available to teleport the target to.

Canttransformitem=Unable to transform this item.

Notmocunit=This unit has already been marked by fire.

Cantimpale=Can't impale this unit.

Needpositivebuff=Must target an enemy unit with positive buffs.
Needposbufforsummoned=Must target an enemy unit with positive buffs or a summoned unit.
Neednegativebuff=Must target a friendly unit with negative buffs.

Absorbmana=Not enough mana to absorb.

Canttakeitem=Unable to pick up this item.
Cantdropitem=Unable to drop this item.
Cantuseitem=Unable to use this item.
Notpowerup=Unable to use powerups.

Itemcooldown=This item is cooling down.


Cantfindcoupletarget=Unable to find couple target.

Notdisabledinventory=This unit has a disabled inventory.

Resistantskin=This unit has Resistant Skin.

Notinvulnerablespell=Unable to use invulnerability granting spells or items.

Needsummoned=Must target summoned units.

Cantsubmergethere=Unable to submerge there.

Alreadydoomed=This unit has already been stricken with Doom.
Thanks to WaterKnight for telling me about the commandstrings.txt document located at units/commandstrings.txt

Here is the map which shows what it does! Please contribute!

Changelog
18/6 - 0.01: Alpha release
19/6 - 0.02: Made test map just that, its an unfinished system not meant to be used as is rn, added a few more error messages and fixed range of There are no usable corpses nearby
24/6 - 0.03: Added more error messages, updated post description
 

Attachments

  • Default Error Message alpha 0.03.w3m
    28.1 KB · Views: 3
Last edited:
antman.gif


Why does this do what it does?

I think this would be more suited for the Advanced Scripting forum.
 
Level 45
Joined
Feb 27, 2007
Messages
5,578
Why does this do what it does?
Because a rune is an instant-use consumable item never intended to be an inventory, so giving one to a unit via a trigger causes the unit to (try to) cast whatever spell the rune has on it? I guess. It's quite a clever solution to change ownership of the useless unit, give a rune, and then change owner back to just get the error message displayed natively!
 
Level 14
Joined
Jan 10, 2023
Messages
247
I like the idea! As someone who finds the need for error messages to be important enough to make a system that uses the chat system to replace error message system, this seems infinitely better and less problematic in the end than what I have.
Not that what I have is really problematic, it's just that if I use it, I either have the chance of the normal error messages overlapping, or if I use frames to remove the error message, then I have to basically make every error message over again.
My solution was to offset my messages by one line and leave the default messages, and some other stuff to let it still work like the game chat.

Yours sounds better if successful because mine is complicated as anything and yours is simple, and cleverly takes advantage of the normal game asset.
Instead of what I'm doing, it sounds like using your system we can change the unused default messages into custom ones.

One thing I am having trouble with, the "Enemy/Friendly Living, Friendly/Enemy Undead" abilities, it is instead giving the error message "That target is not visible on the map."
I'm guessing this is going to be the trick - covering for all the little differences between the different ability and their error messages.

Another thing that might be important before you get too far: choosing good ability ids for these abilities. If there are enough of these, I might not want to import this after the fact if I already had 90% of my abilities assigned to 'A000'-'A100' (not sure what the total of error messages is, but you know what I mean). It's not really a problem if you are making a new game starting with this, but for anything that's already somewhat done it could make a difference.
 
Level 24
Joined
Feb 27, 2019
Messages
833
I think this would be more suited for the Advanced Scripting forum.
I thought it was neither advanced nor contained a lot of scripting so I was unsure where else to post it. My intention was to share the technique and my progress of documenting as many errors as possible. I imagine the map becoming as a kind of library for the technique and for possible errors so one could just copy the error they need. Its still very primitive and a work in progress. My first goal is to collect errors.
Because a rune is an instant-use consumable item never intended to be an inventory, so giving one to a unit via a trigger causes the unit to (try to) cast whatever spell the rune has on it? I guess.
Exactly!
I like the idea! As someone who finds the need for error messages to be important enough to make a system that uses the chat system to replace error message system, this seems infinitely better and less problematic in the end than what I have.
Not that what I have is really problematic, it's just that if I use it, I either have the chance of the normal error messages overlapping, or if I use frames to remove the error message, then I have to basically make every error message over again.
My solution was to offset my messages by one line and leave the default messages, and some other stuff to let it still work like the game chat.
That highlights the two biggest problem. Either have messages overlapping or not acting normal or having to detect and create error messages ones self which doesnt play nicely with the already native error messages.
Yours sounds better if successful because mine is complicated as anything and yours is simple, and cleverly takes advantage of the normal game asset.
Instead of what I'm doing, it sounds like using your system we can change the unused default messages into custom ones.
This seems like a good time to mention. I noticed a problem with this technique. The error sounds are a tiny bit delayed, hardly noticable. Its most easily noticable by comparing two instant abilities, one with normal error and one with this technique. There also appear to occur more error sounds with the normal error when holding the hotkey. Do you think that could be a deal breaker for this technique?
One thing I am having trouble with, the "Enemy/Friendly Living, Friendly/Enemy Undead" abilities, it is instead giving the error message "That target is not visible on the map."
I'm guessing this is going to be the trick - covering for all the little differences between the different ability and their error messages.
I noticed that as well. I think it happens for target abilities. To make it work, grant shared vision of the error unit before giving it the item and remove the vision after. The error unit can still have 0/0 sight radius.
Another thing that might be important before you get too far: choosing good ability ids for these abilities. If there are enough of these, I might not want to import this after the fact if I already had 90% of my abilities assigned to 'A000'-'A100' (not sure what the total of error messages is, but you know what I mean). It's not really a problem if you are making a new game starting with this, but for anything that's already somewhat done it could make a difference.
That is surely a thing. Right now its more of a prototype so I havnt been assed to set ability ids yet. I dont have a clear idea how to set the ids yet either. With the amount of abilities I might end up with it seems wiser for one to only take the abilities for the errors one needs and not bloat their map with tons of unused abilities.
 
Level 14
Joined
Jan 10, 2023
Messages
247
Rather than quoting, I'll just go by topic.

On the sound delay:
I didn't even notice, but I know the feeling of wanting to have everything fine tuned and presentable.
As far as multiple sounds firing, I'm looking at it like there are three options:
1. leave it, if a player wants to mash the hotkey, maybe that's on them. Would the normal game repeat the message if I held the hotkey for say, call to arms, but there are no peasants around? I imagine it would, but don't know.
2. Add a brief cooldown - It wouldn't necessarily need to be a cooldown on the real unit's ability, but a system cooldown that prevents rapid repeated error messages from being sent to a player. I'll have to take another look at the system to make a full suggestion, but you might come up with something before I do, I'll take a look tonight though.

As far as dealbreakers go, this wouldn't bother me even if you didn't fix it because I think if I repeatedly use a normal error message I will get the same.

On the point about the error message throwing an unintended error message:
I think I was imagining the way the system should be used wrongly.
I agree with your solution and it is an eye opener that ties into the last point:
It probably doesn't make sense to expect a person using this system will use the whole package.
That being said, I would say this makes much more sense as a concept than as a system (meaning I should just use this back-channel per need and cater it to the specific needs of my map), but I think it will still find utility because this can serve as the gold standard which I would imagine you would support catering to the nuance differences and eventually finish the project and have you deserved credit.

That's maybe the biggest reason I feel like you should make it at this point. I can do this for a handful of abilities right now and that might be more than enough new messages and I can forget the system, and I don't feel like I would owe credit truly, because this seems more of a discovery, a damn clever one that has been on the table for decades and you noticed, not me.
I think making a strong system here gets you the credit you deserve, and it's nice to own things!
 
Top