Author Topic: Volunteer codeslave wanted for Kelsey overhaul  (Read 8970 times)

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7244
Volunteer codeslave wanted for Kelsey overhaul
« on: August 23, 2010, 06:16:47 PM »
Spurred by the receipt of a Russian Kelsey translation, I think the time has come to seek out some help modernizing the Kelsey mod.

As we all know, Kelsey was the first "full service" romance mod with flirts and voicework and blah blah blah.

But that also means that the code is really old. (Kelsey-TOB turned eight years old this month!) It doesn't avail itself of some of today's modern WeiDU coding advantages. It's still doing some replacing and overwriting which is bad form. It's still distributed in separate SOA and TOB portions, which the advance of broadband has made much less valuable.

Because my time is pulled in lots of directions, my WeiDU skills are rusty, and because frankly I don't understand all of the new scary things people are doing in TP2s these days, I'm hoping to enlist some help performing this fixup. I have no plans at this time to add new content to add to the mod (save the translation) but I would like to accomplish the following:

  • Consolidate Kelsey into a single, intelligent SOA/TOB installer, including backwards-supporting TP2 code to assist current Kelsey users to make a clean migration from the old world ways
  • Remove all "bad behavior" from the mod (foisting Detectable Spells, REPLACE DLG code for patch purposes, etc.)
  • Do whatever it is that people expect newer NPC mods to do in their code (??? see how out of touch I am?)

I'm capable of following instructions to help complete the conversion but would probably need to take orders rather than being the manager, simply because I'm not even certain what portions of the TP2 are bad or "could be done better." (certain elements like the old DLG REPLACE'ing I can probably deal with on my own.)

Any takers?
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: Volunteer codeslave wanted for Kelsey overhaul
« Reply #1 on: August 23, 2010, 06:47:02 PM »
BiG fixpack doesn't contain any fixes or anything to Kelsey, which (if I didn't know how BWP is pieced together) would be a phenomenal testament to Kelsey's stability.

If you don't want to alter sound conversion (since you're bound to be suggested 10 completely different approaches if you asked 8 people), #1 is basically
Code: [Select]
BACKUP ~kelsey/backup~
AUTHOR ~JCompton~
README ~path/to/readme.txt~
VERSION ~Kelsey v 3.141591415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679~ // bonus points if know which program uses this versioning scheme

LANGUAGE ...

BEGIN ~Kelsey~

UNINSTALL ~setup-kelseytob.tp2~ 0 @xxx // ~Uninstalling old version~
UNINSTALL ~setup-kelseytob.tp2~ 1 @xxx // ~Uninstalling old version~
// etc. to remove all components of kelsey ToB

<code from SoA tp2>

ACTION_IF GAME_IS ~ToB BGT~ THEN BEGIN
  <code from ToB tp2>
END

ACTION_IF MOD_IS_INSTALLED ~setup-solaufein.tp2~ 0 THEN BEGIN
  <tp2 code for SoA solaufein dialogue>
  ACTION_IF GAME_IS ~ToB BGT~ THEN BEGIN
    <tp2 code for ToB soulaufein dialogue>
  END
END

ACTION_IF FILE_EXISTS_IN_GAME ~finbodh.dlg~ THEN BEGIN
  <tp2 code for Ascension dialogue>
END

BEGIN ~Portrait by artist #1~
SUBCOMPONENT ~Alternate portraits~
COPY this that

BEGIN ~Portrait by artist #2~
SUBCOMPONENT ~Alternate portraits~
COPY this that
<...>

Re: #2, I believe it'd be better (and easier) to remove DS and give enemies standard BG2 AI  (E.G. mage13d.bcs) - by doing so, enemies will use whatever AI is currently installed (vanilla, tactics, SCSII, ...) which is better for consistence (IMHO). In a similar vein, I removed the banter accelerator from before (it causes problems if IEP tries to install the more configurable version).
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7244
Re: Volunteer codeslave wanted for Kelsey overhaul
« Reply #2 on: August 23, 2010, 06:53:46 PM »
If you don't want to alter sound conversion

Yeah, I don't. Even if the only reason was "I don't know exactly where the WAV masters are at this point," I'm unmoved by the argument that WAVC is preferable. It still makes things markedly larger and there's a minimal tradeoff in the installation experience to use oggdec. (And, if I'm being completely honest with myself, I do favor continuing to use an approach I pioneered.)

