Jump to content

How to add "vanilla" items to "vanilla" creatures in BG2?


Recommended Posts

Well I have deleted the 2 ?? and I had another error message:

[JANJ.DLG] loaded

ERROR locating resource for 'CHAIN3'
Resource [ARTEMUS.DLG] not found in KEY file:
    [./chitin.key]
ERROR: preprocessing APPEND_EARLY [Artemus/dialogue/ARTEMUS.d]: Failure("resource [ARTEMUS.DLG] not found for 'CHAIN3'")
Stopping installation because of error.

ERROR Installing [Mod Artemus Jansen (Necessite Throne of Bhaal)], rolling back to previous state
Unable to Unlink [Artemus\backup/0/OTHER.0]: Unix.Unix_error(1, "unlink", "Artemus\\backup/0/OTHER.0")
[Artemus\backup/0/UNSETSTR.0] SET_STRING uninstall info not found
Will uninstall   3 files for [ARTEMUS/SETUP-ARTEMUS.TP2] component 0.
  Restoring backed-up [Artemus\backup/0/ArtemusS.bmp]
Artemus\backup/0/ArtemusS.bmp copied to override/ArtemusS.bmp, 7014 bytes
Uninstalled      3 files for [ARTEMUS/SETUP-ARTEMUS.TP2] component 0.
Unable to Unlink [Artemus\backup/0/READLN.0]: Unix.Unix_error(20, "unlink", "Artemus\\backup/0/READLN.0")
Unable to Unlink [Artemus\backup/0/READLN.0.TEXT]: Unix.Unix_error(20, "unlink", "Artemus\\backup/0/READLN.0.TEXT")

 

It seems that the bug would be in the CHAIN. Nevertheless, a gleam of hope: the scales are here on the 2 dragons. Ouf…

@Jarno: all the lines are in French, @100 is the presentation by Artemus @101 the response by <CHARNAME> @102 Perhaps another time by <CHARNAME> @103 As you like.    Artemus   @104 come back soon!   Artemus

 

 

 

 

Link to comment
2 hours ago, jastey said:

You called the dialogue file of Artemus ~PEARTEMU~ , so in my template code you need to replace ~Artemus~ with ~PEARTEMU~.

In the d-file, you need to replace the placeholder DLG Name with the real one, as I wrote above.

If you don't understand my advice because of modder slang or so then tell me, but having to repeat the same advice three times leaves me a bit helpless.

Link to comment

Dear Jastey, sorry to bother by my dumb remarks. But I’ve changed in the CHAIN section the Artemus ~~ by peartemu ~~ and it works now! Ah! you can’t imagine imagine the relief I have now; the problem had to be to the fact I read the BEGIN L1 and the IF ~~ THEN in the chain section…What a dummy I am…

@105
== JanJ @106
== ~peartemu~ @107
== JanJ @108
== ~peartemu~ @109
== JanJ @110
== ~peartemu~ @111
END

But after this debugging work, another problem: when I try to speak to Artemus, with or without Jan, I have the line  has nothing to say you…argh

Link to comment

Voila the last ARTEMUS.CRE, and despite all my efforts I don’t know why Artie refuse to engage conversation…the script perhaps ?

 

here my WeiDU

