Jump to content

Rebuilding Blucher's alternate BG2 NPCs


Nythrun

Recommended Posts

Nythrun, I am not convinced we have generated the OS error due to that ^^, though I will check - the error happens when loading the creature, so I assume there is a difference between patching and loading a .chr made as a half-elf vs one made as a human. Why else, out of three .chrs converted, would the two half-elf.cres fail and the human.cre install? I am just pretty confused about why the easiest part of this, building the .cres, is having so much trouble. I will look around, and try to figure out why.

 

(My turn to say "don't apoplogise" - I actually finally understood what you were doing with the terminated ascii whan that error popped up :)).

I will try the next round on this mid-week (RL stuff and BG1 NPC woes).

Link to comment

I have not forgotten stuff here, just not been able to update anything. Has anyone been able to get a created base .cre and test? I have not had an opportunity to try a base .cre created using Wounded Lion's method.

 

If we can get the .cre confirmed, the rest of this is copy and paste and change 2 lines for the basic conversion; some additional work for the item changes if we want them.

Link to comment

Same here -- away from internet until next Monday (Turkey day travel!) Post away, it is definitely your (re)creation!

 

 

Edit: hmmmm.. we are so darned close; I have been comparing the TOB Style NPC component to the code here, and I cannot for the life of me figure out why this isn't already a done deal.

Link to comment

I threw together an exempli gratis patch-from scratch version of this; if anyone's interested I can set it up on rapidshare or the like.

 

It's:

  1. Untested
  2. Hampered by my total ignorance of Tutu/BGT
  3. Only for Imoen
  4. Untested (as in, it might install)

 

There's not much I can do to assist without seeing the truculent .cres at hand, and the Wiki is still being cold shouldered.

 

/edit

 

Or, I could just cull the file names from dudleyville and SCS :p

Link to comment

Made it to line 2,816 before the first parse error...not too shabby if I do say so myself :p

 

To do list for today:

  • BGT files names for the BG1 versions of imoen.cre, kivan\(4\|6\)?.cre, quayle\(4\|6\)?.cre, viconi6.cre, xan\(4\|6\)?.cre, and xzar\(4\|6\)?.cre, and verify that these are the only ones who are changed.
  • BG1 spell lists for Dynaheir, Edwin, Eldoth, Garrick, Quayle, and Xzar (do they change level to level?)
  • Find out which weapon proficiencies the BG1 NPCs get in Tutu and BGT, and see if I've matched them (especially important with Xan).
  • File names for BG1 NPC's gear so that can be adjusted to the requirements of altered classes (low priority).
  • Patch the saving throw boni of the short races in a less stupid way.
  • Test the "add memorized innate" macro and make sure it doesn't crash the game or whatever.
  • Find out what the German word for Swashbuckler et alis is so I can finish the verflucht .tra .
  • Sleep?

Link to comment

Holy Toledo, Nythrun, way cool... I have been backed up against a wall with BG1 NPC, and have not continued on this for awhile - you decided to scrap the whole .cre approach and just patch from scratch? Probably for the best, as we haven't figured out why the .cre nonstandard order thing is happening.

 

I will find the time and do whatever assistance I can, if you send me materials to test/work on.

Link to comment

So, haven't found a complete spell list yet for the BG1 folks, so temporarily stymied.

 

