Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unacceptable how hero specialty work for modding #3949

Open
madaosoul opened this issue May 12, 2024 · 3 comments
Open

Unacceptable how hero specialty work for modding #3949

madaosoul opened this issue May 12, 2024 · 3 comments

Comments

@madaosoul
Copy link

Hero specialty in 1.5 allows for a default creature specialty + exactly one bonus that is defined with VCMI bonus system.

So if you want to create a hero that specializes in two spells (this should be doable, and I'm 90% sure this was possible before some new bonus format nonsense was added), one spell boost is overwritted by the other. And if you want your hero to boost two primary skills, then ... too bad, you only get one.

To reproduce:
make a mod with a hero who's specialty does two things (different from the default creature specialty) and observe that it only does one of them. For example:

	"specialty": 
	{
		"bonuses" : {


			"shild" : {
				"subtype" : "primSkill.defence",
				"type" : "PRIMARY_SKILL",
				"val" : 1,
				"updater" : "TIMES_HERO_LEVEL"
			},
			
			"sord" : {
				"subtype" : "primSkill.attack",
				"type" : "PRIMARY_SKILL",
				"val" : 1,
				"updater" : "TIMES_HERO_LEVEL"
			}
		}
	}
@madaosoul madaosoul added the bug label May 12, 2024
@DjWarmonger DjWarmonger added the rmg Random map generator label May 12, 2024
@dydzio0614 dydzio0614 added modding and removed rmg Random map generator labels May 12, 2024
@henningkoehlernz
Copy link
Collaborator

I'm running a mod that adds multiple bonuses as hero specialty, and it works just fine:
https://github.com/henningkoehlernz/vcmi-mods/blob/master/boost_core/Content/config/boost_core/heroes/castle.json

@henningkoehlernz
Copy link
Collaborator

henningkoehlernz commented May 21, 2024

It looks like the problem is with using multiple TIMES_HERO_LEVEL updaters - only the first instance seems to trigger. Things work fine when replacing one of the updates with

"updater" : {
    "parameters" : [ 20 ],
    "type" : "GROWS_WITH_LEVEL"
}

@madaosoul
Copy link
Author

Right, confirmed that format posted by hkoehlernz indeed works. Thanks to that, Pavillion's tent specialist will still heal more with upgraded tents. And with that, it's possible to make infinite number of bonuses. But it's still kind of non-intuitive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants