Jump to content

Search the Community

Showing results for tags 'macro'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General Discussion
    • G3 News and Announcements
    • Infinity Engine Modding News
    • General Mod Discussion
    • Fan Fiction
    • Noobermeet
  • Tools & Resources
    • DLTCEP
    • GemRB
    • The Gibberlings Three Debugging Suite for BG2
    • IESDP Updates and Info
    • Modding How-Tos and Tutorials
    • Modding Q&A
    • Multi-Install Tool
    • Widescreen Mod
  • Released Projects
    • Miscellaneous Released Mods
    • Ajantis
    • Alternatives
    • Amber
    • Angelo
    • Ascension
    • Auren Aseph
    • BG1 NPC Project
    • Baldur's Gate Mini Quests and Encounters
    • The Beaurin Legacy
    • BG2 Fixpack - General Discussion
    • Calin
    • The Calling
    • Cirerrek's AI Scripts
    • Coran's Friendship Mod
    • Crossmod Banter Pack
    • Divine Remix
    • Enhanced Edition Trilogy
    • Evandra
    • Full Plate & Packing Steel
    • Garrick's Infatuation
    • Gavin
    • The Gibberlings Three Anniversary Mod
    • Glam's NPC Pack
    • Icewind Dale Mod Roundup
    • Icewind Dale in Baldur's Gate II
    • Imoen 4 Ever
    • Item Randomiser
    • Item Revisions
    • IWD2 NPC Project
    • IWDification
    • Keeping Yoshimo
    • Kivan and Deheriana Companions for BG2
    • Level One NPCs
    • Mur'Neth
    • NPC Kitpack
    • NPC Strongholds
    • NPC Tweak for BG2
    • Oversight
    • Romantic Encounters (BG)
    • Romantic Encounters (BG2)
    • Sarah
    • Song and Silence
    • Spell Revisions
    • Sword and Fist
    • Sword Coast Stratagems
    • Tweaks Anthology Forum
    • Tyris Flare
    • Wheels of Prophecy
    • Yoshimo's Remorse
  • Unreleased Projects
    • Aklon
    • Balduran's Seatower
    • Baldur's Gate: Shadow Hand TC
    • Aran Whitehand
    • Delainy
    • IWD Tutu
    • Kit Revisions
    • Inactive Projects
  • NWN2 Modding
  • Mod Workrooms

Categories

  • NPCs
  • Quests and Others
  • Tweaks & Fixes
  • Items/Kits/Spells
  • Portrait Packs
  • Mini Mods
  • Tools
  • In Progress

Categories

  • Fixes
  • Items
  • Kits
  • NPCs
  • Quests
  • Spells
  • Tweaks
  • Other
  • Tools

Product Groups

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Discord


Website URL


Skype


AIM


MSN


ICQ


Yahoo


Jabber


Location


Interests


Mods Worked On

