It works!
At least until it crashes. Well, beginnings are hard.
Updated archive attached.
HotA.rar (4.09 MB)
It works!
At least until it crashes. Well, beginnings are hard.
Updated archive attached.
HotA.rar (4.09 MB)
Bump. Fixed some defs and added creature abilities.
At least one more version is expected, with some stack experience bonuses. I won’t do it anytime soon, though.
Ivan, please take care of creature portraits (big and small).
HOTAmod.rar (1.74 KB)
Ok. But this have one problem: portraits have to be in same def files is H3 (e.g. TWCPORT.def).
Easiest way for now is to add into CCreature field “iconIndex”. Same as ID for H3 creatures, set in Json for mods. VCMI allows empty frames in def so this should work until better solution will be implemented. Resource manager from unfinished branch would solve this problem perfectly but it needs a lot of work.
Done. Same link for updated package: dl.dropbox.com/u/22372764/vcmi/hotapackage.zip
Check for crashes in case if I missed something.
Ivan. You aded fixed number “icon index” to config file, which will not and can’t work when there are more mods. Indexes for creatures are generated at run time in CModHandler::recreateHandlers() function. It is true for example for adventure map def info.
We only need to make sure that right indexes are assigned to right pictures.
Best solution (something like URI to icon) is not possible right now. Runtime generation of list of icons is not possible either.
This is the only viable option I found. Note that you can use any id’s for icons - for example cove creatures use id’s 250-264 with huge hole before them (200-250 are missing). As long as index is not insanely huge it will work and later there will be way to fix this and use URI instead.
Can’t we just ignore def frames and create separate vector (array?) of images / image references?
Or something like “if creature index is within TWCPORT size, use that def, if it’s greater, use def from string”.
It may be just workaround to make creature indexing transparent for user.
I think its better to unpack icons from defs and use filenames. Is this a problem?
Right now it has to be def (or its json replacement) - most of places in code can only use them.
This is how current json replacement works: if entry with file name not present in json - use image from def.
But creating that json in runtime is not possible right now. And we need this to get numeric id’s generated in runtime.
That unfinished resource manager can fix this perfectly but it needs a lot of work.
Attaching new mod with some of icons fixed, stack experience and projectile properties. All necessary properties specified by creature format should be handled.
I don’t really get the meaning of projectile offsets and stuff, hopefully it’s a minor thing.
Horde growth & turret creature are not necessary now I believe, if ever.
Also, attaching little test map with random creatures. Please add it to nearest releases.
Game crashes as soon as new units join our army, which didn’t happen for a while. Together with missing abilities from creature window, I smell client-server desync. Needs testing.
Also, are .msk, .msg files needed anymore?
hotaPackage.rar (4.19 MB)
Values from cranim.txt? They may cause some incorrect positioning but nothing else.
I know how to get correct values from hota files - will fix this later.
Kinda. Right now engine will crash if neither msk nor msg were found.
But these files are almost unused - all vcmi needs is width and height of the object. Which can be moved somewhere else if needed.
Think this should be part of new objects for adventure map format instead of creatures. Unless you really want to get rid from them.
One more update: dl.dropbox.com/u/22372764/vcmi/ … atures.zip
Changes:
Meh, still buggy :o
-Fixed Ayssid large icon
-Fixed Corsair -> Seadog upgrade
Minor change in format with rev 3005:
Instead of
"creatures":
{ ... },
{ ... }
]
VCMI will work with this:
"creatures":
{
"creature1" : { ... },
"creature2" : { ... }
}
Updated json in attachment
mod.json.zip (2.93 KB)
Here my feedback on the current format present in the Wiki Pages:
// normal growth in town or external dwellings
"growth" : 0,
// growth bonus from horde building
"hordeGrowth" : 0,
The 2 above are not creature properties but building properties.
// initial size of creature army on adventure map
"advMapAmount" :
{
"min" : 0,
"max" : 0
},
Again not a property that a creature should have.
// Creature is 2-tiles in size on the battlefield
"doubleWide" : false,
DoubleWide hints to 2 hex creatures only. (Now not supported but multihex creatures should be possible). So rename to “footprint” and values should be: SINGLEHEX, DOUBLEHEX, 232, etc.
"cost" :
{
"gold" : 1000
}
Looks fine for me. You do not need to specify all 7 resources.
Another option is to allow singe number (for gold) instead of structure but definitely “no” to array:
"cost" : 1000
Possibly but:
I agree with you on hordeGrowth but I don’t see any need to invent workarounds to move this value in towns. Something to think about when we’ll work on configurable buildings.
Why? If you consider this to be property of adventure map object then this would need to wait until map modding will be implemented.
"cost" :
{
"gold" : 1000
}
Is indeed ok. I was under the impression that array and the possibility to use only gold was ditched in favor of the verbose specification.
For creature growth like in H3. I see this “creature structure” as VCMI’s and independent of H3. Without knowing the internal constrains I would say that VCMI shout have the structures that make sense and from where those get the info (different H3 files) is another thing. (IF the goal is just to copy mod files and the mod will work than that is another thing altogether). (Backwards compatibility is a bi**h…)
Regarding the attributes that are temporary there, it would be better to mark them as so.
Agreed that in future growth, horgeGrowth should become bonus of town/dwelling (but not only).
This allows more clear implementation of f.e.
and also generalization of growth handling in towns.
Hosting provided by DigitalOcean