![]() |
#29
|
||||
|
||||
![]() Quote:
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:
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:
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):
Quote:
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\ |
|
|