2DA and TLK editing via web interface
#1
Posté 21 août 2013 - 04:00
Wish #1:
Display of NWN data files (2DA and TLK) on a web page. 2DAs are text so this is easy, but it would be handy to have a 2DA parser that we can use in a web implementation and expand. TLK is not so easy as it is not pure text.
Wish #2:
Editing of NWN data files (2DA and TLK) via web interface, and an application to store edits in a versioning control system as well as write edits out to the file.
Anyone have projects that they'd be willing to share? I'd prefer to get them up on github and open source their development, but if you are willing to share with us we'll play by your rules.
#2
Posté 21 août 2013 - 05:05
#3
Posté 21 août 2013 - 05:35
Modifié par henesua, 21 août 2013 - 05:35 .
#4
Posté 05 septembre 2013 - 11:52
It can be easily done via PHP and database with the option to generate 2DA output file. Versioning would be harder but the challenge is welcome. Not exactly sure when I start on this as I have other projects but I already thought it through.
Still leaving TLK alone...
#5
Posté 06 septembre 2013 - 12:01
Presently we are using mercurial CVS and I have TortoiseHG on my ubuntu box to plug into it. But none of that is using an application in a web browser to edit the files.
What I really want though is an application that can read a 2DA and a TLK and then generate the documentation. That is the holy grail for me. For example all of the spells also point to TLK entries describing the spell. It would be great to convert the TLK to text to store in a DB, and then when the DB is edited to change the TLK.
Modifié par henesua, 06 septembre 2013 - 12:03 .
#6
Posté 07 septembre 2013 - 02:27
Of course its always good to have a free option...
#7
Posté 07 septembre 2013 - 02:40
Essentially if someone has the two tool I described above already made as a web application then I can also use them to generate the documentation that I want.
And it is this third thing - automation of documentation - that I really want. And the only difficult part of this for me is the TLK file. I'm not sure how to handle it as it is a binary file. If someone would share an application that converts a tTLK to text then we are cooking.
Modifié par henesua, 07 septembre 2013 - 02:41 .
#8
Posté 07 septembre 2013 - 10:41
henesua wrote...
Pstemarie, agreed but thats not the kind of feature that I am talking about. I want the web interface because it opens up the option to automate the creation of documentation of a custom ruleset rather than to create such a thing by hand.
Now that is something worth pursuing. Documentation is one of the most complex aspect of Custom Content. For me, I often get so involved in what I'm doing I plow on ahead then try to do the documentation afterwards... NOT FUN!
#9
Posté 07 septembre 2013 - 11:43
henesua wrote...
Pstemarie, agreed but thats not the kind of feature that I am talking about. I want the web interface because it opens up the option to automate the creation of documentation of a custom ruleset rather than to create such a thing by hand.
Essentially if someone has the two tool I described above already made as a web application then I can also use them to generate the documentation that I want.
And it is this third thing - automation of documentation - that I really want. And the only difficult part of this for me is the TLK file. I'm not sure how to handle it as it is a binary file. If someone would share an application that converts a tTLK to text then we are cooking.
Try never launcher. Not exactly what you are describing but it can get things out of game formats into text and mysql format. ( This program started as my toolbox for all the things i built to manage my PW so have a lot of features like this )
Open a TLK file ( either open file or drag and drop the tlk onto the file ).
Option 1, "extract SQL" menu under "Compare", saves text to a mysql dump.
( portion of created file from cep.tlk, not showing all 7000+ lines )
CREATE TABLE dialog (`dl_dlid` int(11) default NULL,`LABEL` longtext default NULL,UNIQUE KEY (`dl_dlid`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;
INSERT INTO `dialog` (`dl_dlid`,`LABEL`) VALUES ('16807216', 'Community Expansion Pack');INSERT INTO `dialog` (`dl_dlid`,`LABEL`) VALUES ('16807217', 'Baseitems start here');INSERT INTO `dialog` (`dl_dlid`,`LABEL`) VALUES ('16807218', 'Trident*');INSERT INTO `dialog` (`dl_dlid`,`LABEL`) VALUES ('16807219', 'This simple weapon has its origins in the humble fishing villages on the coasts and inland rivers. Not your simple frogging trident though, this is a weapon of war -- its tines widely spaced and wickedly barbed.');INSERT INTO `dialog` (`dl_dlid`,`LABEL`) VALUES ('16807220', 'Base Damage: 1d8\\rBase Critical Threat: x2\\rBase Damage Type: Piercing\\rWeapon Size: Medium\\rFeats Required: Martial');
The above can get it so it's on the website.
Option 2:
The "Save All Entries" in the tlk editor ( you see it when you open the tlk file )
Create a folder for all the entires to go. This saves a single text file for each entry.
30000.en.upt - this only supports english, but it's tlk id, language, then upt. I name it 30000.magicmissle.en.upt for example to keep track of it easier.
This file simply contains "Community Expansion Pack"
This is setup soas to merge things later on, but also works very well with svn type systems as it reduces things to plain text.
( to go the other way, go to build, select the "Merge Content" Button.

It then traverses all the folders in the source folder which contain upt files, upd files, and raw resources, then saves content to the target folder, i've used this for managing custom content on a large PW and it's well tested, merging a lot of complex content, kaedrins for example, but this new interface is not perfected yet. Make sure the Target folder has nothing in it, since i rerun it i have it delete the folders content each time it's run. It can also let you choose to use custom tlk or dialog.tlk versions, name a custom tlk file, etc. )
( 2da's are dealt with using upd diff files, it also can extract a mysql dump but that does not deal with the problems of merging sets of 2da data )
Modifié par painofdungeoneternal, 07 septembre 2013 - 11:46 .
#10
Posté 07 septembre 2013 - 02:45
henesua wrote...
And it is this third thing - automation of documentation - that I really want. And the only difficult part of this for me is the TLK file. I'm not sure how to handle it as it is a binary file. If someone would share an application that converts a tTLK to text then we are cooking.
We do this with letoscript, using a subversion repository for sharing. Take a look at the last letoscript in the sticky on Mass Editing and Datamining your Module in the scripting forum.
The overview: our dev environment uses VirtualBox, and can run any mod in our modules folder, using Lin (important for us because of our plugins). Acaos made it publicly available, here.
Our version also contains the repo, which saves files in subfolders in the NWN install. There's a folder for our custom hak, which also contains our documentation sections, another for the module, another for nwnx, and so on. Someone wanting to make an edit simply modifies or creates a txt file in a given format in the appropriate folder. Here, for example, is ~/svn/hghak/doc/skill/bluff.txt:
Journal-Tags: skill_all
[doc]
{{ORANGE}}{{UND}}Bluff{{ENDUND}}{{END}}
- Can be used to lower the AB of an enemy, similar to how Taunt lowers AC. Bluff is used via the Taunt skill radial icon.
- The defender must make an opposed Concentration check; if it fails, its AB is lowered by the amount it failed the check by (to a maximum of -6) for 5 rounds.
- The {{PURPLE}}!opt tauntbluff{{END}} command toggles between Taunt and Bluff. The two cannot stack on the same target. As with Taunt, Bluffing is a free action.
.
[replace 8757]
Ability: Charisma
Requires Training: No.
Classes: All.
The character can make the outrageous or the untrue seem plausible. This skill encompasses acting, conning, fast talking, misdirection and misleading body language.
{{GOLD}}Bluff is used to lower the AB of an enemy, similar to how Taunt lowers AC. Bluff is used via the Taunt skill and the{{END}} {{PURPLE}}!opt tauntbluff{{END}} {{GOLD}}command toggles between them.
Check: The DC is a concentration check made by the target against the character's Bluff skill roll. It is a free action and considered an attack. If the Bluff is successful, the opponent suffers an Attack Bonus penalty equal to the difference between the bluff roll and the defender's roll (to a max of a -6 penalty) for 5 rounds.
Special: Bluff and Taunt penalties are not cumulative.
Use: Select Taunt skill and then target creature.{{END}}
{{GOLD}}This is a class skill for Shadowdancers in legendary levels.{{END}}
.
Note the replace 8757 bracket: that's the tlk table value, which it will swap that section (denoted by the single period on the line following) out for our custom tlk (the {{COLOR}} brackets are reformatted depending on what kind of file is being output - GOLD is for our custom edits). Using letoscript and text files like the one above, we're able to generate journal entries, tlk tables, and forum-formatted posts for our documentation, without having to re-type everything. Here's the final forum version containing that Bluff entry:
http://highergroundp...ummaries?page=1
So the tools you need - letoscript, and optionally NWNIAB, and svn, of course - have already been made publicly available, though it'll take some effort to shape them to the particulars of what you want. LMK if you have questions.
Funky
#11
Posté 07 septembre 2013 - 02:49
Funky
Modifié par FunkySwerve, 07 septembre 2013 - 02:52 .
#12
Posté 07 septembre 2013 - 03:02
#13
Posté 07 septembre 2013 - 03:09
Funky
#14
Posté 07 septembre 2013 - 09:38
acaos: I use the xml tlk utilities, they were on the vault iirc
Funky
#15
Posté 09 septembre 2013 - 10:24
#16
Posté 09 septembre 2013 - 10:29
TR
#17
Posté 09 septembre 2013 - 11:17
Thanks.
#18
Posté 09 septembre 2013 - 11:52
I think most PW admins have something like that eventually, hard part is that usually it's not something done so it's portable. ( Dex had it as well, even let you see your character sheet and how many times you were killed, but it was all in CFML and never got it all into PHP )
Modifié par painofdungeoneternal, 09 septembre 2013 - 11:53 .





Retour en haut