// Log of Currently Installed WeiDU Mods
// The top of the file is the 'oldest' mod
// ~TP2_File~ #language_number #component_number // [Subcomponent Name -> ] Component Name [ : Version]
~SETUP-TACTICS.TP2~ #3 #2 // Amelioration de TorGal et du donjon De'Arnise
~SETUP-TACTICS.TP2~ #3 #18 // Amelioration des Rencontres Aleatoires dans la Campagne, par Kensai Ryu
~SETUP-TACTICS.TP2~ #3 #32 // Amelioration de la Foret du Nord, par Mike Barnes
~CORRECFRBG2/CORRECFRBG2.TP2~ #0 #0 // Correction des fautes mineures pour Baldur's Gate II - Shadows of Amn: 1.3 (2016-09-19)
~CORRECFRBG2/CORRECFRBG2.TP2~ #0 #1 // Correction des fautes mineures pour Baldur's Gate II - Throne of Bhaal: 1.3 (2016-09-19)
~TOBEX/TOBEX.TP2~ #2 #100 // TobEx - Base: Beta 0025
~TOBEX/TOBEX.TP2~ #2 #105 // Pas d'interruption de sort pour zero degat: Beta 0025
~TOBEX/TOBEX.TP2~ #2 #107 // Permettre le jumelage a toutes les races: Beta 0025
~TOBEX/TOBEX.TP2~ #2 #108 // Permettre de changer d'armure en cours de combat: Beta 0025
~TOBEX/TOBEX.TP2~ #2 #111 // Desactiver le silence en cas de Charme: Beta 0025
~TOBEX/TOBEX.TP2~ #2 #113 // Rester cache en cas de succes du vol a la tire [C]: Beta 0025
~TOBEX/TOBEX.TP2~ #2 #114 // Une attaque lors du repos fait avancer le temps: Beta 0025
~TOBEX/TOBEX.TP2~ #2 #116 // Activer les sons d'attaque des animations: Beta 0025
~TOBEX/TOBEX.TP2~ #2 #117 // Quatre emplacements d'arme dans l'inventaire pour tous: Beta 0025
~TOBEX/TOBEX.TP2~ #2 #119 // Supprimer toutes les restrictions de classe pour les races: Beta 0025
~TOBEX/TOBEX.TP2~ #2 #120 // Faire tomber l'inventaire au sol en cas de desintegration: Beta 0025
~TOBEX/TOBEX.TP2~ #2 #121 // Faire tomber l'inventaire au sol en cas de mort due au froid: Beta 0025
~TOBEX/TOBEX.TP2~ #2 #122 // Faire tomber l'inventaire au sol en cas de petrification: Beta 0025
~BG2FIXPACK/SETUP-BG2FIXPACK.TP2~ #4 #0 // BG2 Fixpack - Correctifs principaux: v13
~BG2FIXPACK/SETUP-BG2FIXPACK.TP2~ #4 #100 // Gain d'experience si on envoie Keldorn se reconcilier avec Maria: v13
~BG2FIXPACK/SETUP-BG2FIXPACK.TP2~ #4 #101 // Animations des sorts amelioree: v13
~BG2FIXPACK/SETUP-BG2FIXPACK.TP2~ #4 #104 // Correction des symboles divin (par Ghreyfain): v13
~BG2FIXPACK/SETUP-BG2FIXPACK.TP2~ #4 #106 // Penalite d'attaque des Geants contre les Petites-personnes, les Nains et les Gnomes: v13
~BG2FIXPACK/SETUP-BG2FIXPACK.TP2~ #4 #107 // Retire la restriction de jumelage des Archers et des Traqueurs: v13
~BG2FIXPACK/SETUP-BG2FIXPACK.TP2~ #4 #108 // Retire le deuxieme attribut bonus pour le chemin Mauvais a l'epreuve de la Colere en Enfer: v13
~BG2FIXPACK/SETUP-BG2FIXPACK.TP2~ #4 #109 // Correction du comportement des demons convoques: v13
~BG2FIXPACK/SETUP-BG2FIXPACK.TP2~ #4 #110 // Correctifs additionnels pour les scripts: v13
~BG2FIXPACK/SETUP-BG2FIXPACK.TP2~ #4 #111 // Correction de la chanson du barde: v13
~BG2FIXPACK/SETUP-BG2FIXPACK.TP2~ #4 #113 // Correctifs additionnels pour les alignements: v13
~BG2FIXPACK/SETUP-BG2FIXPACK.TP2~ #4 #114 // "Action libre" protege aussi contre l'etourdissement: v13
~BG2FIXPACK/SETUP-BG2FIXPACK.TP2~ #4 #115 // Les pattes provenant d'une metamorphose ne peuvent pas etre dissipees: v13
~BG2FIXPACK/SETUP-BG2FIXPACK.TP2~ #4 #116 // Remove Thieving Start Bonuses from Bard and Ranger Skills: v13
~1PP/1PP.TP2~ #0 #101 // 1ppv4: Core paperdolls
~1PP/1PP.TP2~ #0 #103 // 1ppv4: Extended palette entries -> Full install (recommended)
~1PP/1PP.TP2~ #0 #105 // 1ppv4: Avatar fixes
~1PP/1PP.TP2~ #0 #106 // 1ppv4: Female Dwarves -> Separate Avatars for Female Dwarves - Baldur's Gate II
~1PP/1PP.TP2~ #0 #113 // 1ppv4: Smart Avatar & Armour Switching
~1PP/1PP.TP2~ #0 #200 // 1ppv4: Core content patches
~1PP/1PP.TP2~ #0 #203 // 1ppv4: Restored flame sword animations
~1PP/1PP.TP2~ #0 #204 // 1ppv4: Colourable Quarterstaves
~1PP/1PP.TP2~ #0 #205 // 1ppv4: Legacy Shields
~1PP/1PP.TP2~ #0 #206 // 1ppv4: Additional Shield Animations (core)
~1PP/1PP.TP2~ #0 #207 // 1ppv4: Wizards' Staves (core)
~1PP/1PP.TP2~ #0 #208 // 1ppv4: Additional Helmet Animations (core)
~1PP/1PP.TP2~ #0 #210 // 1ppv4: Increased paperdoll object variety (core)
~1PP/1PP.TP2~ #0 #400 // 1ppv4: Core updates and item patches
~1PP/1PP.TP2~ #0 #401 // 1ppv4: Improved projectile effects
~1PP/1PP.TP2~ #0 #301 // 1ppv4: Miscellaneous content fixes
~UB/SETUP-UB.TP2~ #1 #2 // Kalah et ce qui lui avait ete promis: v27rc1
~UB/SETUP-UB.TP2~ #1 #4 // Gorje Hilldark et la quete de l'Illithium etendue: v27rc1
~UB/SETUP-UB.TP2~ #1 #5 // La quete de Pai'Na et du fleau des araignees: v27rc1
~UB/SETUP-UB.TP2~ #1 #6 // Amelioration de la Rune Tordue: v27rc1
~UB/SETUP-UB.TP2~ #1 #7 // Restaure diverses rencontres: v27rc1
~UB/SETUP-UB.TP2~ #1 #9 // "Creations de Xzar" corrigees: v27rc1
~UB/SETUP-UB.TP2~ #1 #12 // Restaure certains objets: v27rc1
~UB/SETUP-UB.TP2~ #1 #15 // Restauration des portraits des PNJ: v27rc1
~UB/SETUP-UB.TP2~ #1 #17 // Correction des noms de personnages et des biographies: v27rc1
~UB/SETUP-UB.TP2~ #1 #18 // Dialogues mineurs restaures: v27rc1
~UB/SETUP-UB.TP2~ #1 #19 // Pouvoirs de Bhaal restaures, par David Gaider: v27rc1
~UB/SETUP-UB.TP2~ #1 #20 // Descriptions etendues des objets de ToB: v27rc1
~UB/SETUP-UB.TP2~ #1 #21 // Corrections mineures de Throne of Bhaal: v27rc1
~UB/SETUP-UB.TP2~ #1 #24 // Les remords de Sarevok: v27rc1
~UB/SETUP-UB.TP2~ #1 #25 // The Murder of Acton Balthis, by Kulyok: v27rc1
~SPELL_REV/SETUP-SPELL_REV.TP2~ #3 #0 // Spell Revisions: v3.1 (Hotfix 03)
~SPELL_REV/SETUP-SPELL_REV.TP2~ #3 #10 // Animations des Devas et Planetaires: v3.1 (Hotfix 03)
~SPELL_REV/SETUP-SPELL_REV.TP2~ #3 #20 // Correction d'Image Miroir: v3.1 (Hotfix 03)
~SPELL_REV/SETUP-SPELL_REV.TP2~ #3 #30 // Correction de la Dissipation de la Magie: v3.1 (Hotfix 03)
~SPELL_REV/SETUP-SPELL_REV.TP2~ #3 #40 // Correction du Sommeil: v3.1 (Hotfix 03)
~SPELL_REV/SETUP-SPELL_REV.TP2~ #3 #50 // Suppression des sorts non disponibles des ecrans de selection des sorts: v3.1 (Hotfix 03)
~SPELL_REV/SETUP-SPELL_REV.TP2~ #3 #60 // Mise a jour du Livre de sorts des PNJs recrutables: v3.1 (Hotfix 03)
~KAYA/SETUP-KAYA.TP2~ #1 #0 // Mod Kaya (Necessite Throne of Bhaal)
~ARTEMUS/SETUP-ARTEMUS.TP2~ #0 #0 // Mod Artemus Jansen (Necessite Throne of Bhaal)
~ARTEMUS/SETUP-ARTEMUS.TP2~ #0 #1 // Adding Items
 

 