Quote
UNINSTALL ~setup-kelseytob.tp2~ 0 @xxx // ~Uninstalling old version~
UNINSTALL ~setup-kelseytob.tp2~ 1 @xxx // ~Uninstalling old version~

But I'll need to uninstall all components of Kelsey-SOA as well, probably, won't I? Isn't there some extra TP2 maneuver you need to do when the meaning of a component changes? (i.e., it was the SOA flirt pack in the old rev but now it's the portraits, or whatever)

Quote
Re: #2, I believe it'd be better (and easier) to remove DS and give enemies standard BG2 AI  (E.G. mage13d.bcs) - by doing so, enemies will use whatever AI is currently installed (vanilla, tactics, SCSII, ...) which is better for consistence (IMHO).

Yes, I would prefer this.
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline Miloch

  • Barbarian
  • Planewalker
  • *****
  • Posts: 1030
  • Gender: Male
Re: Volunteer codeslave wanted for Kelsey overhaul
« Reply #3 on: August 23, 2010, 07:11:42 PM »
Re: #2, I believe it'd be better (and easier) to remove DS and give enemies standard BG2 AI  (E.G. mage13d.bcs) - by doing so, enemies will use whatever AI is currently installed (vanilla, tactics, SCSII, ...) which is better for consistence (IMHO).
Yes, I would prefer this.
In that case, the mass-overwrite of vanilla spells should be unnecessary. That's the only glaring "bad behaviour" I see in the existing tp2. For everything else, I say if it ain't broke, don't fix it, though the consolidation of separate SoA/ToB mods should be easy enough.

If you do need to add effects to spells, the "modern" usage is the WeiDU ADD_SPELL_EFFECT function.

[Edit offtopic: is it possible to get the forum to word-wrap codeboxes when someone puts something like the value of pi in them rather than making it necessary to horizontally scroll in the browser?]
« Last Edit: August 23, 2010, 07:13:58 PM by Miloch »

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: Volunteer codeslave wanted for Kelsey overhaul
« Reply #4 on: August 23, 2010, 07:21:56 PM »
Yeah, I don't. Even if the only reason was "I don't know exactly where the WAV masters are at this point," I'm unmoved by the argument that WAVC is preferable. It still makes things markedly larger and there's a minimal tradeoff in the installation experience to use oggdec. (And, if I'm being completely honest with myself, I do favor continuing to use an approach I pioneered.)
I'm not suggesting to use WAVC (I used to complain tons about having to download the audio over a 56k line). There are hybrid oggdec/WeiDU approaches that make (un,re)installing WAV files faster and/or stabler across the three platforms; of course, choosing the 'right' approach between the 50 or so possible ones feels (and is) just jerking yourself off over a dozens lines of code.

