Help with mods - questions

Hi I’m totally new to this, sorry if this isn’t a ‘general questions’ thread - this question isn’t related to the above at all!

I’m interested in starting a project that effectively lifts the battle mode out of HOMM3 and builds a game almost exclusively around that. Think; scenarios against different combinations of AI stacks, pvp ladders, carrying over troops to next battle, earning game-gold from battle to buy more troops before next fight etc. None of the explore the map part, resources and buildings.

Could someone help me understand how I could extract those parts from the code base, and fork out this kind of project?

Thanks!

ps - this project makes me so happy, one of my favourite games as a kid (and still play today)

If you know c++ then almost everything is possible:) You should join slack (link is at vcmi.eu) to talk with current devolopers about details. But there are many technical problem with base code (it’s outdated and poorly written).

Help! Again! :stuck_out_tongue:
Anybody has an idea how to give BLOCK_MAGIC_ABOVE bonus only for enemy hero?

What I’ve seen people do in a few mods to apply a negative bonus to the enemy hero, is to apply it to the entire battlefield and then apply a reverse of that bonus to your hero.
For an example of this, you can check Tides of War mod. It has 2 skills, Hexes and Intimidation, that are supposed to give negative luck and morale to the enemy army, but what they actually do is give negative luck and morale to the entire battlefield and then gives you positive luck/morale to negate the battle wide negative luck/morale.

I’m co-author of ToW and I’ve tried that trick :slight_smile: Result was enemy couldn’t cast spells as I wanted by my hero can’t even click on high level spells. I’ve made some even dirtier tricks like summoning at the beginning of the battle a creature that should block magic (ONLY_ENEMY_ARMY bonus works with creatures) but I’m still failing :frowning:
I have a few others ideas I must check, but I hope somebody else messed with that. Thanks anyway!

now that the special buildings have been integrated, I was wondering if it is possible if a city can have more than one special building, for example the castle can have in addition to its brotherhood of sword also the portal summoning of the dungeon?

There’s 4 ‘special’ buildings in the game, so I guess in every town we can have maximum 4 special buildings.

how to create an object on the map that works as a transmuter of creatures, paying a sum based on the strength of the creature, for example if you have 1 pikeman and you want to turn it into 1 dragon fairy you pay 20000, if you have 2 pikes to convert into 2 fairy dragons you pay 40000, etc. etc.?

How to change this spell, so it will kill 1 creature in stack? And how to kill exact percent of creatures in stack?

{

"kill":

{

	"type": "combat", 

	"name": "Kill",

	"school":

	{

		"air": false,

		"earth": false,

		"fire": false,

		"water": false

	},

	"level": 4,

	"power": 1,

	"defaultGainChance": 2, 

	"gainChance":

	{

		

		"necropolis": 5

	},

“targetCondition” : {

    "noneOf" : {

            "bonus.EARTH_IMMUNITY" : "normal",

            "bonus.GARGOYLE" : "absolute",

            "bonus.NON_LIVING" : "absolute",

            "bonus.SIEGE_WEAPON" : "absolute"

    }

},

	"animation":{

		"hit":["Kill/Sp06_1"]

	},	


	"flags" : {"damage": true,"indifferent":false,"negative":true},



	//flags structure of bonus names,any one of these bonus grants immunity

	//graphics - OPTIONAL; object;

	"graphics":

	{

		"iconBook": "Kill/back0",

		"iconScroll": "Kill/back1.png",

		"iconScenarioBonus": "Kill/back2.bmp",

		"iconEffect": "Kill/back3"

	},

	"sounds":

	{

		"cast":"Eradicate"

	},

	"targetType" : "CREATURE",//_EXPERT_MASSIVE",



	"levels":

	{

		"base":{

			"range" : "0",

			"power":1,


			"battleEffects":{

				"damage":{

					"type":"core:damage",

					"optional":false,

					"indirect":false,

					"killByCount": true, //if true works like Death Stare

					"killByPercentage" : false, //if true works like DESTRUCTION ability

				}

			}

		},		

	

		"none":

		{

			"description": "Kills one creature.",

 

			"cost": 18,

			"power": 1,

			"aiValue": 6,

			"range": "0",

			"targetModifier":{"smart":false},


		

		},

		"basic":

		{

			"description": "Kills one creature.",

 

			"cost": 17,

			"power": 1,

			"aiValue": 6,

			"range": "0",

			"targetModifier":{"smart":false},				

			

			




		},

		"advanced":

		{

			"description": "Kills one creature.",

 

			"cost": 16,

			"power": 1,

			"aiValue": 6,

			"range": "0",

			"targetModifier":{"smart":false},				

			

			},

	

		"expert":

		{

			"description": "Kills one creature.",

 

			"cost": 15,

			"power": 1,

			"aiValue": 6,

			"range": "0",

			"targetModifier":{"smart":false},

		}

	}

}

}

