Modding FAQ

Someone someday said this tooltip is for hoovering cursor over icon. But I can’t find where tooltip text is shown. Just type there sth like: Creature bonus: Peasant or Skill bonus: Archery or Spell bonus: Slow.

Gonna try that, thanks! The tooltip is shown when you right-click on any hero specialty (not during the scenario selection but after the game has begun).

EDIT: By the way I have a question about the HD remastered version of Heroes III released in 2015. Is there a reason why we never saw an HD mod that port the remaked visuals?

EDIT2: Is it possible to make a creature uses randomly an adventure icon (.DEF) on the map? It could be useful to add alternate adventure icon but I personally need this for a special creature project.

EDIT3: I am trying to give my hero the ability to upgrade the neutral creatures from the game into my town’s creatures. I can’t manage to find the correct identifier for WoG’s creatures. I tried a lot of different combinaisons : “wog:nightmare”, “wog.nightmare”, “wog:creature.nightmare”, “wog.creature.nightmare”, “creature.wog.nightmare”, “creature.wog:nightmare”, “creature.wog:nightmare”, “creature:wog:nightmare”, “::wog:nightmare”, “:wog:nightmare”, "wog:nightmare(172), “172”, etc.

Code
{
"rfgLeyla" :{
	"specialty" :{
		"bonuses" :{
			"conversionRogue":{
				"type" :	"SPECIAL_UPGRADE",
				"subtype":	"creature.rogue",
				"addInfo":	"creature.rfgRogue"},
			"conversionBoar":{
				"type" :	"SPECIAL_UPGRADE",
				"subtype":	"creature.boar",
				"addInfo":	"creature.rfgBoar"},
			"conversionNomad":{
				"type" :	"SPECIAL_UPGRADE",
				"subtype":	"creature.nomad",
				"addInfo":	"creature.rfgNomad"},
			"conversionSharpshooter":{
				"type" :	"SPECIAL_UPGRADE",
				"subtype":	"creature.sharpshooter",
				"addInfo":	"creature.rfgSharp"},
			"conversionSorceress":{
				"type" :	"SPECIAL_UPGRADE",
				"subtype":	"wog:sorceress",
				"addInfo":	"creature.rfgSorceress"},
			"conversionEnchanter":{
				"type" :	"SPECIAL_UPGRADE",
				"subtype":	"creature.enchanter",
				"addInfo":	"creature.rfgEnchanter"},
			"conversionGoldGolem":{
				"type" :	"SPECIAL_UPGRADE",
				"subtype":	"creature.goldGolem",
				"addInfo":	"creature.rfgGoldGolem"},
			"conversionDiamondGolem":{
				"type" :	"SPECIAL_UPGRADE",
				"subtype":	"creature.diamondGolem",
				"addInfo":	"creature.rfgDiamondGolem"},
			"conversionHellSteed":{
				"type" :	"SPECIAL_UPGRADE",
				"subtype":	"wog:hellSteed(195)",
				"addInfo":	"creature.rfgHorseFire"},
			"conversionNightmare":{
				"type" :	"SPECIAL_UPGRADE",
				"subtype":	"wog:nightmare",
				"addInfo":	"creature.rfgHorseBlack"}
	}}}
}

What should I type in the "subtype" section to make it work for WoG’s creatures?

Because resizing HD remastered graphic into standard h3 resolution looses many details. Check Ghost Necro mod for example.

Check Neutral Heroes mod. Inside it you’ll find working hero (Unrish) with upgrade wog messengers specialty.

1 Like

@misiokles Thanks, looks like the correct format was "creature.[id]" but I needed to add this line inside my mod.json to make it works: "depends" :[ "wog" ],.

Any idea about the possibility to have a creature uses randomly a .DEF in the adventure map among specified files?

Also, do you know if it’s technically possible right now to make a dwelling works the same way as the Refugee Camp (meaning it would have a random creature each week).

Correct format for subtype is mod:creature.id.

I want to recreate one of WoG artifacts - Gold Tower Arrow.
When equipped and hero attacks enemy town, Arrow Towers don’t shoot.

Code:

			{
				"type": "NOT_ACTIVE",
				"effectRange" : "ONLY_ENEMY_ARMY",
				"limiters": [ {
					"type":"CREATURE_TYPE_LIMITER",
						"parameters": [ "arrowTower", false ]
					}
				]				
			},

