StrategyPlanet

 
     
 

Kohan Film Database

 

 

 
 
 
 

Kings of War - Editing

 

 
Basic Unit Modding
by Chimaeros

Until someone figures a way to extract the files from the .rwd, get your hands on a hex editor like UltraEdit and take a look inside the data.rwd file. Just about everything other than graphics, sounds, etc. are in text files (.tgi) which can be modded.

What you will need to do is replicate the directory structure that is inside the .rwd. In your Kings of War directory, create a Data folder. I believe everything will then go inside that...for example:

You want to create a new Drauga unit.

1. Create the following directories /Data/Units/Drauga
2. Using a hex editor, copy one of the existing units as a template:

Here is the Drauga Huntmaster:

[Thing template = K2DraugaUnit]
{
IDS = huntmaster
name = "#huntmaster_name"

[View]
{
resource_prefix = Huntmaster/Huntmaster

[WhenCreated Template=FXC_Equipment]
action = HIDE
location = RHAND
equipment_type_ids = horn
}

[BodyComponent]
{
health = 500
defense = 1

[WhenHealth Template=FXC_PlayHitEffect]
{
health_trigger_type = RELATIVE_DECREASE
health = 0.035

pivot = head
axis = 0,0,1
max_impulse = 500
max_damage = 0.20
max_angle = 30
vel_decay = 1.05
stiffness = 15
}
}

[CharacterComponent]
{
[Animation Template=MoveAnimation]
IDS = walk
walk_distance = 1.5

[Animation Template=MoveAnimation]
IDS = jog
walk_distance = 2.5

[Animation Template=IdleAnimation]
IDS = idle

[Animation Template=MeleeIdleAnimation]
IDS = idlemelee

[Animation Template=FidgetAnimation]
IDS = fidget1

[Animation Template=FidgetAnimation]
IDS = fidget2

[Animation Template=DieAnimation]
{
IDS = die1

[WhenStart template=FXC_PlaySFX]
audio_ids = huntmaster_death
}

[Animation Template=MeleeAttackAnimation]
IDS = melee1
key_ratio = 0.6

[Animation Template=MeleeAttackAnimation]
IDS = melee2
key_ratio = 0.6

[Animation Template=CastAnimation]
{
IDS = cast
key_ratio = 0.48

[WhenStart Template=FXC_Equipment]
action = UNHIDE
location = RHAND
equipment_type_ids = horn

[WhenStart Template=FXC_Equipment]
action = HIDE
location = RHAND
equipment_type_ids = sword

[WhenEnd Template=FXC_Equipment]
action = HIDE
location = RHAND
equipment_type_ids = horn

[WhenEnd Template=FXC_Equipment]
action = UNHIDE
location = RHAND
equipment_type_ids = sword
}

[Animation Template=CastIdleAnimation]
IDS = idlecast
}

[EconomyComponent]
{
[Cost]
gold = 20

[Upkeep]
wood = 1
mana = 1
}

[ElementComponent]
{
morale_value = 6
required_structures = drauga_quarry
denizen_type = denizen_type_melee

[SupportProperty]
property_IDS = trailblazing
}

[MoverComponent]
{
speed_max = 4.5

[TrackInfo Template=K2TracksBipedRight]

[TrackInfo Template=K2TracksBipedLeft]
}

[PerformerComponent]
{
cv_bias = 2
wait_bonus = 1

[Ability Template=K2MeleeLocal]
{
animation1 = melee1
animation2 = melee2

[AbilityDefinition Template=K2MeleeAttack]
{

name = "#huntmaster_AbilityDefinition_name"

[Effect Template=MainDamageEffect]
damage_type_IDS = melee
amount = 20

[WhenDo template=FXC_PlaySFX]
audio_ids = metal_swing3
}
}

[Ability template=K2SpellSummonLocal]
ability_IDS = summon_mauler
required_experience_min = 0
required_experience_max = 2

[Ability template=K2SpellSummonLocal]
ability_IDS = summon_mauler2
required_experience_min = 3
required_experience_max = 3
}

[PropertiesComponent]
{
[Property]
property_IDS = race_drauga

[Property]
property_IDS = support

[Property]
property_IDS = melee

[Property]
property_IDS = swift

[Property]
property_IDS = role_summoner
}
}

3. Mod the heck out of it, save it as a .tgi file (just change the .txt to .tgi) and then place it in the Data/Units/Drauga folder. Be sure to change both

IDS = huntmaster
name = "#huntmaster_name"

if you want a completely new unit, otherwise you will just override the existing unit (and if you mess up, the game will let you know by crashing ). So if I wanted to make a unit called Huntmistress...

IDS = huntmistress
name = "Huntmistress"

Some other directories in the /Data folder:

Factions
Nations
Spells
Units/Drauga (and the other races)
Units/Ceyah (and the other factions)
Units/Ambient
Units/Monster
Units/Tech
Heroes/Ceyah (and the other factions)

KoW will look in those folders and add what is in there, overriding anything that duplicates what is in the .rwd.

If you make a new unit, also make sure to use a different file name. Above example would be huntmistress.tgi

Note: If you and the people you want to play with do not have the same modded files then you will get checksum errors and be unable to play together.

For those interested in skinning, those files are in .dds format (Microsoft DirectDraw Surface).
The Nvidia site has plug-ins for use with various programs such as 3D Studio, Photoshop and Paint Shop Pro :

http://developer.nvidia.com/object/...ture_tools.html
 


 

 






Copyright © 2001, 2004
Dan "Chimaeros" Genovese
No reproduction or other use of content contained within this site is allowed without specific written permission.
Kohan: Copyright © 2000-2001 TimeGate Studios, Inc. All rights reserved.
All other logos, brand names, product names listed are trademarks or registered trademarks of their respective holders.