Показать цитируемый текст

Thith in Courtyard mod tried to use in spell code “INDEPENDENT_MIN” bonus. Check immolation.json and deathGrasp.json - maybe it will help you.

who knows if vcmi supports the eighth recruitment in town?

It doesn’t support.

I’ve tried to port ERA2 Morn’s Battlefields mod to VCMI, but I’ve got only 80% success.

This mod adds more graphics to OH3 terrain battlefields, now fights have more graphical grounds from available pools to use.

What works:

What doesn’t work:

  • vanilla graphics (mod seems to disable them)
  • special terrain graphics (lucid pools, fiery fields, cursed ground etc.) - mod (?) someshow doesn’t see such layers.

What crashes:

I need a smarter guy to point me out how to get rid of these issues, and how to add more graphics to special terrains like Magic Clouds or Clovef Fields.

Download link (written for 1.2.1 version)

(click Code → Download ZIP)

1 Like

Also, it would be cool to have battlefields linked to Banks, like in the video :slight_smile:

Works ok for me: Fix issues with custom battlefields · Issue #2368 · vcmi/vcmi · GitHub

However, terrain overlays (and all the objects) currently support only one battlefield max. Changing this will have to wait until 1.3.2.

Below are a handful of errors and warnings that can pollute the log files for a number of mods that I currently use. I’ve not included the one related to missing the translator for the launcher and editor logs because it sounds like that is not an error anymore and will be removed.

Also, Andruid’s Expansion mod pack was not working because of a missing Chinese translation file or something like that. An easy fix is that if you don’t speak Chinese, you can remove the “chinese” entry from the mod.json file.

Some of these fixes may not work as intended. I haven’t tested all of them. Others should be fine.

VCMI_Client_log.txt

Highlands Town:
ERRORs related to the “flight” entry under animation time for any creature will show up as an error.
FIX: Remove the entry

[2023-Jul-27 14:01:40.203149] WARN mod - There is deprecated bonus found:
FIX: This for different bonuses:

	"type" : "SELF_LUCK"
	"type" : "KING1"

These must be changed to:

{
	"type" : "LUCK",
	"val" : 1,
	"valueType" : "INDEPENDENT_MAX"
}

And:

{
	"type" : "KING",
	"val" : 0,
	"valueType" : "ADDITIVE_VALUE"
}

There are a number of other errors like this.

Many Chinese translations are missing the required “Description” entry.
FIX: Add the description entry, even if it is blank.

Cathedral Town:
ERROR doesn’t recognize the “french” field for translations.
I don’t know the fix, not sure if this amounts to a typo.

New Old Spells Plus:

[2023-Jul-26 18:38:56.414439] WARN mod - Data in new-old-spells-plus is invalid!
[2023-Jul-26 18:38:56.414545] WARN mod - At /german
	 Error: Unknown entry found: modType

FIX: Remove the entry “modType” from the translation section under german.

ToK:

[2023-Jul-26 19:21:49.418937] WARN mod - Data in tok is invalid!
[2023-Jul-26 19:21:49.419027] WARN mod - At /chinese
	 Error: Required entry description is missing

FIX: Add the required entry into mod.json
There are a number of missing or added entry issues related to certain mods that have a translation update.

VCMI_Editor_log.txt