If you don't want to move to an hybrid approach (which would actually be somewhat helpful for Linux and Mac users), some quick and easy steps to streamlining the process for Windows users are to
- remove the NOTEPAD path/to/readme.txt from the .bat (it's already in the README flag, which opens the readme before installing components)
- change AT_EXIT to AT_NOW (processed right now, not after saving the tlk, so safe against people closing weidu too soon and/or strange stack operations)
- change _INTERACTIVE versions of AT_NOW and AT_UNINSTALL to the non-INTERACTIVE versions (you're bound to uninstall but not reinstall audio or something like that).

Quote
But I'll need to uninstall all components of Kelsey-SOA as well, probably, won't I? Isn't there some extra TP2 maneuver you need to do when the meaning of a component changes? (i.e., it was the SOA flirt pack in the old rev but now it's the portraits, or whatever)
You need a DEPRECATED component:
Code: [Select]
BEGIN ~Solaufein dialogue~
DEPRECATED ~Included in the main component~
just put it in place of all removed and/or merged components (E.G. Sola dialogue, banter accelerator).
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline Kulyok

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 6233
  • Gender: Female
  • The perfect moment is now.
Re: Volunteer codeslave wanted for Kelsey overhaul
« Reply #5 on: August 24, 2010, 12:22:31 AM »
If it ain't broken, don't fix it. Kelsey has been surprisingly stable and compatible.

Seriously.

Offline MajorTomSawyer

  • The chain smoking modder-wannabe
  • Planewalker
  • *****
  • Posts: 255
  • Gender: Male
  • WeiDU Molester
    • Gaming Nerds Я Us
Re: Volunteer codeslave wanted for Kelsey overhaul
« Reply #6 on: August 24, 2010, 06:05:42 AM »
You should make Kelsey bisexual, that is all the rage these days.
"A good pipe and tobacco will make you a patient philosopher or a philistine depending on how you are bent." - Ted's Pipe Shop

Webmaster of Gaming Nerds Я Us

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7244
Re: Volunteer codeslave wanted for Kelsey overhaul
« Reply #7 on: August 24, 2010, 03:08:17 PM »
If it ain't broken, don't fix it. Kelsey has been surprisingly stable and compatible.

Seriously.

Well, the issue here is that I have to "touch" the mod anyway in order to add the new translation. So it raises the question of whether or not I should make other minor, modernizing improvements while I'm in there.
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline Mike1072

  • Planewalker
  • *****
  • Posts: 272
  • Gender: Male
Re: Volunteer codeslave wanted for Kelsey overhaul
« Reply #8 on: August 24, 2010, 04:45:37 PM »
Please get rid of the unnecessary spell overwriting.  It makes Kelsey incompatible with other mods unless a strict install order is followed.  Plus, the files are super ancient so it's possible that they undo Fixpack changes to the spells.

Offline Suspiria

  • Planewalker
  • *****
  • Posts: 14
  • Gender: Male
Re: Volunteer codeslave wanted for Kelsey overhaul
« Reply #9 on: September 02, 2010, 07:58:07 PM »
You should make Kelsey bisexual, that is all the rage these days.

Ha, I was wondering if this was going to be suggested. 
« Last Edit: September 02, 2010, 08:00:11 PM by Suspiria »

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7244
Re: Volunteer codeslave wanted for Kelsey overhaul
« Reply #10 on: September 02, 2010, 08:09:17 PM »
Hey, remember that the very first mod romance (Solaufein) covered that territory.

So in that sense, bisexual romance NPCs are so 2001.
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline DavidW

  • Planewalker
  • *****
  • Posts: 218
Re: Volunteer codeslave wanted for Kelsey overhaul
« Reply #11 on: September 03, 2010, 12:30:34 PM »
As I recall, Kelsey includes a detectable-spells package; I think most or all of the spell overwrites come from that. (It's one of the mods, along with Ascension, that SCS explicitly patches when DS is installed.)

If, as it sounds, that's the main change needed to prevent overwrites, I don't mind having a stab at incorporating the modern version of DS and generally cleaning up the code. It doesn't sound like a large task.

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7244
Re: Volunteer codeslave wanted for Kelsey overhaul
« Reply #12 on: September 03, 2010, 01:43:46 PM »
If, as it sounds, that's the main change needed to prevent overwrites, I don't mind having a stab at incorporating the modern version of DS and generally cleaning up the code. It doesn't sound like a large task.

I think it would be better, as was suggested above, to just put the creatures back on generic AI. The use of DS was never really a strategic decision, it was Ghrey saying "I think this Detectable Spells thing is cool" and me saying "Okay, whatever" to give him a little freedom in the creation process. But since there are certainly better ways to make enemies in general have better AI, there's no real reason it needs to be in Kelsey.

The biggest problem, it seems to me, would be merging the two halves of the mod in such a way that doesn't screw up the game for people who already have one or both installed.
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline Miloch

  • Barbarian
  • Planewalker
  • *****
  • Posts: 1030
  • Gender: Male
Re: Volunteer codeslave wanted for Kelsey overhaul
« Reply #13 on: September 03, 2010, 08:00:17 PM »
The biggest problem, it seems to me, would be merging the two halves of the mod in such a way that doesn't screw up the game for people who already have one or both installed.
Apart from UNINSTALL and DEPRECATED, you could make them both optional components of the same mod. That way, someone would have to explicitly install the component to UNINSTALL (for example) Kelsey ToB (if they choose the ToB component). Shouldn't really be an issue though.

Offline Suspiria

  • Planewalker
  • *****
  • Posts: 14
  • Gender: Male
Re: Volunteer codeslave wanted for Kelsey overhaul
« Reply #14 on: October 02, 2010, 05:55:19 PM »
Hey, remember that the very first mod romance (Solaufein) covered that territory.

So in that sense, bisexual romance NPCs are so 2001.

True enough, although by that logic, exclusively heterosexual NPCs are so 2000.  ;)   And is Solaufein really that old already?  Wow.   I guess I didn't know mods like that were already coming out a year after the game was released.   I was a late-comer to the game.  It was like late 2003 or early 2004 by the time I played the BG games.   
« Last Edit: October 02, 2010, 05:57:39 PM by Suspiria »

Offline Wisp

  • Planewalker
  • *****
  • Posts: 806
Re: Volunteer codeslave wanted for Kelsey overhaul
« Reply #15 on: December 27, 2010, 08:10:08 AM »
If no one else is doing this I thought I'd give it a go, with the probablydefinitely-too-hopeful goal of having it done before Jan.

Some questions:

What do you want to do with kelsyai.bs (player AI for Kelsey)? It uses Kelsey's DS so de-DS-ing it, while keeping it, isn't entirely straightforward.

Some scripts have cooperative elements (e.g. priests heal wounded who shout ASSIST). Do you want to keep this, or replace the entire custom script with a standard one?

Do you want to axe the banter accelerator like Bigg suggested?

Do you want more questions like these and/or review the package I put together (or a detailed summary of the changes)?

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7244
Re: Volunteer codeslave wanted for Kelsey overhaul
« Reply #16 on: December 27, 2010, 10:49:47 AM »
What do you want to do with kelsyai.bs (player AI for Kelsey)? It uses Kelsey's DS so de-DS-ing it, while keeping it, isn't entirely straightforward.

I'd just as soon suggest replacing it with an off-the-shelf sensible sorcerer AI file, or omitting it entirely.

Quote
Some scripts have cooperative elements (e.g. priests heal wounded who shout ASSIST). Do you want to keep this, or replace the entire custom script with a standard one?

Replace with standard.

Quote
Do you want to axe the banter accelerator like Bigg suggested?

Yes.

Quote
Do you want more questions like these and/or review the package I put together (or a detailed summary of the changes)?

Yes, we should discuss it in some depth, preferably in realtime.

I'll probably also want to mess with how the alternate portraits are presented (like, either bundling more of them, or bundling none at all), and probably go ahead and actually change the default to one of the clearly-superior variants. I'll probably want to mull that over a bit.
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline Wisp

  • Planewalker
  • *****
  • Posts: 806
Re: Volunteer codeslave wanted for Kelsey overhaul
« Reply #17 on: December 27, 2010, 01:39:35 PM »
What do you want to do with kelsyai.bs (player AI for Kelsey)? It uses Kelsey's DS so de-DS-ing it, while keeping it, isn't entirely straightforward.

I'd just as soon suggest replacing it with an off-the-shelf sensible sorcerer AI file, or omitting it entirely.

I'm not sure there is anything that doesn't require DS that is significantly different from the vanilla player scripts, so maybe omitting it is the best option.

Quote
Quote
Do you want more questions like these and/or review the package I put together (or a detailed summary of the changes)?

Yes, we should discuss it in some depth, preferably in realtime.

Sure. I'm partial to IRC myself, but whatever works for you.

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7244
Re: Volunteer codeslave wanted for Kelsey overhaul
« Reply #18 on: December 27, 2010, 02:22:29 PM »
I'm not sure there is anything that doesn't require DS that is significantly different from the vanilla player scripts, so maybe omitting it is the best option.

Was the original aware of his cloak's Fireshield: Green? Automating his use of that would be handy and sensible if it's easy enough to accomplish.

Quote
Sure. I'm partial to IRC myself, but whatever works for you.

I'm usually logged into PPG's channel on Slashnet (#ppgmod) but am stupendously busy for the next day or two. We can have a brief chat if you'd like, though.
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline Wisp

  • Planewalker
  • *****
  • Posts: 806
Re: Volunteer codeslave wanted for Kelsey overhaul
« Reply #19 on: December 28, 2010, 04:54:23 AM »
Was the original aware of his cloak's Fireshield: Green? Automating his use of that would be handy and sensible if it's easy enough to accomplish.

It was not.
Scripting him to use the cloak is easy enough, but scripting him to use it appropriately (e.g. not as soon as he sees some random goblin) is more difficult. I'll see what I can come up with.

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: