Modding FAQ

No, does not work.

Edit: I think, the problem lies somewhere else. I had my mod splitted into 2 submods. Enabling one submod seemed to disable the other. Now i have eliminated the submod splitting, and now it seems to work, exactly as described above.
Strange.

If you still need any help you can give me your mod so that I can debug it.

Many thanks. I’m still searching for where to upload the files. Without registration/account. But i’ll find some way. And yes, i’d apprechiate any help. This ios my first mod.

Yiu can try to attach here, directly via forum as zip file.


It will ask emails but you can just upload files and pick a link from there. Emails are not required.

ok, tried.

Got it, will try a bit later

It works with:

{
“type” : “CREATURE_TYPE_LIMITER”,
“parameters” : [ “centaur”, true ]
},

But yeah, if there are two mods, and both want to modify e.g. “core:centaurAxe”, then only one would work in the end.

1 Like

I found a typo in the skills.json file, and added more artifacts to the artifacts.json.
Special.zip (5.3 KB)

I have only time for H3 on saturdays, and sometimes an hour or so on sundays. So next time will be next saturday :slight_smile:

I’m also interested in what you think about the idea. My idea is to encourage a more RPG style of gameplay. F.ex. a Cleric with the “shield of the damned” is not a good match. Or a devil with the “pendant of holyness” is an evenly bad match. I want to encourage a gameplay where the artifacts and skills match the faction, type and biography.
For the resource generating artifacts i think i found another way to do this. I let the artifact simply increase the matching skill. So the hero gets an extra benefit if he has this skill. And the specialty also increases the matching skill. Si f.ex. a hero with specialty of generating 1 crystal per day also increases the “miner” skill, which generates crystal. And the “everflowing crystal cloak” increases this skill too. The increase by specialty should grow with level, the increase by artifact not. But still the idea is, best would be to give the cloak not to some random hero, but to a crystal specialist. For this i added skills similar to the estates skill. Estetes generates gold. Miner generates crystal, woodcutter generates wood, prospector generates ore, and so on. One skill for each resource.
Similar with artifacts like the “centaurs axe”, which gives an extra benefit to centaurs, thus encouraging usage of this artifact for rampart faction. I have plans to add new combo artifacts of such artifacts. But that has to wait until i have made an update of all the standard artifacts.
Btw, it is intentional that an artifact may also give some malus, if worn by a hero of the wrong faction. Pure necromantic artifacts should give a malus to good factions, and pure good artifacts like pendant of holiness should give a malus to evil factions. I still have to balance this, but as a first step, that’s the idea.

Thanks for the help so far.

it should be possible in vcmi to create a mod to add building 44 or two dwelling 7 or assign it to dwelling 8

It could be sufficient to be able to upgrade building level 7 a second time to also offer creature level 8.

I have 2 questions regarding my new mod. First: here are the first 3 artifacts i modified:

"core:centaurAxe":
{
	"text" : { 
		"description" : "This item increases your attack by 2 and the attack of all centaurs and centaur captains by 5"
	},
	"bonuses" : [
		{
			"subtype" : "primSkill.attack",
			"type" : "PRIMARY_SKILL",
			"val" : 2,
			"valueType" : "BASE_NUMBER"
		},
		{
			"type" : "PRIMARY_SKILL",
			"subtype" : "primSkill.attack",
			"val" : 3,
			"valueType" : "ADDITIVE_VALUE",
			"limiters" : [
				{
					"type" : "CREATURE_TYPE_LIMITER",
					"parameters" : [ "core:centaur", true ]
				},
			]
		}
	],
},
"core:blackshardOfTheDeadKnight":
{
	"text" : {
		"description" : "The blackshard of the dead knight increases your attack by 3, the attack of all undead by 6, but decreases morale of all living by -1"
	},
	"bonuses" : [
		{
			"subtype" : "primSkill.attack",
			"type" : "PRIMARY_SKILL",
			"val" : 3,
			"valueType" : "BASE_NUMBER"
		},
		{
			"type" : "PRIMARY_SKILL",
			"subtype" : "primSkill.attack",
			"val" : 3,
			"valueType" : "ADDITIVE_VALUE",
			"limiters" : [
				{ "IS_UNDEAD" }
			]
		},
		{
			"type" : "MORALE",
			"val" : -1,
			"limiters" : [
				"noneOf",
				"IS_UNDEAD",
				{
					"type" : "HAS_ANOTHER_BONUS_LIMITER",
					"parameters" : [ "NON_LIVING" ]
				},
				{
					"type" : "HAS_ANOTHER_BONUS_LIMITER",
					"parameters" : [ "GARGOYLE" ]
				}
			]
		}
	],
},
"core:greaterGnollsFlail":
{
	"text" : {
		"description" : "This great flail increases your attack by 4, and the attack of all gnolls in your army by 8"
	},
	"bonuses" : [
		{
			"subtype" : "primSkill.attack",
			"type" : "PRIMARY_SKILL",
			"val" : 4,
			"valueType" : "BASE_NUMBER"
		},
		{
			"type" : "PRIMARY_SKILL",
			"subtype" : "primSkill.attack",
			"val" : 4,
			"valueType" : "ADDITIVE_VALUE",
			"limiters" : [
				{
					"type" : "CREATURE_TYPE_LIMITER",
					"parameters" : [ "core:gnoll", true ]
				},
			]
		}
	],
},

The first 2 apparently work, the third does not work. The description does not show up. And none of the artifacts after that. Any idea why? The syntax seems to be correct. So what did i wrong?

Second: I copied at first the original bonus, and then added the additional limited bonus. Is it necessary to copy the original?

Edit: I disabled all mods except WoG and my new one. Same result.

Yeah, the syntax seems to be correct. Strange.

No.

not exactly because the eighth creature is still the upgrade of the seventh creature, in practice in the new home instead of recruiting only the eighth creature you can also recruit the seventh and that’s not exactly what I meant

I have a question. I have made a spell what can apply only on the mod creature. How can I do this in json? I do this but not works only on mode creatures: “targetCondition” : {
“anyOf” : {“creature.mymod:creature1a”: “absolute”

Please, paste all code here.

I have few questions about modding possibilities :

  1. Is it possible to make a creature summon a single creature at the start of a battle ? It should be automatic and shouldn’t require using the unit’s turn to cast summon.
  • The ability “summon guardians” will summon more than just one.
  • The enchanter spell-caster seems buggy as it won’t allow another unit with enchanter spell-caster ability to cast its spell.
  • The bonus type “Opening Battle spell” doesn’t seem to work if added to a creature.
  1. I want a special building on my town to works the same way as “Refugee camp”. Meaning it should grant a 8th dwelling (same as Dungeon’s portal) and should allow a random creature to be recruited each week. Does VCMI modding allows this to be done ?

It wasn’t possible as of VCMI v0.99 but we’re now v1.3.2 so I don’t know if the answer is the same.

  1. I would like a spell to summon a random creature. It could be a random from the game, or a random unit among a defined list. Is this something possible ?

For example, instead of writing something like this :

> "battleEffects":{	"summon":{
> 					"exclusive":		true,
> 					"id":				"fireElemental",
> 					"permanent":		true,
> 					"type":				"core:summon",
> 					"summonByHealth":	false}}},

What if I write something like this ? :

"battleEffects":{	"summon":{
					"exclusive":		true,
					"id":				["fireElemental", "waterElemental"],
					"permanent":		true,
					"type":				"core:summon",
					"summonByHealth":	false}}},

I don’t know. Is there a feature that could return a random creatureID value ? Something like this :

> RANDOM_CREATURE
> "subtype"			= 0 (Random from all creatures, as refugee camp), 1 (random among predefined list)
> "val"				= Number value. Cooldown in days to refresh the random creature (ex: refugee camp would be 7.). 0 could always refresh.
> "additional info" = ["X", "Y", "etc."] 	// list of predefined creatures you can add if subtype=1. (Optional). Could be even better if you could add %chance value for each entry.