Json configuration for spells

shoud be hota.cove:pirate

it works, thank you! But mod id must not contains capital letters.
For example:
“id”:“doomMod.lostsoul” - is bad
“id”:“doommod.lostsoul” - is good
Maybe it’s obvious…

It is not obvious and very confusing actually. VCMI converts mod id to lower case, but for entity identifiers lowerCamelCase is recommended.

What exactly means this summonByHealth. We should type for example in spell json?:
“flags” : {
“indifferent”: true
“summonByHealth” : true
},

No it is not generic “flag”, it is boolean option of the effect.

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

Thanks, I’ll test!

Is there any way to summon only one creature regardless of hero’s spell power?

1 Like

No it`s not.

Can someone helps me for the “id” fill for the summon spell? I tried plenty of times to get this right but I can’t figure what I need to put in the “id” section. I tried “rfggoldgolem”, “rfgGoldGolem”, “refugee.rfggoldgolem”, “refugee.rfgGoldGolem”, “refugeetown.rfggoldgolem”, “refugeetown:rfggoldgolem”, etc.

@misiokles says its “id”:“doommod.lostsoul” - Lostsoul is the creature’s id but what is exactly doommod? folder name, town name, etc.?
@AVS says it’s “id”:“hota.cove:pirate” - and here there’s hota.cove and then “:” followed by the creature id. I’m lost.

I have a spell localized in: (spell id = “rfgSummon”)
RefugeeTown/content/config/refugee/spells/spell.json

and I’d like to summon this creature: (creature id = “rfgGoldGolem”)
RefugeeTown/content/config/refugee/creatures/REFGL5L

What am I missing? Thanks for your answers

This should work if spell and creature are in same mod.

“battleEffects” : { “summon” : { “exclusive” : true, “id” : “rfgGoldGolem”, “permanent” : false, “type” : “core:summon”, “summonByHealth” : true } },

This should work anywhere

“battleEffects” : { “summon” : { “exclusive” : true, “id” : " refugeetown:rfgGoldGolem", “permanent” : false, “type” : “core:summon”, “summonByHealth” : true } },

1 Like

This still doesn’t work (after the spell is launched, hero do spell animation and then game soft-freeze until I check an error dialog box outside the game. When I comeback to the game I’m back at the main menu).

“battleEffects” : { “summon” : { “exclusive” : true, “id” : “rfgGoldGolem”, “permanent” : false, “type” : “core:summon”, “summonByHealth” : true } },

Game crashed with this one.

“battleEffects” : { “summon” : { “exclusive” : true, “id” : " refugeetown:rfgGoldGolem", “permanent” : false, “type” : “core:summon”, “summonByHealth” : true } },

If I remove the uppercases (refugeetown:rfggoldgolem), then the game soft-freeze like previously.

image

Logs_txt.rar (111,5 Ko)

The spell
rfgSummon.json (2,5 Ko)

The creature
REFGL5L.json (1,3 Ko)

Any idea why it still doesn’t want to work?

This should be correct one, but there a space right after ", remove it. And post new logs if it crash again.

1 Like

Game didn’t crashed but I’ve got this error message ingame:

logs.rar (113,9 Ko)

Your spell configuration is incorrect. For summon effect you need level power in level config, not common. You have

“power”: 30,
“levels” … “power”: 1,

That error message shows that you cannot summon even single creature.

1 Like

Tried “creature.rfgGolem” ?

Thanks the spell successfully summon the creature (Town’s Gold golem) and now I just need to play with the value to get the desired effect. Thanks a lot @AVS for your help!

@Macron1 I tried that before and didn’t worked but it “refugeetown:rfgGoldGolem” worked!

I want to make a spell that only affect specific creatures (only Golems) but when I’m trying the spell it works on every creatures. I thought the target condition would only allows the spell to be used on any of those creatures. What am I missing?

You need to add “creature” to each condition line, like “core:creature.ironGolem”

1 Like

@AVS Issue solved, thanks !