Crossing the Great Divide
#33
Posted 26 August 2007 - 12:44 PM
"tutu_scriptp" should be "_" for Tutu
"tutu_scriptp" should be "p" for BGT
There are only two creatures in the game that require this, the two prostitutes that stand outside Feldpost's in Beregost. Still, it should probably go in there.
I know that I need them in Gavin.
cmorgan: "None of us get old around here, just more proficient at doing more stuff with less braincells!"
berelinde's mods
TolkienAcrossTheWater website
TolkienAcrossTheWater Forum
#35
Posted 26 August 2007 - 04:10 PM
For Durlyle (and presumably Delainey)
%tutu_var_D%URLYLE1.
For Tutu, it's _urlyle1. For BGT, it's durlyle1.
cmorgan: "None of us get old around here, just more proficient at doing more stuff with less braincells!"
berelinde's mods
TolkienAcrossTheWater website
TolkienAcrossTheWater Forum
#36
Posted 26 August 2007 - 05:11 PM
berelinde, on Aug 26 2007, 04:49 PM, said:
"tutu_scriptp" should be "p" for BGT
#37
Posted 27 August 2007 - 06:20 AM
Playing with it now; further suggestions welcome... I will check back in about an hour.
#38
Posted 27 August 2007 - 09:18 AM
/* * "The BG1 NPC Project" * Version 12 Combined Tutu/BGT installer * authored and coded by tons of dedicated people from all walks of life * August 27, 2007 * Version 12 Beta 4 Pre-Release */ /* Backup folder */ BACKUP ~BG1NPC/backup~ /* Author */ AUTHOR ~The BG1 NPC Project Team: forums.gibberlings3.net/index.php?showforum=45~ /* enable all error messages; nothing suppressed. comment this out for release version - cmorgan */ MODDER /* launch the readme file immediately. If you want to disable the ReadMe, place two slashes before it, like //README */ README ~bg1npc/bg1npcreadme.html~ ALWAYS ACTION_IF FILE_EXISTS_IN_GAME ~FW0100.are~ THEN BEGIN /* Tell the player it is using Tutu stuff */ PRINT @1000 INCLUDE ~BG1NPC\lib\g3_tutu_cpmvars.tpa~ END ELSE BEGIN ACTION_IF FILE_EXISTS_IN_GAME ~AR7200.are~ THEN BEGIN /* Tell the player it is using BGT stuff */ PRINT @1001 INCLUDE ~BG1NPC\lib\g3_bgt_cpmvars.tpa~ /* Tell the player it is not Tutu or BGT */ END ELSE BEGIN FAIL @1002 END END /* prep tras for sound references */ COPY ~BG1NPC/TRA/%LANGUAGE%/BG1NPC_tmp.tra~ ~BG1NPC/TRA/%LANGUAGE%/BG1NPC.tra~ EVALUATE_BUFFER LOAD_TRA ~BG1NPC/TRA/%LANGUAGE%/BG1NPC.tra~ END /* Language Settings */ AUTO_TRA ~BG1NPC/TRA/%s~ LANGUAGE ~English~ ~english~ ~BG1NPC/TRA/english/setup.tra~ /* BEGIN The BG1 NPC Project: Required Modifications for v12 */ BEGIN @1005 /* Tells other mods BG1NPC Core is installed */ COPY ~BG1NPC/Core/X#component.xx~ ~override/X#BG1NPCCore.G3~
where ~BG1NPC\lib\g3_tutu_cpmvars.tpa~ and ~BG1NPC\lib\g3_bgt_cpmvars.tpa~ contents are here:
http://dev.gibberlings3.net/index.php/Comm...s:_Tutu_and_BGT
Edited by cmorgan, 27 August 2007 - 09:35 AM.
#39
Posted 05 November 2007 - 10:37 AM
cmorgan, on Aug 27 2007, 03:25 PM, said:
That's what I did for my quest mod: I used the structure of this tutorial to cross-modd for BG1, BG1 + TotSC, Tutu and BGT. Miloch and I are thinking about creating BG1 libraries. Until then I just want to write what I did.
The overall code has to be BG1 engine syntax. Only exception I made was "EraseJournalEntry()", since it's standard for Tutu / BGT.
The variables I used for the cross platform modding to match all games were:
%FACE_x%, "x" being a number from 0 to 16: Face orientation in "CreateCreature()", i.e. "CreateCreature([xxx.yyy]%FACE_x%)".
For BG1, it's "CreateCreature([xxx.yyy])", for Tutu and BGT it's "CreateCreature([xxx.yyy],X)", with "X" being the face orientation.
For BG1 with TotSC, Tutu and BGT, this would be
/* TotSC, Tutu, BGT: Face orientation for CreateCreature([xxx.yyy]%FACE_x%) */
OUTER_SPRINT ~FACE_0~ ~,0~
OUTER_SPRINT ~FACE_1~ ~,1~
OUTER_SPRINT ~FACE_2~ ~,2~
OUTER_SPRINT ~FACE_3~ ~,3~
OUTER_SPRINT ~FACE_4~ ~,4~
OUTER_SPRINT ~FACE_5~ ~,5~
OUTER_SPRINT ~FACE_6~ ~,6~
OUTER_SPRINT ~FACE_7~ ~,7~
OUTER_SPRINT ~FACE_8~ ~,8~
OUTER_SPRINT ~FACE_9~ ~,9~
OUTER_SPRINT ~FACE_10~ ~,10~
OUTER_SPRINT ~FACE_11~ ~,11~
OUTER_SPRINT ~FACE_12~ ~,12~
OUTER_SPRINT ~FACE_13~ ~,13~
OUTER_SPRINT ~FACE_14~ ~,14~
OUTER_SPRINT ~FACE_15~ ~,15~
OUTER_SPRINT ~FACE_16~ ~,16~
For BG1 without TotSC, there is no face orientation:
/* BG1: Face orientation for CreateCreature([xxx.yyy]%FACE_x%) */
OUTER_SPRINT ~FACE_0~ ~~
OUTER_SPRINT ~FACE_1~ ~~
OUTER_SPRINT ~FACE_2~ ~~
OUTER_SPRINT ~FACE_3~ ~~
OUTER_SPRINT ~FACE_4~ ~~
OUTER_SPRINT ~FACE_5~ ~~
OUTER_SPRINT ~FACE_6~ ~~
OUTER_SPRINT ~FACE_7~ ~~
OUTER_SPRINT ~FACE_8~ ~~
OUTER_SPRINT ~FACE_9~ ~~
OUTER_SPRINT ~FACE_10~ ~~
OUTER_SPRINT ~FACE_11~ ~~
OUTER_SPRINT ~FACE_12~ ~~
OUTER_SPRINT ~FACE_13~ ~~
OUTER_SPRINT ~FACE_14~ ~~
OUTER_SPRINT ~FACE_15~ ~~
OUTER_SPRINT ~FACE_16~ ~~
%ERASEJOURNALENTRY_X%, x being the number of the string.
For Tutu and BGT, these would be (I have a list until @150 I can provide, before anyone else starts typing!)
/* EraseJournalEntry() for Tutu and BGT*/
OUTER_SPRINT "ERASEJOURNALENTRY_0" "ErasejournalEntry(@0)"
OUTER_SPRINT "ERASEJOURNALENTRY_1" "ErasejournalEntry(@1)"
OUTER_SPRINT "ERASEJOURNALENTRY_2" "ErasejournalEntry(@2)"
OUTER_SPRINT "ERASEJOURNALENTRY_3" "ErasejournalEntry(@3)"
OUTER_SPRINT "ERASEJOURNALENTRY_4" "ErasejournalEntry(@4)"
OUTER_SPRINT "ERASEJOURNALENTRY_5" "ErasejournalEntry(@5)"
OUTER_SPRINT "ERASEJOURNALENTRY_6" "ErasejournalEntry(@6)"
OUTER_SPRINT "ERASEJOURNALENTRY_7" "ErasejournalEntry(@7)"
OUTER_SPRINT "ERASEJOURNALENTRY_8" "ErasejournalEntry(@8)"
OUTER_SPRINT "ERASEJOURNALENTRY_9" "ErasejournalEntry(@9)"
OUTER_SPRINT "ERASEJOURNALENTRY_10" "ErasejournalEntry(@10)"
etc.
For BG1, with or without TotSC:
/* EraseJournalEntry() for BG1*/
OUTER_SPRINT "ERASEJOURNALENTRY_0" ""
OUTER_SPRINT "ERASEJOURNALENTRY_1" ""
OUTER_SPRINT "ERASEJOURNALENTRY_2" ""
OUTER_SPRINT "ERASEJOURNALENTRY_3" ""
OUTER_SPRINT "ERASEJOURNALENTRY_4" ""
OUTER_SPRINT "ERASEJOURNALENTRY_5" ""
OUTER_SPRINT "ERASEJOURNALENTRY_6" ""
OUTER_SPRINT "ERASEJOURNALENTRY_7" ""
OUTER_SPRINT "ERASEJOURNALENTRY_8" ""
OUTER_SPRINT "ERASEJOURNALENTRY_9" ""
OUTER_SPRINT "ERASEJOURNALENTRY_10" ""
Order of Journal entries: In Tutu /BGT, there is the distinction between SOLVED_JOURNAL and UNSOLVED_JOURNAL. In BG1, it's both JOURNAL.
For BG1, the syntax for AddJournalEntry() is without specification, i.e. AddJournalEntry(@0). For Tutu and BGT, the destinction between QUEST and QUEST_DONE is made, to sort it into the right diary page: AddJournalEntry(@0,QUEST) would be an unsolved quest entry.
So, what we need is:
/* order of journal entries, BG1 */
OUTER_SPRINT "SOLVED_JOURNAL" "JOURNAL"
OUTER_SPRINT "UNSOLVED_JOURNAL" "JOURNAL"
OUTER_SPRINT "QUEST" ""
OUTER_SPRINT "QUEST_DONE" ""
/* order of journal entries, Tutu and BGT */
OUTER_SPRINT "SOLVED_JOURNAL" "SOLVED_JOURNAL"
OUTER_SPRINT "UNSOLVED_JOURNAL" "UNSOLVED_JOURNAL"
OUTER_SPRINT "QUEST" ";QUEST"
OUTER_SPRINT "QUEST_DONE" ",QUEST_DONE"
Additionally, I needed some of the for Tutu and BGT already listed variables to use them in BG1, mainly
/* BG1: tp2, d, and baf parsing variables based on conversion */
OUTER_SPRINT "tutu_var" ""
/* BGT-only shutdown of D and BAF after BG1 content */
OUTER_SPRINT ~BGT_VAR~ ~~
/* BG1 Chapters */
OUTER_SPRINT "tutu_chapter_1" "1"
OUTER_SPRINT "tutu_chapter_2" "2"
OUTER_SPRINT "tutu_chapter_3" "3"
OUTER_SPRINT "tutu_chapter_4" "4"
OUTER_SPRINT "tutu_chapter_5" "5"
OUTER_SPRINT "tutu_chapter_6" "6"
OUTER_SPRINT "tutu_chapter_7" "7"
OUTER_SPRINT "PrologueChapter" "0"
OUTER_SPRINT "PrologueChapterAdvance" "0"
This way, I have one dialogue file and one script file for all three (four) games.
This is no method where a pure Tutu /BGT mod can be made working for BG1; as I said BG1 syntax is required. But for a newly created mod that can live without "AreaCheck()", "PartyRested()" and dream scripts etc. this is a nice way of minimising the work and possible copy&paste bugs.
Edited by jastey, 05 November 2007 - 12:08 PM.
#40
Posted 14 November 2007 - 11:40 PM
jastey, on Nov 5 2007, 01:42 PM, said:
For example, I have a "targeting" block in a script for a creature in a BG2 (Tutu/BGT) engine mod. This CRE does not like spellcasters, particularly not druids, so goes after them first. Well, in the BG2 engine, we can cover all multi-classes with the "_ALL" flag:
IF !See([GOODCUTOFF.0.0.DRUID_ALL]) !See([GOODCUTOFF.0.0.SORCERER]) !See([GOODCUTOFF.0.0.MAGE_ALL]) !See([GOODCUTOFF.0.0.CLERIC_ALL]) !See([GOODCUTOFF.0.0.BARD_ALL]) !See([GOODCUTOFF])In BG1, this fails to compile, so instead I'll COPY the script and REPLACE_TEXTUALLY so I end up with something like this.
IF !See([GOODCUTOFF.0.0.DRUID]) !See([GOODCUTOFF.0.0.MAGE]) !See([GOODCUTOFF.0.0.CLERIC_MAGE]) !See([GOODCUTOFF.0.0.CLERIC]) !See([GOODCUTOFF.0.0.BARD]) !See([GOODCUTOFF])Yeah, it's not *exact* but it *emulates* the BG2 engine behaviour, which is good enough (for me anyway... I'm not out to make a BG1 SCS or something...).
Then of course, there's the Tutu underscore, which I'll just replace during compile also (I think cmorgan has described this above already):
IF
HPPercentLT(Myself,70)
!GlobalTimerNotExpired("tcn","LOCALS")
HasItem("%tsu%POTN08",Myself)(In Tutu, %tsu% becomes _ and otherwise it gets replaced with nothing.)Then there are other cases where I want my CRE to use a BG2 (or even TotSC) spell that may not be available in plain BG1. Well if I'm feeling ambitious (and this is rare) I'll actually *port* the spell and all its resources to BG1. That can get hairy. If I'm feeling less than ambitious, I'll use the BG2 spell and simply REPLACE_TEXTUALLY its reference with a roughly-equivalent BG1 spell in the script when the mod install detects that platform. And if I'm feeling lazy (and yes, this is most common) I'll just use the BG1 spell to begin with in both scripts for maximum compatibility. It usually doesn't matter a whole lot for what I do, and I find it's more worthwhile to spend time on plot twists and dialogue options rather than cool eye candy like making Call Woodland Nymphs work in BG1 (eh... ok fine... I have spent a lot of time on that
).And if I'm in doubt with which spells work on which platforms, I find Oogi's School at Dudleyville to be an excellent reference and far less time-consuming than looking up stuff with multiple DLTCEP/NI instances (though I do a lot of that too of course).
I usually don't bother with having alternate scripts or resources for BG1/Tutu/BGT where I can avoid it, hence the reason for the REPLACE_TEXTUALLY in the TP2 on a common script. It makes for duplicate editing when you want to change some little thing in the script which is otherwise platform-independent. Sometimes I can't easily avoid that as with compressed/uncompressed BAMs for spell graphics and the like, but that's fairly easy once you figure out what works (and there's some other thread floating out on that but I'm too lazy to cross-reference it at the moment
Area name differences are easy - just look up the Tutu/BGT area list in my signature and substitute "AR" for "FW" in the Tutu areas for BG1/TotSC.
I have more tips and maybe some TP2 examples, but most of my code is on my other laptop, which just fried another video card
Aurora (new release!) * BG1 NPC * Gnomes * Haiass * Level 1 NPCs * Lost Items * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * In Progress: Adjusted Portraits * DSotSC (Tutu)
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * PSPad Highlighters * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Wherefore do ye toil; is it not that ye may live and be happy? And if ye toil only that ye may toil more,
when shall happiness find you?" -H.P. Lovecraft, The Quest of Iranon
#41
Posted 15 November 2007 - 03:06 PM
#42
Posted 12 July 2009 - 05:39 PM
Until I get to it, anyone can access this by downloading bg1npc and looking in the bg1npc\lib\ directory for the current master lists of things that need to be set as variables to allow a Tutu/BGT combined installer.
ETA should be July 13th by 5pm CST.
#43
Posted 09 August 2009 - 07:08 PM
cmorgan, on Jul 12 2009, 09:39 PM, said:
To be honest, I only declare the ones I need in any particular mod, to keep the bloat factor/download size down. (Also when I'm squashing bugs, which is frequently, the fewer lines of code I have to tear through, the better.) Though I do consult the BG1 NPC lib and other mod libs pretty frequently for reference.
Aurora (new release!) * BG1 NPC * Gnomes * Haiass * Level 1 NPCs * Lost Items * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * In Progress: Adjusted Portraits * DSotSC (Tutu)
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * PSPad Highlighters * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Wherefore do ye toil; is it not that ye may live and be happy? And if ye toil only that ye may toil more,
when shall happiness find you?" -H.P. Lovecraft, The Quest of Iranon
#44
Posted 14 January 2012 - 02:43 PM
//extra BGT stuff
EXTEND_BOTTOM THALAN 35
IF ~Global("D0TaintedOreQuest","GLOBAL",1)
PartyHasItem("POTN48")~ THEN REPLY @28 GOTO Examine //"Examine" is a custom dialogue state in the .d
IF ~Global("D0TaintedOreQuest","GLOBAL",2)
PartyHasItem("POTN48")~ THEN REPLY @29 GOTO Examine
END
#45
Posted 15 January 2012 - 07:29 AM
in .tp2
ACTION IF ~game is bgt~ THEN BEGIN
OUTER_SPRINT ~bgt_dialog~ ~
EXTEND_BOTTOM THALAN 35
IF ~Global("D0TaintedOreQuest","GLOBAL",1)
PartyHasItem("POTN48")~ THEN REPLY @28 GOTO Examine //"Examine" is a custom dialogue state in the .d
IF ~Global("D0TaintedOreQuest","GLOBAL",2)
PartyHasItem("POTN48")~ THEN REPLY @29 GOTO Examine
END
~
END ELSE BEGIN
OUTER_SPRINT ~bgt_dialog~ ~~
END
COMPILE EVALUATE_BUFFER ~myDialogFile~
USING ~the original tra file~
and put a line in the relevant d %bgt_dialog%
I don't know if that would work, haven't tested doing large multiline OUTER_SPRINT...
wait a minute -
Thinking about it, I would skip all that. I would run a small .d that only gets used when game_is BGT and map the .tra to the small file using USING
Reply to this topic

1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











