View previous topic :: View next topic |
Author |
Message |
Clockworker
Joined: 15 Sep 2009 Posts: 6
|
Posted: Tue Sep 15, 2009 21:26 Post subject: Hello! |
|
|
Hello everyone.
I'm new to NWNX and I find it most refreshing from a Modding PoV.
I've been tinkering around with adding/removing Feats to classes at Level up, but with little success.
I got NWNX2, Leto and SSE (that subrace system) correctly configed, since the preset Subraces work 100%.
I'm having issues however when it comes to adding/removing Feats at certain Class levels and not Character Levels (which is what SSE uses).
If someone could make a small little example script or something, I'm sure I could copy and learn upon that myself.
I've been reading guides for the last 6 hours and gotten no futher and I just wanna get started with the wonderful world of NWNX!
Is there anyone qualified to do that on this forum? Can someone cook up a small "Add/Remove Feat" script under these circumstances (NWNX2+Leto+SSE installed and 100% working).
For what I can gather all the tools, code and functions are there to do it, I just can seem to piece them all together and make it work.
Thanks for reading! |
|
Back to top |
|
|
FunkySwerve
Joined: 02 Jun 2005 Posts: 377
|
Posted: Wed Sep 16, 2009 3:01 Post subject: |
|
|
I returned your pm on the bioboards. Can correspond either place, but I prefer not both.
Funky |
|
Back to top |
|
|
Clockworker
Joined: 15 Sep 2009 Posts: 6
|
Posted: Wed Sep 16, 2009 9:52 Post subject: |
|
|
Thank you very much Funky!
You're a life saver.
I still can't seem to find any Function for adding feats where I can specify which PC's bic I wish to modify.
Does it work something like this?
Code: | #include "hgll_leto_inc"
void main()
{
object oPC = GetPCLevellingUp();
if(GetHitDice(oPC)==2)
{
ExportSingleCharacter(oPC);
DelayCommand(3.0,ApplyLetoScriptToPC(AddFeat(FEAT_TOUGHNESS),oPC));
DelayCommand(3.1,BootPC(oPC));
}
} |
Also, how do I remove a Feat? |
|
Back to top |
|
|
Clockworker
Joined: 15 Sep 2009 Posts: 6
|
Posted: Thu Sep 17, 2009 9:18 Post subject: |
|
|
Does anyone know? Can anyone help? |
|
Back to top |
|
|
FunkySwerve
Joined: 02 Jun 2005 Posts: 377
|
Posted: Fri Sep 18, 2009 5:43 Post subject: |
|
|
Yes, that's basically how it works, though the ApplyLetoScriptToPC function in hgll_leto_inc already has a boot - a second one will crash your server if the pc isn't on it any more. That function also assumes that you've already set a local string on the pc with with the bic path. You should read the leto explanations I've posted on the biobards before attempting this. Here's one that covers all the basics:
http://nwn.bioware.com/forums/viewtopic.html?topic=637992&forum=47&highlight=specialist
Funky |
|
Back to top |
|
|
Clockworker
Joined: 15 Sep 2009 Posts: 6
|
Posted: Fri Sep 18, 2009 13:17 Post subject: |
|
|
Alright, I got it working to some degree. Hehe.
Still no clue how to remove a feat.
Do I need to copy&modify the AddFeatAtCurrentLevel() function somehow and make a new function? |
|
Back to top |
|
|
FunkySwerve
Joined: 02 Jun 2005 Posts: 377
|
|
Back to top |
|
|
Clockworker
Joined: 15 Sep 2009 Posts: 6
|
Posted: Sat Sep 19, 2009 14:52 Post subject: |
|
|
Ok, that post didn't help me much. Since I still don't understand the basics. I have no real desire to learn that either, since I just want to remove/add feats at level up and be done with it.
Since I'm building a whole Mod, I don't really have the time or will to learn LetoScript untop of NWScript.
Not now anyways.
So anyways, this is what I've got so far.
Adding feats works, due to the fact that I could copy&paste the function from another script.
In short I haven't figured out anything or learned anything, nor did I need to since I could just borrow someone else's work (which they will be credited for of course).
I'm not trying to come of as lazy or unwilling to learn and I do appriciate the hard work people put into this, I'm just being realistic and saying I cannot sink my teeth into this and learn it.
I just need to get it done ASAP.
Sorry if that sounds rude or needy, but it's frustrating to get stuck when someone is sitting on the answers.
I appriciate the fact that you want me to learn Funky, but I really don't have the room to learn right now. I just want to get a few lines of code and get this Add&Remove Feat-function working.
So I'm pressed on time and focus to make this Mod, so I'd really appriciated if someone could please help me fill out the "missing-link" in this script.
Thanks!
Code: |
#include "hgll_leto_inc"
void main()
{
object oPC = GetPCLevellingUp();
if(GetLevelByClass(CLASS_TYPE_SHADOWDANCER,oPC)==1)
{
//remove HiPS from oPC
}
if(GetLevelByClass(CLASS_TYPE_SHADOWDANCER,oPC)==11)
{
string sLeto = AddFeatAtCurrentLevel(oPC, FEAT_HIDE_IN_PLAIN_SIGHT);
ApplyLetoScriptToPC(sLeto, oPC);
}
}
|
|
|
Back to top |
|
|
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Tue Sep 22, 2009 11:57 Post subject: Hi |
|
|
Hi,
While I appreciate that you believe that you dont have the room to learn letoscript at the moment, please take a moment, and reflect on the fact that I too thought much the same thing.
The reason you believe it is complicated, is because you dont have any visual way of understanding the structure of the bic file.
Download leto 1.69 (the offline character editor) and open a bic file, and then view the advanced editor.
Believe me, it will help you to understand what the code does.
I wrote a post on bioware forums, that sort tried to explain the structure as a webpage, or a file directory analagy.
for instance, if a letoscript command reads
/FirstName = Bob;
This means that in the root directory of the bic file, there is a node/object called FirstName, that we want to change to equal Bob.
if we want to add to a value, such as STR, then the syntax of this would be
/STR = /STR+1;
Which basically translates to
In the root directory, set the value of STR to be equal to STR + 1.
More complicated example, would be feats, or skill modifications, which would have a syntax similar to this
/SkillList/[0]/Rank = /SkillList/[0]/Rank + 10;
This means that
Inside Root Directory, there is a directory called SkillList, inside SkillList, there is a directory called [0] (there is actually [0] - [28] I think) and this folder has an object, called Rank, and this Rank object, holds the current value of our skill.
0 = Animal Empathy - you can find these values from the skill 2da file in your source folder.
If you wish to increase Animal Empathy by 50, you would have to generate a command like this.
/SkillList/[0]/Rank = /SkillList/[0]/Rank + 50;
If you wish to make this into a re-useable function you might need something like this
Code: |
string AddToSkill(int iSkill, int iAmount)
{
string sAmount = IntToString(iAmount);
string sSkill = IntToSkill(iSkill);
string sCommand = "/SkillList/["+sSkill+"]/Rank = /SkillList/["+sSkill+"]/Rank +"+sAmount;
return sCommand;
}
|
In theory, you would only need to feed this command into your apply letoscript function for the particular player, and it would give him the bonus, or reduction, to his skill of that type.
Question to anyone who knows - In some examples of this, I see the skill modifications are made in two places, as well as feat modifications.
In the SkillList/FeatList main directory, as well as the LvlStatList/classnumber/ directory too.
Can someone tell me what the LvlStatList is specifically for, and what the possible implications are, if it is not used?
I have a theory, that it is used for de'leveling - so the bic file knows what stats to take away, when the player de-levels. But am hoping someone can confirm.
Anyhow, if you are wanting to add feats, it is a little bit more complicated.
the syntax is something like this
"add /FeatList/Feat, type => gffWord, value => "+IntToString(iFeatNumber)+";";
The above examples dealt with modifications of already exisint objects in the bic directory structure, but this example, actually creates an object,
add (the command)
/FeatList/Feat (the name of the directory/object path)
type => gffWord (the type of encoding used - in most cases you need not worry about this)
value => IntToString(iFeatNumber) (The value of the feat number you wish to add)
You need to use IntToString because you cannot join Int's together with Strings.
So, an example of the sort of code this could generate would be
add /FeatList/Feat, type => gffWord, value => 0;"; // Adds Alertness feat.
Anyhow, once you open Leto 1.69 and have a look, and see that the bic files are really just tree diagrams, you will find it less daunting, and come to understand how to impliment simple add, remove, and modify commands with ease. |
|
Back to top |
|
|
Zebranky
Joined: 04 Jun 2006 Posts: 415
|
Posted: Tue Sep 22, 2009 13:21 Post subject: Re: Hi |
|
|
Baaleos wrote: | Question to anyone who knows - In some examples of this, I see the skill modifications are made in two places, as well as feat modifications.
In the SkillList/FeatList main directory, as well as the LvlStatList/classnumber/ directory too.
Can someone tell me what the LvlStatList is specifically for, and what the possible implications are, if it is not used?
I have a theory, that it is used for de'leveling - so the bic file knows what stats to take away, when the player de-levels. But am hoping someone can confirm. |
You're spot on (AFAIK). _________________ Win32 SVN builds: http://www.mercuric.net/nwn/nwnx/
<Fluffy-Kooshy> NWNx plugin is to this as nuclear warheads are to getting rid of fire ants.
<ThriWork> whenever I hear nwn extender, I think what does NWN need a penis extender for? |
|
Back to top |
|
|
Clockworker
Joined: 15 Sep 2009 Posts: 6
|
Posted: Tue Sep 22, 2009 20:11 Post subject: |
|
|
Hehe, you guys are great!
All this will to help others learn is commendable.
Hats off to you.
Sadly I didn't get the answer I wanted.
Another MOD that dies in its infant stage.
Thanks for all the answers and time you guys put into reading and replying to this!
Cheers all! |
|
Back to top |
|
|
FunkySwerve
Joined: 02 Jun 2005 Posts: 377
|
Posted: Tue Sep 22, 2009 23:01 Post subject: Re: Hi |
|
|
Zebranky wrote: | Baaleos wrote: | Question to anyone who knows - In some examples of this, I see the skill modifications are made in two places, as well as feat modifications.
In the SkillList/FeatList main directory, as well as the LvlStatList/classnumber/ directory too.
Can someone tell me what the LvlStatList is specifically for, and what the possible implications are, if it is not used?
I have a theory, that it is used for de'leveling - so the bic file knows what stats to take away, when the player de-levels. But am hoping someone can confirm. |
You're spot on (AFAIK). |
That's correct, it's used for deleveling. You can dump all feats and skills added at [0] (level 1) if you like, as the HGLL system does. Hitpoints will roll over at 128, if memory serves, though, so you have to distribute hit points above that number between various levels. The HGLL system has an example of that (it uses levels 1-20 for levels 41-60's hit points, ensuring no overflow).
Funky |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|