Aller au contenu

Photo

Customize 2da files.


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

#1
1Ombra1

1Ombra1
  • Members
  • 24 messages
I have a little question, if I add a column in a standard .2da file (e.g. in spell.2da or feat.2da) to be used by my custom scripts, will it give problem with the standard game functions?

Wich  I need is to add a column in nwn2_deities.2da with the proper god's alignment.

#2
The Fred

The Fred
  • Members
  • 2 516 messages
No, it shouldn't do at all. The deities file is already a bit screwed up because they added columns in MotB anyway.

#3
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages
No, but only your scripts will see it when you use that column name. The engine will ignore it.

You can however make a new 2da, with the same first 2 columns and your added columns and use it as a extra 2da to do the same thing, just use the same row numbers as the real 2da and use your own 2da to store the data. This makes it far easier for others to merge in any changes, or for you to use others work. ( tony k does this for example )

Modifié par painofdungeoneternal, 04 février 2012 - 02:56 .


#4
Kurziel

Kurziel
  • Members
  • 14 messages
This is great news, as it plays in with something I've been contemplating for a custom magic item system.

I'm relatively new to NWN2 customization. Did quite a bit of Diablo II modding back in the day, but just recently got into NWN2. I'm still learning how exactly the engine works.

I'm looking to assign stats to items that can be changed by scripts. If I created custom values as described in a customer 2da, would scripts be able to change (increase) those values on items that are already existing, or would those items be reset back to the values list in the 2da whenever the character/module is reloaded?

Modifié par Kurziel, 07 février 2012 - 04:26 .


#5
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages
Depends on how you program it. A 2da can work as an initial configuration file, but you can't change values in a 2da file from inside the game. That is what a database is for, and would require NWNx and using a server.

However you can increment items properties( there are a lot of functions that allow you to manipulate those item props ), store variables on items and increase the value of variables on those same items.