VCMI Project - Heroes 3: WoG recreated
Forum of the project aiming to recreate best turn-based strategy ever!

Content creation - Help with mods - questions

marif - 2014-11-20, 21:31
Post subject: Help with mods - questions
Hi,

I try to make an artifact that allows the hero to make more experience, lets say 15% as in the example below. As I understand, EXP_MULTIPLIER is the right bonus type to choose. I add the folowing code:

Code:

        "bonuses":
        [
            {
                "type": "EXP_MULTIPLIER",
                "val" : 15,
                "valueType": "PERCENT_TO_BASE"
            }
        ]


While starting, VCMI detects the mod as correct, but when I get the artifact and fight lets say 100 peasants, I still get 100 exp points instead of 115. Am I doing something wrong?

Warmonger - 2014-11-20, 21:42

Quote:
EXP_MULTIPLIER
val - percent of additional exp gained by stack / commander (base value 100)

Try SECONDARY_SKILL_PREMY with learning for hero.

From CGHeroInstance.cpp:
Code:
TExpType CGHeroInstance::calculateXp(TExpType exp) const
{
    return exp * (100 + valOfBonuses(Bonus::SECONDARY_SKILL_PREMY, SecondarySkill::LEARNING))/100.0;
}

Macron1 - 2014-11-20, 21:42

EXP_MULTIPLIER
##val - percent of additional exp gained by stack / commander (base value 100)

This is bonus not for hero.

By the way, I made artefact with bonus
Code:
{
"type":"PRIMARY_SKILL",
"subtype":3,
"val":100,
"valueType":"PERCENT_TO_BASE"

}

and it's not working. Where I have mistaken?

marif - 2014-11-20, 21:56

Quote:
Try SECONDARY_SKILL_PREMY with learning for hero.


Yep, that was my initial idea, but I wanted to make an artifact that is universal (does not require hero to have learning). That is why I am asking for this.

Does even funcionality like this exist?

Warmonger - 2014-11-20, 22:11

That's why I provided code sample. It does not check for secondary skill presence, just total bonus value.
marif - 2014-11-20, 22:43

Ok, now I undestand, thanks :)
marif - 2014-11-23, 16:53

Is there a way to make an artifact that turns 'living' creatures into 'undead' (with the exception of non-living; like golems etc.)? AFAIK there is no limiter on living creatures, I can't come up with any workaround as well...

Code:

        "bonuses":
        [
            {
                "type" : "UNDEAD",
                "limiters" :
                [
                    {
                        "type": "HAS_ANOTHER_BONUS_LIMITER",
                        "parameters" : ["???????"]
                    }
                ]
            }

AVS - 2014-11-23, 17:19

There is no LIVING bonus and it may be good idea to add it (I`ve seen a comment somewhere in codebase about presence such bonus in WoG`s creature exp mechanics).
marif - 2014-11-23, 17:31

I mentioned it over half a year ago on the bugtracker right here in the comments, but WARMONGER said it would cause problems... though thinking of it now I would disagree :)
marif - 2014-11-23, 18:25

BTW. I am also looking for a way to disable 'UNDEAD' ability (by an artifact), but nothing seems to work. I tried:

Code:
        "bonuses":
        [
            {
                "type" : "UNDEAD",
                "val" : null
            }
        ]


and

Code:
        "bonuses":
        [
            {
                "type" : "UNDEAD": null
            }
        ]


but both of them do the opposite (make all creatures UNDEAD) - probably null is ignored (?), but at VCMI initialization the mod is not labeled as incorrect... If there was an 'IS_LIVING' ability, then I would do it by setting type to 'IS_LIVING' and limiting it to 'UNDEAD' creatures :p

Macron1 - 2014-11-23, 18:47

I didn't try such thing.
Don't think it's possible to remove current bonus ability "UNDEAD" in artefacts.

AVS - 2014-11-23, 22:38

marif wrote:
BTW. I am also looking for a way to disable 'UNDEAD' ability (by an artifact), but nothing seems to work. I tried:

Code:
        "bonuses":
        [
            {
                "type" : "UNDEAD",
                "val" : null
            }
        ]


and

Code:
        "bonuses":
        [
            {
                "type" : "UNDEAD": null
            }
        ]


but both of them do the opposite (make all creatures UNDEAD) - probably null is ignored (?), but at VCMI initialization the mod is not labeled as incorrect... If there was an 'IS_LIVING' ability, then I would do it by setting type to 'IS_LIVING' and limiting it to 'UNDEAD' creatures :p