Combo “effectRange” : “ONLY_ENEMY_ARMY” + limiter doesn’t work. Whole army become not_active :frowning:

How to correctly use archives? I’m working on the “siege” visuals of my mod and I encounter similar lags to when I tried using PNG for the townscreen back then. I converted my .BMP files into .PCX to add them into a .PAC archive file and I would like the visuals to be loaded from this pac file.

But when I try to do the same thing as WoG’s mod, my game crash.

How can I achieve to make h3’s archive work with my mod in VCMI?

.pac files are just cointainers, they don’t improve performance. For best performance it’s better to use 8-bit bmp frames. Personally I try to avoid making .pac files and set “filesystems” - it’s better to put frames in Data of Sprites folders and configure them separatelly in json… WoG mod is bad example, hota mod is better.

1 Like

I will download HoTA mod and learn from it then, thanks ! Edit: There are issue with some download links in the Mod list (VCMI Wiki) for both HoTA and my mod. Correct link for mine is : https://drive.google.com/file/d/1iUKm_KNtmqgNtWZI_dpxrwZauAhK-0VE/view .

By the way I usually save BMP in 8bits format but I realized that I did a mistake in my Photoshop actions. During exports, the RLE compression was off. When it’s activated it considerably reduces pictures’ weight (for example here, from ~400kb to ~10-20kb). PNG-8bits do the job as well.

Links were updated!

I want to make a spell that works like Land Mine, but with beneficial effects after stepping on mines. After casting this spell, mines are appear. I want unit to step at one of the spots to get damage boost.

"boostSpot":
{
	"type": "combat", 
	"targetType": "NO_TARGET", 
	"name": "Boost Spot", 
	"school":
	{
		"air": false,
		"earth": false,
		"fire": true,
		"water": false
	},
	"level": 2,
	"power": 0,
	"defaultGainChance": 0, 
	"gainChance":
	{
	},
	"animation":{
	},
	"flags" : { "positive": true, "special" : true },
	"graphics":
	{
		"iconBook": "CmNumWin",
		"iconEffect": "CmNumWin",
		"iconScroll": "CmNumWin",
		"iconScenarioBonus": "CmNumWin"
	},

	"sounds": {
		"cast": null
	},

	"levels" : {
		"base":{
			"range" : "X",
			"description": "",
			"cost": 0,
			"aiValue": 10,
			"power": 20,
			"battleEffects" : {
				"obstacle" : {
					"type":"core:obstacle",
					"hidden" : true,
					"passable" : true,
					"trap" : false,
					"trigger" : true,
					"removeOnTrigger" : true,
					"patchCount" : 4,
					"turnsRemaining" : -1,
					"attacker" :{
						"animation" : "C09SPF1",
						"appearAnimation" : "C09SPF0"
					},
					"defender" :{
						"animation" : "C09SPF1",
						"appearAnimation" : "C09SPF0"
					}
				},
				"damageBoost":{
					"type":"core:timed",
					"bonus": {
						"boost": {
							"type" : "CREATURE_DAMAGE",
							"subtype" : 0,
							"val" : 25,
							"valueType" : "PERCENT_TO_ALL",
							"duration" : "N_TURNS"
						}
					}
				}
			}
		},

But, bonus to creature damage is applied on every creature after casting spell. Is there possibility to trigget this bonus when creature walk at this spot and only then?

Hi,
i’ve just started modding. First step was to fix a bug in the HotA mod, which prevents the Sea Dogs from being hired and the Corsairs from being upgraded to Sea Dogs in town. This works now. Where should i upload it?

Next: I want to add more bonus to some artifacts, if these artifacts are equipped by a hero with a given speciality. So f.ex. i want to increase the amount of generated gold for the endless sack of gold from 1000 to f.ex. 1100, if the sack is equipped by f.ex. Caitlin, and only then. So i took a look at the boost core mod, and started to modify this. So i added something to the artifact here:

	"core:endlessSackOfGold":
{
	"text" : { "description" : "This item generates 1000 Gold per day and increases estates skill by 10%" },
	"bonuses" : [
		{
			"type" : "GENERATE_RESOURCE",
			"subtype" : "resource.gold",
			"val" : 1000,
			"valueType" : "BASE_NUMBER",
			"stacking" : "ALWAYS"
		},
		{
			"type" : "SECONDARY_SKILL_PREMY",
			"subtype" : "skill.estates",
			"val" : 10
		},
		{
			"type" : "GENERATE_RESOURCE",
			"subtype" : "resource.gold",
			"val" : 100,
			"valueType" : "BASE_NUMBER",
			"source" : "HERO_SPECIAL",
			"sourceID" : "resource.gold"
		}
	],
	"index" : 115,
	"type" : ["HERO"]
}

Now it seems to do something, but not what i intended. It seems to add 50 gold instead of 100. So how to do it correctly? I’m still not quite sure if to make the additional bonus fixed or level dependent, and would like to experiment with that.

Ok, i found one bug in the part i copied from the boost core mod. The second bonus needs a “valueType” : “PERCENT_TO_BASE”.
Now the third bonus always gives the +100 gold, which i do not want. It should give this bonus only if equipped by a hero with gold specialty.

"limiters": 
                {
                "type" : "HAS_ANOTHER_BONUS_LIMITER",
                "parameters": [ "GENERATE_RESOURCE", "resource.gold" ]
                }

Parameter must be bonus from bonus list https://wiki.vcmi.eu/List_of_all_bonus_types. That’s why it won’t work with pure estates, because estates technically in not a bonus. It’s a skill defined by bonuses or hardcoded.

As far as I know, “source” and “sourceID” fields don’t do anything. And “stacking” probably only works on creatures.

Here’s how I got the Endless Sack to give extra 100 coin to Caitlyn:

  1. make a dummy spell (does nothing, works only as a marker)
  2. add a “MORE_DAMAGE_FROM_SPELL” bonus from the dummy spell as the hero’s specialty
  3. add another 100 gold bonus to the modified artifact, but only for heroes with “MORE_DAMAGE_FROM_SPELL” bonus from the dummy spell

See for yourself: https://cdn.discordapp.com/attachments/422934446170308608/857369771392368720/goldstack.zip

If you want the added gold for every hero with +350 gold specialty, then it’s even easier - no need to make a dummy spell, just add the same +100 bonus with a limiter:

"limiters": 
                {
                "type" : "HAS_ANOTHER_BONUS_LIMITER",
                "parameters": [ "GENERATE_RESOURCE", "resource.gold" ]
                }
1 Like

The second example seems to be perfect. I did not really understand that “HAS_ANOTHER_BONUS_LIMITER”, but if it does what you wrote, than it’s perfect. So the artifact would give more gold to any hero who generates whatever amount of gold? Is that limited to generating gold from a speciality? Or does that include estates skill as well? Or does it even include other gold generating artifacts?

Btw, i’m making some progress with the mod :smile: Here is what i have now. The most difficult part for me is the graphics. I do not have any graphics talent.

I’m sorry, I was wrong about the last part. The endless sack itself has “GENERATE_RESOURCE” bonus, so it would always automatically give +100 gold to any hero. I’m afraid you’d need to add the “MORE_DAMAGE_FROM_SPELL” to every hero with +350 gold bonus for it to work.

Ah, ok. I’ll try that.

At least i have now some icons for resource generating skills (and the skills themselves working apparently):
CrystalLarge1 CrystalLarge2 CrystalLarge3
GemsLarge1 GemsLarge2 GemsLarge3
LumberLarge1 LumberLarge2 LumberLarge3
MercuryLarge1 MercuryLarge2 MercuryLarge3
OreLarge1 OreLarge2 OreLarge3

As already said, my graphics skills are nearly non-existent :slight_smile:

I’m currently trying to add some extra bonus to some artifacts, limited to some creature type. F.ex. the centaurs axe:

"core:centaurAxe":
{
	"bonuses" : [
		{
			"subtype" : "primSkill.attack",
			"type" : "PRIMARY_SKILL",
			"val" : 2,
			"valueType" : "BASE_NUMBER"
		},
		{
			"type" : "PRIMARY_SKILL",
			"subtype" : "primSkill.attack",
			"val" : 3,
			"valueType" : "BASE_NUMBER",
			"limiters" : [
				{
					"type" : "CREATURE_TYPE_LIMITER",
					"parameters" : [ "core:centaur", true ]
				},
			]
		}
	],
},

But that doe not work. It simply does nothing. The first bonus works, the second not. Any help how to do that right?

Edit: I also tried to add it instead to the centaurs as an ability, using this “source” and “sourceID”. Did not work either.

Try “core:creature.centaur”