ericp07 Posted June 18, 2010 Author Share Posted June 18, 2010 It should be OR(12), not just plain OR. OK...and I know why, just didn't see. That should knock down one more error... Thanks, Eric Link to comment
ericp07 Posted June 18, 2010 Author Share Posted June 18, 2010 Would you believe SUCCESSFULLY INSTALLED? Now I can test, then carefully add meaningful conversation content... Thanks, everyone! Eric Link to comment
ericp07 Posted June 18, 2010 Author Share Posted June 18, 2010 I consider this issue solved. The mod installed; I had to summon the NPC using CLUAConsole, because the party had already been to AR1200 before (where she spawns), so she wasn't standing where she's supposed to. Moved party to a couple different areas, and the Beast of Malar scripts worked as they should. Creatures spawned and attacked, changing from one form to the other as expected. Hinaeariel even delivers her character sounds! Now, to fill in some of the placeholder text with real text... Thanks again! Eric Link to comment
cmorgan Posted June 18, 2010 Share Posted June 18, 2010 congratulations! Addictive, isn't it? Link to comment
berelinde Posted June 18, 2010 Share Posted June 18, 2010 It's odd that Hinaeriel didn't spawn from area script. In my experience, unless you're using an OnCreation() block to spawn her, she'll spawn whether you've been to the area or not. Would you mind posting your spawn code? Oh, and congratulations! It's always a thrill, the first time you see your NPC in the game. Link to comment
ericp07 Posted June 19, 2010 Author Share Posted June 19, 2010 It's odd that Hinaeriel didn't spawn from area script. In my experience, unless you're using an OnCreation() block to spawn her, she'll spawn whether you've been to the area or not. Would you mind posting your spawn code? Oh, and congratulations! It's always a thrill, the first time you see your NPC in the game. Odd, yes, but I've seen the behavior before; I successfully installed and tested the mod before adding more code (which this very thread bears out). Thanks very much! Indeed it is a thrill to see the character come to life Here's the spawning script: IF Global("HinExists","AR1200",0) THEN RESPONSE #100 SetGlobal("HinExists","AR1200",1) CreateCreature("EP#Hin",[2100.1750],7) END Is there anything here that should be added or changed? It now occurs to me to ask, as this file is named AR1200.baf, if I should rename it. Thanks, Eric Link to comment
berelinde Posted June 19, 2010 Share Posted June 19, 2010 First of all, you should set the global *after* you have spawned the creature. Second, you should plan on using EXTEND_TOP ~ar1200.bcs~ ~my spawn script~ because it's less likely to get screwed up if somebody else decides to mod something silly. But if you do use EXTEND_TOP, you *must* add Continue() to the end of the block. So, if you do all these things, your script block becomes IF Global("HinExists","AR1200",0) THEN RESPONSE #100 CreateCreature("EP#Hin",[2100.1750],7) SetGlobal("HinExists","AR1200",1) Continue() END If your creature still fails to spawn, you need to check two things. The first thing you need to check is that your creature code is right. You want the creature code here, not the DV. The second thing you need to check is that the spawn coordinates you have are in an accessible part of the search map. If you try to spawn her on top of a rock or at the edge of a cliff or something, the spawn will fail and you'll never know why. So make sure your spawn coordinates are in an open part of the map. Edit: It really doesn't matter what your spawn script is named. You're extending an existing script, not compiling it, so you don't need to worry about your script replacing an existing game script. Make sense? Link to comment
ericp07 Posted June 19, 2010 Author Share Posted June 19, 2010 First of all, you should set the global *after* you have spawned the creature. Second, you should plan on using EXTEND_TOP ~ar1200.bcs~ ~my spawn script~ because it's less likely to get screwed up if somebody else decides to mod something silly. But if you do use EXTEND_TOP, you *must* add Continue() to the end of the block. So, if you do all these things, your script block becomes IF Global("HinExists","AR1200",0) THEN RESPONSE #100 CreateCreature("EP#Hin",[2100.1750],7) SetGlobal("HinExists","AR1200",1) Continue() END If your creature still fails to spawn, you need to check two things. The first thing you need to check is that your creature code is right. You want the creature code here, not the DV. The second thing you need to check is that the spawn coordinates you have are in an accessible part of the search map. If you try to spawn her on top of a rock or at the edge of a cliff or something, the spawn will fail and you'll never know why. So make sure your spawn coordinates are in an open part of the map. Edit: It really doesn't matter what your spawn script is named. You're extending an existing script, not compiling it, so you don't need to worry about your script replacing an existing game script. Make sense? Yes. I've made the coding changes, except for the EXTEND_TOP. My .tp2 COMPILEs AR1200.baf, so it appears I should change that. Yes? The character spawns at coordinates where any .cre could stand. There's a rock arch near the center of the map, to the right of the crossable stream and a bit south of where the Gnolls and Werewolves are. Hinaeariel begins standing nearly under the arch, and walks to charname on sight. Link to comment
berelinde Posted June 19, 2010 Share Posted June 19, 2010 Uh, yeah, when you compile a script with the same name as an existing game script, you'll overwrite the existing script. I haven't looked up what's in ar1200.bcs, but I'm willing to bet that it's important. If you use the spawn script edits that I supplied, you would put this in your tp2 EXTEND_TOP ~ar1200.bcs~ ~hinaeriel/script/ar1200.baf~ // or whatever your the path to your area script is In general, if you want to add to a script that already exists, you are going to use some flavor of EXTEND. If it's a brand new script that has never been in the game before, like Hinaeriel's override script or a custcene script, you would COMPILE it. Link to comment
ericp07 Posted June 19, 2010 Author Share Posted June 19, 2010 Uh, yeah, when you compile a script with the same name as an existing game script, you'll overwrite the existing script. I haven't looked up what's in ar1200.bcs, but I'm willing to bet that it's important. If you use the spawn script edits that I supplied, you would put this in your tp2 EXTEND_TOP ~ar1200.bcs~ ~hinaeriel/script/ar1200.baf~ // or whatever your the path to your area script is In general, if you want to add to a script that already exists, you are going to use some flavor of EXTEND. If it's a brand new script that has never been in the game before, like Hinaeriel's override script or a custcene script, you would COMPILE it. That was my understanding, and I know I previously had EXTEND_TOP, as I want to avoid overwriting game files whenever there's a preferred method. I guess I must have copied something that replaced that line. In any case, the EXTEND_TOP line now replaces the COMPILE line. Now (meaning before changing to EXTEND_TOP), when I move to AR1200, Hinaeariel appears and approaches the party (and I'm a dope for not restoring the dialogue lines), but she doesn't join regardless of which option I choose (about to check coding again). If I press ctrl-Q with the cursor over her, she joins the party, and soon after, the beast spawn occurs. I'll massage the files some more, and try again. Thanks, Eric Link to comment
ericp07 Posted June 19, 2010 Author Share Posted June 19, 2010 ericp07, I can't find anything in your .tp2 that would cause the compile to fail, but I had a "duh" moment: you are getting the .tra warnings because you have MODDER enabled. You can ignore those... BACKUP ~Hinaeari/backup~ AUTHOR ~Eric P. (edited_out_by_cm)~ MODDER VERSION ~v1~ BEGIN ~Hinaeariel Gwaithoron for BGII:SoA/ToB~ Leaving MODDER enabled gives you lots of good feedback. But one of the things that it does is send out messages that experienced folks read and dismiss as "chaff". The whole warning section is because you have not yet created .tra files, so WeiDU says "whoa, I can't find .tra references - I will tell the modder and move on". In terms of the rest of the .tp2, I can't see any problem, except perhaps that you are expecting everyone to have ToB - otherwise you would want to only compile SoA stuff on SoA installs, and ToB on ToB installs. And devSin got us straight on encoding/newline usage. I guess you could try... hold on a sec... well, just to rule it out, make sure every time you use EP# you enclose it with tildes. It is a long shot, but WeiDU might be cutting thing off because it sees # as the start of a comment. Maybe. Try this on for size, just to see if it is comment format that is messing you up. You can also use this as a "sorting" .d, so that you keep things easy to install and don't accidentally get stuff like a CHAIN being created in the middle of an APPEND. testing.d /* BEGIN: initiate file all SoA mod dialogue files */ BEGIN ~EP#Hin~ BEGIN ~EP#HinJ~ BEGIN ~EP#HinB~ BEGIN ~EP#HinP~ /* END: initiate file all SoA mod dialogue files */ /* BEGIN: all I_C_T's for SoA */ I_C_T NALIA 45 EP#HinCommentNaliaJoin == ~EP#HinJ~ IF ~InParty("Nalia") InMyArea("Nalia")~ THEN ~I have never seen anyone look so fancy! Even with your adventuring gear, you look so...formal.~ END /* END: all I_C_T's for SoA */ /* BEGIN: things that get added to H's Joined dialog file */ APPEND ~EP#HinJ~ IF ~IsGabber(Player1)~ THEN PID1 SAY ~(Hinaeariel notices you looking at her strangely.)~ = ~Mani naa ta? What is it, <CHARNAME>?~ ++ ~Just wondering how you're doing.~ + PID1-1 ++ ~You’re good company, Hinaeariel!~ + PID1-2 ++ ~I was noticing the necklace you wear. Would you mind telling me about it?~ + PID-3 END IF ~~ PID1-1 SAY ~I’m well. Thank you for asking!~ IF ~~ THEN EXIT END IF ~~ PID1-2 SAY ~Diolalle! Thank you, <CHARNAME>!~ IF ~~ THEN EXIT END IF ~~ PID-3 SAY ~This is the symbol of the Supreme Ranger and Lady of the Forest, Mielikki. I received it when Needles made me one of them. I treasure it...and I never remove it.~ ++ ~PC Placeholder: Response one~ EXIT ++ ~PC Placeholder: Response two~ EXIT ++ ~PC Placeholder: Response three~ EXIT END /* these blocks are called from PLAYER1.DLG */ IF ~~ Option1 SAY ~<CHARNAME>, I’m in!~ COPY_TRANS PLAYER1 33 END IF ~~ Option2 SAY ~No time to be sentimental now. Let’s get this over with!~ COPY_TRANS PLAYER1 33 END IF ~~ Option3 SAY ~Let’s go!!!~ COPY_TRANS PLAYER1 33 END END /* of append to EP#HinJ */ /* END: things that get added to H's Joined dialog file */ /* BEGIN: things that get added to PLAYER1 dialog file */ /* SoA: Tree of Life Extension, Part A */ /* Add the extension to the bottom of the stack */ EXTEND_BOTTOM ~PLAYER1~ 33 IF ~InParty("EP#Hin") InMyArea("EP#Hin") !StateCheck("EP#Hin",CD_STATE_NOTVALID) Global("EP#Hintreelife","LOCALS",0)~ EXTERN ~PLAYER1~ EP#HinTreeOfLifeTalk END /* SoA: Tree of Life Extension, Part B : Add the initiating state */ APPEND ~PLAYER1~ IF ~~ EP#HinTreeOfLifeTalk SAY ~Hinaeariel: the Elven ranger who has been at your side through much adventure~ ++ ~Hinaeariel, You don’t have to do this, you know. You don’t have to risk your life for mine.~ DO ~SetGlobal("EP#Hintreelife","LOCALS",1)~ EXTERN EP#HinJ Option1 ++ ~Hinaeariel, you’re a good friend, and I don’t want you harmed. You would be wise to go.~ DO ~SetGlobal("EP#Hintreelife","LOCALS",1)~ EXTERN EP#HinJ Option2 ++ ~Hinaeariel, are you ready for this?~ DO ~SetGlobal("EP#Hintreelife","LOCALS",1)~ EXTERN EP#HinJ Option3 END END /* of append to PLAYER1*/ /* END: things that get added to PLAYER1 dialog file */ /* BEGIN: things that get added to H's SoA pre-joined dialog file */ APPEND ~EP#Hin~ IF ~NumTimesTalkedTo(0)~ THEN BEGIN first_met_party SAY ~Heya. This is a placeholder state.~ ++ ~placeholder option 1~ + pre_join_1 ++ ~placeholder option 2~ + pre_join_2 END IF ~~ pre_join_1 SAY ~Heya. This is a placeholder state. Option 1.~ IF ~~ THEN EXIT END IF ~~ pre_join_2 SAY ~Heya. This is a placeholder state. Option 2.~ IF ~~ THEN EXIT END END /* of APPEND to EP#Hin */ /* END: things that get added to H's SoA pre-joined dialog file */ /* BEGIN: things that get added to H's SoA left dialog file */ APPEND ~EP#HinP~ IF ~IsGabber(Player1)~ THEN BEGIN left_party SAY ~Heya. This is a placeholder state. I want to know if you want me in the party or not, sine you just kicked me out.~ ++ ~I want you in the party, H.~ + left_party_1 ++ ~Actually, I follow Malarite ways. Run quickly - I enjoy the thrill of the hunt.~ + left_party_2 END IF ~~ left_party_1 SAY ~Heya. This is a placeholder state. Option 1.~ IF ~~ THEN DO ~JoinParty()~ EXIT END IF ~~ left_party_1 SAY ~Heya. This is a placeholder state. Option 2.~ IF ~~ THEN DO ~LeaveParty() EscapeArea()~ EXIT END END /* of append EP#HinP */ /* END: things that get added to H's SoA left-party dialog file */ /* BEGIN: all SoA Banter CHAINs from all dialogs */ /* END: all SoA Banter CHAINs from all dialogs */ /* BEGIN: all SoA CHAIN materials from all dialogs */ /* END: all SoA CHAIN materials from all dialogs */ see if that helps. Is this an all-in-one file for the d. files? I mean, should I place corresponding text from the individual files into this one...or would that even work? I've got it as-is in my install right now. Please advise. Thanks, Eric Link to comment
ericp07 Posted June 19, 2010 Author Share Posted June 19, 2010 OK, latest install attempt gives this error: ERROR: [Hinaeari/character/EP#Hin.cre] -> [override/EP#Hin.cre] Patching Failed (COPY) (Not_found) Stopping installation because of error. ERROR Installing [Hinaeariel Gwaithoron for BGII:SoA/ToB], rolling back to previous state Will uninstall 36 files for [Hinaeari.tp2] component 0. Uninstalled 36 files for [Hinaeari.tp2] component 0. ERROR: Not_found How it can't find files that exist, especially when it found them before, is beyond me. Please help! Thanks, Eric Link to comment
berelinde Posted June 19, 2010 Share Posted June 19, 2010 I haven't seen your tp2, so can you post the part where you are copying the cre to the override? Link to comment
ericp07 Posted June 19, 2010 Author Share Posted June 19, 2010 I haven't seen your tp2, so can you post the part where you are copying the cre to the override? This is everything down to just before the character sound assignments in the .tp2: // Hinaeariel's character COPY ~Hinaeari/character/EP#HinS.bmp~ ~portraits~ COPY ~Hinaeari/character/EP#HinM.bmp~ ~portraits~ COPY ~Hinaeari/character/EP#HinH.bmp~ ~portraits~ COPY ~Hinaeari/character/EP#Hin.cre~ ~override~ ADD_CRE_ITEM ~leat03~ #0 #0 #0 ~IDENTIFIED~ ~ARMOR~ ADD_CRE_ITEM ~EP#HINAM~ #0 #0 #0 ~IDENTIFIED~ ~AMULET~ ADD_CRE_ITEM ~ax1h11~ #0 #0 #0 ~IDENTIFIED~ ~SHIELD~ ADD_CRE_ITEM ~sw1h23~ #0 #0 #0 ~IDENTIFIED~ ~WEAPON1~ EQUIP ADD_CRE_ITEM ~bow16~ #0 #0 #0 ~IDENTIFIED~ ~INV1~ ADD_CRE_ITEM ~arow02~ #12 #0 #0 ~IDENTIFIED~ ~QUIVER1~ ADD_CRE_ITEM ~arow05~ #7 #0 #0 ~IDENTIFIED~ ~QUIVER2~ SAY NAME1 ~Hinaeariel Gwaithoron~ SAY NAME2 ~Hinaeariel Gwaithoron~ WRITE_SHORT 0x244 0 // doesn't change WRITE_BYTE 0x246 ~%EP#NEEDL%~ // the internal name of your kit, surrounded by % WRITE_BYTE 0x247 0x40 // doesn't change The character folder does indeed contain the three portraits and the .cre (in that folder, it's EP#HIN.CRE, all caps). The item folder contains EP#HINAM, which is copied to override before the section that adds the NPC's kit, and the kit folder contains EP#Needl.2DA. When Hinaeariel appears in-game, she's properly equipped as the above scheme suggests. I used to have the COPY lines like this: COPY ~Hinaeari/character/EP#HinS.bmp~ ~portraits/EP#HinS.bmp~ COPY ~Hinaeari/character/EP#HinM.bmp~ ~portraits/EP#HinM.bmp~ COPY ~Hinaeari/character/EP#HinH.bmp~ ~portraits/EP#HinH.bmp~ COPY ~Hinaeari/character/EP#Hin.cre~ ~override/EP#Hin.cre~ Then, I second-guessed, after getting the error, and cut these lines to the way they're listed in the previous code section. What to do now? Thanks, Eric Link to comment
berelinde Posted June 19, 2010 Share Posted June 19, 2010 I don't see anything out of place in the tp2 section you posted. All I can tell you is make sure that your CRE is named ep#hin.cre. Capitalization doesn't matter on Windows or Mac, but it does matter on Linux. Linux users are used to having to tolower the mods on their installation, but it's one more step they have to go through to install your mod. Say, Mac doesn't have anything like that annoying bug feature in Windows where the extensions are hidden, does it? Just saying, because if it did, I would wonder whether the creature file is misnamed ep#hin.cre.cre. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.