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.
Here my feedback on the current format present in the Wiki Pages:
“cost” : [1500, 0, 0, 0, 0, 0], - gold first (and it can be gold only). keeps file and file reading shorter/faster. More verbose does not mean always better. I think it is quite easy format to use.
// 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.
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:
This is how H3 handles this. We would need to think of some workaround for H3 creatures
growth is used also for growth of external building, including some creatures like gold golems who have no town buildings.
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.
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.
All values not present in config will be replaced by default value during loading. For numbers default is 0, for strings default is empty string and for boolean this is “false”.
Take a look on creature configs in “cove” mod - for most creatures only gold is specified for cost, some optional parameters like hordeGrowth are also missing.
As for growth: it will definitely stay at least till both configurable buildings and map modding will be implemented. But why should a modder specify growth separately for town building and adventure map object? From my point of view having growth as creature property is more logical.
Horde growth is another thing: right now you just can’t move it to buildings - configurable buildings must be implemented first.
After this will be done - “hordeGrowth” will most likely remain as default value for town hordes. The field is likely to remain at least internally but may be removed from json config. Still a bit too early to say.
I usually place TODO mark near fields that may be removed\changed. Probably missed this one.
Now that you’ve mention it… The growth rates could be separated to allow more freedom :D. (Pyre problem comes to mind). But there should be a limit until someone requests it specifically.
So we were in agreement there: same growth for both, we just do not agree where to specify the growth :D. Logical ^^ would be in the config for the specified dwelling. And that one will be propagated automatically to town when you instantiate a dwelling inside. (We agree to disagree )
How about “forseeing” initiative? No opinions on that ?
It will be possible to make town dwellings function as both dwelling and horde at once or any other combination of functions.
So if you have creature with growth 10 and want to give town dwelling growth of 7 you will:
Turn building into dwelling (total growth=10)
Turn building into horde with growth -3 (total growth=7)
This is not how our system works internally. You don’t “instantiate” a dwelling. Instead town is essentially a dwelling and shares most of mechanics with external dwellings.
And what happens when creature is available in multiple dwellings? In H3 you can recruit elementals in 3 different dwellings:
One shared elemental conflux
Big version of dwelling, coming from RoE IIRC.
Small version of dwellings, placed as random dwellings for Conflux.
Growth of which dwelling town building should choose?
I won’t mind but somebody would need to implement this. Somebody who more familiar with this area than me.
Maybe we use same name for different things but here my problem with that. Horde building as in H3 horde building is and extra building that:
1: increases said creature production
2: makes said growth immune to plague.
So it is not good to use this horde dwelling trick (for Pyre for example).
Here I am not so knowledgeable. From memory I think that like for every other castle there is one building exactly like the one present in town. That one should be used. To turn this around for you, if you have 3 different buildings and the growth is stored in creature config, how do you make the 3 have different growths?
I doubt that this part (plague immunity) is implemented right now. Interesting - is this a bug or feature of H3?
Anyway - all growth-related objects (castle, grail, hordes, legion parts\statue) use exactly same code. So plague immunity should be a separate option, not a part of “bonus growth” mechanics. So -3 horde is still valid.
Not anymore - see HotA
There is no direct connection between town and external dwellings so there is no “exactly same” dwelling or primary dwellings or anything like that. What we have is
Town which is (by itself) dwelling that produces some creatures
Dwelling(s) that produce creatures and give +1 bonus to growth in towns
Why would someone do that? All creatures are connected to some towns (or are neutral). Town does not need to have more than one dwelling of a creature.
Yes - you can set creature as recruitable in another town but I doubt someone will use that - this creatures will be “alien” to town.
In short:
There is no easy way to connect dwellings and towns. The only viable option is to make town growth and external dwelling separate but this may be confusing to modders.
Standard H3 feature. If it started as bug… do not know. I consider it adds a little more depth to the game then if all creatures plagued.
Maybe if you indulge a last attempt from my side. I think I am still not understanding something. Here my understanding of how town (should produce)produces units, maybe you can spot out what I did not get.
Town by itself produces 0 units, but it has dwellings that will produce units. Town has some extra structures (citadel/castle/horde dwelling/grail) that modify these numbers. The same number produced by dwelling in town is produced outside town, because in fact they are another instance of the same building.
I just used your example of con-flux with 3 buildings for elemental. In your case (growth in creature config) all share same growth.
Here is short description on how dwellings\towns work in VCMI:
We have two c++ classes:
class Dwelling: public MapObject
class TownInstance : public Dwelling
So town is always a single dwelling. When you build some creature-producing buildings list of available creatures will be modified but there won’t be any new objects created.
On new week game will calculate growth based on presence of some buildings.
For external dwellings behaviour is mostly same but growth and available creatures are constants.
So you don’t instantiate dwellings - towns and dwellings are completely independent structures.
Yes - all external dwellings will always use the same growth. And there is no way to change that.
However I don’t remember requests like this anywhere. It seems that most people are satisfied with current situation.
And don’t forget scripts - this is what we should use for something significantly different from H3.
Does editing standard (those already added) creatures with mod’s .json files already work? Or are we just limited to adding new creatures for now? If editing the old ones is possible, then how to do this properly? I’m trying to change some values and names, but game crashes on startup if I use existing creature identifier (like “pikeman” or “archer”…). It crashes even on simpliest code like: