Question: is now for adventure map objects I cannot change standard text appearing?
I want to make Water Wheel - like object (Farm, subid object of Water Wheel), but to change text, that is showed when visiting.
I’ve installed latest 9,7c version with some basic mods (like wog and Hota) instaled automaticly.
I tried to modify mods a little bit. Tried change some “def” graphics but the problem is: I can’t find those mods and def folders. Tried to find in “Mods” folder but without succeed.
In game everything works fine. I’ve got commanders, I’ve got new Hota city- and that is very cool. Problem is: I cant find def graphics for mods…
As i can see in sources github.com/vcmi/vcmi/blob/devel … ructor.cpp
JSON configuration for new/modified standard map objects is already implemented.
But there are no examples how how to use these features.
Have someone messed with adding new rewardable objects?
Can help be added to Wiki?
Does VCMI support recruiting multiple units from one building in town? I want one building upgrade to add two possible units to buy, same as upgrades in heroes 5: tribes of the east, looks like it does not work.
Because you must do two buildings for 2 units.
Like “building43” is upgrade for “building36”, you add it to hallSlots and assign it “redDragon” on 7th level.
Then you add “building50”, in “structures” write “requires”: “building43”], “mode”:“auto”.
then don’t write it to hallSlots, but assign “blackDragon” to 3rd unit of level 7.
When 43 building builds, 50 building will be built automatically.
Example:
BUILDINGS.JSON
"building43": {
"id": 43,
"upgrades": "building36",
"requires" : "allOf" , "building2"]],
"cost": {
"gold": 10000,
"ore": 15,
"sulfur": 20
},
"description" : "Black Tower allows to recruit Red and Black Dragons.",
"name" : "Black Tower"
},
"building50": {
"id": 50,
"mode": "auto",
"upgrades":"building43",
"cost": {
"gold": 10000,
"ore": 15,
"sulfur": 20
},
"description" : "Black Tower allows to recruit Red and Black Dragons.",
"name" : "Black Tower"
}
Have no one here experienced modding rewardable objects?
I tried to construct JSON from sources reading on GitHub, I got this object (I tried to recreate full structure of “rewards”), but it don’t work (when visiting him on map I got only 1 empty message with OK button.
Where I am wrong?
{
//"core:learningStone": {
"someHistoryMuseum": {
"handler": "oncePerHero",
"name": "Museum Level 1",
"types": {
"ModernSomeMuseum01": {
//"soundID": 1,
"resetDuration": 0,
"canRefuse": true,
"onSelectMessage": "You must pay 200 gold to visit exposition of this museum of history.",
"onVisitedMessage": "You already had visited this museum in past and have no time or wish to visit it again.",
"onEmptyMessage": "This museum was closed due to budget shorting, and now only wind blows in these walls.",
"rewards":
{
"dice": 1.0,
"appearChance": {
"min": 25,
"max": 30
},
"limiter": {
//"numOfGrants": 0,
//"dayOfWeek": 0,
//"minLevel": 1,
"resources": {
"gold": 200
},
//"primary": {
"attack": 0,
"defence": 0,
"spellPower": 0,
"knowledge": 0
},
//"secondary": {
"necromancy": "basic"
},
//"artifacts":
],
//"creatures":
],
},
//"resources": {
"gold": 100
},
"gainedExp": 1000,
//"gainedLevels": 0,
//"manaPoints": 0,
//"manaPercentage": 0,
//"movePoints": 0,
//"movePercentage": 0,
//"primary": {
"attack": 0,
"defence": 0,
"spellPower": 0,
"knowledge": 0
},
//"secondary": {
{
"skill": "necromancy",
"level": "basic"
}
},
//"artifacts":
],
//"spells":
],
//"creatures":
],
"message": "You have visited museum exposition, and now your knowledge of the world is getting up.",
"selectChance": 60,
},
{
"dice": 1.0,
"appearChance": {
"min": 25,
"max": 30
},
"limiter": {
//"numOfGrants": 0,
//"dayOfWeek": 0,
//"minLevel": 1,
"resources": {
"gold": 200
},
//"primary": {
"attack": 0,
"defence": 0,
"spellPower": 0,
"knowledge": 0
},
//"secondary": {
"necromancy": "basic"
},
//"artifacts":
],
//"creatures":
],
},
//"resources": {
"gold": 100
},
"gainedExp": 1500,
//"gainedLevels": 0,
//"manaPoints": 0,
//"manaPercentage": 0,
//"movePoints": 0,
//"movePercentage": 0,
//"primary": {
"attack": 0,
"defence": 0,
"spellPower": 0,
"knowledge": 0
},
//"secondary": {
"necromancy": "basic"
},
//"artifacts":
],
//"spells":
],
//"creatures":
],
"message": "You have visited museum exposition, and now your knowledge of the world is getting up.",
"selectChance": 60,
},
{
"dice": 1.0,
"appearChance": {
"min": 25,
"max": 30
},
"limiter": {
//"numOfGrants": 0,
//"dayOfWeek": 0,
//"minLevel": 1,
"resources": {
"gold": 200
},
//"primary": {
"attack": 0,
"defence": 0,
"spellPower": 0,
"knowledge": 0
},
//"secondary": {
"necromancy": "basic"
},
//"artifacts":
],
//"creatures":
],
},
//"resources": {
"gold": 100
},
"gainedExp": 1200,
//"gainedLevels": 0,
//"manaPoints": 0,
//"manaPercentage": 0,
//"movePoints": 0,
//"movePercentage": 0,
//"primary": {
"attack": 0,
"defence": 0,
"spellPower": 0,
"knowledge": 0
},
//"secondary": {
"necromancy": "basic"
},
//"artifacts":
],
//"spells":
],
//"creatures":
],
"message": "You have visited museum exposition, and now your knowledge of the world is getting up.",
"selectChance": 60,
},
{
"dice": 1.0,
"appearChance": {
"min": 25,
"max": 30
},
"limiter": {
//"numOfGrants": 0,
//"dayOfWeek": 0,
//"minLevel": 1,
"resources": {
"gold": 200
},
//"primary": {
"attack": 0,
"defence": 0,
"spellPower": 0,
"knowledge": 0
},
//"secondary": {
"necromancy": "basic"
},
//"artifacts":
],
//"creatures":
],
},
//"resources": {
"gold": 100
},
"gainedExp": 800,
//"gainedLevels": 0,
//"manaPoints": 0,
//"manaPercentage": 0,
//"movePoints": 0,
//"movePercentage": 0,
//"primary": {
"attack": 0,
"defence": 0,
"spellPower": 0,
"knowledge": 0
},
//"secondary": {
"necromancy": "basic"
},
//"artifacts":
],
//"spells":
],
//"creatures":
],
"message": "You have visited museum exposition, and now your knowledge of the world is getting up.",
"selectChance": 60,
},
],
"name": "Museum Level 1",
"rmg": {
"zoneLimit": 3333,
"value": 500,
"rarity": 80
},
"templates": {
"138F": {
"animation": "test/objects/someMuseum/138F",
"visitableFrom":
"---",
"+++",
"+++"
],
"mask":
"VVVVVV",
"BBBBBV",
"BBBBBB",
"VABBVV"
],
"allowedTerrains":
"grass",
"rough",
"dirt"
]
},
},
},
}
}
}
{
"someHistoryMuseum": {
"handler": "oncePerHero",
"name": "Museum Level 1",
"types": {
"ModernSomeMuseum01": {
"resetDuration": 0,
"canRefuse": true,
"onSelectMessage": "You must pay 200 gold to visit exposition of this museum of history.",
"onVisitedMessage": "You already had visited this museum in past and have no time or wish to visit it again.",
"onEmptyMessage": "This museum was closed due to budget shorting, and now only wind blows in these walls.",
"rewards":
{
"dice": 1,
"appearChance": {
"min": 25,
"max": 30
},
"limiter": {
"resources": {
"gold": 200
}
},
"gainedExp": 1000,
"message": "You have visited museum exposition, and now your knowledge of the world is getting up.",
"selectChance": 60
},
{
"dice": 1,
"appearChance": {
"min": 25,
"max": 30
},
"limiter": {
"resources": {
"gold": 200
}
},
"gainedExp": 1700,
"message": "You have visited museum exposition, and now your knowledge of the world is getting up.",
"selectChance": 60
},
{
"dice": 1,
"appearChance": {
"min": 25,
"max": 30
},
"limiter": {
"resources": {
"gold": 200
}
},
"gainedExp": 1300,
"message": "You have visited museum exposition, and now your knowledge of the world is getting up.",
"selectChance": 60
},
{
"dice": 1,
"appearChance": {
"min": 25,
"max": 30
},
"limiter": {
"resources": {
"gold": 200
}
},
"gainedExp": 1500,
"message": "You have visited museum exposition, and now your knowledge of the world is getting up.",
"selectChance": 60
}
],
"name": "Museum Level 1",
"rmg": {
"zoneLimit": 3333,
"value": 500,
"rarity": 80
},
"templates": {
"138F": {
"animation": "test/objects/someMuseum/138F",
"visitableFrom":
"---",
"+++",
"+++"
],
"mask":
"VVVVVV",
"BBBBBV",
"BBBBBB",
"VABBVV"
],
"allowedTerrains":
"grass",
"rough",
"dirt"
]
}
}
}
}
}
}
If you want 4 rewards with 25% probability each (only 1 reward at time), set “dice”: 1 for all and min-max to 0-25, 26-50 etc.
Or you may set different “dice” and identical chance 0-25, then you get 25% chance for each reward independently.
Yes, but currently user is asked to calculate incremental sum on his own. So if you decide to change one value, you need to change another accordingly.
Thanks for explanation. This idea requires think over more. One question is how to define “empty” reward: explicitly for each dice? Or leave sum hardcoded to 100 and only change range to probability.