Found 3 results

  1. OK, long faculty meeting, and no access to stuff I am supposed to be working on, or even modding stuff - and most of all, a long pointless argument raging over "No Child Left Behind"'s merits, which really is moot - it isn't as if we can choose to ignore it. So, I already have a bunch of stuff done on soundsets - I'll scribble while Rome burns. The soundset. Straightforward stuff like .cre files, etc., really are not a concern until later. I am working from a "character first" perspective, and BG2 graphics are not Oblivion stuff; we can build that stuff later. So, sounds - recorded lines or not? Argument for: everyone has 'em. They help some people characterize the NPC and fill them out in their brain. Argument against, thousands - including tons of time, energy, and work balancing the sounds, only to have a bunch of folks who had supplied the voice and accent in their heads think "hey - that is not how Aran should sound". In fact, I often rip the soundfiles out of mods before playing them - my inner voice is much more comfortable to me than an outsider's interpretation. I like bg1npc's idea of "soundtracks" for speakers, called by script, but that is a whole other topic, and weeks away. But you know what, it doesn't matter at this point - until Aran is 90% or more done, taking the time to record (or hire someone to record) a soundset and/or lines is silly. Things may will change, and perhaps the entire characterization will shift slightly. So the sound recordings themselves, next to last to do. Let's move on to the text strings, and set them up to handle sound when it is eventually recorded and added. Note: This looks like just a quick couple of days to whip through this, but actually took place over several weeks, and the final draft was vetted by berelinde and Amaurea to make sure I wrote something that fit my idea. Unfortunately, we all write from within our own heads. While I'm not writing Aran for anyone but my personal enjoyment, it is nice to check to see if the communication moves off the page to other folks, or if it ends up being stilted/odd. Some soundreferences with tobbacco use got nixed because the ladies (quite rightly) pointed out that it was a potential turn-off for some readers, while adding nothing really to his character - so I blatantly stole berelinde's rephrase of it into "twig chewing". This stuff is tougher than it looks, because we all want the character to have what comes up in our head during fanfic-like daydreams; unfortunately, if you create a line like La Traviata for dying, it will stink as a soundset: This might be fun to envision in my head, but really, soundset entries are supposed to be very quick, or the lines will trip over others. Wicked short, to the point - that's why they are some of the toughest writing out here. "Characterize your NPC's reactions in less than four words.... GO!" But, we have caught a break with it, because we have a format to work in, and we know the parameters. Short, simple, to the point, in character. And, WeiDU has taken the work out of all the coding completely. A standard setup in the .tp2 will install the right strings in the right places - and the i.e. engine has a simple format for strings that deal with sound. STTREF/OFFSET ~[comment] text string~ [sOUNDREF] Here, STTREF/OFFSET is where in the .cre file the string reference in dialog.tlk is stored. This is why soundsets can get scrambled, and other lines, too - the .cre file carries only a reference number, or index lookup to dialog.tlk. Technically, you could go all fancy hard-core Old Skool here and tell WeiDu the specific offset for the .cre sound, but why when WeiDU does the work for you: SAY MORALE The next, the actual string created in dialog.tlk, ~[comment] text string~ well, that's pretty straightforward - the [comment] will not be seen by the player. In fact, it is where I picked up the idea to try to use this to help translators - when Smoketest, devSin, and Grim Squeaker patiently led me through how sound works in i.e. games, it was there for the BioWare developers. Every soundset in BG carries the referenced sound file in the test string in this format. It is especially useful for usually "no word" things, like "Hurt" and Dying" - the blank sound reference can be labled and searched for by the comment, like this: SAY DAMAGE ~[c-aran13]~ [c-aran13] sounds like "Ah!", but carries no text - and would get skipped in traification if it were traified as this: SAY DAMAGE ~~ [c-aran13] So, last part - [sOUNDREF]. Here, the .wav (or wavc, acm) that we will eventually place in the game override file is referenced. It can only be 8 characters long, and looking at other folk's mods there are lots of ways to label this stuff - BioWare had an odd numbering system that is consistent but does not match .cre ordering - so i am going to arbitrarily label these c-aran## and use the comment as the soundreference. The game won't care if there is no sound matching in the override - it will silently skip it. And then, if I get a soundset recorded and dropped into the override, it will be picked up when that particular string is called by the engine. Here is the blank template that can be applied for all BG2 engine games (not BG, etc - they have the same structure, but the .cre file has less of these enabled.) COPY_EXISTING ~myMod/myFolder/myCre.cre~ ~override/myCre.cre~ SAY NAME1 ~ << Full Name Of Creature >> ~ SAY NAME2 ~ << Short (tooltip hovering) Name Of Creature >> ~ SAY MORALE ~[sOUNDREF] << Morale Failure >> ~ [sOUNDREF] SAY HAPPY ~[sOUNDREF] << When Happy on .2da >> ~ [sOUNDREF] SAY UNHAPPY_ANNOYED ~[sOUNDREF] << When Annoyed on .2da >> ~ [sOUNDREF] SAY UNHAPPY_SERIOUS ~[sOUNDREF] << When Close to leaving on .2da >> ~ [sOUNDREF] SAY UNHAPPY_BREAKING_POINT ~[sOUNDREF] << When leaving on .2da >> ~ [sOUNDREF] SAY LEADER ~[sOUNDREF] << Moved to Leader >> ~ [sOUNDREF] SAY TIRED ~[sOUNDREF] << Tired >> ~ [sOUNDREF] SAY BORED ~[sOUNDREF] << Bored >> ~ [sOUNDREF] SAY BATTLE_CRY1 ~[sOUNDREF] << Attack Commanded >> ~ [sOUNDREF] SAY BATTLE_CRY2 ~[sOUNDREF] << Attack Commanded >> ~ [sOUNDREF] SAY BATTLE_CRY3 ~[sOUNDREF] << Attack Commanded >> ~ [sOUNDREF] SAY BATTLE_CRY4 ~[sOUNDREF] << Attack Commanded >> ~ [sOUNDREF] SAY DAMAGE ~[sOUNDREF] << Hit by other >> ~ [sOUNDREF] SAY DYING ~[sOUNDREF] << Toast >> ~ [sOUNDREF] SAY HURT ~[sOUNDREF] << Low HP >> ~ [sOUNDREF] SAY AREA_FOREST ~[sOUNDREF] << in area flagged with Forest bit >> ~ [sOUNDREF] SAY AREA_CITY ~[sOUNDREF] << in area flagged with City bit >> ~ [sOUNDREF] SAY AREA_DUNGEON ~[sOUNDREF] << in area flagged with Dungeon bit >> ~ [sOUNDREF] SAY AREA_DAY ~[sOUNDREF] << Daytime >> ~ [sOUNDREF] SAY AREA_NIGHT ~[sOUNDREF] << Nighttime >> ~ [sOUNDREF] SAY SELECT_COMMON1 ~[sOUNDREF] << Select the .cre >> ~ [sOUNDREF] SAY SELECT_COMMON2 ~[sOUNDREF] << Select the .cre >> ~ [sOUNDREF] SAY SELECT_COMMON3 ~[sOUNDREF] << Select the .cre >> ~ [sOUNDREF] SAY SELECT_COMMON4 ~[sOUNDREF] << Select the .cre >> ~ [sOUNDREF] SAY SELECT_COMMON5 ~[sOUNDREF] << Select the .cre >> ~ [sOUNDREF] SAY SELECT_COMMON6 ~[sOUNDREF] << Select the .cre >> ~ [sOUNDREF] SAY SELECT_ACTION1 ~[sOUNDREF] << Action >> ~ [sOUNDREF] SAY SELECT_ACTION2 ~[sOUNDREF] << Action >> ~ [sOUNDREF] SAY SELECT_ACTION3 ~[sOUNDREF] << Action >> ~ [sOUNDREF] SAY SELECT_ACTION4 ~[sOUNDREF] << Action >> ~ [sOUNDREF] SAY SELECT_ACTION5 ~[sOUNDREF] << Action >> ~ [sOUNDREF] SAY SELECT_ACTION6 ~[sOUNDREF] << Action >> ~ [sOUNDREF] SAY SELECT_ACTION7 ~[sOUNDREF] << Action >> ~ [sOUNDREF] SAY SELECT_RARE1 ~[sOUNDREF] << rare sound >> ~ [sOUNDREF] SAY SELECT_RARE2 ~[sOUNDREF] << rare sound >> ~ [sOUNDREF] SAY CRITICAL_HIT ~[sOUNDREF] << successful critical roll >> ~ [sOUNDREF] SAY CRITICAL_MISS ~[sOUNDREF] << dysmal critical roll >> ~ [sOUNDREF] SAY TARGET_IMMUNE ~[sOUNDREF] << Up the creek without a paddle >> ~ [sOUNDREF] SAY INVENTORY_FULL ~[sOUNDREF] << dropping items >> ~ [sOUNDREF] SAY SPELL_DISRUPTED ~[sOUNDREF] << hit wile casting >> ~ [sOUNDREF] SAY SET_A_TRAP ~[sOUNDREF] << successful trap set >> ~ [sOUNDREF] SAY HIDDEN_IN_SHADOWS ~[sOUNDREF] << successful attempt to hide >> ~ [sOUNDREF] SAY PICKED_POCKET ~[sOUNDREF] << successful pickpocket attempt >> ~ [sOUNDREF] SAY BIO ~[DUMMYREF] << character screen, no sound - text with blank sound reference >> ~ [bLANK] Well, here goes - in file aranw.tp2, right now empty, we toss in the set of references: COPY_EXISTING ~aranw/cre/c-aran.cre~ ~override/c-aran.cre~ SAY NAME1 ~Aran Whitehand~ SAY NAME2 ~Aran~ SAY MORALE ~[c-aran01] Helm's bones - RETREAT!~ [c-aran01] SAY HAPPY ~[c-aran02] Aye, 'tis a fair group. 'Tis better than a clear day on Trade Way.~ [c-aran02] SAY UNHAPPY_ANNOYED ~[c-aran03] By Tymorra's bright coin, you make some strange decisions. I don't rightly agree.~ [c-aran03] SAY UNHAPPY_SERIOUS ~[c-aran04] I gave up some serious opportunities to travel with you. Wasn't expectin' this kind of 'adventure'. Stop this, or I'll dissolve th' contract.~ [c-aran04] SAY UNHAPPY_BREAKING_POINT ~[c-aran05] I'll see you in the hands o' Kelemvor, but not one second before.~ [c-aran05] SAY LEADER ~[c-aran06] I'll lead, but 'tisn't my strong point.~ [c-aran06] SAY TIRED ~[c-aran07] Time to make camp. This gear is startin' to chafe.~ [c-aran07] SAY BORED ~[c-aran08] By Torm's Blood, are we beggin' to be ambushed? Standin' 'round with our swords up our...~ [c-aran08] SAY BATTLE_CRY1 ~[c-aran09] Archers to th' rear!~ [c-aran09] SAY BATTLE_CRY2 ~[c-aran10] Spellcasters die first!~ [c-aran10] SAY BATTLE_CRY3 ~[c-aran11] By Tymorra's Luck!~ [c-aran11] SAY BATTLE_CRY4 ~[c-aran12] By Sune's Bottom!~ [c-aran12] SAY DAMAGE ~[c-aran13]~ [c-aran13] //ah... SAY DYING ~[c-aran14]~ [c-aran14] //aarrgh... SAY HURT ~[c-aran15] Send the rest o' them to hell for me...~ [c-aran15] SAY AREA_FOREST ~[c-aran16] Need less trees, more road. Too many places for enemies to hide.~ [c-aran16] SAY AREA_CITY ~[c-aran17] Trade time! Some trade, then some drinkin', then some sleep... or more drinkin'.~ [c-aran17] SAY AREA_DUNGEON ~[c-aran18] I gave up comfortable inns an' guardin' simple caravans to poke around this dank musty place. I'm a bloody idiot.~ [c-aran18] SAY AREA_DAY ~[c-aran19] Lathander's fat arse is up at last. 'Bout time he shed some light around here.~ [c-aran19] SAY AREA_NIGHT ~[c-aran20] Bloody dark. Good for coverin' enemies an' ambushes. Someone light a torch, eh?~ [c-aran20] SAY SELECT_COMMON1 ~[c-aran21] Yep?~ [c-aran21] SAY SELECT_COMMON2 ~[c-aran22] What's to be done?~ [c-aran22] SAY SELECT_COMMON3 ~[c-aran23] Do I needs lead?~ [c-aran23] SAY SELECT_COMMON4 ~[c-aran24] Aye?~ [c-aran24] SAY SELECT_COMMON5 ~[c-aran25] Yes?~ [c-aran25] SAY SELECT_COMMON6 ~[c-aran26] I'm listenin'.~ [c-aran26] SAY SELECT_ACTION1 ~[c-aran27] Got it.~ [c-aran27] SAY SELECT_ACTION2 ~[c-aran28] Sune's sweet cheeks, I heard.~ [c-aran28] SAY SELECT_ACTION3 ~[c-aran29] On it.~ [c-aran29] SAY SELECT_ACTION4 ~[c-aran30] Understood~ [c-aran30] SAY SELECT_ACTION5 ~[c-aran31] Sune's Bosom, I'm movin', already!.~ [c-aran31] SAY SELECT_ACTION6 ~[c-aran32] Ilmater's Blood. I said I'd do it.~ [c-aran32] SAY SELECT_ACTION7 ~[c-aran33] Less talk, more action.~ [c-aran33] SAY SELECT_RARE1 ~[c-aran34] Watch where you point that thing.~ [c-aran34] SAY SELECT_RARE2 ~[c-aran35] Aye, I'm here.~ [c-aran35] SAY CRITICAL_HIT ~[c-aran36] Good.~ [c-aran36] SAY CRITICAL_MISS ~[c-aran37] Cyric's Black Heart!~ [c-aran37] SAY TARGET_IMMUNE ~[c-aran38] Bounced off. Damn.~ [c-aran38] SAY INVENTORY_FULL ~[c-aran39] I'm already carryin' more than my share.~ [c-aran39] SAY SPELL_DISRUPTED ~[c-aran40] Never did get that one right...~ [c-aran40] SAY SET_A_TRAP ~[c-aran41] Try that, you bugger.~ [c-aran41] SAY HIDDEN_IN_SHADOWS ~[c-aran42] Huntin'...~ [c-aran042] SAY PICKED_POCKET ~[c-aran043] Hey, look what I found.~ [c-aran43] SAY BIO ~[c-aranbio] When you ask him about his past, ARAN WHITEHAND grasps at a nearby twig to chew on. He explains that he grew up in a small independent family-run Coster plying the Trade Way and Coast Way from Waterdeep both north and south. Working as both Pen and Sword (scribe and fighting guard) made him attractive as an independent, since he could balance accounts, keep inventory, and still operate as a sellsword. A few campaigns with mercenary companies, a few battles, and lots of wandering about has brought him to Amn. He hastens to note that he is not the man to send in to negotiate anything, preferring to wield weapons rather than the spoken word - but if you want a trading contract written up, he's the right man for the job.~ [c-aran44] Later on, the sound references will be c-aran01.wav to c-aran43.wav, and weeks/months from now when we get there we can deal with how to set the darned thing up to install on Windows/OS X/Linux and play in-game. Ok, the faculty talk is back to reality-based stuff, like what we are doing with dress-code this year, and how the heck us male teacher-dudes are supposed to inform a 14 year old that her underwear is showing and not get arrested... and worse, how to not insult the mom that sent the girl to school in one of those new thigh-length baby-doll tops designed for use over a pair of shorts, sans shorts. I'd better pay attention again. I'll type this stuff up later, and post it up on an odd moment. Well, technically, if you are reading this, I already did.
  2. In <<this thread>> we were tracing ways of adding in install choices for players. in the meantime, the bigg has come up with some new WeiDU possibilities that allow some interesting ways of "swinging" code into separate branches based on setting/reading variables and matching against their values. Basically, the same kind of thinking that PATCH_IF statements use, but on a larger scale. Never one to do something and let it just sit, let's recast the player choices on install using this new method. He has a bunch of these new commands that might be interesting to heavy coders, but for gadabouts like me, ACTION_MATCH is the simplest to understand and shows basically what he is allowing in various forms by supporting this kind of code behavior. note: Doing this is fun for me, but in this particular case it is hitting a fly with an ICBM. I suspect other code which relies on massive internal checking and patching based on a whole series of variables could be cleaned up using this kind of construction, done better - the code below is very clunky and linear, and does not take advantage of the heaviest potential gains, where separate 'building blocks" could be swapped in based on multiple matches or "guarding conditions" or whatever the big Boyz and Girlz use for terminology. Basically, stuff like IF (A) AND (NOT B) AND © AND (D) AND (NOT E) IF (NOT A) AND (NOT B) AND © AND (D) AND (NOT E) IF (NOT A) AND (B) AND © AND (NOT D) AND (NOT E) etc. etc. can be set up with a series of individual matched blocks of code, and put into play that way rather than creating a whole series of individual 'cases'. The end Result of This As Applied To Aran CODE BEGIN ~Aran Whitehand, "No Choices Wanted" (Fighter)~ FORCED_SUBCOMPONENT ~Choose Which Aran Configuration to install...~ REQUIRE_COMPONENT ~setup-aranw.tp2~ ~0~ ~Aran Whitehand must be installed for this to work.~ OUTER_SET class_choice = 5 LAUNCH_ACTION_MACRO customized_cre_choice ACTION_IF FILE_EXISTS_IN_GAME ~ar6111.are~ THEN BEGIN // ToB .cre file COPY_EXISTING ~c-aran7.cre~ ~override/c-aran13.cre~ WRITE_LONG 0x18 2500000 // current XP 2500000, ToB start WRITE_ASCII 0x2cc ~C-ARN25A~ #8 /* dialogue */ WRITE_ASCII 0x280 ~C-ARAN~ #32 /* DV */ WRITE_ASCII 0x248 ~C-ARN25~ #8 /* override script */ END BEGIN ~Aran Whitehand, Mage Dual-Class stats configuration (Tinker)~ FORCED_SUBCOMPONENT ~Choose Which Aran Configuration to install...~ REQUIRE_COMPONENT ~setup-aranw.tp2~ ~0~ ~Aran Whitehand must be installed for this to work.~ OUTER_SET class_choice = 1 LAUNCH_ACTION_MACRO customized_cre_choice ACTION_IF FILE_EXISTS_IN_GAME ~ar6111.are~ THEN BEGIN // ToB .cre file COPY_EXISTING ~c-aran7.cre~ ~override/c-aran13.cre~ WRITE_LONG 0x18 2500000 // current XP 2500000, ToB start WRITE_ASCII 0x2cc ~C-ARN25A~ #8 /* dialogue */ WRITE_ASCII 0x280 ~C-ARAN~ #32 /* DV */ WRITE_ASCII 0x248 ~C-ARN25~ #8 /* override script */ END BEGIN ~Aran Whitehand, Cleric Dual-Class stats configuration (Tailor)~ FORCED_SUBCOMPONENT ~Choose Which Aran Configuration to install...~ REQUIRE_COMPONENT ~setup-aranw.tp2~ ~0~ ~Aran Whitehand must be installed for this to work.~ OUTER_SET class_choice = 2 LAUNCH_ACTION_MACRO customized_cre_choice ACTION_IF FILE_EXISTS_IN_GAME ~ar6111.are~ THEN BEGIN // ToB .cre file COPY_EXISTING ~c-aran7.cre~ ~override/c-aran13.cre~ WRITE_LONG 0x18 2500000 // current XP 2500000, ToB start WRITE_ASCII 0x2cc ~C-ARN25A~ #8 /* dialogue */ WRITE_ASCII 0x280 ~C-ARAN~ #32 /* DV */ WRITE_ASCII 0x248 ~C-ARN25~ #8 /* override script */ END BEGIN ~Aran Whitehand, Fighter stats configuration (Soldier)~ FORCED_SUBCOMPONENT ~Choose Which Aran Configuration to install...~ REQUIRE_COMPONENT ~setup-aranw.tp2~ ~0~ ~Aran Whitehand must be installed for this to work.~ OUTER_SET class_choice = 3 LAUNCH_ACTION_MACRO customized_cre_choice ACTION_IF FILE_EXISTS_IN_GAME ~ar6111.are~ THEN BEGIN // ToB .cre file COPY_EXISTING ~c-aran7.cre~ ~override/c-aran13.cre~ WRITE_LONG 0x18 2500000 // current XP 2500000, ToB start WRITE_ASCII 0x2cc ~C-ARN25A~ #8 /* dialogue */ WRITE_ASCII 0x280 ~C-ARAN~ #32 /* DV */ WRITE_ASCII 0x248 ~C-ARN25~ #8 /* override script */ END BEGIN ~Aran Whitehand, Thief Dual-Class stats configuration (Spy)~ FORCED_SUBCOMPONENT ~Choose Which Aran Configuration to install...~ REQUIRE_COMPONENT ~setup-aranw.tp2~ ~0~ ~Aran Whitehand must be installed for this to work.~ OUTER_SET class_choice = 4 LAUNCH_ACTION_MACRO customized_cre_choice ACTION_IF FILE_EXISTS_IN_GAME ~ar6111.are~ THEN BEGIN // ToB .cre file COPY_EXISTING ~c-aran7.cre~ ~override/c-aran13.cre~ WRITE_LONG 0x18 2500000 // current XP 2500000, ToB start WRITE_ASCII 0x2cc ~C-ARN25A~ #8 /* dialogue */ WRITE_ASCII 0x280 ~C-ARAN~ #32 /* DV */ WRITE_ASCII 0x248 ~C-ARN25~ #8 /* override script */ END For an "allow me to choose" subcomponent, or we let players just skip all the crap: ACTION_READLN and Other Macros as Building Blocks Instead of the code in the previous thread, first we pull everything we can out into discreet blocks and turn them into "get information from the user" macros and "work on the .cre" macros. That allows us to individualize the class choice ones, change the order, and most of all get everything set up, then copy the .cre once and apply all the changes in one swoop. CODE DEFINE_ACTION_MACRO aran_wealth_selection BEGIN OUTER_FOR( aran_wealth = 0; ~%aran_wealth%~ STRING_COMPARE_REGEXP ~^[123]$~; )BEGIN PRINT ~Please choose from the following choices to modify starting armor and weapons available to him: [1] Aran is down-and-out poor and has sold off most of his good equipment. [2] Aran has kept most of his good gear. [3] Aran has kept the best gear available to a successful mercenary. Please select 1, 2, or 3 and press enter.~ ACTION_READLN aran_wealth END END DEFINE_ACTION_MACRO aran_armor_choice BEGIN OUTER_FOR( aran_armor_choice = 0; ~%aran_armor_choice%~ STRING_COMPARE_REGEXP ~^[12345]$~; )BEGIN PRINT ~Please choose from the following starting armor choices for Aran: [1] Leather [2] Studded Leather [3] Chain [4] Splint [5] Plate Please select 1, 2, 3, 4, or 5 and press enter.~ ACTION_READLN aran_armor_choice END END DEFINE_ACTION_MACRO aran_mage_choice BEGIN OUTER_FOR( weapon_choices = 0; ~%weapon_choices%~ STRING_COMPARE_REGEXP ~^[123]$~; )BEGIN // one way of setting up for READLN PRINT ~You are probably going to Dual-Class Aran to Mage. He currently has proficiencies as follows: ** Long Sword ** Quarterstaff ** Dagger Please choose from the following starting weapon choices and press enter: [1] Long Sword, Shield, Dagger [2] Long Sword, Shield, Quarterstaff [3] Long Sword, Shield, Potions of healing~ ACTION_READLN ~weapon_choices~ END END DEFINE_ACTION_MACRO aran_cleric_choice BEGIN OUTER_FOR( weapon_choices = 0; ~%weapon_choices%~ STRING_COMPARE_REGEXP ~^[1234]$~; )BEGIN // one way of setting up for READLN PRINT ~You are probably going to Dual-Class Aran to Cleric. He currently has proficiencies as follows: * Long Sword * Hammer * Mace * Flail ** Sword and Shield Style Please choose from the following starting weapon choices: [1] Long Sword, Shield, Mace [2] Long Sword, Shield, Quarterstaff [3] Long Sword, Shield, Hammer [4] Long Sword, Shield, Flail~ ACTION_READLN ~weapon_choices~ END END DEFINE_ACTION_MACRO aran_fighter_choice BEGIN OUTER_FOR( weapon_choices = 0; ~%weapon_choices%~ STRING_COMPARE_REGEXP ~^[123456]$~; )BEGIN // one way of setting up for READLN PRINT ~You are probably going to leave Aran as a fighter. He currently has proficiencies as follows: ** Long Sword ** Bastard Sword * Long Bow * Sword and Shield Please choose from the following starting weapon choices: [1] Long Sword, Shield, Dagger [2] Long Sword, Shield, Long Bow [3] Long Sword, Shield, Potions of healing [4] Bastard Sword, Shield, Dagger [5] Bastard Sword, Shield, Long Bow [6] Long Sword, Shield, Hammer~ ACTION_READLN ~weapon_choices~ END END DEFINE_ACTION_MACRO aran_thief_choice BEGIN OUTER_FOR( weapon_choices = 0; ~%weapon_choices%~ STRING_COMPARE_REGEXP ~^[12345]$~; )BEGIN // one way of setting up for READLN PRINT ~You are probably going to Dual-Class Aran as a Thief. He currently has proficiencies as follows: ** Long Sword ** Short Sword * Dagger * Crossbow Please choose from the following starting weapon choices: [1] Long Sword, Shield, Dagger [2] Long Sword, Shield, Crossbow [3] Long Sword, Shield, Potions of healing [4] Short Sword, Shield, Dagger [5] Short Sword, Shield, Crossbow~ ACTION_READLN ~weapon_choices~ END END Now, we have user choices defined, and we can apply them in a new macro, customized_cre_choice. Here, we are looking to "swing" the code into different branches based on the class, chosen, because we are working with two unique building blocks. While wealth and armor are the same for each, we need to bring a different base .cre into play, and the proficiency set (and weapons choices) vary by the base .cre chosen. So we need to a. look at what the player chose, b. swing a block of code temporarily down an alternate track based on that c. remind the player what they chose (and list it in the .DEBUG for troubleshooting) d. then bring everything back to order. So, CODE ACTION_MATCH ~var~ WITH 1 BEGIN <<do case 1 >> END 2 BEGIN <<or else do case 2 >> END DEFAULT <<or if neither 11 nor 2, then do case 3/default actions >> END In Aran's implementation (tested and works; horribly clumsy though), instead of talking I commented stuff: CODE /* Installing one of the 5 forced subcomponents does OUTER_SET class_choice = 1 or 2 or 3 or 4 or 5 (5 = no player choices wanted). */ DEFINE_ACTION_MACRO customized_cre_choice BEGIN // define the instruction set to be called in other places ACTION_MATCH ~%class_choice%~ // the thing we are checking to allow the code to "swing" to variants, the "case" WITH 1 // the first check. If %class_choice% = 1, the next stuff will work, else check the next BEGIN /* mage dual-class build */ LAUNCH_ACTION_MACRO aran_wealth_selection LAUNCH_ACTION_MACRO aran_mage_choice LAUNCH_ACTION_MACRO aran_armor_choice ACTION_MATCH ~%aran_wealth%~ // the thing we are checking to allow the code to "swing" to variants, the "case" WITH 3 BEGIN PRINT ~Aran is successful~ END 2 BEGIN PRINT ~Aran is of average wealth~ END DEFAULT PRINT ~Aran is down-and-out poor~ END ACTION_MATCH ~%aran_armor_choice%~ // the thing we are checking to allow the code to "swing" to variants, the "case" WITH 1 BEGIN PRINT ~Leather Armor~ END 2 BEGIN PRINT ~Studded Leather Armor~ END 3 BEGIN PRINT ~Chain Mail~ END 4 BEGIN PRINT ~Splint Mail~ END DEFAULT PRINT ~Plate Armor~ END /* we are using READLN values to set a variable - the mod range of possible combos is 1 to 15 inclusive, so we can't just read it directly */ ACTION_MATCH ~%weapon_choices%~ // check this value WITH // against the following 3 cases, so 1 BEGIN OUTER_SET ~aran_weapon_set~ = 1 // Long Sword, Shield, Dagger PRINT ~Long Sword, Shield, Dagger~ PRINT ~~ END 2 BEGIN OUTER_SET ~aran_weapon_set~ = 2 // Long Sword, Shield, Quarterstaff PRINT ~Long Sword, Shield, Quarterstaff~ PRINT ~~ END 3 BEGIN OUTER_SET ~aran_weapon_set~ = 3 // Long Sword, Shield, Potions of healing PRINT ~Long Sword, Shield, Potions of Healing~ PRINT ~~ END DEFAULT // this should never run, but as an emergency fallback OUTER_SET ~aran_weapon_set~ = 6 // Long Sword, Shield, Long Bow PRINT ~Long Sword, Shield, Long Bow~ PRINT ~~ END COPY ~aranw/cre/c-arnmge.cre~ ~override/c-aran7.cre~ // copy the base .cre into the game, and LAUNCH_PATCH_MACRO ~aran_cre_setup~ // patch in player choices using this pre-defined code END // of dual-to-mage swing 2 // the second check. If %class_choice% = 2, the next stuff will work, else check the next BEGIN /* cleric dual-class build */ LAUNCH_ACTION_MACRO aran_wealth_selection LAUNCH_ACTION_MACRO aran_cleric_choice LAUNCH_ACTION_MACRO aran_armor_choice ACTION_MATCH ~%aran_wealth%~ // the thing we are checking to allow the code to "swing" to variants, the "case" WITH 3 BEGIN PRINT ~Aran is successful~ END 2 BEGIN PRINT ~Aran is of average wealth~ END DEFAULT PRINT ~Aran is down-and-out poor~ END ACTION_MATCH ~%aran_armor_choice%~ // the thing we are checking to allow the code to "swing" to variants, the "case" WITH 1 BEGIN PRINT ~Leather Armor~ END 2 BEGIN PRINT ~Studded Leather Armor~ END 3 BEGIN PRINT ~Chain Mail~ END 4 BEGIN PRINT ~Splint Mail~ END DEFAULT PRINT ~Plate Armor~ END ACTION_MATCH ~%weapon_choices%~ // check this value WITH // against the following 3 cases, with 4 or anything else defaulting to a '"standard choice" 1 BEGIN OUTER_SET ~aran_weapon_set~ = 4 // Long Sword, Shield, Mace PRINT ~Long Sword, Shield, Mace~ PRINT ~~ END 2 BEGIN OUTER_SET ~aran_weapon_set~ = 2 // Long Sword, Shield, Quarterstaff PRINT ~Long Sword, Shield, Mace~ PRINT ~~ END 3 BEGIN OUTER_SET ~aran_weapon_set~ = 12 // Long Sword, Shield, Hammer PRINT ~Long Sword, Shield, Mace~ PRINT ~~ END DEFAULT // this will run on 4, or as an emergency fallback OUTER_SET ~aran_weapon_set~ = 5 // Long Sword, Shield, Flail PRINT ~Long Sword, Shield, Flail~ PRINT ~~ END COPY ~aranw/media/c-arnclr.cre~ ~override/c-aran7.cre~ // the cleric stat L7 .cre LAUNCH_PATCH_MACRO ~aran_cre_setup~ // patch in player choices using this pre-defined code END // of dual-to-cleric swing 3 // the third check. If %class_choice% = 3, the next stuff will work, else check the next BEGIN /* fighter single-class build */ LAUNCH_ACTION_MACRO aran_wealth_selection LAUNCH_ACTION_MACRO aran_fighter_choice LAUNCH_ACTION_MACRO aran_armor_choice ACTION_MATCH ~%aran_wealth%~ // the thing we are checking to allow the code to "swing" to variants, the "case" WITH 3 BEGIN PRINT ~Aran is successful~ END 2 BEGIN PRINT ~Aran is of average wealth~ END DEFAULT PRINT ~Aran is down-and-out poor~ END ACTION_MATCH ~%aran_armor_choice%~ // the thing we are checking to allow the code to "swing" to variants, the "case" WITH 1 BEGIN PRINT ~Leather Armor~ END 2 BEGIN PRINT ~Studded Leather Armor~ END 3 BEGIN PRINT ~Chain Mail~ END 4 BEGIN PRINT ~Splint Mail~ END DEFAULT PRINT ~Plate Armor~ END ACTION_MATCH ~%weapon_choices%~ // check this value WITH // against the following 3 cases, with 4 or anything else defaulting to a '"standard choice" 1 BEGIN OUTER_SET ~aran_weapon_set~ = 1 // Long Sword, Shield, Dagger PRINT ~Long Sword, Shield, Dagger~ PRINT ~~ END 2 BEGIN OUTER_SET ~aran_weapon_set~ = 6 // Long Sword, Shield, Long Bow PRINT ~Long Sword, Shield, Long Bow~ PRINT ~~ END 3 BEGIN OUTER_SET ~aran_weapon_set~ = 3 // Long Sword, Shield, Potions of healing PRINT ~Long Sword, Shield, Potions of healing~ PRINT ~~ END 4 BEGIN OUTER_SET ~aran_weapon_set~ = 7 // Bastard Sword, Shield, Dagger PRINT ~Bastard Sword, Shield, Dagger~ PRINT ~~ END 5 BEGIN OUTER_SET ~aran_weapon_set~ = 8 // Bastard Sword, Shield, Long Bow PRINT ~Bastard Sword, Shield, Long Bow~ PRINT ~~ END DEFAULT // this will run on 6, or as an emergency fallback OUTER_SET ~aran_weapon_set~ = 12 // Long Sword, Shield, Hammer PRINT ~Long Sword, Shield, Hammer~ PRINT ~~ END COPY ~aranw/cre/c-arnftr.cre~ ~override/c-aran7.cre~ // the fighter stat L7 .cre LAUNCH_PATCH_MACRO ~aran_cre_setup~ // patch in player choices using this pre-defined code END // of just-a-fighter swing 4 // the second check. If %class_choice% = 4, the next stuff will work, else check the next BEGIN /* thief dual-class build */ LAUNCH_ACTION_MACRO aran_wealth_selection LAUNCH_ACTION_MACRO aran_thief_choice LAUNCH_ACTION_MACRO aran_armor_choice ACTION_MATCH ~%aran_wealth%~ // the thing we are checking to allow the code to "swing" to variants, the "case" WITH 3 BEGIN PRINT ~Aran is successful~ END 2 BEGIN PRINT ~Aran is of average wealth~ END DEFAULT PRINT ~Aran is down-and-out poor~ END ACTION_MATCH ~%aran_armor_choice%~ // the thing we are checking to allow the code to "swing" to variants, the "case" WITH 1 BEGIN PRINT ~Leather Armor~ END 2 BEGIN PRINT ~Studded Leather Armor~ END 3 BEGIN PRINT ~Chain Mail~ END 4 BEGIN PRINT ~Splint Mail~ END DEFAULT PRINT ~Plate Armor~ END ACTION_MATCH ~%weapon_choices%~ // check this value WITH // against the following 3 cases, with 4 or anything else defaulting to a '"standard choice" 1 BEGIN OUTER_SET ~aran_weapon_set~ = 1 // Long Sword, Shield, Dagger PRINT ~Long Sword, Shield, Dagger~ PRINT ~~ END 2 BEGIN OUTER_SET ~aran_weapon_set~ = 9 // Long Sword, Shield, Crossbow PRINT ~Long Sword, Shield, Crossbow~ PRINT ~~ END 3 BEGIN OUTER_SET ~aran_weapon_set~ = 3 // Long Sword, Shield, Potions of healing PRINT ~Long Sword, Shield, Potions of healing~ PRINT ~~ END 4 BEGIN OUTER_SET ~aran_weapon_set~ = 10 // Short Sword, Shield, Dagger PRINT ~Short Sword, Shield, Dagger~ PRINT ~~ END DEFAULT // this will run on 5, or as an emergency fallback OUTER_SET ~aran_weapon_set~ = 11 // Short Sword, Shield, Crossbow PRINT ~Short Sword, Shield, Crossbow~ PRINT ~~ END COPY ~aranw/cre/c-arnthf.cre~ ~override/c-aran7.cre~ // the thief stat L7 .cre LAUNCH_PATCH_MACRO ~aran_cre_setup~ // patch in player choices using this pre-defined code END // of dual-to-thief swing DEFAULT // the fall-through check. If %class_choice% was not 1, 2, 3, or 4, the default code will run PRINT ~No class choice was chosen... installing Aran's Default (Fighter, moderate wealth, long sword and bow)~ /* Set up the variables for a default .cre so BWP folks don't have to deal with READLN */ OUTER_SET ~aran_wealth~ = 2 // experienced mercenary with some resources OUTER_SET ~aran_weapon_set~ = 6 // Long Sword, Shield, Long Bow OUTER_SET ~aran_armor_choice~ = 4 // splint COPY ~aranw/cre/c-arnftr.cre~ ~override/c-aran7.cre~ // the fighter stat L7 .cre LAUNCH_PATCH_MACRO ~aran_cre_setup~ // patch in player choices using this pre-defined code END // of default swing END // of define action macro This usage is interesting to me in that it shows how you can nest both macros and ACTION_MATCH WITH . It is a criminal waste of space to use this for just PRINT materials the way I have; the better usage would be to fully convert the various PATCH_IF statements and that whole pyramid of materials found in aran_cre_setup into a better/tighter logic chain, so that i could do away with SUBCOMPONENT entirely. Using this idea, the whole thing could be built into one component, and we could ask "Default, or choice?" and then if a person chose choice, they could run everything through a single run of code that asked and adjusted for responses. To do this, instead of using LAUNCH_PATCH_MACRO ~aran_cre_setup~ the currently unchanged contents of aran_cre_setup's PATCH_IF statements would be integrated into the above.
  3. One fun thing about RP that BG2 blows completely out of the water is equipment choice, level, and relative wealth. Well, OK, so there are many areas where it differs from a P&P AD&D game, but there are lots of mods out there to fix some of this... but for Aran, let's give the players some choice. From a RP perspective, it is silly for a L7 fighter to not have a decent magical weapon, good armor, and perhaps even some supplies. I have never been a mercenary, but I would assume that they are like musicians in one respect - a horn player will eat nothing but crackers for days/weeks/months/years before giving up his horn. After all, how are you going to work your way out of debt if you have a garbage old beat-up single Conn, and everyone else is showing up with pro equipment, well maintained and well rehearsed in its strengths and weaknesses in relation to your playing style? And that is not a matter of life and death, like a good shield or sword might be. So we can mess about with helping Aran have gear. We can even let players decide: Is Aran down-and-out poor, having sold off his best gear? Is Aran treasure-poor but equipped with decent L7 equipment? Is Aran equipped with the best equipment possible, because I am going to dual-class him and take his gear so I can be L33T and overpowered, at least up until I run into the first SCSII-enhanced gibberling? Heck, we can take that one step farther. We can set up those four choices of stats with appropriate proficiencies, and give players choice over what gear he has. That could be modified by what RP option was chosen about his relative equipment wealth; if he is poor and down-and-out, he might have a regular mundane long sword, but if he is average that will be a +1 long sword, and if he has been successful he may be starving but he won't stop gripping the pommel of that +2 long sword until he is forced to. OK, lots of fun - lots of choice; that brings up two additional considerations. Q. Why not give the player full choice of everything? A. I've watched Nythrun, and I'm no Nythrun. Between eric, miloch, and Nythrun, Level1NPCs will eventually allow people to completely respec Aran any way they want. I'm counting on that - why else would I be adding dialog options that check to see if Aran is CLERIC_ALL, or MAGE_ALL, or KIT:HEARTWARDER_OF_SUNE and such? Plus, there is a defining of character that can take place. If Aran is setting up to Dual to Cleric, my take is that he would be messing around with many different cleric-able weapons, but not specializing in any of them. After all, his primary start is sword and board, and he is not driven to excel in one specific focused area. Aran as a Kensai? Have you heard him talk? The level of precision and self-control necessary for Bushido does not seem likely to be something Aran would be able to handle. So from a RP standpoint, keeping within character, I can set up some baselines that fit his personality, confident that eventually folks will get to L1NPC him into that magical Kensai->Mage dual class for their power-gaming run. Q. What about the confusing raft of choices? I just want to play - worse, I have a BWP install, and I don't understand all the custom install templates. Why can't I just install him and be done with it? A. Good point. BWP has solved user input at install through scripting, but it can be a huge job to understand what is going on. So, a 'default' configuration needs to be available, so the user does not have to make tons of choices if they don't want to. OK, so on to implementing this mess of choices. MARCO-ME (ok, ok, pun intended. Macrame. Feeble humor, but that's what I got.) Before we get started on implementing this, though, let's mess around with a fancy thing called DEFINE_PATCH_MACRO. Say I have 4 or 5 .cres (or even more) that have the same stuff done to them, with very minor variations. The regular way is to declare everything out front - 5, or 6 variations on CODE /* Area C-AW01 Entry Point - Bouncer on Promenade */ COPY_EXISTING ~kpgrd01.cre~ ~override/c-aw01ep.cre~ SAY NAME1 ~Manson~ SAY NAME2 ~Manson~ REMOVE_CRE_ITEM ~rndtre02~ WRITE_LONG INITIAL_MEETING (BNOT 0x0) WRITE_LONG DIALOGUE_HOSTILE (BNOT 0x0) WRITE_LONG MORALE (BNOT 0x0) WRITE_LONG HAPPY (BNOT 0x0) WRITE_LONG UNHAPPY_ANNOYED (BNOT 0x0) WRITE_LONG UNHAPPY_SERIOUS (BNOT 0x0) WRITE_LONG UNHAPPY_BREAKING (BNOT 0x0) WRITE_LONG LEADER (BNOT 0x0) WRITE_LONG TIRED (BNOT 0x0) WRITE_LONG BORED (BNOT 0x0) WRITE_LONG BATTLE_CRY1 (BNOT 0x0) WRITE_LONG BATTLE_CRY2 (BNOT 0x0) WRITE_LONG BATTLE_CRY3 (BNOT 0x0) WRITE_LONG BATTLE_CRY4 (BNOT 0x0) WRITE_LONG BATTLE_CRY5 (BNOT 0x0) WRITE_LONG HURT (BNOT 0x0) WRITE_LONG AREA_FOREST (BNOT 0x0) WRITE_LONG AREA_CITY (BNOT 0x0) WRITE_LONG AREA_DUNGEON (BNOT 0x0) WRITE_LONG AREA_DAY (BNOT 0x0) WRITE_LONG AREA_NIGHT (BNOT 0x0) WRITE_LONG SELECT_COMMON1 (BNOT 0x0) WRITE_LONG SELECT_COMMON2 (BNOT 0x0) WRITE_LONG SELECT_COMMON3 (BNOT 0x0) WRITE_LONG SELECT_COMMON4 (BNOT 0x0) WRITE_LONG SELECT_COMMON5 (BNOT 0x0) WRITE_LONG SELECT_COMMON6 (BNOT 0x0) WRITE_LONG SELECT_ACTION1 (BNOT 0x0) WRITE_LONG SELECT_ACTION2 (BNOT 0x0) WRITE_LONG SELECT_ACTION3 (BNOT 0x0) WRITE_LONG SELECT_ACTION4 (BNOT 0x0) WRITE_LONG SELECT_ACTION5 (BNOT 0x0) WRITE_LONG SELECT_ACTION6 (BNOT 0x0) WRITE_LONG SELECT_ACTION7 (BNOT 0x0) WRITE_LONG SELECT_RARE1 (BNOT 0x0) WRITE_LONG SELECT_RARE2 (BNOT 0x0) WRITE_LONG CRITICAL_HIT (BNOT 0x0) WRITE_LONG CRITICAL_MISS (BNOT 0x0) WRITE_LONG TARGET_IMMUNE (BNOT 0x0) WRITE_LONG INVENTORY_FULL (BNOT 0x0) WRITE_LONG PICKED_POCKET (BNOT 0x0) WRITE_LONG HIDDEN_IN_SHADOWS (BNOT 0x0) WRITE_LONG SPELL_DISRUPTED (BNOT 0x0) WRITE_LONG SET_A_TRAP (BNOT 0x0) WRITE_LONG BIO (BNOT 0x0) WRITE_EVALUATED_ASCII 0x34 ~%DEST_RES%~ #8 /* small portrait */ WRITE_ASCII 0x248 ~None~ #8 /* override AI script */ WRITE_ASCII 0x250 ~None~ #8 /* disable class AI script */ WRITE_ASCII 0x258 ~None~ #8 /* disable race AI script */ WRITE_ASCII 0x260 ~None~ #8 /* disable general AI script */ WRITE_ASCII 0x268 ~None~ #8 /* disable default AI script */ WRITE_EVALUATED_ASCII 0x2cc ~%DEST_RES%~ #8 /* dialogue */ WRITE_EVALUATED_ASCII 0x280 ~%DEST_RES%~ #32 /* death variable */ But what if I could work this out with just one line, instead of everything? I can... CODE COPY_EXISTING ~kpgrd01.cre~ ~override/c-aw01ep.cre~ /* Area C-AW01 Entry Point - Bouncer on Promenade */ SAY NAME1 ~Manson~ SAY NAME2 ~Manson~ REMOVE_CRE_ITEM ~rndtre02~ LAUNCH_PATCH_MACRO ~support_cre_cleanup~ ... if I set up what I want to happen in a macro, like this... CODE DEFINE_PATCH_MACRO ~support_cre_cleanup~ BEGIN WRITE_LONG INITIAL_MEETING (BNOT 0x0) WRITE_LONG DIALOGUE_HOSTILE (BNOT 0x0) WRITE_LONG MORALE (BNOT 0x0) WRITE_LONG HAPPY (BNOT 0x0) WRITE_LONG UNHAPPY_ANNOYED (BNOT 0x0) WRITE_LONG UNHAPPY_SERIOUS (BNOT 0x0) WRITE_LONG UNHAPPY_BREAKING (BNOT 0x0) WRITE_LONG LEADER (BNOT 0x0) WRITE_LONG TIRED (BNOT 0x0) WRITE_LONG BORED (BNOT 0x0) WRITE_LONG BATTLE_CRY1 (BNOT 0x0) WRITE_LONG BATTLE_CRY2 (BNOT 0x0) WRITE_LONG BATTLE_CRY3 (BNOT 0x0) WRITE_LONG BATTLE_CRY4 (BNOT 0x0) WRITE_LONG BATTLE_CRY5 (BNOT 0x0) WRITE_LONG HURT (BNOT 0x0) WRITE_LONG AREA_FOREST (BNOT 0x0) WRITE_LONG AREA_CITY (BNOT 0x0) WRITE_LONG AREA_DUNGEON (BNOT 0x0) WRITE_LONG AREA_DAY (BNOT 0x0) WRITE_LONG AREA_NIGHT (BNOT 0x0) WRITE_LONG SELECT_COMMON1 (BNOT 0x0) WRITE_LONG SELECT_COMMON2 (BNOT 0x0) WRITE_LONG SELECT_COMMON3 (BNOT 0x0) WRITE_LONG SELECT_COMMON4 (BNOT 0x0) WRITE_LONG SELECT_COMMON5 (BNOT 0x0) WRITE_LONG SELECT_COMMON6 (BNOT 0x0) WRITE_LONG SELECT_ACTION1 (BNOT 0x0) WRITE_LONG SELECT_ACTION2 (BNOT 0x0) WRITE_LONG SELECT_ACTION3 (BNOT 0x0) WRITE_LONG SELECT_ACTION4 (BNOT 0x0) WRITE_LONG SELECT_ACTION5 (BNOT 0x0) WRITE_LONG SELECT_ACTION6 (BNOT 0x0) WRITE_LONG SELECT_ACTION7 (BNOT 0x0) WRITE_LONG SELECT_RARE1 (BNOT 0x0) WRITE_LONG SELECT_RARE2 (BNOT 0x0) WRITE_LONG CRITICAL_HIT (BNOT 0x0) WRITE_LONG CRITICAL_MISS (BNOT 0x0) WRITE_LONG TARGET_IMMUNE (BNOT 0x0) WRITE_LONG INVENTORY_FULL (BNOT 0x0) WRITE_LONG PICKED_POCKET (BNOT 0x0) WRITE_LONG HIDDEN_IN_SHADOWS (BNOT 0x0) WRITE_LONG SPELL_DISRUPTED (BNOT 0x0) WRITE_LONG SET_A_TRAP (BNOT 0x0) WRITE_LONG BIO (BNOT 0x0) WRITE_EVALUATED_ASCII 0x34 ~%DEST_RES%~ #8 /* small portrait */ WRITE_ASCII 0x248 ~None~ #8 /* override AI script */ WRITE_ASCII 0x250 ~None~ #8 /* disable class AI script */ WRITE_ASCII 0x258 ~None~ #8 /* disable race AI script */ WRITE_ASCII 0x260 ~None~ #8 /* disable general AI script */ WRITE_ASCII 0x268 ~None~ #8 /* disable default AI script */ WRITE_EVALUATED_ASCII 0x2cc ~%DEST_RES%~ #8 /* dialogue */ WRITE_EVALUATED_ASCII 0x280 ~%DEST_RES%~ #32 /* death variable */ END Easy, huh? With this predefined snippet of code I can slap most of the .cre silent, set the portrait and dialog and dv and anything else I want to the name of the .cre, disabled the scripts I don't want - everything in one swoop. DEFINE_PATCH_MACRO basically says "here is a list of things I want to do within a patching operation". Putting it at the top of your mod or component means later on, instead of writing it all out or copying and pasting blocks, you can refer to it buy using LAUNCH_PATCH_MACRO. Now, how can we leverage this a bit more, to make life easier? We have to come up with a way to set some of the choices above to "variables", so we can... duh... vary them. We actually already have, because we have leveraged the bigg's WeiDU variables, %DEST_RES%, which equals the name of the resource being worked on by the code at the moment (See Mike1072's post below for a clearer explanation of this). Let's play with this idea for Aran. First off, we want 4 basic choices, as we have said before - Tinker, Tailor, Soldier, Spy (Dual-Classable stats for Ftr->Mage, Ftr->Cleric, Fighter, Ftr->Thief). We would also like to be able to choose some basic equipment and armor, and perhaps roleplay the level of gear he has. We also need a "yeah, whatever - stop messing about and just install the damned NPC and let's get on with it" option. But we can make it much more far-reaching than that. We can let the user choose some of the input.
×
×
  • Create New...