Aller au contenu

Photo

Creating a custom background?


  • Veuillez vous connecter pour répondre
11 réponses à ce sujet

#1
AaronH

AaronH
  • Members
  • 115 messages

Our project consists of around 10 custom skills (around 25 in total in the future years), and with backgrounds, we currently have the nwn2 default ones, since we haven't got round to editting them yet, but we have now.

 

Ok so,

 

I understand its the backgrounds.2da (obviously :D) but what other 2das are linked?

I'd like it so that, when a player chooses Blacksmith background, they start off with a few levels in Mining and Smithing. Of course this is custom, I need to find where to edit these.

Any help?



#2
Clangeddin86

Clangeddin86
  • Members
  • 220 messages

Your best bet is creating a OnEnter script that triggers the effects that you want for your backgrounds, faster to do too.



#3
AaronH

AaronH
  • Members
  • 115 messages

Your best bet is creating a OnEnter script that triggers the effects that you want for your backgrounds, faster to do too.

So player chooses a background, when they log in for the first time, the OnEnter gives them said skill level?

 



#4
Clangeddin86

Clangeddin86
  • Members
  • 220 messages

Yes, more or less. You have to set that script on the module properties field that says "On PC Loaded Script" though.



#5
AaronH

AaronH
  • Members
  • 115 messages

Yes, more or less. You have to set that script on the module properties field that says "On PC Loaded Script" though.

XP is used to level our skills.

Say something logs in with the blacksmith skill and theyre 5 smithing. They get it to like level 10 and log out. If they load in again, wouldn't the script fire, possibly bugging them and bringing them down back to level 5 smithing?



#6
Clangeddin86

Clangeddin86
  • Members
  • 220 messages

Are these skills done with the standard skill system of NWN2 (like armorsmithing, weaponsmithing, ecc...) or they're entirely custom made systems?



#7
AaronH

AaronH
  • Members
  • 115 messages

Entirely custom made systems.

I think the way you mentioned won't work as we have other things inplace.

Going to longest way around it, what would that be? I.e, what 2das are linked with the background?



#8
Clangeddin86

Clangeddin86
  • Members
  • 220 messages

the only 2das linked with the background are the background.2da and the feat.2da, but then you'll need the script anyway for either firing the feat's spell impact script or calling the script when it checks for the background.

That said, it can be done, but to give you the exact the script, I'd have to know how the the custom system was made, with local variables or something else?



#9
Tristondor5

Tristondor5
  • Members
  • 1 messages

Hello clangeddin86, I'm Triston, guy working on the skill tree.

- Forum says I only have 10 posts a day so I'll give as much detail as I can.

 

The only times the custom skilltree is updated are:

1) When the PC initially logs in the very first time all skills are set to 1 if they were 0

2) When the script tracking PC's experience points updates it uses the SetBaseSkillRank function

 

Now the skilltree works perfectly as I intended one week, then when it bugs out (this isn't the first time), this is the scenario:

1) On PC's login on the server all skills have random points out of nowhere, sometimes even negative numbers

2) When I gain experience points and my script calls SetSkillRank, they remain unchanged.

 

I believe the possible 2das causing this are skills.2da, backgrounds.2da, and feats.2da.

I only know very little about the skills.2da, but do you have any idea wha to do?
 

Now I can't post images, but it kinda looks like this on a new account...

Cooking: 0

Crafting: 0

Firemaking: 7

Fishing: 7

Mining: 0

Prayer: 1

Runecrafting: 51

Smithing: 0

Woodcutting: 40



#10
rjshae

rjshae
  • Members
  • 4 485 messages

Rather than using scripts, an idea that was suggested to me a long time ago was to use the skin slot. I.e. create a skin matching each of the backgrounds, and add the appropriate item to the character's skin inventory slot.



#11
kevL

kevL
  • Members
  • 4 056 messages
beware that skins can go a bit buggy in NwN2:

http://forum.bioware...rty/?p=19493728

#12
Clangeddin86

Clangeddin86
  • Members
  • 220 messages

Hello clangeddin86, I'm Triston, guy working on the skill tree.

- Forum says I only have 10 posts a day so I'll give as much detail as I can.

 

The only times the custom skilltree is updated are:

1) When the PC initially logs in the very first time all skills are set to 1 if they were 0

2) When the script tracking PC's experience points updates it uses the SetBaseSkillRank function

 

Now the skilltree works perfectly as I intended one week, then when it bugs out (this isn't the first time), this is the scenario:

1) On PC's login on the server all skills have random points out of nowhere, sometimes even negative numbers

2) When I gain experience points and my script calls SetSkillRank, they remain unchanged.

 

I believe the possible 2das causing this are skills.2da, backgrounds.2da, and feats.2da.

I only know very little about the skills.2da, but do you have any idea wha to do?
 

Now I can't post images, but it kinda looks like this on a new account...

Cooking: 0

Crafting: 0

Firemaking: 7

Fishing: 7

Mining: 0

Prayer: 1

Runecrafting: 51

Smithing: 0

Woodcutting: 40

 

Hello there, the script SetSkillRank will adjust the skills from the skills.2da, AaronH said the system is completely custom made and the only thing I could infer from that was that it was not using the skills from skills.2da, but it was calling local variables stored on objects and then displayed via a custom UI.

 

If that is not the case (and you use the standard NWN2 skill system, but just with different skills), then the solution would be easier, but the random skills issue could even be caused by a custom .xml. When I was actively working on Tales of Tethyr PW they had this issue with Skill Points being screwed up on level up, and it was caused the custom level up .xml used for The Tome of War classes. We ended up fixing the issue by removing those classes entirely. :P

 

I also would not know why the script would work for a week and then stop working as intended all of a sudden, something else in the module/server must have been changed, this stuff does not stop working on its own.

 

The issue seems to be very specific here and the only way I could understand where to begin is taking a look directly into the scripts or .2das you have modified (if you feel like uploading them somewhere like Dropbox ecc...), there could be a mistake somewhere, or you could have used the wrong .2das, or maybe it's something else entirely in your module that is preventing the scripts to trigger or work as intended.