HotA:
[2023-Jul-26 18:26:46.398938] ERROR global - Unable to find localization for string 'core.tentcolr.8'
FIX: This can be fixed by going into the config file for the Border Guard objects and changing the name of the first one from “avxwbor1” to “green”. I don’t know if it is green but that got rid of the error.

Cathedral Town:
ERROR zealot.def file used for the adventure map animation of the “Red Fanatic” WoG commander was using the wrong type of group. This caused an error where it said CAnimation missing for group 0 frame 0.
FIX: Opened it with Greyface’s Def Viewer and Def Tool and put it back together under group zero using the “adventure object” preset.

Courtyard Town:
[2023-Jul-27 04:26:28.557313] ERROR global - Mixing Death Grasp special effects with old format effects gives unpredictable result
FIX: The log has about 18 entries like this totaling the number of entries for special effects accross 4 spells. Apparently this is caused by spells having the “offensive” flag when they shouldn’t. Also, not entirely sure the spells will work as intended.

I wanted to make bombs throwing by Catapult.
So I’ve changed tower moat json.

{
    "siegeBombTrigger" :
    {
        "targetType" : "CREATURE",
        "type": "ability",
        "name": "Mine",
        "school": {},
        "level": 3,
        "power": 10,
        "gainChance": {},
		"animation" : {
			"hit" : ["C09SPF3"]
		},
		"sounds" : {
		   "cast" : "LANDKILL"
		},
        "levels" : {
            "base": {
                "power" : 0,
                "range" : "0",
                "description" : "", //For validation
                "cost" : 0, //For validation
                "aiValue" : 0, //For validation
                "battleEffects" : {
                    "directDamage" : {
                        "type":"core:damage"
                    }
                },
                "targetModifier":{"smart":false}
            },
            "none" : {
            },
            "basic" : {
            },
            "advanced" : {
            },
            "expert" : {
            }
        },
        "flags" : {
            "damage": true,
            "negative": true,
            "nonMagical" : false,
            "special": true
        },
        "targetCondition" : {
        }
    },
    "siegeBomb": {
        "targetType" : "NO_TARGET",
        "type": "ability",
        "name": "Mine",
        "school" : {},
        "level": 3,
        "power": 0,
        "defaultGainChance": 0,
        "gainChance": {},
        "levels" : {
            "base":{
                "description" : "",
                "aiValue" : 0,
                "power" : 0,
                "cost" : 0,
                "targetModifier":{"smart":false},
                "battleEffects":{
                    "bomb":{
                        "type":"core:obstacle",
                        "hidden" : false,
                        "trap" : false,
                        "triggerAbility" : "siegeBombTrigger",
                        "dispellable" : false,
                        "removeOnTrigger" : true,
                        "moatDamage" : 70,
                        "moatHexes" : [[30], [63], [97], [132], [167]],
						"attacker" :{
							"animation" : "C09SPF1",
							"appearAnimation" : "C09SPF0",
							"appearSound" : "LANDMINE"
						},
						"defender" :{
							"animation" : "C09SPF1",
							"appearAnimation" : "C09SPF0",
							"appearSound" : "LANDMINE"
						}
                    }
                },
                "range" : "X"
            },
            "none" :{
            },
            "basic" :{
            },
            "advanced" :{
            },
            "expert" :{
            }
        },
        "flags" : {
            "nonMagical" : true,
            "indifferent": true
        },
        "targetCondition" : {
        }
    }
}

and give throwing bombs specialty to hero

		"specialty" : {
			"bonuses" : {
				"casts" :
				{
					"type" : "CASTS",
					"val" : 1,
					"limiters": [ 
					{
						"type":"CREATURE_TYPE_LIMITER",
							"parameters": [ "catapult", false ]
					}
				]
				},
				"castsBombs" :
				{
					"type" : "ENCHANTER",
					"subtype" : "spell.siegeBombTrigger",
					"val" : 3,
					"addInfo" : 20,
					"limiters": [ 
					{
						"type":"CREATURE_TYPE_LIMITER",
						"parameters": [ "catapult", false ]
					}
				]
				}

But nothing happens, spell is casted but bombs don’t appear on desired hexes.
How to fix it?