Help with mods - questions

Well, every bonus effect is handled in C++ code. You are free to add new bonuses as long as it make sense. But we don’t need more “flags” with no functionality while so many WoG bonuses are still missing.

I though this one will be a piece of cake to make, but it turned out to be a tough cookie instead. I wanted to make a simple bonus, activated only at specific type of terrain. Am I doing something wrong, is it not yet implemented or did I misinterpret the use of “sourceType” determinant? NATIVE_TERRAIN doesn’t work as well. Bonus appears at all times regardless of terrain type.

			"Snow Stealth" : 
			{
				"type" : "BLOCKS_RETALIATION",
				"sourceType" : "TERRAIN_OVERLAY",	
				"sourceID" : 4
			}

This won’t work. You can’t force source type for bonus. The bonus as you described is static and “TERRAIN OVERLAY” is just additional indicator with no effect.

I want to make VCMI port of ERA2 mod called A Song of Ice and Fire. This mod brings 20+ map designed to suit Westeros geography, new heroes portraits, new music, new splash screens and loadgame pics.
Not everything can be ported to VCMI, but some of it features yes. So I’ve made such port, but encountered some problems. I’ve noticed that in vcmi mod New-menu there’s a code:

{
	"game-select" :
	
		"new-menu/Scenario Selection 1.png",
		"new-menu/Scenario Selection 2.png",
		"new-menu/Scenario Selection 3.png"
	],

	"loading" :
	
		"new-menu/LoadingScreen 1.png",
		"new-menu/LoadingScreen 2.png",
		"new-menu/LoadingScreen 3.png"
	],

So we have three random scenario selection screens and three loadgame screens. So I’ve tried to do same thing in mod, but game crashes every time and I don’t know why :cry: Could someone wants to look into into json files and tell what I did wrong?
Here’s link to the lite vesrsion:
www108.zippyshare.com/v/LqGfs02q/file.html

Important: for now, game crashes at the first four time. Fifth time game launch normally without errors. :open_mouth:

I have been trying to work on editing some descriptions and names on some of my heroes for Fairy Town, and some others, but when I try to update names it crashes it. I have a feeling it’s because there are other files that don’t recognize the names when I update them…can someone give me some idea on what all I need to change for one individual hero to make my changes work (Just description wise, not changing any pictures at this point)

You must remember that in mod.json file (below content folder) you must write patch do your hero.json.
For example:

"heroes" :
	
		"config/fairy/heroes/yourHeroName.json",

        ]

Okay, so I was looking through some mods at how the .json is set up for the townscreen and I noticed a lot of the buildings have "x:0 y:0 "… This doesn’t make sense to me unless the makers are saving each building as a transparent image the size of the whole background. Is that what I am seeing or am I just not understanding how it works?

Yes it is like that .

Town screens in vcmi support pngs and transparency. So you can just set it to x:0 y:0 and it will work for the same size as townscreen background images.

Every def and every transparent png file has itw own resolutions. And x,y coordinates are top-left townscreen coordinate of every image. Townscreen has 800x374 resolution, so min x=0, min y = 0, max x = 800, max y = 374. So if your def (or transparent png) has 800x374 resolution, it’s obvious that top-left pinnacle has x = 0, y = 0 coordinates (like in Asylum and Preserve mod). But look at the Grove mod. Defs are smaller, have smaller resolution so pnnacles must be set manually for proper viewing. I think this picture show you all about coordinates.

So it’s up to you which metod you choose. x=0, y = 0 method is easier for modder, but mod is heavier and tends to lag (like Silaneo’s NecroTown), second method is more time consuming, but final mod works better. If you work with defs and 8-bit graphic I suggest x=0, y=0 method. If you want work with transparent png, second method is reasonable.

Awesome guys~ Helps out a lot :slight_smile:

@misiokles:

Thanks for the info. While I use GIMP all the time I just never thought about getting coordinates with it. Certainly it is very easy . It was right there and I just never thought about it.

Do you have any idea how big would be the slowdown for x:0 y:0 method if town screen size was set to 1066x600 instead of standard 800x374?

@val-gaav

I have been using Paint.net and it actually gives the coordinates of where the mouse icon is pointing at the bottom of the program screen, so I imagine most art programs have similar options built in

Yes GIMP has this too, Misiokles posted screenshot of GIMP BTW.

I simply expected this to be very hard to do, and didn’t notice easy solution that was right there.

I only noticed Paint.net after you asked the question…lol…so don’t feel bad, I wasn’t picking on you

Hard to say, because we have only one (ufinished) town using full (800x374) png transparency files. Check Silaneo’s Necro Town:
heroescommunity.com/viewthread.p … 1358#focus

I edited most these png’s by cutting them to smaller “rectangles” files, and slowdown reduced dramatically! But you must test it by yourself.

What is difference betweend Dispel and dispelHelpfull spell? A what is difference between SPECIAL_PECULIAR_ENCHANT, SPECIAL_BLESS_DAMAGE, SPECIAL_SPELL_LEV and SPECIFIC_SPELL_DAMAGE ?

dispelHelpfull is Dragonfly’s ability, which dispells only positive spells.

SPECIAL_PECULIAR_ENCHANT is or peculiar enchantment spells as stated in Strategija:

And so on.

SPECIAL_BLESS_DAMAGE is Adela’s ability

But can work with other spells too.

SPECIAL_SPELL_LEV is Solmyr & pals bonus.

SPECIFIC_SPELL_DAMAGE is flat % damage bonus as Ciele and Luna.

So, all there four commands work with other spells, right?

Hey new problem… Our town has a structure built on the castle called Awakening. I had wanted it to have the ability to unlock a secondary upgrade to each of the seven monster tiers, but it seems there may be some coding issues with trying to do that with just the one structure as opposed to having to add to each dwelling structure. Any suggestions?

What does “unlock a secondary upgrade” mean? Where upgraded creatures to be hired if:

  • upgraded dwelling is built
  • upgraded dwelling is not built or even disabled