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

FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  StatisticsStatistics
RegisterRegister  Log inLog in  AlbumAlbum  DownloadDownload

Previous topic :: Next topic
Spell damage modding
Author Message
hkoehler

Joined: 11 Jul 2017
Posts: 14
Posted: 2017-07-22, 12:40   Spell damage modding

When modding power of spells (lightning bolt, fireball, etc.) via spells.json, the in-game description shows the desired damage amount, but the actual damage dealt is unaffected. Example extract of modded spells.json is below - am I missing something?
Code:

"fireball" : {
    "index" : 21,
    "targetType": "LOCATION",
    "power" : 20,
   
    "animation":{
        "hit":["C13SPF"] //C13SPF0 ???
    },     
    "sounds": {
        "cast": "SPONTCOMB"
    },
    "levels" : {
        "base":{
            "range" : "0,1",
            "targetModifier":{"smart":false}
        },
       "none" : { "power" : 20 },
        "basic" : { "power" : 20 },
        "advanced" : { "power" : 100 },
        "expert" : { "power" : 200 },
    },
    "flags" : {
        "damage": true,
        "offensive": true,
        "negative": true
    },
    "immunity" : {
        "DIRECT_DAMAGE_IMMUNITY": true
    }
},

The only new lines are those with the word "power" in them.
 
     
AVS 

Joined: 25 Feb 2011
Posts: 561
Location: Russia
Posted: 2017-07-22, 20:05   Re: Spell damage modding

hkoehler wrote:
When modding power of spells (lightning bolt, fireball, etc.) via spells.json, the in-game description shows the desired damage amount, but the actual damage dealt is unaffected. Example extract of modded spells.json is below - am I missing something?
Code:

"fireball" : {
    "index" : 21,
    "targetType": "LOCATION",
    "power" : 20,
   
    "animation":{
        "hit":["C13SPF"] //C13SPF0 ???
    },     
    "sounds": {
        "cast": "SPONTCOMB"
    },
    "levels" : {
        "base":{
            "range" : "0,1",
            "targetModifier":{"smart":false}
        },
       "none" : { "power" : 20 },
        "basic" : { "power" : 20 },
        "advanced" : { "power" : 100 },
        "expert" : { "power" : 200 },
    },
    "flags" : {
        "damage": true,
        "offensive": true,
        "negative": true
    },
    "immunity" : {
        "DIRECT_DAMAGE_IMMUNITY": true
    }
},

The only new lines are those with the word "power" in them.


" "expert" : { "power" : 200 }," - remove comma on the end of line
 
     
hkoehler

Joined: 11 Jul 2017
Posts: 14
Posted: 2017-07-22, 21:37   Re: Spell damage modding

AVS wrote:
" "expert" : { "power" : 200 }," - remove comma on the end of line

While technically that does cause an invalid json format, the parser seems well able to handle it, and the displayed power does update. So not really the issue here.
 
     
AVS 

Joined: 25 Feb 2011
Posts: 561
Location: Russia
Posted: 2017-07-23, 03:35   

Just remove that comma and test once more.
 
     
hkoehler

Joined: 11 Jul 2017
Posts: 14
Posted: 2017-07-23, 12:38   

Wow, I stand corrected - that did fix it. Thanks for that. Feel like a moron now for making assumptions without testing them.
 
     
Display posts from previous:   
Reply to topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
Add this topic to your bookmarks
Printable version

Jump to:  

Powered by phpBB modified by Przemo © 2003 phpBB Group

Hosting provided by DigitalOcean
Page generated in 0.02 second. SQL queries: 12