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
Modding FAQ
Author Message
Warmonger 
VCMI programmer


Age: 28
Joined: 07 Jun 2008
Posts: 1537
Location: Warsaw, Poland
Posted: 2017-03-25, 10:28   

Macron1 wrote:
By the way, I have a question.
If i'll set
Code:

{
"type":"SPELL_IMMUNITY",
"subtype":"spell.visions"
}

to hero, will it be immune to Visions spell?

No. Immunity for Vision is never checked.
_________________
Think twice if you really need to send me private message. Use public forum for general questions.
DJ Warmonger blog
beegee wrote:
Warmonger, you are the best!
 
 
     
AVS 

Joined: 25 Feb 2011
Posts: 553
Location: Russia
Posted: 2017-03-26, 05:24   

Macron1 wrote:
By the way, I have a question.
If i'll set
Code:

{
"type":"SPELL_IMMUNITY",
"subtype":"spell.visions"
}

to hero, will it be immune to Visions spell?

No immunities do not work on adventure spells.
 
     
misiokles 

Joined: 12 Nov 2015
Posts: 165
Posted: 2017-05-18, 09:10   

I wanted to introduce HotA's Warehouses into VCMI. So I've written code:

Code:
{
    "warehouses" :{   
        "name": "Warehouses",
        "handler": "oncePerWeek",
        "types" : {
            "crystalWarehouse" : {
                "name": "Warehouse of Crystal",
                "producedResources" : "crystal",
                "producedValue" : 6,
                "rmg" : {
                    "value"        : 500,
                    "rarity"    : 70
                },
                "templates" : {
                    "avwrhscr" : { "animation" : "avwrhscr",
                    "visitableFrom" : [ "---", "+++", "+++" ],
                    "mask" : ["0VV","VVV","VBA"],
//                    "allowedTerrains": ["sand"]
                    }                   
                }
            }           
        }   
    }
}


In random maps object appears, can be visited but doesn't produce anything... Any ideas what is wrong?
 
     
Warmonger 
VCMI programmer


Age: 28
Joined: 07 Jun 2008
Posts: 1537
Location: Warsaw, Poland
Posted: 2017-05-18, 09:34   

Nothing is wrong, adding objects with new properties is not supported.
_________________
Think twice if you really need to send me private message. Use public forum for general questions.
DJ Warmonger blog
beegee wrote:
Warmonger, you are the best!
 
 
     
misiokles 

Joined: 12 Nov 2015
Posts: 165
Posted: 2017-05-18, 19:25   

But I suggested the example from wiki:
http://wiki.vcmi.eu/index...ect_type_format

In town section code "produce" is working, so I thought that "producedResources" and "producedValue" work too...
 
     
AVS 

Joined: 25 Feb 2011
Posts: 553
Location: Russia
Posted: 2017-05-19, 05:04   

misiokles wrote:
But I suggested the example from wiki:
http://wiki.vcmi.eu/index...ect_type_format

In town section code "produce" is working, so I thought that "producedResources" and "producedValue" work too...


Handler "oncePerWeek" has no configuration. It used only for MYSTICAL_GARDEN, WINDMILL, WATER_WHEEL

For new objects please try to use "configurable" handler, it is undocumented though.
 
     
AVS 

Joined: 25 Feb 2011
Posts: 553
Location: Russia
Posted: 2017-05-19, 05:11   

The code located here: https://github.com/vcmi/vcmi/blob/develop/lib/mapObjects/CRewardableConstructor.cpp#L47
 
     
Warmonger 
VCMI programmer


Age: 28
Joined: 07 Jun 2008
Posts: 1537
Location: Warsaw, Poland
Posted: 2017-05-19, 07:17   

Keep in mind that someday this code might be finished, refactored and current not-supported mods might stop working.
_________________
Think twice if you really need to send me private message. Use public forum for general questions.
DJ Warmonger blog
beegee wrote:
Warmonger, you are the best!
 
 
     
misiokles 

Joined: 12 Nov 2015
Posts: 165
Posted: 2017-05-19, 08:22   

Noted that, thank you both guys!
 
     
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