![]() |
#2
|
|||
|
|||
![]() Quote:
You have to use KB_DB_EDIT to convert them into text files, even then they are not the most easily editable files, but when I worked on editing the heroes in my H3B mod I came up with some templates to aid in how to edit them as well as devised my own enemy hero skill system based on their class and level to redefine their skills. Let me give you an example of what a file looks like and how to edit it... Okay, I guess before that, if you want to batch convert them do this (skip this if you're only interested in one and just use KB_DB_EDIT_0.75 to decompile it):
Now the anatomy of a *.HERO file (I'll pick one from TL, but it should follow the same rules in WotN) - here is 1206884.HERO converted to 1206884.HERO.TXT: Code:
{Y}{}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 11 elements { {U}{uid} = {1206884} {U}{au} = {1986885} {W}{h} = {ehero_system_hint_1206884} {A}{ato} = {ah_robber} {A}{sp} = {spell_healing} {U}{le} = {1} {U}{in} = {1} {U}{ma} = {10} {U}{atk} = {2} {U}{de} = {1} {Y}{fi}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{1} // 1 elements { {Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements { {Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 2 elements { {A}{level} = {1,2} {A}{belligerent} = {enemy} } {A}{pbonus} = {moral,-1,0,0,-100,0,0} {A}{dbonus} = {} {A}{rbonus} = {} {A}{attack_on} = {} {A}{attack_off} = {} } } } We'll go line by line, and start with the first section: Code:
{Y}{}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 11 elements { . . . } Next: Code:
{U}{uid} = {1206884} Code:
{U}{au} = {1986885} Code:
{W}{h} = {ehero_system_hint_1206884} Code:
{A}{ato} = {ah_robber} Code:
{A}{sp} = {spell_healing} Code:
{U}{le} = {1} Code:
{U}{in} = {1} {U}{ma} = {10} {U}{atk} = {2} {U}{de} = {1} Code:
{Y}{fi}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{1} // 1 elements { {Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements { . . . } } The last portion: Code:
{Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 2 elements { {A}{level} = {1,2} {A}{belligerent} = {enemy} } {A}{pbonus} = {moral,-1,0,0,-100,0,0} {A}{dbonus} = {} {A}{rbonus} = {} {A}{attack_on} = {} {A}{attack_off} = {} Let's look at an item in ITEMS.TXT for clarification; here's the Silver Chain item: Code:
silber_chain { category=o image=heroitem_belt_silver.png hint_config=object_item label=itm_silber_chain_name hint=itm_silber_chain_hint information_label=itm_silber_chain_info maphint= mapinfo= atoms { 1 { atom= lu=template_item_mb label= } } price=7700 maxcount=1 level=2 race=neutral use {} fight { { filter { race=undead } pbonus=defense,-2,0,0,-100,0,0 dbonus= rbonus= attack_on= attack_off= } } mods { intellect=count,1 } propbits=belt params {} } There are predominately 2 sections:
Here's Beardless Joe's filter: Code:
{ {A}{level} = {1,2} {A}{belligerent} = {enemy} } Valid filters and their values are: belligerent (ally or enemy), daytime (time of day: night, evening, day, morning), level (you can specify it such as <3 for units less than level 3, etc.), loctype (i.e. dungeon, lava, etc. specified in ARENA.TXT as logic_bits), race (as specified in LOGIC.TXT, races), and unit (any valid unit ATOM). The bonus section needs a bit more description but note that this is where you modify unit abilities. Code:
{A}{pbonus} = {moral,-1,0,0,-100,0,0} {A}{dbonus} = {} {A}{rbonus} = {} {A}{attack_on} = {} {A}{attack_off} = {}
The last 3 numbers apply to the bonus itself:
So in the case above -100, 0, 0 mean: -100 on the duration means it never expires (i.e. a value of 1 means that it lasts 1 round), means that it is not removed if the unit is damaged, and has lowest, 0, priority. Usually your bonuses are always going to follow this pattern, but there are skills that affect your unit bonuses for the first round only so you may want to implement some bonuses like them and then you can specify 1, 0, 0. Valid pbonus modifiers are: attack, defense, health, hitback (for retaliation - see this in GRIFFIN.ATOM, for example), initiative, krit (for critical hit), moral (for morale), and speed. The dbonus modifier works just the same as pbonus, except it is a modifier to a unit's damage. Valid modifiers are (as specified in the resistances LOGIC.TXT, i.e. the damage types in the game): astral, fire, magic, physical, and poison (in WotN you can add cold). The 6 numbers following are the same as for pbonus. The rbonus modifier works just the same as pbonus, except it is for a unit's resistances. Valid modifiers are the same as dbonus. The last two, attack_on and attack_off, I'm not sure exactly what they do. I surmised that they enabled / disabled a unit's attacks, but it didn't seem to work during my very limited testing with TL. You could try to specify an additional attack (i.e. talent) for an ATOM and set it to disabled (look at how Dragon Arrows are implemented) and then try listing it in the attack_on section to experiment if it works in AP / CW / WotN. Just like items, you can list multiple bonuses, i.e.: Code:
{Y}{fi}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{1} // 1 elements { {Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements { {Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 2 elements { {A}{level} = {1,2} {A}{belligerent} = {enemy} } {A}{pbonus} = {moral,-1,0,0,-100,0,0} {A}{dbonus} = {} {A}{rbonus} = {} {A}{attack_on} = {} {A}{attack_off} = {} } } {Y}{-N/A-}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 6 elements { {Y}{filter}, F_SORTED{0}, F_COMPACT_TAGS{1}, F_NONAMES{0} // 2 elements { {A}{belligerent} = {ally} } {A}{pbonus} = {attack,2,0,0,-100,0,0} {A}{dbonus} = {} {A}{rbonus} = {} {A}{attack_on} = {} {A}{attack_off} = {} } } } Once you are done editing the file, you compile the *.TXT file back into a *.HERO file with KB_DB_EDIT_0.75. If you edit them all (like I did in my H3B mod for TL) you can create another BATch file to compile them all back into *.HERO files. In the next post, I'll paste my exact templates that I used for my H3B mod so that you can see how I implemented various bonuses for the enemy heroes and you can paste them into your editor and edit and use them if you'd like! ![]() /C\/C\ |
Thread Tools | |
Display Modes | |
|
|