Scenario Editor: How to make a proper cost in a custom description

For my scenario, I managed to make the Trade Workshop buildable, but I have it named as the Tavern. I wanted to include a custom description explaining its role in the scenario, but I don’t know how to add a proper cost in the description that has the right resource icon and turns red when you don’t have enough. Can anyone help?

I suppose you can create a new mod-text file, write the description there and then with triggers, modyfy attribute Object description ID

Well, how do I do that?

I wrote a papyrus but it was actually simpler than that. I’ll let the papyrus intact, in case someone wants to actually localize their mods. Also, if this doesn’t work, try the papyrus option

Go to Effect->Modify Object Description.
Select player and object and write a description
Example description
Create <b>Tavern<b> (<cost>)\nUsed to recruit mercenaries<i> Upgrades: line of sight (Town Center); hit points, armor, ship attack (University).<i>\n<hp> <attack> <armor> <piercearmor> <range> <garrison>
Or whatever you want.
Anything inside any pair of <> must be left intact. You can delete them or leave it intact or move them around, not modify their content. They are self explanatory.

This should be it. Don’t look ahead if you don’t want to localize your mod.



OG papyrus ahead

Go to C:\Users\yourPCID\Games\Age of Empires 2 DE\YourSteamID\mods\local
Create a new folder and call it whatever you want. This will be the folder of your mod. Let’s call it
ApocalypsoMOD

In this folder, create a new folder and call it _resources.
In this folder, create a new folder and call it en
In this folder, create a new folder and call it strings
In this folder, create a new folder and call it key-value
In this folder, create a new txt file and call it key-value-modded-strings-utf8.txt Remember to check for file extensions

The full folder path will be, then,
C:\Users\yourPCID\Games\Age of Empires 2 DE\YourSteamID\mods\local\_resources\en\strings\key-value\key-value-modded-strings-utf8.txt

In this txt you’ll write a string ID and a string. For example, the stock create Knight string looks like this
26068 "Create <b>Knight<b> (<cost>)\nPowerful all-purpose cavalry. Strong vs. infantry and archers. Weak vs. Pikemen, Camel Riders, and Monks.<i> Upgrades: attack, armor (Blacksmith); speed, hit points, to Cavalier ##### 300G (Stable); creation speed (Castle); more resistant to Monks (Monastery).<i>\n<hp> <attack> <armor> <piercearmor> <range>"

Picture in Notepad

In your case, you’ll want something like this

mySuperIDthatCanBeAnythingButYoudWantSomethingShort Build "Create <b>Tavern<b> (<cost>)\nBuilding in which you can recruit mercenaries<i> Upgrades: line of sight (Town Center); hit points, armor, ship attack (University).<i>\n<hp> <attack> <armor> <piercearmor> <range> <garrison>"

Picture in notepad

Protip: common knowledge indicates that the string ID must be an integer, but it can be a string, too. Just don’t make it too long. If you have problems writing it in the Modify Attribute: Modify Object Description ID, just copy and paste

Then->Trigger->Effect->Modify Attribute->Short Description ID

Is it possible to insert this description using only triggers and not a mod?

You do exactly that formatting, but you put it in the text field of the “Change unit description” trigger, at least from memory.

With a bit of tweaking, I managed to get it to work. For some reason, though, I’m having difficulty making it train units, even though I changed the train location of the units I want to add.

Did you enable those units?

I think so.

20 characters.

Try training these units from other buildings. I half remember there were buildings with issues training units

It seems like the Norse Warrior specifically will not be enabled for training under any circumstances.

I tried another unit and I tried another building. I even changed the condition under which the trigger activated. Nothing changed; I was completely unable to train the unit I supposedly enabled in the particular building.

I can train norse warriors from the barracks with no problem. Try to set a timer of a few seconds and see if it trains