jastey Posted August 12, 2017 Share Posted August 12, 2017 I don't add actors via tp2 into areas, so I have no experience with this. This is what Jarl's Adventure Pack does. My problem is: the name ~Gast~ would have to be ~Guest~ in English. But using the string from the setup.tra (I tried @2120 without quotation marks) doesn't work. How would I do this? COPY_EXISTING ~AR7227.ARE~ ~override~ PATCH_IF (SOURCE_SIZE > 0x11b) BEGIN //Invalid file protection LAUNCH_PATCH_MACRO ~Q_ARE_InitVars~ LAUNCH_PATCH_MACRO ~Q_AREAdd_InitVars~ SET "Q_New_Actor" = 10 SET "Q_New_Ambie" = 1 SET "Q_New_Anima" = 8 LAUNCH_PATCH_MACRO ~Q_AREAdd_Process~ // Add Actor 1 WRITE_ASCII "Q_NewOffset_Actor" + ("Q_Siz_Actor" * 0) ~Gast~ #32 // Name WRITE_ASCII "Q_NewOffset_Actor" + ("Q_Siz_Actor" * 0) + 0x80 ~JA#DOPP0~ #8 // CRE WRITE_ASCII "Q_NewOffset_Actor" + ("Q_Siz_Actor" * 0) + 0x48 ~JA#DOPP0~ #8 // DLG WRITE_LONG "Q_NewOffset_Actor" + ("Q_Siz_Actor" * 0) + 0x38 0xffffffff // Unknown WRITE_SHORT "Q_NewOffset_Actor" + ("Q_Siz_Actor" * 0) + 0x20 1103 // Pos X WRITE_SHORT "Q_NewOffset_Actor" + ("Q_Siz_Actor" * 0) + 0x22 587 // Pos Y WRITE_SHORT "Q_NewOffset_Actor" + ("Q_Siz_Actor" * 0) + 0x24 1103 // Des X WRITE_SHORT "Q_NewOffset_Actor" + ("Q_Siz_Actor" * 0) + 0x26 587 // Des Y WRITE_SHORT "Q_NewOffset_Actor" + ("Q_Siz_Actor" * 0) + 0x34 11 // Orientation WRITE_LONG "Q_NewOffset_Actor" + ("Q_Siz_Actor" * 0) + 0x40 0x00ffffff // Present WRITE_SHORT "Q_NewOffset_Actor" + ("Q_Siz_Actor" * 0) + 0x28 1 // Visible (...) Link to comment
argent77 Posted August 12, 2017 Share Posted August 12, 2017 I would advise against using a translation string for an ARE actor name. It's basically the ARE counterpart of a CRE script name for scripting purposes. If you're still willing to use a tra reference you can try SPRINT: COPY_EXISTING ~ar7227.are~ ~override~ SPRINT actorName @2120 // ... WRITE_ASCIIE offset ~%actorName%~ #32 Btw, I would strongly recommend to use the WeiDU function fj_are_structure to add (or remove) all kinds of area structures, including actors. In your case it would look something like this: COPY_EXISTING ~ar7227.are~ ~override~ LPF fj_are_structure INT_VAR fj_loc_x = 1103 fj_loc_y = 587 fj_orientation = 11 STR_VAR fj_structure_type = "actor" fj_name = "Gast" // or use fj_name = EVAL "%actorName%" if you still want to use the tra reference from above fj_cre_resref = "JA#DOPP0" fj_dlg_resref = "JA#DOPP0" END More info in the WeiDU docs. Link to comment
Gwendolyne Posted August 12, 2017 Share Posted August 12, 2017 Deleted. Argent77 was faster. Link to comment
Roxanne Posted August 12, 2017 Share Posted August 12, 2017 I don't add actors via tp2 into areas, so I have no experience with this. This is what Jarl's Adventure Pack does. My problem is: the name ~Gast~ would have to be ~Guest~ in English. But using the string from the setup.tra (I tried @2120 without quotation marks) doesn't work. How would I do this? COPY_EXISTING ~AR7227.ARE~ ~override~ PATCH_IF (SOURCE_SIZE > 0x11b) BEGIN //Invalid file protection LAUNCH_PATCH_MACRO ~Q_ARE_InitVars~ LAUNCH_PATCH_MACRO ~Q_AREAdd_InitVars~ SET "Q_New_Actor" = 10 SET "Q_New_Ambie" = 1 SET "Q_New_Anima" = 8 LAUNCH_PATCH_MACRO ~Q_AREAdd_Process~ // Add Actor 1 WRITE_ASCII "Q_NewOffset_Actor" + ("Q_Siz_Actor" * 0) ~Gast~ #32 // Name WRITE_ASCII "Q_NewOffset_Actor" + ("Q_Siz_Actor" * 0) + 0x80 ~JA#DOPP0~ #8 // CRE WRITE_ASCII "Q_NewOffset_Actor" + ("Q_Siz_Actor" * 0) + 0x48 ~JA#DOPP0~ #8 // DLG WRITE_LONG "Q_NewOffset_Actor" + ("Q_Siz_Actor" * 0) + 0x38 0xffffffff // Unknown WRITE_SHORT "Q_NewOffset_Actor" + ("Q_Siz_Actor" * 0) + 0x20 1103 // Pos X WRITE_SHORT "Q_NewOffset_Actor" + ("Q_Siz_Actor" * 0) + 0x22 587 // Pos Y WRITE_SHORT "Q_NewOffset_Actor" + ("Q_Siz_Actor" * 0) + 0x24 1103 // Des X WRITE_SHORT "Q_NewOffset_Actor" + ("Q_Siz_Actor" * 0) + 0x26 587 // Des Y WRITE_SHORT "Q_NewOffset_Actor" + ("Q_Siz_Actor" * 0) + 0x34 11 // Orientation WRITE_LONG "Q_NewOffset_Actor" + ("Q_Siz_Actor" * 0) + 0x40 0x00ffffff // Present WRITE_SHORT "Q_NewOffset_Actor" + ("Q_Siz_Actor" * 0) + 0x28 1 // Visible (...) Another mystery solved. This is how the mod managed to create creatures on top of existing creatures to make the originals unusable. Using simple area scripts to create mod cretures would have prevented those bugs. Hope if you now take care of Jarl's Incompatibility Pack, you also take care of these issues. Or the removal of vanilla NPCs from vanilla areas, which was another issue of this mod. Link to comment
jastey Posted August 12, 2017 Author Share Posted August 12, 2017 Thank you for the example code Argent (and Gwendolyne). Roxanne: well, looking at the amount of work I am not sure what / how much I'll do, but I am looking at compatibility with bg1re and bg1npc currently at least. The actors added to areas I *have* to do something about, because currently they have all German names. Link to comment
lynx Posted August 12, 2017 Share Posted August 12, 2017 I think they were trying to say this isn't their short or long name, but the script name. So no need to translate this, but change the actual CREs it is referencing. Could likely cause problems in scripts and dialogs if they wouldn't be using the same thing. Link to comment
jastey Posted August 12, 2017 Author Share Posted August 12, 2017 You are right, it's not the name you see when meeting the creature ingame. But it isn't the script name, either. It's a name I see in NI when looking at the are file. Thank you for drawing my attention to this, because this I can ignore (and that saves me a *lot* of work.) Link to comment
Ardanis Posted August 12, 2017 Share Posted August 12, 2017 For containers, triggers, doors etc. "fj_name" is how you reference them with TriggerActivation(), OpenDoor() etc., so technically it is indeed a script name. The catch is that actor's .cre file may have their own, and by default is the one that game uses for script purposes. It's possible to have "fj_name" override it with BIT3 (?) flag, although I don't remember if it's EE-only feature or not. Link to comment
Roxanne Posted August 12, 2017 Share Posted August 12, 2017 For containers, triggers, doors etc. "fj_name" is how you reference them with TriggerActivation(), OpenDoor() etc., so technically it is indeed a script name. The catch is that actor's .cre file may have their own, and by default is the one that game uses for script purposes. It's possible to have "fj_name" override it with BIT3 (?) flag, although I don't remember if it's EE-only feature or not. It is *Override Script Name*, Flag(3) in the are-file. If the flag is set, the name given in the are file (or the fj_name if the cre is added this way) becomes the script name (DV) regardless of what the cre-file has in that place. This may be intended in specific cases, but mostly is used when you want to give a generic creature a distinct script name for the one case in the one area. Under *normal* circumstances, for creatures the fj_name may be just something like actor1, actor2 and the more important one would be fj_cre_resref which is your creature-file (and which has all the other stuff like name, script name etc in it). Link to comment
Roxanne Posted August 13, 2017 Share Posted August 13, 2017 Just some hints concerning Jarl's Incompatibility Pack: - check BWFixpack for a large number of fixes for the mod >>> Big World Fixpack/JA#BGT_AdvPack - check also Area_Patcher for fixes to known issues with the mod PS - a practical way could be to start work on a version you first patched with BWFixpack. https://github.com/BiGWorldProject/BiG-World-Fixpack/archive/master.zip Link to comment
jastey Posted August 13, 2017 Author Share Posted August 13, 2017 I integrated the BWPFixpack fixes already. Which Area_Patcher you are referring to? EDIT: And would you please use the mod's name and not a mock name. I get it that you don't have a high opinion of the used coding but that's no reason for trolling. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.