SoD files mod like

  1. This is old solution from 0.8. I would like to see hero specialties translated to current format.
    See function CGHeroInstance::initObj() in CObjectHandler.cpp.
  1. UN32/UN44 def’s

  2. Artifacts? The only artifact that hero may receive on start is spellbook. Right now determined by presence of “spellbook” entry.
    For war machines check HOTRAITS.txt (file with starting armies). Some heroes have war machine instead of one of creature stacks.

“\n” should give you end-of-line. Although not sure if current code will convert end-of-line into “\n”. Will check in a few days.

Here the hero classes… (I am posting stuff as I make them so that mistakes can be spotted as early as possible. There is a lot of copy pasting involved :slight_smile: ).
heroClases.zip (10.7 KB)

I have so problems making hero specialties… For the moment I will make them with only a prototype for speciality and will copy the specialities original field too. Attached 2 examples.

For example I do not know how to tell Valeska to give bonuses starting only from level 2. And I do not understad why is speed clumped toghether with attack and defence since speed will not grow. And how are attack and defence increased? Since it is not a +1 flat for every level?
heroes.zip (1.51 KB)

I gave up ATM to try to spit def files. Too much of a headache with minor aesthetical improvements. So for heroes I will use the index property instead of image. Can the game handle these indexes? (At least they should be not hardcoded).

If icon fields are empty then they will be set based upon “index” property.

And I think you should take a look on this: sourceforge.net/p/vcmi/code/3410/
(link will work as soon as “upgraded” source browser will update)

try using “def2bmp twcrport.def” in VCMI console :slight_smile:

Attached the castle heroes.

I am not using images for icons but the index field. And for skills I am using the old format (specialties). The end goal is to translate to the new “speciality” format but I fear I do not know how. (Maybe someone with more intimate code knowledge takes this conversion part? If not I will try to dwelve into it after I finish the SoD mod. (I think this really has to be done since it is not trivial and will help modders with setting up their heroes).
castle-heroes.zip (12.6 KB)

Wow! def2bmp works like a charm… (only .bmp needs to be added)

I intend to split the following files only: (if you think any of them make no sense splitting please let me know)

  • CPRSMALL.def - small creature icons.
  • TwCrPort.def - big creature icons
  • FlagPort.def - adv map recruitment dwellings
  • ITPA.def ITPt.def - town icons small and big

I do not see the point in splitting things like UN23, un44 (special skills icons) or things like artifact.def (artifact icons).

Why creature icons have hardcoded backgrounds? I would expect that the town has a generic background image an on top of that creature icons are added with transparent background.

I think this should be supported because of the :numerous: towns and creatures that we will have. (for sure some creatures will be shared between towns)

Ah. I’ve used too much to OS that detects file type not solely by file extension :slight_smile:

You’ll need to ask NWC employers for that.

Creatures shared between towns won’t be able to have town-specific background - same creature must have same parameters (including icons) no matter where it was recruited.

Something like “composite image” may be an interesting idea but it must be implemented on more basic level and not be something specific to creature icons. Probably as post-1.0 feature (or when it will be possible to implement this easily)

About backgrounds I was asking because I saw these files: CRBKGCAS.bmp. An i thought the idea was to use transparent fg creatures on those. Or maybe they are used somewhere else entirely…

For cove town in config there is a “creatures.json”

"cove-creatures:ayssid" :
	{
		"faction" : "cove"
	},
	"cove-creatures:haspid" :
	{
		"faction" : "cove"
	},

What is the purpose of this file? Is it really needed?

Same question for Hero-classes.

Cove is not made by Ivan as 1-part mod, so this is workaround to assign creatures to cove faction.

It’s the generic problem of icons.
For this reason I supposed animated icons generated at run-time.

Yes. There are two backgrounds: one is 120x100 pixels another one is 130x100 pixels. One of them is used in fort window and another one in creature window.

Purpose is that if player will enable only cove-creatures mod the game will work but all Cove creatures will be neutral. Installing cove-town will change their faction to Cove. Same for heroes.

Another way is to add Cove faction in cove-creatures that will act as H3 neutral faction (see config/factions/neutral.json) and then use cove-town mod to add all town data into Cove faction.

What/where are these files used for? “hallcstl.def”

Those are icons for town hall screen. Check town/buildingIcons field in factions format.

Yeah! Now with hindsight its kind of obvious :slight_smile:

Could the “map” node be changed to “adventureMap” in all json’s for all mods? For me it has been some days since using it and I still have to adjust to it.

By all json’s you mean hero classes and creatures? Or am I missing something else?

Sounds reasonable - no point to have different name for field with same meaning.