Some modding questions
Saigon1983
Member Posts: 157
Hello, everyone!
I have a "noob-maybe" question.
I'm from Russia. So, i have two TLK files, you know.
For example, I have 2 replics from NPC, one for male-hero and one for female-hero. An I also have two WAV-files for these replics. An a TRA-file. My question is, which syntaxis is correct?:
@1000=~Replic for male~ [VOICE001] ~Replic for female~ [VOICE002]
or
@1000=~Replic for male~ ~Replic for female~ [VOICE001] [VOICE002]
or both are correct/incorrect?
In D-file I'll code it like this:
SAY @1000
Will this works?
I have a "noob-maybe" question.
I'm from Russia. So, i have two TLK files, you know.
For example, I have 2 replics from NPC, one for male-hero and one for female-hero. An I also have two WAV-files for these replics. An a TRA-file. My question is, which syntaxis is correct?:
@1000=~Replic for male~ [VOICE001] ~Replic for female~ [VOICE002]
or
@1000=~Replic for male~ ~Replic for female~ [VOICE001] [VOICE002]
or both are correct/incorrect?
In D-file I'll code it like this:
SAY @1000
Will this works?
Post edited by Saigon1983 on
1
Comments
I never experienced with different voice files for male and female, I don't know if it work but it seems reasonnable to expect it.
Anywhere you can write @nnn, you'll be able to have a text using the first syntax. However it will only work for texts used in a context where the character gender is checked by the game. It works for dialogs but not scripted cutscenes or item descriptions, for instance (unless something was changed in the Enhanced Editions). For those, the male text is applied.
It's not directly applicable as it is, but it explains the principle. For instance, you'll have to devise a proper ways of doing what's described as strref="text", for instance.
Un russian, some phrases for male and female persons diferent only in ending "a" for female verbs. The common method ~male~ ~female~ is useful, but I want to set token < A >, which will add "" to dialog.tlk and "a" to dialogF.tlk. So, I think about three-lines code, which I cat add to any mod for a russian translate. The conception of this code is like this:
1. Append "" to dialog.tlk and "a" to dialogF.tlk. This will sets in the last tlk-string
2. Set "myvar", which takes the number of last string as strref
3. SetToken("A"."myvar")
But I have no idea, how to write this correctly... and where...
There are many ways to add a new string to the dialog files. However, in this case, you'd better do it in the same file as the code to set the token linked with the particular string.
Since you want to use this on a very broad scale, you should ensure this is done as soon as the game starts. You could add that to a script in the starting area of the game. This one depends on the game.
You don't need a variable. In the example, the use case was to display the value of a variable. In your case, you just want to link the token to your string. This may work:
SetToken("FEMALE_SUFFIX", @1~~ ~a~)
with
@1 = ~~ ~a~
for russian, and
@1 = ~~ ~~
for other languages.
Then use your token like this (fake english example)
@57 = ~I am Jhon~ ~I am<FEMALE_SUFFIX> Jane~
Please don't take this for granted though.
To restrict an item to a specific chararacter there is a new effect in Enhanced Editions. You can read details about it here and you can check various items in BG2EE that use it: Yoshimo's katana (NPSW02.ITM). In practise, most items whose code start with NP are NPC specific in BG2EE, if you need more examples.
This is not compatible with older games. You'd have to include restrictions on strength and other characteristics of the NPC to simulate something similar with BG2 (that's how the NP items were made back then).
If the NPC joins the party or got the item somewhere later in the game you could cast the spell via the NPC script and the item only could used by this NPC... (If you try to equip this Item to another NPC the String reference would be displayed in the inventory screen, like if you trying to take Minsc's Boo away...)
IF
Global("NPCGotHisItem","LOCALS",0)
PartyHasItem("Itemname")
THEN
RESPONSE #100
SetGlobal("NPCGotHisItem","LOCALS",1)
ApplySpellRES("Spell",Myself)
END
My advise is to design the set in a way that each its piece complements the others. E.g. each item gives a small cumulative bonus to something, be it regeneration, resistance type, immunity to disabling one type of effects or what have you... This is more or less how item sets are implemented in Item Revisions mod.