Decided to re-write again instead (hopefully more legibly to people who aren't me this time :p ) .

 

Two questions:

 

Is a final .tp2 format like this:

BACKUP ~frontdown/test~
AUTHOR ~not I said the fox~

BEGIN ~cleric/mage multi~
SUBCOMPONENT ~aerie~
OUTER_SET "classandkit" "whatever" LAUNCH_ACTION_MACRO "do_everything"

BEGIN ~cleric/illusionist multi~
SUBCOMPONENT ~aerie~
OUTER_SET "classandkit" "whatever" LAUNCH_ACTION_MACRO "do_everything"

BEGIN ~fighter~
SUBCOMPONENT ~aerie~
OUTER_SET "classandkit" "whatever" LAUNCH_ACTION_MACRO "do_everything"

BEGIN ~kensai~
SUBCOMPONENT ~aerie~
OUTER_SET "classandkit" "whatever" LAUNCH_ACTION_MACRO "do_everything"

BEGIN ~platypus-slayer~
SUBCOMPONENT ~aerie~
OUTER_SET "classandkit" "whatever" LAUNCH_ACTION_MACRO "do_everything"

BEGIN ~knight of the water closet~
SUBCOMPONENT ~aerie~
OUTER_SET "classandkit" "whatever" LAUNCH_ACTION_MACRO "do_everything"

BEGIN ~cleric/mage multi~
SUBCOMPONENT ~fred~
OUTER_SET "classandkit" "whatever" LAUNCH_ACTION_MACRO "do_everything"

BEGIN ~cleric/illusionist multi~
SUBCOMPONENT ~fred~
OUTER_SET "classandkit" "whatever" LAUNCH_ACTION_MACRO "do_everything"

BEGIN ~fighter~
SUBCOMPONENT ~fred~
OUTER_SET "classandkit" "whatever" LAUNCH_ACTION_MACRO "do_everything"

BEGIN ~kensai~
SUBCOMPONENT ~fred~
OUTER_SET "classandkit" "whatever" LAUNCH_ACTION_MACRO "do_everything"

BEGIN ~platypus-slayer~
SUBCOMPONENT ~fred~
OUTER_SET "classandkit" "whatever" LAUNCH_ACTION_MACRO "do_everything"

BEGIN ~knight of the water closet~
SUBCOMPONENT ~fred~
OUTER_SET "classandkit" "whatever" LAUNCH_ACTION_MACRO "do_everything"

 

easy enough for other people to contribute to, and

 

Is it too flipping annoying to go through thirty-six NPCs with > twenty options each this way? It may very well be and I'm having misgivings.

Link to comment

I would use GROUP along with the SUBCOMPONENT actions to set it up, but I dunno...

 

nah, I wouldn't.

 

You only get all of NPCs for BGT installs, and you can add the IF FILE_EXISTS_IN_GAME stuff to make sure only the Tutu 24(?) show for Tutu and only the BG2 # for BG2. That cuts down on some repetition. The subcomponent code allows only one choice, so really the questions are:

 

Change Imoen?

a.something

b. something2

c.

d.

e.

f.

g.

on down the list

 

and the player only hits either "N" for no way or one of the choices and they are done.

 

The GROUP command might just make things worse - then you would be asked about each NPC, and only have the ones requested shown, but it is really no different han just asking the question in the first place...

 

and frankly, the point of Blucher's mod was to make new choices available. If a user is frustrated with making that many new choices, then why are they installing the mod in the first place? :p

 

As for repetitions, cut &paste, and saving Nythrun time (and frustration/boredome quotient) for important patch work and research grunt work is my stock-in-trade. Have Crimson/ConTEXT/TEXTEdit/Notepad, Will Travel!

Link to comment

Heh, think I've got it now.

 

It's ACTION_READLN to get a user-supplied variable, not ACTION_IF (1=1) THEN BEGIN READLN END. Wish I'd figured that out a few days ago :p

 

So there don't need to be any subcomponents at all, just two groups (BG1 only NPCs) and (BG2 only NPCs), then you pick the class from the generic list of the twenty that are possible, then the kit from however many.

 

This won't be so bad :p

Link to comment

ok.... please teach me!!!! I think you just said that you can get WeiDU to

  1. let a user choose to show just BG1 NPCs, just BG2 NPCs, or both;
  2. let the user choose which specific NPCs from a menu of all available based on that choice;
  3. for each NPC chosen, let the user choose to class NPCs from a menu of all available classes;
  4. for each NPC/class chosen, let the user choose to kit NPCs from a menu of all available and relevant kits

If so, wow. Please teach me using small words :p

Link to comment

You've been far too sweet for me to allow you to do all the miserable plodding work :p

 

Here's a basic example of how this will work: it's only going to pick classes and kits right now, though that's negotiable :p

BACKUP ~frontdown/imadummy~
AUTHOR ~Nythrun~

NO_IF_EVAL_BUG 

ALWAYS

 DEFINE_ACTION_MACRO ~select_class~ BEGIN
PRINT
~Select a class
1 Mage
2 Fighter
3 Cleric
4 Thief
5 Flintknapper
6 Psychoanalyst
7 Professional Wrestler
You must choose a number between 1 and 2.~
ACTION_READLN ~class~
ACTION_IF (("%class%" != 0x01) AND ("%class%" != 0x02)) THEN BEGIN
  LAUNCH_ACTION_MACRO ~select_class~
END
 END

 DEFINE_ACTION_MACRO ~select_kit~ BEGIN
ACTION_IF ("%class%" = 0x01) THEN BEGIN
  PRINT
  ~Select a kit
  1 None
  2 Illusionist
  3 Spoonbender
  You must choose a number between 1 and 3.~
  ACTION_READLN ~kit~
  ACTION_IF (("%kit%" != 0x01) AND ("%kit%" != 0x02) AND ("%kit%" != 0x03)) THEN BEGIN
	LAUNCH_ACTION_MACRO ~select_kit~
  END
  ACTION_IF ("%kit%" = 0x01) THEN BEGIN
	OUTER_SET "kit" = 0x40000000 // kit ids value for no kit
  END
  ACTION_IF ("%kit%" = 0x01) THEN BEGIN
	OUTER_SET "kit" = 0x04000000 // kit ids value for no kit
  END
  ACTION_IF ("%kit%" = 0x01) THEN BEGIN
	OUTER_SET "kit" = 0xffffffff // we'd obviously have to look up in kit ids what the value is here
  END
END
ACTION_IF ("%class%" = 0x02) THEN BEGIN
  PRINT
  ~Select a kit
  1 None
  2 Berserker
  3 Platypus-Slayer
  4 Knight of the Water Closet
  You must choose a number between 1 and 2.~
  ACTION_READLN ~kit~
  ACTION_IF (("%kit%" != 0x01) AND ("%kit%" != 0x02)) THEN BEGIN
	LAUNCH_ACTION_MACRO ~select_kit~
  END
  ACTION_IF ("%kit%" = 0x01) THEN BEGIN
	OUTER_SET "kit" = 0x40000000 // no kit
  END
  ACTION_IF ("%kit%" = 0x01) THEN BEGIN
	OUTER_SET "kit" = 0x40010000 // berserker
  END
END
 END

 DEFINE_ACTION_MACRO ~set_to_level_one~ BEGIN /*
COPY_EXISTING - ~%tempcre%~ ~override~
LAUNCH_PATCH_MACRO ~read_base_creature~
COPY ~lvl1npcs/cre/imnobody.cre~ ~override/%tempcre%~
LAUNCH_PATCH_MACRO ~calculate_lore~
LAUNCH_PATCH_MACRO ~calculate_thac0~
LAUNCH_PATCH_MACRO ~calculate_hitpoints~
LAUNCH_PATCH_MACRO ~calculate_saving_throws~
LAUNCH_PATCH_MACRO ~calculate_spellcasting_ability~
LAUNCH_PATCH_MACRO ~calculate_weapon_proficiencies~  
LAUNCH_PATCH_MACRO ~write_base_creature~ */
 END
 /*
 INCLUDE ~lvl1npcs/macros/macro_calculate_lore.tph~
 INCLUDE ~lvl1npcs/macros/macro_calculate_thac0.tph~
 INCLUDE ~lvl1npcs/macros/macro_calculate_hitpoints.tph~
 INCLUDE ~lvl1npcs/macros/macro_calculate_saving_throws.tph~
 INCLUDE ~lvl1npcs/macros/macro_calculate_spellcasting_ability.tph~
 INCLUDE ~lvl1npcs/macros/macro_calculate_weapon_proficiencies.tph~
 */
END

///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\

BEGIN ~aerie~
GROUP ~bg2 only npcs~
NO_LOG_RECORD

DEFINE_ACTION_MACRO ~patch_aerie~ BEGIN
 OUTER_SPRINT ~tempcre~ ~aerie7.cre~
 LAUNCH_ACTION_MACRO ~set_to_level_one~
 OUTER_SPRINT ~tempcre~ ~aerie9.cre~
 LAUNCH_ACTION_MACRO ~set_to_level_one~
 OUTER_SPRINT ~tempcre~ ~aerie11.cre~
 LAUNCH_ACTION_MACRO ~set_to_level_one~
END

LAUNCH_ACTION_MACRO ~select_class~
LAUNCH_ACTION_MACRO ~select_kit~
SILENT
LAUNCH_ACTION_MACRO ~patch_aerie~

///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\

BEGIN ~fred~
GROUP ~Mod npcs~
NO_LOG_RECORD

DEFINE_ACTION_MACRO ~patch_fred~ BEGIN
 OUTER_SPRINT ~tempcre~ ~fred7.cre~
 LAUNCH_ACTION_MACRO ~set_to_level_one~
 OUTER_SPRINT ~tempcre~ ~fred9.cre~
 LAUNCH_ACTION_MACRO ~set_to_level_one~
 OUTER_SPRINT ~tempcre~ ~fred11.cre~
 LAUNCH_ACTION_MACRO ~set_to_level_one~
END

LAUNCH_ACTION_MACRO ~select_class~
LAUNCH_ACTION_MACRO ~select_kit~
SILENT
LAUNCH_ACTION_MACRO ~patch_fred~

 

In order to single out specific groups, we'll probably add a REQUIRE_PREDICATE (FILE_EXISTS ~imoen6.cre~ OR FILE_EXISTS ~_imoen6.cre~) to detect Tutu/BGT.

 

This is safe to run, by the way, and writes nothing if you want to get a feel for how the options will be displayed - the external macros have to be commented out since they're about two thousand lines and won't fit.

 

Anyway, you pick your group (BG1, BG2, Mods).

 

Then it asks about each NPC with a yes/no prompt (I was thinking that would be just as convenient as a list, which would be codeable but kind of snarly) - basic stuff so far.

 

Before the component-specific stuff happens, we do the actions in the header's ALWAYS...END block, which is defining some macros so they'll always be ready to use and so we don't have to include them or write them more than once.

 

You pick the class first:

Select a class
1 Mage
2 Fighter
3 Cleric
4 Thief
5 Flintknapper
6 Psychoanalyst
7 Professional Wrestler
You must choose a number between 1 and 2.

There's only twenty classes possible, ever, so that's how long this section will be, and it's going to match numbers with class.ids.

 

The next bit in the macro ~select_class~ waits for the user to pick a number which will correspond to the class that the NPC will get - this is the ACTION_READLN ~class~ that I spent about four hours banging my head against yesterday. Note that if the user picks something that isn't an allowed number, it launches the same macro over again.

 

From there we'll move on to the ~select_kit~ macro, which is a little more complicated, as we only want to offer the berserker kit to someone who's a fighter of some kind, not to mages. So there will be twenty subsections here, each corresponding to a class that the user just selected (and we forced them to pick a valid one :) ) There's another ACTION_READLN, which asks for the kit this time. While we could just ask the user to enter 1073807360 if they want to have a berserker, that's annoying to type and prone to error, so instead they'll just pick a managable number off of an arbitrary list and we'll OUTER_SET it to 0x40010000 a bit later.

 

They're done making their choices now (well, we could add another level where they pick weapon proficiencies and such, but I'm not that far along yet and I think it would be too annoying). So we patch aerie. Which tells us to set the string value for ~tempcre~ to ~aerie7.cre~. This value is plugged into the set_to_level_one macro (which then reads all of the salient information from aerie7.cre, including her items and such). Then set_to_level_one copies a dummy .cre into the override as ~aerie7.cre~ and makes its changes. Then we repeat for aerie9.cre....

 

Um, I'm sure this is really unclear and slapdash and the examples are silly, so I'll be back later to (hopefully) clarify it a bit. I'm sure you'll get it though, if I can figure it out....

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...