Implementation of new start varibility added
I've still been working on my mod, but it is has been slow going due to my limited time and (until recently) the lack of the capability to reference the LUA library.
Nonetheless, I've been making good progress with the implementation of the tomes and some other ideas.
Notably, I've finished implementing the capability that I added in my TL H3 Babies mod: random starting armies and spells for the 3 different hero classes.
I've also augmented this system with random item generation as well including containers (i.e. eggs, etc.) and a select list of level 1 items for each class.
Some screenshots are attached below, but essentially, each hero class's sections have been augmented to increase variability of starting units, spells, and items and each part is implmented via:
- On the class's army = line, the units that are possible for that starting hero are listed and randomly selected if the hero has enough leadership for that unit as well as adding the max number of units that the hero can lead. You simply list the units that are available and the numbers are automatically generated to the hero's max leadership. For rebirth (i.e. when the hero dies), this list is used to recreate the hero's rebirth army (which can now be larger since the hero will most likely have more leadership). The maximum leadership is capped by a value specified in LOGIC.TXT via the difficulty level. So if you list Black Dragon's in the unit's army list, the hero probably won't start the game with them (since they most likely have insufficient leadership), but it is possible to get them in the future (on a rebirth) if the unit is selected. Note that all units in the army= list are equally probable.
- The class's spells section now allows the listing of spells with a chance for the hero to get them at the start of the game. There are separate spell_chance and scroll_chance fields such that if a spell is listed with it set to 0 (i.e. spell_dispell=0) then there is a chance that the hero starts with that spell based on the spell_chance setting and depending on the scroll_chance whether the spell will either be learned or a scroll. So, for example, if the Paladin has spell_chance=10, there is a 10% chance that the spell listed set to 0 will be given to the starting hero. If the spell is selected then if scroll_chance=50 there is a 50% chance that that spell will be a scroll (as opposed to being learned). Any valid spell may be added to the list and setting the value to a positive integer (i.e. 1) means that the hero automatically starts with that spell (just like before) and setting it to a negative integer (i.e. -2) means that the hero automatically starts with the absolute value of that many scrolls (just like before).
- The class's item section now uses a system where if a negative integer is specified, then this becomes the chance to get that item as well as the maximum number of that item available. So for example if black_dragon_egg=-1, then there is a 1% chance to get 1 Black Dragon egg. If ent_seed=-10, then there is a 10% chance to get 1 to 10 Ent Seedlings. Also, I've added pertinent level 1 items to a hero's item list such that they have a 1% chance to get 1 of those items (i.e. simple_sword=-1).
The system gives an incredible amount of variability to the starting class's army, spells, and items.
I've also added some new item combination slots to give more variability to each class's item choices as well as to ensure that each hero class has at least 3 artifact / regalia slots for Tomes (which are both artifacts and regalia and therefore equipable in either slot). The new combination slots are: 1) artefact,belt (i.e. Artifact/Belt), 2) shield,regalia (Shield/Regalia), and 3) artefact,gloves (Artifact/Gloves). The first two were in The Legend, but removed for some reason in AP/CW, whereas the third one is new that I just created. Look for these icons in the attached pictures below.
I've also tweaked the experience and leadership tables such that they have a consistent growth throughout the game (whereas the previous lists had inconsistent growth in a few spots).
Here are the class-specific sections for the armies, spells, items, and slots (note that commented sections have a starting "//"):
Warrior:
Code:
// New! Just list the units and a random number within the hero's leadership will be selected
army=peasant,sprite_lake,thorn,thorn_warrior,dragonfly_lake,sprite,dragonfly_fire,devilfish,spider_venom,skeleton,spider_undead,archer,spider,robber,hyena,miner,dryad,pirat,snake_green,graywolf,robber2,snake,zombie,barbarian,barbarian2,footman,goblin,zombie2,goblin2,priest,bowman,satyr,pirat2,footman2,werewolf,snake_royal,bear,ghost,elf,bear2,orc,vampire,dwarf,griffin,priest2,druid,ghost2,catapult,unicorn,orc2,elf2,bear_white,unicorn2,blackknight,knight,vampire2,horseman,archmage,necromant,shaman,cannoner,paladin,alchemist,ent,griffin2,kingthorn,ogre,ent2,bonedragon,cyclop,giant,greendragon,runemage,reddragon,blackdragon
// New! Chance of getting a spell if it is set to 0
spell_chance=5
// New! Chance that a random spell is a scroll
scroll_chance=75
// New! Set spell = 0 for a random spell / scroll at start based on chance above
spells {
spell_healing=0
spell_defenseless=0
spell_stone_skin=0
// spell_last_hero=0
spell_dragon_arrow=0
spell_magic_axe=0
spell_bless=0
spell_adrenalin=0
spell_pacifism=0
spell_anger_management=0
spell_accuracy=0
spell_haste=0
spell_slow=-1
spell_reaction=0
spell_berserker=0
// spell_shroud=0
spell_target=0
spell_dragon_wake=0
spell_trap=0
spell_ghost_sword=0
spell_fire_arrow=0
spell_smile_skull=0
// spell_oil_fog=0
spell_fire_breath=0
spell_weakness=0
spell_kamikaze=0
spell_totem_adrenalin=0
spell_balance=0
spell_armor=0
spell_splash=0
}
// army=bowman|3|footman|5|bear|2
// spells {
// spell_haste=-1
// }
items {
time_clock=1
picture_inspirit=1
rage_potion=2
black_dragon_egg=-1 // negative values mean chance and max number of that item
bonedragon_egg=-1
red_dragon_egg=-2
dragon_egg=-1
dfly_egg=-40
ent_seed=-5
griffin_egg=-10
skeleton_grave=-40
snake_egg=-20
spider_egg=-40
thorn_seed=-50
vampire_grave=-10
simple_helm=-1
warrior_helm=-1
shtopir=-1
simple_sword=-1
round_shield=-1
shield=-1
chain=-1
leather_armor=-1
chief_belt=-1
boots=-1
graceful_boots=-1
valor_sign=-1
beast_rage_book=-1
guard_braces=-1
ball_dress=-1
}
slots {
// slot name in the interface types of items that can be added in a comma-separated list
// Do not forget to use important combinations hero.txt -> slot_bgs
1=helmet
2=weapon
3=armor,dress
4=boots
5=shield,regalia
6=weapon,shield
7=artefact,gloves
8=regalia,belt
wife=wife
}
Paladin:
Code:
// New! Just list the units and a random number within the hero's leadership will be selected
army=peasant,sprite_lake,thorn,thorn_warrior,dragonfly_lake,sprite,dragonfly_fire,hyena,miner,dryad,graywolf,barbarian,barbarian2,footman,priest,bowman,satyr,footman2,werewolf,bear,elf,bear2,dwarf,griffin,priest2,druid,unicorn,elf2,bear_white,unicorn2,knight,horseman,archmage,paladin,alchemist,ent,griffin2,kingthorn,ent2,cyclop,giant,greendragon,runemage,reddragon,blackdragon
// New! Chance of getting a spell if it is set to 0
spell_chance=10
// New! Chance that a random spell is a scroll
scroll_chance=50
// New! Set spell = 0 for a random spell / scroll at start based on chance above
spells {
spell_dispell=0
spell_healing=1
spell_defenseless=0
spell_stone_skin=0
// spell_last_hero=0
spell_dragon_arrow=0
spell_magic_axe=0
spell_bless=1
spell_adrenalin=0
spell_pacifism=0
spell_dragon_slayer=0
spell_phoenix=0
spell_animal_call=0
// spell_gifts=0
spell_demon_slayer=0
spell_lightning=0
spell_resurrection=1
spell_divine_armor=0
spell_holy_rain=0
spell_angel_avenger=0
spell_accuracy=0
spell_haste=0
spell_reaction=0
spell_exorcism=0
spell_totem_adrenalin=0
spell_balance=0
spell_armor=0
spell_orb=0
spell_icethorn=0
spell_gizmo=0
}
//army=gorguana|50|blackdragon|20|griffin2|5|griffin_spirit|12|paladin|15
// army=footman|4|peasant|28|bowman|2
// spells {
// spell_bless=1
// spell_healing=1
// spell_pacifism=-1
// }
items {
time_clock=1
picture_inspirit=1
mana_potion=1
rage_potion=1
black_dragon_egg=-1
red_dragon_egg=-1
dragon_egg=-2
dfly_egg=-45
ent_seed=-10
griffin_egg=-20
thorn_seed=-50
concentration_bandage=-1
guard_helm=-1
simple_helm=-1
warrior_helm=-1
simple_sword=-1
round_shield=-1
shield=-1
chain=-1
simple_belt=-1
steel_band=-1
graceful_boots=-1
steel_boots=-1
valor_sign=-1
beast_rage_book=-1
guard_braces=-1
ball_dress=-1
walking_dress=-1
}
slots {
1=helmet
2=weapon
3=armor,dress
4=boots
5=regalia,artefact
6=shield,gloves
7=shield,regalia
8=belt,regalia
wife=wife
}
Mage:
Code:
// New! Just list the units and a random number within the hero's leadership will be selected
army=sprite_lake,thorn,thorn_warrior,dragonfly_lake,sprite,dragonfly_fire,devilfish,spider_venom,archer,spider,dryad,snake_green,graywolf,spider_fire,snake,goblin,goblin2,priest,bowman,satyr,werewolf,snake_royal,elf,griffin,priest2,druid,catapult,beholder,unicorn,elf2,unicorn2,knight,beholder2,horseman,archmage,necromant,shaman,cannoner,paladin,alchemist,ent,griffin2,kingthorn,ent2,bonedragon,cyclop,giant,greendragon,runemage,reddragon,blackdragon
// New! Chance of getting a spell if it is set to 0
spell_chance=15
// New! Chance that a random spell is a scroll
scroll_chance=25
// New! Set spell = 0 for a random spell / scroll at start based on chance above
spells {
spell_dispell=0
spell_healing=-1
spell_defenseless=0
spell_stone_skin=0
// spell_last_hero=0
spell_dragon_arrow=0
spell_magic_axe=0
spell_bless=0
spell_adrenalin=0
spell_pacifism=0
// spell_dragon_slayer=0
// spell_phoenix=0
spell_animal_call=0
spell_anger_management=0
// spell_gifts=0
// spell_demon_slayer=0
// spell_lightning=0
// spell_resurrection=0
// spell_divine_armor=0
// spell_holy_rain=0
spell_angel_avenger=0
spell_accuracy=0
spell_haste=0
spell_slow=0
spell_reaction=0
spell_berserker=0
spell_shroud=0
spell_pain_mirror=0
spell_target=0
spell_magic_source=0
spell_dragon_wake=0
spell_trap=0
// spell_invisibility=0
spell_ghost_sword=0
// spell_phantom=0
// spell_teleport=0
// spell_pygmy=0
// spell_blind=0
// spell_hypnosis=0
// spell_geyser=0
spell_exorcism=0
// spell_time_return=0
spell_fire_arrow=1
spell_smile_skull=0
spell_scare=0
// spell_oil_fog=0
// spell_plague=0
spell_fire_breath=0
spell_magic_bondage=0
spell_ice_serpent=0
spell_fire_ball=0
spell_sacrifice=0
spell_weakness=0
// spell_evilbook=0
spell_kamikaze=0
spell_crue_fate=0
// spell_ram=0
// spell_demonologist=0
spell_fire_rain=0
// spell_necromancy=0
// spell_zlogn=0
// spell_armageddon=0
// spell_death_star=0
// spell_inferno_dragon=0
spell_totem_adrenalin=0
spell_balance=0
spell_fishes=0
spell_rockfall=0
// spell_quake=0
spell_armor=0
spell_splash=0
// spell_orb=0
spell_icethorn=0
// spell_gizmo=0
// spell_souldrain=0
// spell_darkhole=0
}
// army=sprite|11|peasant|20|dragonfly_lake|11
// spells {
// spell_fire_arrow=1
// spell_slow=1
// spell_fire_ball=-1
// spell_healing=-1
// }
items {
time_clock=1
picture_inspirit=1
mana_potion=2
black_dragon_egg=-2
bonedragon_egg=-1
red_dragon_egg=-1
dragon_egg=-1
dfly_egg=-40
ent_seed=-5
griffin_egg=-10
skeleton_grave=-40
snake_egg=-20
spider_egg=-40
thorn_seed=-50
vampire_grave=-10
concentration_bandage=-1
straw_hat=-1
disciple_staff=-1
road_staff=-1
leather_armor=-1
boots=-1
graceful_boots=-1
old_boots=-1
white_slippers=-1
fisher_net=-1
inkpot=-1
snake_ring=-1
warm_gloves=-1
novice_dress=-1
}
slots {
1=helmet
2=weapon
3=armor,dress
4=boots
5=regalia,artefact
6=shield,artefact
7=belt,gloves
8=artefact,belt
wife=wife
}
I'll try to provide an update with these changes soon so that you can check them out, in the meantime, you can look at the images and get an idea of the variability of the implementation.
Images:
- Paladin Start with Item - shows the Paladin's starting items (note that she got an Ordinary Helmet as well as some thorn seedlings and dragonfly eggs, and now Paladin's start with 1 each of a mana and rage potion). Starting army (note that this was pretty lucky to get Inquisitors and Priests, the Unicorns are a nice bonus). Also note the combo items (armor / dress, then from upper to lower right: 1) Artifact/Regalia, 2) Shield/Gloves, 3) Shield/Regalia, and 4) Belt/Regalia.
- Warrior Start with New Portrait - once again note items (Warriors start with 2 Rage potions); note that the Bill Gilbert portrait is setup to start giving Tomes; note starting randomized army.
- Mage with great start - note the items (1 included Bone Dragon egg! 1% chance - what luck!) and that Mage starts with 2 Mana Potions.
- Mage Example Starting Spellbook - note the starting spells / scrolls, completely randomized except for the healing scroll (i.e. spell_healing=-1).
- Paladin Example Starting Spellbook - once again note starting spells (healing and resurrection are set =1).
/C\/C\
|