ARTEMUS.CRE

Link to comment

Thanks for the reminder.

This is what you have currently:

Quote


COPY ~Artemus/creature/ARTEMUS.CRE~ ~override/ARTEMUS.CRE~
  SAY NAME1 @11

If you change this to this, it should work in game:

Quote


COPY ~Artemus/creature/ARTEMUS.CRE~ ~override/ARTEMUS.CRE~
  SAY NAME1 @11
WRITE_EVALUATED_ASCII 0x2cc ~peartemu~ #8

Btw: you should tag your mod cre-files with your prefix, too, as well as variables you use.

Link to comment

Well, I’ve modified the lines in the tp2 like you’ve suggested. It works when <CHARNAME> is alone but I’ve some problems when Jan is here…

And I don’t understand well your last line: is it like it ->

// Creature Stuff

COPY ~Artemus/creature/PEARTEMS.bmp~ ~override~
COPY ~Artemus/creature/PEARTEMU.CRE~ ~override/PEARTEMU.CRE~
  SAY NAME1 @11
WRITE_EVALUATED_ASCII 0x2cc ~peartemu~ #8

 

I’ve not modified the ARTEMUS.d

BEGIN ~PEARTEMU~ 

    // presentation Artemus
IF ~True()~ THEN BEGIN 0 
SAY @100 
+ ~OR(4) !InParty("Jan") 
     !InMyArea("Jan") 
     StateCheck("Jan",CD_STATE_NOTVALID) 
     Global("xx_janchain_run","LOCALS",0)~ + @101 DO ~StartStore("ARTEMUS",LastTalkedToBy(Myself))~ EXIT
