Aller au contenu

Photo

A More Awesome Way to Mod the Game?


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

#1
The Fred

The Fred
  • Members
  • 2 516 messages
A few weeks ago, I had something of an epiphany. You see, I had been (re)playing what is considered by many to be BioWare's great ever RPG, Baldur's Gate, but because I've played it a couple of times before, this time, I installed a number of mods which greatly enhanced the gameplay experience.

However, as much fun as it was, what I want to talk about is not the game, but the mods. Baldur’s Gate is an old game which was never designed to be modded, but it has been, extensively. Now, because of the nature of NWN(2), we tend to create modules not modifications and doing either is easier. However, it suddenly struck me that NWN(2) suffers from many of the modding limitations that BG suffered from – in particular, 2DA and TLK merging.

To illustrate what I mean: If go and download Kaedrin’s PrC Pack, suddenly, I can’t use anyone else’s class pack, unless I merge their classes.2da files. But wait! That’s not all. I also can’t use any other completely unrelated packs with custom strings, like an Animal Companion pack, because they both use a modified dialog.tlk file. Now, it’s not too hard to merge them for those that know how, but what if I want to combine three, four, or more packs?

Furthermore, this situation gives rise to a distinct dearth of such content – notice that we generally only have a few large such overrides, and very few small ones (and any mathematician should suspect that this is wrong because it contravenes the power law we might expect such releases to follow). Why? Well, I’m hardly going to spend my time building and releasing my PrCs of the Discworld pack if it has to compete with such giants as Kaedrin’s, or Drammel’s Tome of Battle, and I don’t want to provide a plethora of merged files for each possible install combination.

Anyway, the point of my story is that, as anyone who’s modded BG will know, most mods are now installed with an awesome utility called WeiDU. What it does is dynamically patch the TLK, 2DA, script and other files, and is capable of checking for compatibility with existing mods etc. Then, when you’re done, it will uninstall the mod for you – and can even uninstall them in a different order to the one you installed in, by un- and re-installing mods as appropriate. Because it keeps a complete backup, you never need to worry.

It took a while, though, for the ramifications of this to percolate through my brain. Suddenly, it hit me! Why couldn’t we use WeiDU to install NWN(2) mods? It quickly became clear to me that we couldn’t – the games are just too dissimilar. But surely a similar program could be created?

Well, I’ve never created a piece of software in my life, but I did do one course on C (half of which covered syntax common to NWScript) so I figured it might be worth a go creating something, even if I had to learn as I went along (which I did). So, I do now have a “proof-of-concept” program which can automatically patch TLK and 2DA files so that multiple mods can be installed with relative ease, which I intend to release (albeit probably as a beta) sometime soon (I’ve been kinda busy recently so I’ve only been working on it on and off).

However, I think I’ve written more than enough for the meantime, so whay does everyone think about whether such an automatic mod installer might work?

Modifié par The Fred, 03 août 2010 - 12:16 .


#2
_Knightmare_

_Knightmare_
  • Members
  • 643 messages
If it works then I'd say it would be a VERY useful and popular tool. Please do you best to make it user firendly, even to those with little computer literacy skills.

#3
The Fred

The Fred
  • Members
  • 2 516 messages
Well, my programming skills are pretty aweful, so I've been having to learn as I go, but I do have something now which can patch 2da and TLK files, back up changes and reverse them. I still have lists of issues with it and features I'd like to add but as a demonstration of what should be possible it seems to work surprisingly well.



In terms of user-friendliness, it's relatively painless for the end-user, though producing an install file for a specific mod is still a bit awkward. Right now I'm just making a couple of demo ones for some popular override packs.

#4
Guest_Chaos Wielder_*

Guest_Chaos Wielder_*
  • Guests
I like the sound of it. Anything that takes away time from 2das is useful, IMO

#5
NWN DM

NWN DM
  • Members
  • 1 126 messages
Yes please... speaking on behalf of those who just want to build, not futz around with 2da and tlk files.

#6
ladydesire

ladydesire
  • Members
  • 1 928 messages
If this could let me mod in NWN2 the way I do in Dragon Age, bring it on. :) That's the main reason I haven't come back to modding in NWN2; its a royal pain compared to DA.

#7
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages
 You mean an installer like this
http://nwvault.ign.c....detail&id=4560

or 2da merging like this
http://nwvault.ign.c...ls.Detail&id=75

The stuff dragon age has just kind of does that on the fly, it still will have issues of various sorts.

#8
The Fred

The Fred
  • Members
  • 2 516 messages
I haven't tried out the PRC installer myself. Does it merge things or just extract them?

The 2DA merger is kind of what I'm getting at, but I'm proposing more a sort of "all-purpose" installer which will patch 2DAs, TLKs (and potentially scripts etc) all in one go with the minimum of pain for the end user. Kind of like the 2DA merger combined with a TLK merger, but one that'll do it all automatically like WeiDU does for BG (if you have BG, try out a WeiDU mod; if not, go buy BG Posted Image).

Of course, there are many better programmers than me out there but I've built something as a demo at least.

#9
-Semper-

-Semper-
  • Members
  • 2 256 messages

ladydesire wrote...

If this could let me mod in NWN2 the way I do in Dragon Age, bring it on. :) That's the main reason I haven't come back to modding in NWN2; its a royal pain compared to DA.