This is other problem :) There is no way to revoke bonus. Also ""type" : "UNDEAD": null" is syntactically incorrect, no error in log = bug in json parser

marif - 2014-11-23, 23:06

Quote:
There is no LIVING bonus and it may be good idea to add it (I`ve seen a comment somewhere in codebase about presence such bonus in WoG`s creature exp mechanics).


Quote:
This is other problem :) There is no way to revoke bonus. Also ""type" : "UNDEAD": null" is syntactically incorrect, no error in log = bug in json parser


Well, I quietly hope you guys add those funcionalities to VCMI :)

Macron1 - 2014-11-24, 16:34

AVS wrote:
There is no LIVING bonus and it may be good idea to add it (I`ve seen a comment somewhere in codebase about presence such bonus in WoG`s creature exp mechanics).


Oh no, there will be need to manually correct all these jsons of creatures:-) What a pain! :evil:
All creatures by default are "LIVING". I think there will be mess, if there will be creatures with both LIVING and UNDEAD bonuses.
Maybe it's better to add bonuses that related to LIVING nature?
Like "AFFECTED_BY_MORALE","AFFECTED_BY_LUCK","AFFECTED_BY_HEALING"? Is this are all living creatures bonuses?

Macron1 - 2014-11-24, 16:45

Or another way i suggested long time ago.
We have DRAGON_NATURE, UNDEAD, NON_LIVING types of bonuses served as limiters.
I suggested adding customized type of limiters.
Like i will add something like
Code:

"limiters":{"types": {

"DEMON" :  {       
        {
             "abilities":
                  {
                      "fireImmunity":{"type":"FIRE_IMMUNITY",
                     "lessDamageFromSpellFireball":{   
                        "type":"MORE_DAMAGE_FROM_SPELL",
                       "val":-50,
                       "subtype":"spell.fireball"
                     }
}

                }
         }

    }

}

and if in creature json we see "type":"DEMON", VCMI will automatically assign this set of abilities to it.
Same can go for "LIVING" creature. Add list of abilities incorporated, and then
Code:
"abilityToBeLiving":{"type":"LIVING","limiter":"UNDEAD"}

Warmonger - 2014-11-24, 16:53

I think you don't understand what "Limiter" is in first place. Limiter, as the name suggests, limits propagation of boonuses over bonus system tree to some specific cases. It defines no additional behavior for anything.
AVS - 2014-11-24, 16:55

Macron1 wrote:
Or another way i suggested long time ago.
We have DRAGON_NATURE, UNDEAD, NON_LIVING types of bonuses served as limiters.
I suggested adding customized type of limiters.
Like i will add something like
...


I`m afraid U don`t understand what Limiter is.
What U suggest should be called Bonus (of Ability) Preset. However, I like the idea and will implement it in next version of "BonusType config".

Macron1 - 2014-11-24, 16:56

Warmonger wrote:
I think you don't understand what "Limiter" is in first place. Limiter, as the name suggests, limits propagation of boonuses over bonus system tree to some specific cases. It defines no additional behavior for anything.

Maybe it's so. It's more about template for creature abilities in my post.
For example, user may want to add custom limiter "IS_DEMON". Then he describes "DEMON" template of abilities.

Macron1 - 2014-12-29, 20:27

Want to brag.
Made VCMI to change appearances for Castle Town depending on terrains (http://www.forum.acidcave.net/topic.php?TID=2393, Sower work).
It is easy, you must only not forget to replace original templates (village,fort,citadel,castle,capitol) by new only grass templates.

Code:

{
    "core:castle" : {
        "town" : {
            "mapObject" : {
                "filters" : {
                    "village_dirt": ["noneOf", [ "fort" ]  ],
                    "fort_dirt" : [ "allOf", [ "fort" ], [ "noneOf", [ "citadel" ] ] ],
                    "citadel_dirt" : [ "allOf", [ "citadel" ], [ "noneOf", [ "castle" ] ] ],
                    "castle_dirt" : [ "allOf", [ "castle" ], [ "noneOf", [ "capitol" ] ] ],
                    "capitol_dirt" : [ "allOf", [ "castle"  ], [ "capitol"  ] ],
                   
                   
                    "village": ["noneOf", [ "fort" ]  ],
                    "fort" : [ "allOf", [ "fort" ], [ "noneOf", [ "citadel" ] ] ],
                    "citadel" : [ "allOf", [ "citadel" ], [ "noneOf", [ "castle" ] ] ],
                    "castle" : [ "allOf", [ "castle" ], [ "noneOf", [ "capitol" ] ] ],
                    "capitol" : [ "allOf", [ "castle"  ], [ "capitol"  ] ],
                   
                    "village_lava": ["noneOf", [ "fort" ]  ],
                    "fort_lava" : [ "allOf", [ "fort" ], [ "noneOf", [ "citadel" ] ] ],
                    "citadel_lava" : [ "allOf", [ "citadel" ], [ "noneOf", [ "castle" ] ] ],
                    "castle_lava" : [ "allOf", [ "castle" ], [ "noneOf", [ "capitol" ] ] ],
                    "capitol_lava" : [ "allOf", [ "castle"  ], [ "capitol"  ] ],
                   
                    "village_rough": ["noneOf", [ "fort" ]  ],
                    "fort_rough" : [ "allOf", [ "fort" ], [ "noneOf", [ "citadel" ] ] ],
                    "citadel_rough" : [ "allOf", [ "citadel" ], [ "noneOf", [ "castle" ] ] ],
                    "castle_rough" : [ "allOf", [ "castle" ], [ "noneOf", [ "capitol" ] ] ],
                    "capitol_rough" : [ "allOf", [ "castle"  ], [ "capitol"  ] ],
                   
                    "village_sand": ["noneOf", [ "fort" ]  ],
                    "fort_sand" : [ "allOf", [ "fort" ], [ "noneOf", [ "citadel" ] ] ],
                    "citadel_sand" : [ "allOf", [ "citadel" ], [ "noneOf", [ "castle" ] ] ],
                    "castle_sand" : [ "allOf", [ "castle" ], [ "noneOf", [ "capitol" ] ] ],                   
                    "capitol_sand" : [ "allOf", [ "castle"  ], [ "capitol"  ] ],
                   
                    "village_snow": ["noneOf", [ "fort" ]  ],
                    "fort_snow" : [ "allOf", [ "fort" ], [ "noneOf", [ "citadel" ] ] ],
                    "citadel_snow" : [ "allOf", [ "citadel" ], [ "noneOf", [ "castle" ] ] ],
                    "castle_snow" : [ "allOf", [ "castle" ], [ "noneOf", [ "capitol" ] ] ],       
                    "capitol_snow" : [ "allOf", [ "castle"  ], [ "capitol"  ] ],
                   
                    "village_subterra": ["noneOf", [ "fort" ]  ],
                    "fort_subterra" : [ "allOf", [ "fort" ], [ "noneOf", [ "citadel" ] ] ],
                    "citadel_subterra" : [ "allOf", [ "citadel" ], [ "noneOf", [ "castle" ] ] ],
                    "castle_subterra" : [ "allOf", [ "castle" ], [ "noneOf", [ "capitol" ] ] ],   
                    "capitol_subterra" : [ "allOf", [ "castle"  ], [ "capitol"  ] ],
                   
                    "village_swamp": ["noneOf", [ "fort" ]  ],
                    "fort_swamp" : [ "allOf", [ "fort" ], [ "noneOf", [ "citadel" ] ] ],
                    "citadel_swamp" : [ "allOf", [ "citadel" ], [ "noneOf", [ "castle" ] ] ],
                    "castle_swamp" : [ "allOf", [ "castle" ], [ "noneOf", [ "capitol" ] ] ],                       
                    "capitol_swamp" : [ "allOf", [ "castle"  ], [ "capitol"  ] ],
                    },
                "templates" : {
                    "village_dirt": {"allowedTerrains":["dirt"], "animation" : "newlook_castle/CastleDirtHall.def"},
                    "fort_dirt" : {"allowedTerrains":["dirt"], "animation" : "newlook_castle/CastleDirtCastle1.def"},
                    "citadel_dirt" : {"allowedTerrains":["dirt"], "animation" : "newlook_castle/CastleDirtCastle2.def"},
                    "castle_dirt" : {"allowedTerrains":["dirt"], "animation" : "newlook_castle/CastleDirtCastle3.def"},
                    "capitol_dirt" : {"allowedTerrains":["dirt"], "animation" : "newlook_castle/CastleDirtCastle3F.def"},

                    "village": {"allowedTerrains":["grass"], "animation" : "newlook_castle/CastleGrassHall.def"},
                    "fort" : {"allowedTerrains":["grass"], "animation" : "newlook_castle/CastleGrassCastle1.def"},
                    "citadel" : {"allowedTerrains":["grass"], "animation" : "newlook_castle/CastleGrassCastle2.def"},
                    "castle" : {"allowedTerrains":["grass"], "animation" : "newlook_castle/CastleGrassCastle3.def"},
                    "capitol" : {"allowedTerrains":["grass"], "animation" : "newlook_castle/CastleGrassCastle3F.def"},

                    "village_lava": {"allowedTerrains":["lava"], "animation" : "newlook_castle/CastleLavaHall.def"},
                    "fort_lava" : {"allowedTerrains":["lava"], "animation" : "newlook_castle/CastleLavaCastle1.def"},
                    "citadel_lava" : {"allowedTerrains":["lava"], "animation" : "newlook_castle/CastleLavaCastle2.def"},
                    "castle_lava" : {"allowedTerrains":["lava"], "animation" : "newlook_castle/CastleLavaCastle3.def"},
                    "capitol_lava" : {"allowedTerrains":["lava"], "animation" : "newlook_castle/CastleLavaCastle3F.def"},

                    "village_rough": {"allowedTerrains":["rough"], "animation" : "newlook_castle/CastleRoughHall.def"},
                    "fort_rough" : {"allowedTerrains":["rough"], "animation" : "newlook_castle/CastleRoughCastle1.def"},
                    "citadel_rough" : {"allowedTerrains":["rough"], "animation" : "newlook_castle/CastleRoughCastle2.def"},
                    "castle_rough" : {"allowedTerrains":["rough"], "animation" : "newlook_castle/CastleRoughCastle3.def"},
                    "capitol_rough" : {"allowedTerrains":["rough"], "animation" : "newlook_castle/CastleRoughCastle3F.def"},

                    "village_sand": {"allowedTerrains":["sand"], "animation" : "newlook_castle/CastleSandHall.def"},
                    "fort_sand" : {"allowedTerrains":["sand"], "animation" : "newlook_castle/CastleSandCastle1.def"},
                    "citadel_sand" : {"allowedTerrains":["sand"], "animation" : "newlook_castle/CastleSandCastle2.def"},
                    "castle_sand" : {"allowedTerrains":["sand"], "animation" : "newlook_castle/CastleSandCastle3.def"},
                    "capitol_sand" : {"allowedTerrains":["sand"], "animation" : "newlook_castle/CastleSandCastle3F.def"},

                    "village_snow": {"allowedTerrains":["snow"], "animation" : "newlook_castle/CastleSnowHall.def"},
                    "fort_snow" : {"allowedTerrains":["snow"], "animation" : "newlook_castle/CastleSnowCastle1.def"},
                    "citadel_snow" : {"allowedTerrains":["snow"], "animation" : "newlook_castle/CastleSnowCastle2.def"},
                    "castle_snow" : {"allowedTerrains":["snow"], "animation" : "newlook_castle/CastleSnowCastle3.def"},
                    "capitol_snow" : {"allowedTerrains":["snow"], "animation" : "newlook_castle/CastleSnowCastle3F.def"},

                    "village_swamp": {"allowedTerrains":["swamp"], "animation" : "newlook_castle/CastleSwampHall.def"},
                    "fort_swamp" : {"allowedTerrains":["swamp"], "animation" : "newlook_castle/CastleSwampCastle1.def"},
                    "citadel_swamp" : {"allowedTerrains":["swamp"], "animation" : "newlook_castle/CastleSwampCastle2.def"},
                    "castle_swamp" : {"allowedTerrains":["swamp"], "animation" : "newlook_castle/CastleSwampCastle3.def"},
                    "capitol_swamp" : {"allowedTerrains":["swamp"], "animation" : "newlook_castle/CastleSwampCastle3F.def"},

                    "village_subterra": {"allowedTerrains":["subterra"], "animation" : "newlook_castle/CastleSubterraHall.def"},
                    "fort_subterra" : {"allowedTerrains":["subterra"], "animation" : "newlook_castle/CastleSubterraCastle1.def"},
                    "citadel_subterra" : {"allowedTerrains":["subterra"], "animation" : "newlook_castle/CastleSubterraCastle2.def"},
                    "castle_subterra" : {"allowedTerrains":["subterra"], "animation" : "newlook_castle/CastleSubterraCastle3.def"},
                    "capitol_subterra" : {"allowedTerrains":["subterra"], "animation" : "newlook_castle/CastleSubterraCastle3F.def"},                   
                }
            }
        }
    }
}

Some color disruption of castle looks is some bug in VCMI (common to HOTA mod - they used system colors for graphics)

Andruids - 2015-10-27, 13:26

Hello everyone.

I tried to make an ability that could effectively jam the spellcasting of other creatures. Problem is, it affects only the maximum casts of the stack, not its current one so it's practically useless.

E.g. Fairy Dragon has a line displaying "Spells: 5". After being hit with this effect it changes to "Spells: 2 (5)". So it decreased his maximum casts and nothing else. He will still doll out all 5 of his magical beatings like nothing happened.

Here's how it's written:
Code:
    "jammer":
    {
    "type" : "CASTS",
    "val" : -3,
    "valueType" : "ADDITIVE_VALUE",
    "duration" : "N_TURNS",
    },


Any suggestions?

Warmonger - 2015-10-27, 13:56

Currently impossible, spell counter is separate from CASTS bonus and can't be modified by Bonus system at all. Same is true for shots, conunterstrikes and possibly more.
Macron1 - 2015-10-27, 14:55

Andruids wrote:

E.g. Fairy Dragon has a line displaying "Spells: 5". After being hit with this effect it changes to "Spells: 2 (5)". So it decreased his maximum casts and nothing else. He will still doll out all 5 of his magical beatings like nothing happened.

Any suggestions?


yes, i also tried to play "type" : "CASTS" and get nothing.
You can also try
Code:
{"type":"CASTS",
"valueType":"BASE_NUMBER",
"val":0,
"duration":"N_TURNS"
}


Or
Code:
{"type":"CASTS",
"valueType":"PERCENT_TO_ALL",
"val":-100,
"duration":"N_TURNS"
}

Andruids - 2015-10-27, 15:59

Thanks for quick reply!

Shame it can't properly work right now, but if it will in future, it could be very useful and unique ability.

I'll try not to bugger you too often but I have one last concern. I can't make ADDITIVE_VALUE work as intended. Be it with afore-mentioned ability or some other one, all I can achieve is reducing creature's statistic by defined value and not one point further. On older version of VCMI Disrupting Ray didn't work at all, but it does after updating to 0.98d and it was written just like in my code (just with different "type"). Am I missing something obvious?

Macron1 - 2015-10-27, 17:03

Andruids wrote:
Thanks for quick reply!

Shame it can't properly work right now, but if it will in future, it could be very useful and unique ability.

I'll try not to bugger you too often but I have one last concern. I can't make ADDITIVE_VALUE work as intended. Be it with afore-mentioned ability or some other one, all I can achieve is reducing creature's statistic by defined value and not one point further. On older version of VCMI Disrupting Ray didn't work at all, but it does after updating to 0.98d and it was written just like in my code (just with different "type"). Am I missing something obvious?


?
ADDITIVE_VALUE should work as you say - is it summed with parameter value. If you want to make -2 to defence (val:-2,"valueType":"ADDITIVE_VALUE"), it will make -2 to defence (don't remember but it will be lowered to 0 as there are no negative stat params allowed.

PS On primary params on older versions PERCENT_TO_ALL doesnt work. On most recent version didnt tested it yet. I tried to make artefact with bonus
Code:
{
"type":"PRIMARY_SKILL",
"subtype":2,
"val":100,
"valueType":"PERCENT_TO_ALL"
}

and it didnt icrease spell power by 100% :evil:

Andruids - 2016-04-03, 04:09

Hi everyone.

Opening my experimental town in a map editor got me excited, so I played around with some new ideas. One of them is an ability to turn foes to ice. That's just a "stone gaze"/"paralysis" but with a twist. Attacking frozen unit would shatter it and make it lose its top stack, not unlike the Mighty Gorgon's DEATH_STARE. I think it's doable, but I lack some kind of limiter.
When I tried wishful thinking, I got a yellow message "Adding new bonuses not implemented" (shoot), so I thought I'll ask here. What would I need to do to change the list of standard bonuses? I thought this shouldn't be too hard, it wouldn't even do anything, just be there and serve as a flag.

Warmonger - 2016-04-03, 12:05

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.
Andruids - 2016-04-04, 15:56

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.
Code:
            "Snow Stealth" :
            {
                "type" : "BLOCKS_RETALIATION",
                "sourceType" : "TERRAIN_OVERLAY",   
                "sourceID" : 4
            }

Warmonger - 2016-06-01, 06:34

Andruids wrote:
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.
Code:
            "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.

misiokles - 2016-09-06, 15:45

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:

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:
http://www108.zippyshare.com/v/LqGfs02q/file.html

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

Draeganfire - 2016-12-06, 16:20

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)
misiokles - 2016-12-06, 16:32

You must remember that in mod.json file (below content folder) you must write patch do your hero.json.
For example:
Code:
"heroes" :
    [
        "config/fairy/heroes/yourHeroName.json",

        ]

Draeganfire - 2017-02-09, 01:23
Post subject: Town Screen creation in regards to Death Valley project.
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?
val-gaav - 2017-02-09, 13:18

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.

misiokles - 2017-02-09, 15:53
Post subject: Re: Town Screen creation in regards to Death Valley project.
Draeganfire wrote:
his 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?


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.

Draeganfire - 2017-02-09, 18:00

Awesome guys~ Helps out a lot :-)
val-gaav - 2017-02-10, 21:49

@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?

Draeganfire - 2017-02-10, 22:28

@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

val-gaav - 2017-02-11, 00:15

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.

Draeganfire - 2017-02-12, 02:46

I only noticed Paint.net after you asked the question....lol....so don't feel bad, I wasn't picking on you
misiokles - 2017-02-12, 19:10

val-gaav wrote:

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?


Hard to say, because we have only one (ufinished) town using full (800x374) png transparency files. Check Silaneo's Necro Town:
http://heroescommunity.co...D=1401358#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.

misiokles - 2017-03-16, 20:15

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 ?
Warmonger - 2017-03-16, 20:34

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

SPECIAL_PECULIAR_ENCHANT is or peculiar enchantment spells as stated in Strategija:
Quote:
Loynis' Prayer specialty gives an additional +3 speed, attack and defense to levels 1-2, +2 levels 3-4, +1 levels 5-6 and no bonuses to level 7.
Terek/Cyra/Brissa's Haste specialty gives an additional +3 speed to level 1-2, +2 levels 3-4, +1 levels 5-6 and no speed to level 7.
Coronius' Slayer specialty gives an additional +4 attack to level 1, +3 level 2, +2 level 3, +1 level 4, no attack to levels 5-6-7.
Zubin's Precision specialty gives an additional +3 attack to ranged levels 1-2, +2 levels 3-4, +1 levels 5-6, no attack to level 7.
Daremyth and Melodia's Fortune specialty enables them to cast a +3 Luck Fortune spell regardless of Air magic expertise.
Xsi, Darkstorn, Merist and Labetha's Stoneskin specialty gives an additional +3 defense to levels 1-2, +2 levels 3-4, +1 levels 5-6 and no defense to level 7.
Ash and Inteus' Bloodlust specialty gives an additional +3 attack to levels 1-2, +2 levels 3-4, +1 levels 5-6 and no attack to level 7.

And so on.

SPECIAL_BLESS_DAMAGE is Adela's ability
Quote:
Adela's Bless specialty adds BD * 0,03 * Hero level / Unit level damage to all units on top of the Bless spell. E.g., at level 18, Adela will provide (in average) 54% bonus damage to Halberdiers, 27% to Marksmen, 18% to Royal Griffins, 13,5% to Crusaders, 10,8% to Zealots, 9% to Champions, and 7,1% to Archangels.

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.

misiokles - 2017-03-17, 08:14

So, all there four commands work with other spells, right?
Draeganfire - 2017-05-02, 17:28
Post subject: Team Death Valley Question
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?
AVS - 2017-05-02, 19:24
Post subject: Re: Team Death Valley Question
Draeganfire wrote:
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

Draeganfire - 2017-05-02, 20:42

by "unlocking " I only meant the Awakening would make available the secondary upgrade. In essence the Awakening structure would add an additional upgrade to each creature. Sorry sometimes things sound simpler in my head than in type.
AVS - 2017-05-02, 21:14

Draeganfire wrote:
by "unlocking " I only meant the Awakening would make available the secondary upgrade. In essence the Awakening structure would add an additional upgrade to each creature. Sorry sometimes things sound simpler in my head than in type.


So it adds 7 more creatures or one more independent population of existing upgrdes?

Draeganfire - 2017-05-02, 21:27

7 more, one for each dwelling.
AVS - 2017-05-02, 21:52

Draeganfire wrote:
7 more, one for each dwelling.


You may try add 7 more dwelling buildings (without structures - invisible) with "auto" build mode, each depends on basic dwelling and Awakening.

Draeganfire - 2017-05-02, 22:01

Sounds like an idea!!! Thanks!

Powered by phpBB modified by Przemo © 2003 phpBB Group