Skill Modding

Mods and development for mods. Including WoG & Equilibris (RU) subforums.
^Dagon^
Leprechaun
Leprechaun
Posts: 46
Joined: 29 May 2006

Skill Modding

Unread postby ^Dagon^ » 13 Dec 2006, 14:26

I have two questions:

1) It has been said that each hero type has a certain chance to learn a particular skill, for example Defence (see skill wheel). Does anyone know where this information is contained?

2) If I want to make changes to the skills that can be learned by each class, is it enough to modify the file Game Mechanics/Skill/*.*, or there are more references that need to be edited?

Neckie
Peasant
Peasant
Posts: 67
Joined: 05 Oct 2006
Location: Quebec, Canada

Unread postby Neckie » 13 Dec 2006, 15:43

Well it depends if you are using the expansion or not.

For HoF :
1) GameMechanics/RefTables/HeroClass.xdb
2) GameMechanics/RefTables/Skills.xdb

Else :

1) dunno where those probability are stored... the file structure isn't exactly the same than with HoF. Someone else might have the answer.
2) I guess here you only have to change the file GameMechanics/RefTables/Skills.xdb but if it doesn't work you'll have to edit the Game Mechanics/Skill/ files also.

conclusion : its easier with HoF :D

User avatar
Sir_Toejam
Nightmare
Nightmare
Posts: 1061
Joined: 24 Jul 2006

Unread postby Sir_Toejam » 13 Dec 2006, 23:31

yes the probabilites for attributes and skills are contained in the heroclass file, but I haven't yet tested whether changing the values in HOF does what one would expect.

^Dagon^
Leprechaun
Leprechaun
Posts: 46
Joined: 29 May 2006

Unread postby ^Dagon^ » 20 Dec 2006, 09:26

I think changing the skills themselves is not enough. There is a file inside the 'Reference Tables' folder called 'skills.xdb'. Is it needed to be changed too? I see there are already some mods changing requirements etc so there must be someone knowing how to edit such things.
As for the probability for each skill to be learned, since I don't have the expansion yet I have to search somewhere else. In Heroes II those probabilities where on the .exe (as well as most other things) and I was able to successfuly edit them (if anyone wants to know about Heroes II modding please tell me). It would be of great help if anyone could tell the range of these probabilities (I mean which is the least chance - I suppose 0, and the most one), since they may be stored in a way such as the following:

02030005060202...

If this is the case, they must not be too hard to track.

Neckie
Peasant
Peasant
Posts: 67
Joined: 05 Oct 2006
Location: Quebec, Canada

Unread postby Neckie » 20 Dec 2006, 13:32

I modified the skills.xdb file for a mod to change the dwarf skills at Elrath forum.

Its not very complicated you can search for a specific skill like :
HERO_SKILL_GRAIL_VISION

then look at what the skill needs to be learned. It will look like this:

Code: Select all

				<SkillPrerequisites>
					<Item>
						<Class>HERO_CLASS_KNIGHT</Class>
						<dependenciesIDs>
							<Item>HERO_SKILL_FORTUNATE_ADVENTURER</Item>
						</dependenciesIDs>
					</Item>
if you want to edit the skill on which it depends change HERO_SKILL_FORTUNATE_ADVENTURER for something else. If you want to remove a skill from being learned for a particular class you can remove the whole

Code: Select all

 					<Item>
						<Class>HERO_CLASS_KNIGHT</Class>
						<dependenciesIDs>
							<Item>HERO_SKILL_FORTUNATE_ADVENTURER</Item>
						</dependenciesIDs>
					</Item> 
if you want to add a class instead just copy this part and paste it right after but before the </SkillPrerequisites> which finish the prerequisites for the skill. Then change the class and the skill it depends on. It will look like this :

Code: Select all

					<Item>
						<Class>HERO_CLASS_KNIGHT</Class>
						<dependenciesIDs>
							<Item>HERO_SKILL_FORTUNATE_ADVENTURER</Item>
						</dependenciesIDs>
					</Item>
					<Item>
						<Class>HERO_CLASS_WIZARD</Class>
						<dependenciesIDs>
							<Item>HERO_SKILL_SPOILS_OF_WAR</Item>
							<Item>HERO_SKILL_MELT_ARTIFACT</Item>
						</dependenciesIDs>
					</Item>
For the attributes i guess they are stored at the same place the buildings types (which i would love to edit/add) so you wouldn't have to make a script for new buildings but anyway back on the subject here is an example for knight :

Code: Select all

					<Item>
						<SkillID>HERO_SKILL_LEADERSHIP</SkillID>
						<Prob>15</Prob>
					</Item>
					<Item>
						<SkillID>HERO_SKILL_DEFENCE</SkillID>
						<Prob>15</Prob>
					</Item>
					<Item>
						<SkillID>HERO_SKILL_TRAINING</SkillID>
						<Prob>10</Prob>
					</Item>
					<Item>
						<SkillID>HERO_SKILL_WAR_MACHINES</SkillID>
						<Prob>10</Prob>
					</Item>
					<Item>
						<SkillID>HERO_SKILL_OFFENCE</SkillID>
						<Prob>10</Prob>
					</Item>
					<Item>
						<SkillID>HERO_SKILL_LOGISTICS</SkillID>
						<Prob>8</Prob>
					</Item>
					<Item>
						<SkillID>HERO_SKILL_LIGHT_MAGIC</SkillID>
						<Prob>8</Prob>
					</Item>
					<Item>
						<SkillID>HERO_SKILL_LUCK</SkillID>
						<Prob>8</Prob>
					</Item>
					<Item>
						<SkillID>HERO_SKILL_DARK_MAGIC</SkillID>
						<Prob>8</Prob>
					</Item>
					<Item>
						<SkillID>HERO_SKILL_SORCERY</SkillID>
						<Prob>2</Prob>
					</Item>
					<Item>
						<SkillID>HERO_SKILL_DESTRUCTIVE_MAGIC</SkillID>
						<Prob>2</Prob>
					</Item>
					<Item>
						<SkillID>HERO_SKILL_SUMMONING_MAGIC</SkillID>
						<Prob>2</Prob>
					</Item>
					<Item>
						<SkillID>HERO_SKILL_LEARNING</SkillID>
						<Prob>2</Prob>
					</Item>
				</SkillsProbs>
				<AttributeProbs>
					<OffenceProb>30</OffenceProb>
					<DefenceProb>45</DefenceProb>
					<SpellpowerProb>10</SpellpowerProb>
					<KnowledgeProb>15</KnowledgeProb>
				</AttributeProbs>

^Dagon^
Leprechaun
Leprechaun
Posts: 46
Joined: 29 May 2006

Unread postby ^Dagon^ » 20 Dec 2006, 15:56

I already know what you said, except the last code window (about the probabilities). Where is it located?

Neckie
Peasant
Peasant
Posts: 67
Joined: 05 Oct 2006
Location: Quebec, Canada

Unread postby Neckie » 21 Dec 2006, 01:23

Its a part of the heroclass.xdb in HoF
here you can have it if you want : http://rapidshare.com/files/8340906/HeroClass.xdb

^Dagon^
Leprechaun
Leprechaun
Posts: 46
Joined: 29 May 2006

Unread postby ^Dagon^ » 22 Dec 2006, 13:31

So, its only possible in HoF?

Galactygon
Leprechaun
Leprechaun
Posts: 30
Joined: 15 May 2006

Unread postby Galactygon » 22 Jan 2007, 02:36

I have a different question about skill/spell/item editing in general: Is it possible to use complex math?

For example, I would like to change estates so that it produces 100+10*(Lvl^2) gold per day rather than 250 gold per day. Or make spell damage exponential as well. And what about moats inflicting 170*(Moat Multiplier)*(TownLevel/MaxLevel)+17*(Moat Multiplier)*(NumOfDaysHeld/(4-2*(TownLevel/MaxLevel)))^(1+day/100) points of damage rather than a constant value? It would be nifty if moats' strengths would increase with more structures built and more days owned by the same player.

From what I saw, the xdb sheets resemble html code rather than a more complex one, so I am saddened by the suspicion these changes might not be possible. Nonetheless, I am hopeful some modding guru will come along and prove otherwise.

-Galactygon


Return to “Modcrafting Guild”

Who is online

Users browsing this forum: No registered users and 3 guests