Quote:
Originally Posted by Fatt_Shade
Great job with this mod, and with changed files Matt.
Couple questions :
1) skill.txt is for defining parameters for lvling up skill
eng_skill.lng is for text description in hero screen in game
skills.lua is for skill mechanics right ? I aks because in AP/CW there some really weird things in skill.lua file, and i have no idea how to change how skill work in game. Changing eng_skill and skill.txt is no prob, but when i start game there are no some of changes i added in my files
|
Unfortunately, it is not so cut and dry as this. This is part of a frustration that I had when I was working on my mod, but really here is what you can do with each file:
SKILLS.TXT - this file not only defines the level up parameters that you mention, but you can also put the fight bonuses here. Everything except morale, that is. So if you look at ITEMS.TXT you'll see that there is a fight{} section and a mods{} section for most items. The fight{} section is for applying bonuses to units during combat and the mods{} section is for bonuses inside and outside of combat. SKILLS.TXT, unfortunately, does not implement the mods{} part so you can only put fight bonuses in SKILLS.TXT except for morale bonuses! Even though items can have morale bonuses defined in ITEMS.TXT, SKILLS.TXT will ignore any morale bonuses you put there. They have to go in MORALE.TXT. I had to figure all this out. So SKILLS.TXT is both for parameters shown on the skill tree screen and for directly applying fight bonuses to your units (and negatives to enemy units for that matter).
What is neat about this, though, is that I took the skill tree bonuses and made an enemy skill tree when I was modifying the enemy heroes such that they have fight bonuses implemented such that they give bonuses to certain of their units and also negatives to your units. For example, certain enemy heroes have -1 speed to all your units or, for example, Xeona has a special Destroyer Skill that is -50 Fire Resistance to all your units when you fight her!
ENG_SKILLS.LNG - you are 100% right about this. What is important to note about any of the *.LNG files is that they are governed by TEMPLATES.LNG. The templates file is what takes [param4] for example in a *.LNG file and either applies a label or calls an LUA function generator to parse what "param4" means. This gives great power in being able to generate bonuses that are dynamically generated (like, for example, the new percent bonuses for units with attacks that cause burning). You can always add new templates to TEMPLATES.LNG to generate a value. The only issue is that certain King's Bounty libraries (i.e. Attack, AU, Logic, etc.) are not available all the time and so you are limited by when they are available. I've learned a lot about the libraries, but since most the the documentation and information is in Russian there are still a lot of questions I have about them.
SKILLS.LUA - this file is for anything that can't be accomplished with the other two files. You are only limited by what the LUA script engine can do. This is what makes modding so much fun - the fact that you can change game mechanics like you mentioned, but it really goes further. You also have access to the King's Bounty Libraries and if a library is available, then you can use it. Typically Logic and Obj. are available from the functions inside SKILLS.LUA. Here is the (English translated) website for the King's Bounty Libraries:
http://translate.googleusercontent.c...cVb1S9FDIBT-8Q
I'm still learning a lot about these libraries, but need to learn more about the tags and how to make libraries available for functions as I couldn't access certain libraries when I wanted to - probably because I didn't understand how the tags worked.
Quote:
Originally Posted by Fatt_Shade
2) Glory is it necessary to add every unit for -lds% ? Or is it possible to add strings form special_params.txt, example sp_lead_orc (all orcs listed in special_params.txt file), sp_lead_demon all demon units, etc. I like your idea for this skill, this way it`s useful during all game, not just in first 10 hero lvls so i wanted to add it to AP/CW.
|
Unfortunately, with The Legend, yes. You are right about the race and unit category bonuses, but the problem is that if you want to have a bonus that, say, decreases leadership of humans 10% and then you want to have another bonus that decreases bowman leadership 15%, they will not stack unless you do them individually. I actually think this is a bug in The Legend and I had to deal with this as I was doing the group and individual leadership requirement bonuses. In the end, I had to make a leadership bonus for every unit (or I used groups if I thought that I'd never need to select an individual unit from that group) in SPECIAL_PARAMS.TXT such that I could have bonuses that apply a leadership reduction to groups of units (by giving the bonus to each individual unit in that group) and then to individual units. This is how I can have Mirabella, for example, give a leadership reduction to all humans and then have individual human unit leadership reduction bonuses.
They may have fixed this in AP/CW, but I doubt it since no one probably knew about it.
This implementation was actually a fall-back plan as I really simply wanted Glory to give the +Leadership bonus and then also a +Percentage Leadership bonus. But, since the mods{} bonus functionality is not implemented in SKILLS.TXT, I tried to do this in the LUA. Unfortunately, though, I could not figure out how to give a percentage bonus for leadership (like some of the original babies had) from the LUA function. So in the end, I did the leadership reduction thing instead. Maybe there is a way to do it, but I couldn't figure it out.
Quote:
Originally Posted by Fatt_Shade
3) what files i need to add in mod folder to get that unit in game ? I tried to add champion unit form adventure mod for AP to Red sands, but every way i try some errors report  . Is there any more files for units then this : champion.atom , champion.dds , champion.lua ?
|
I'm not sure who the champion is, but I think there is an example in the mod forum where someone added some new units. I did a quick look, I think Army of Darkness may be a good example mod to download and look how they did it.
I have not tried to add any new units, but from what I understand (I think the Crossworlds Editor documentation might provide some insight here, too):
- You need to add the *.ATOM that you mention
- If your new unit has special abilities or features, they are added to either: SPECIAL_ATTACKS.LUA or UNIT_FEATURES.LUA. What constitues a special or feature is a little bit blurry, but it really doesn't matter which file it goes in so long as you pick one.
- If your new unit has attacks that create side effects, you may have to add its effect to EFFECTS.TXT. The new Ent / Ancient Ent Entangle is a good ability to study for this.
- Either have it use an existing animation or make your own
- Create a PNG for it. You do not have to add it to a DDS like with The Legend because AP/CW both support PNG natively.
- If your new unit has new abilities, you'll have to create PNG's for the icons as well. Each ability needs 5 pictures: 1) Normal, 2) On Mouse, 3) On Click, 4) On Disable, and 5) A small version of the normal for when looking at a unit's info card.
- If your new unit creates side effects, then you will need a picture for that, too (PNG).
- Edit the embryos to allow the game to generate the unit when starting a new game - Army of Darkness might be a good mod to study for this
- There may be more, but I think that's what you'd have to do.
Quote:
Originally Posted by Fatt_Shade
4) i also wanted to add some new spells but got stuck after changing spells.txt. Idea was to make spells like hell breath, just to bonus poison dmg, and %chance for poisoning to help players against dragons/demons. What else i need to change ? i see in your spells all translated to eng which is great, but here are my problems - How to add new slot for spell in spell book (must i delete some existing , or will it add it self somehow ?  , Adding png files for spell in book, for scroll for shops, and for effect(poisoned during battle) anything else ? ,
spell_effect.lua , spells.lua , spells.txt , spells_common.lua , spells_hint , spells_power.lua do i have to changed all this files to add my spell or ...?
if you can give some advice thx in advance 
|
I have not added a new spell, but changed one. As far as I know, you should be able to make a new spell by:
1. SPELLS.TXT - all spells are defined here, so your new spell needs to be added here.
2. ENG_SPELLS.LNG - all spell descriptions are here and so your new spell needs a description to go here.
3. SPELLS.LUA - all spells use an LUA script function that determines the spell's behavior and so your new spell needs a function for it to go here.
4. SPELLS_POWER.LUA - most spells have a function here that computes the spell's power. Also SPELLS_HINT.LUA can call the spell's power function so that it can display the spell's information.
5. SPELLS_HINT.LUA - as mentioned above typically calls the spell's power function that resides inside SPELLS_POWER.LUA to get the spell's parameters to display in the text hint.
6. TEMPLATES.LNG - if you are going to have a new description, the spell's parameter templates will have to be added here in the appropriate section for spell templates.
7. SPELLS_COMMON.LUA - this file contains unit select functions for a spell. So you may not need to edit this file unless you want to use a unit selection criteria that doesn't exist.
8. SPELL_EFFECTS.LUA - this file contains spell effects that are caused by the spell. For example, Flame Arrow, Fire Ball, and Fire Rain all cause burning. The burning effect function is located here.
You may have to edit other files as well, but these are the most common for covering a spell. What you would really need to do is look at one of the spells in SPELLS.TXT and see what scripts it uses, what pictures, etc. and use it as a template for creating you're new spell. As far as the icons are concerned, you would have to generate a new PNG (I guess you don't really need to create a DDS file since individual PNG's are supported in AP/CW) for the spell picture if you didn't use one already in the game. Then, just like with the new unit, you would need to edit the embryos to allow the game to generate that new spell.
Once again, I haven't done this so you may need to do some more research, but this should at least get you started.
Okay, those were some good questions - that's about all I can provide right now. By the way, this is the kind of stuff I want to put into my modding guide if I ever get around to creating it.
/C\/C\