+ ~OR(4) !InParty("Jan") 
     !InMyArea("Jan") 
     StateCheck("Jan",CD_STATE_NOTVALID) 
     Global("xx_janchain_run","LOCALS",0)~ + @102 + au_revoir
IF ~InParty("Jan") InMyArea("Jan") !StateCheck("Jan",CD_STATE_NOTVALID)
Global("xx_janchain_run","LOCALS",0)~ THEN DO ~SetGlobal("xx_janchain_run","LOCALS",1)~ + jan_chain
END

IF ~~ THEN au_revoir
SAY @103 
= @104 
IF ~~ THEN EXIT
END

CHAIN
IF ~~ THEN ~PEARTEMU~ jan_chain
@105
== JanJ @106
== ~peartemu~ @107
== JanJ @108
== ~peartemu~ @109
== JanJ @110
== ~peartemu~ @111
END
++ @101 DO ~StartStore("ARTEMUS",LastTalkedToBy(Myself))~ EXIT
++ @102 + au_revoir

 

All these problems drive me mad…Well dear Lady of Computer Science the ball is in your court now and thank you by advance.

 


 

Link to comment
Quote

but I’ve some problems when Jan is here…

Yeah... looking at this:

IF ~True()~ THEN BEGIN 0 
SAY @100 
+ ~OR(4) !InParty("Jan") 
     !InMyArea("Jan") 
     StateCheck("Jan",CD_STATE_NOTVALID) 

     Global("xx_janchain_run","LOCALS",0)

...

+ ~OR(4) !InParty("Jan") 
     !InMyArea("Jan") 
     StateCheck("Jan",CD_STATE_NOTVALID)

     Global("xx_janchain_run","LOCALS",0)

 

These 2 have the exact same conditions and you expect just one of those 4 conditions to be true... aka this is a logical fallacy. You need to switch the thing to be essentially just...

!InParty("Jan") 
!InMyArea("Jan") 
StateCheck("Jan",CD_STATE_NOTVALID) 
Global("xx_janchain_run","LOCALS",0)~
END

... aka NO OR()'s. As they ALL need to be TRUE, not just 1 out of the 4. Or rather you don't want to check if Jan is in CD_STATE_VALID... as just out of the party should be enough.

Edited by Jarno Mikkola
Link to comment

Jarno, stop posting nonsense. The OR(4) is correct, because ONE of these 4 will enable this. Jan can only talk if he is present PLUS in Party PLUS able to talk PLUS the variable is still at "0". So if either one of these is not true, his dialogue will not trigger. Makes sense?

But, the variable needs to be "1", not " 0", that was a mistake in my template.

Thus this:

~OR(4) !InParty("Jan")
     !InMyArea("Jan")
 StateCheck("Jan",CD_STATE_NOTVALID)

Global("xx_janchain_run","LOCALS",0)~

 

needs to be this:

~OR(4) !InParty("Jan")
     !InMyArea("Jan")
     StateCheck("Jan",CD_STATE_NOTVALID)

     Global("xx_janchain_run","LOCALS",1)~

Link to comment
On 7/3/2019 at 6:01 PM, jastey said:

Jarno, stop posting nonsense. The OR(4) is correct, because ONE of these 4 will enable this. Jan can only talk if he is present PLUS in Party PLUS able to talk PLUS the variable is still at "0". So if either one of these is not true, his dialogue will not trigger. Makes sense?

1

Yes... but the PLUS is not done with OR... it's done with AND... and that's not done with this scripting engine ... as it additive conditions by default.

And the ! is a negation... so:

OR(2)
 !InParty("Jan")
 !InMyArea("Jan")

Means, either Jan is not in the area, OR not in the party(or both).

If you go above and check ... the very exact conditions are done in both dialog checks... not reverse ones. So.... he won't open the store ... nor not open it. 

Edited by Jarno Mikkola
Link to comment

Jarno, the OR(4) condition is for Jan not there/able to talk or Jan present BUT dialogue already run, so the OR(4) is correct.

 

Because, why would I check for Jan not being able to talk AND not being in the area AND not being in the party? This makes absolutely no sense.

 

Link to comment

Well, thank you for your help, Jastey and Jarno. But I don’t stop to encounter problems here and here throughout  my work, many of them being incomprehensible. So, I prefer to forget all about my modding attemps now, before to become screwy; perhaps in a near future I’ll resume my works about Artemus, but for the moment it’s suspended. But yet without you I couldn’t be able to enter in the BG2 modding community, thank you very much.

NB: my first mod is available now on the Couronne de Cuivre site, it’s Kaya a spell merchant.

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...