better fiddling with 2das rather than the absolutely useless lightmapper bioware ships with the da:o toolset.
nice tool fred, bring it on ;)

Modifié par -Semper-, 04 août 2010 - 10:13 .


#10
ladydesire

ladydesire
  • Members
  • 1 928 messages
When you have to merge 3 or 4 different sets of file on a fairly regular basis to make sure they're all compatible, it's a royal pain; just having to worry about my own content will be so much nicer.



As far as the PRC installer, if I remember correctly there are several problems; it doesn't support NWN2 yet and it only does haks and separate module tlk files, not overrides and dialog.tlk. It might call the script compiler, but I don't remember for sure as it's been a while since I looked at the source code for it.

#11
The Fred

The Fred
  • Members
  • 2 516 messages
Well I have uploaded my demo to the vault here. It's still not approved at time of writing, but then it's not even brillig PST yet - hopefully by then it will be up.



All it does at the moment is patch the dialog.tlk and 2da files into the override, and copy other files. If you have the NSSCLC installed it can call that too, but since it doesn't have script patching functions yet, there's no real point.



I've made a couple of demo files for Races of Faerun and Tome of Battle - to use these, run them from the program (just enter the filename, including path and extension, though I made them extensionless for ease). You need the respective mods installed into folders of the same name in the mods subfolder of the download. Unfortunately, I haven't been able to test them fully 'cos afaik they're both SoZ-required and I don't have that (so no custom classes for me!). This is another thing that needn't be a problem, though; my ideal vision is one where people can install the same mod regardless of what expansions they have (for the most part) as well as regardless of what other mods they have. Hell, you could even (theoretically) have a mod which would work on both NWN1 and 2.



Feel free to criticise away, by the way - I'm more than aware there are quite a lot of issues, and many many more features which I would like such an installer to have, but any more input is welcome!



P.S. If anyone wants the source code they can have it, I'm just really ashamed of how bad it might be. ;-)

#12
ladydesire

ladydesire
  • Members
  • 1 928 messages
I'd be interested in the source code; messy is fine, as long as it gets the job done.

#13
The Fred

The Fred
  • Members
  • 2 516 messages
It's not so much that it's messy (I've commented it quite a lot, even if many of the comments are more notes to myself) but that because I've been learning as I go along there are probably a lot of better ways of doing things, and next on my list is to go and learn to program properly and then fix it up. I'm conscious that with C, doing BAD things like causing memory leaks and whatnot are a lot easier than they should be. Posted Image

Anyway I don't mind putting it up sometime. The original release has been verified on the vault now, too, by the way.

#14
WyrinDnjargo

WyrinDnjargo
  • Members
  • 136 messages
if you can pull this off you'll be a true scholar and a gentleman. Don't ahve time to test at the moment, but maybe soon....

#15
The Fred

The Fred
  • Members
  • 2 516 messages
I have a list of things that need to be done or would be nice to do which is longer than my arm, but unfortunately I've been kinda busy myself. I aim to get the first few things (learn C, or even another language, fix up existing code and improve efficiency where possible, and then add a few features like adding 2da columns, string inputs to TLKs and 2das, script patching etc) done before to long, though.



Maybe then BIF reading for NWN1 users, GFF editing maybe and hopefully, eventually, campaign patching. Dynamic TLK stuff too, like WeiDU does, so you don't need to reserve TLK ranges either, and potentially even the same for 2das and things.

#16
Haplose

Haplose
  • Members
  • 1 262 messages
If you suceed to make it work and to make it as user friendly as possible, so that even someone 100% ignorant when file merging is concerned (such as myself) can easily install multiple mods that modify the same files, I would say this would be revolutionary!



Good luck!

#17
nicethugbert

nicethugbert
  • Members
  • 5 209 messages
I used to know C and loved it. I never had memory leak problems. I think the problem with memory leaks is all a result of programmer carelessness. Naturally, a language where memory management is automatic and reliable frees up programmer time so they can be careful about something else.



I always did want to learn python but never got around to it. I was never as good at C++ as a I was with C. I just tend to think in terms of flow of commands rather than objects and I had no problems being careful with pointers. I guess C is the more Presidential language.




#18
The Fred

The Fred
  • Members
  • 2 516 messages
Well I've kinda been learning as I've gone along, meaning I'm often saying things like "so what's garbage collection?" Obviously the syntax is more or less easy after scripting in NWN, but pointers and stuff are a massive brainache when you're trying to learn them. Posted Image
Still, I think I know in theory pretty much how to do a lot of the things I'd like to do with this, it's just finding the time and state of mind (yes, I have to meditate before I can script or program Posted Image).

#19
The Fred

The Fred
  • Members
  • 2 516 messages
I have made a new Project Page, to be cool (also so I can try out the new Project capability of this site, or "Capers" as they're called in Buccaneer).

#20
-Semper-

-Semper-
  • Members
  • 2 256 messages
just a quick note: you have to set your files to public. right now they are not visible ;)

#21
The Fred

The Fred
  • Members
  • 2 516 messages
Oh right OK (first project I've made). Thanks for that. Is that better?

#22
The Fred

The Fred
  • Members
  • 2 516 messages
OK, for anyone who's interested, I've put the source code up. It's a little outdated now since I've made a few changes since that version, but the main bulk is the same. It's got quite a lot of comments, though most of them are notes from me to myself (and read like a schizophrenic soliloquy).