Author Topic: How to Make a String Fixer  (Read 3357 times)

0 Members and 1 Guest are viewing this topic.

Offline Sillara

  • Retired Modder
  • Level 2
  • *****
  • Posts: 888
  • Karma: +2/-0
  • Gender: Female
    • MSN Messenger - gilalion
    • AOL Instant Messenger - sk8pilmp
    • Yahoo Instant Messenger - charisariel
    • View Profile
    • http://www.gilalion.com
    • Email
How to Make a String Fixer
« on: April 08, 2005, 03:28:41 AM »
nethrin
 Posted: Fri Jan 21, 2005 11:09 am    Post subject: how to make a string fixer  

--------------------------------------------------------------------------------
 
some have expressed a desire to learn how to make a string fixer, so here goes.

first, make a .baf file and name it something. mine is called KKFIX.baf

Code: [Select]

IF
    True()
THEN
    RESPONSE #100
        CutSceneId("KINDREK")
        SetName(~Kindrek~)
    SetPlayerSound(Myself,~I'm running away?~ [KINDR001],MORALE)
    SetPlayerSound(Myself,~Of course! You have finally come to your senses!~ [KINDR006],LEADER)
    SetPlayerSound(Myself,~Set camp, so that I may rest!~ [KINDR007],TIRED)
    SetPlayerSound(Myself,~This wasted time could be used slaying wizards!~ [KINDR008],BORED)
    SetPlayerSound(Myself,~Ha ha haaa!!!~ [KINDR009],BATTLE_CRY1)
    SetPlayerSound(Myself,~Death take you!~ [KINDR010],BATTLE_CRY2)
    SetPlayerSound(Myself,~Let the slaughter begin!~ [KINDR011],BATTLE_CRY3)
    SetPlayerSound(Myself,~I bathe in hot blood!~ [KINDR012],BATTLE_CRY4)
    SetPlayerSound(Myself,~I slake my bloodthirst on you!~
[KINDR013],BATTLE_CRY5)
    SetPlayerSound(Myself,~My wounds only make me stronger!~ [KINDR014],DAMAGE)
    SetPlayerSound(Myself,~So it ends!~ [KINDR015],DYING)
    SetPlayerSound(Myself,~The lifeblood pours from me!~ [KINDR016],HURT)
    SetPlayerSound(Myself,~Are wizards hiding behind these trees?~
[KINDR017],AREA_FOREST)
    SetPlayerSound(Myself,~Where there are people, there are wizards. Let us find some and slay them!~ [KINDR018],AREA_CITY)
    SetPlayerSound(Myself,~This place is rank with magic! It is offensive!~ [KINDR019],AREA_DUNGEON)
    SetPlayerSound(Myself,~May the light of day blazon forth my fearsome visage!~ [KINDR020],AREA_DAY)
    SetPlayerSound(Myself,~A dark time for dark deeds.~  [KINDR021],AREA_NIGHT)
    SetPlayerSound(Myself,~What?!~ [KINDR022],SELECT_COMMON1)
    SetPlayerSound(Myself,~Speak!~ [KINDR023],SELECT_COMMON2)
    SetPlayerSound(Myself,~Bother me not!~[KINDR024],SELECT_COMMON3)
    SetPlayerSound(Myself,~I am here!~ [KINDR025],SELECT_COMMON4)
    SetPlayerSound(Myself,~Speak quickly!~ [KINDR026],SELECT_COMMON5)
    SetPlayerSound(Myself,~Make haste!~ [KINDR027],SELECT_COMMON6)
    SetPlayerSound(Myself,~I go for this?~ [KINDR028],SELECT_ACTION1)
    SetPlayerSound(Myself,~This is tedious!~ [KINDR029],SELECT_ACTION2)
    SetPlayerSound(Myself,~My arm is best used in battle!~
[KINDR030],SELECT_ACTION3)
    SetPlayerSound(Myself,~I am willing!~ [KINDR031],SELECT_ACTION4)
    SetPlayerSound(Myself,~I would rather strangle a wizard!~
[KINDR032],SELECT_ACTION5)
    SetPlayerSound(Myself,~Where are the wizards?~ [KINDR033],SELECT_ACTION6)
    SetPlayerSound(Myself,~I would rather bury Disruptor in a wizard's skull!~ [KINDR034],SELECT_ACTION7)
    SetPlayerSound(Myself,~My fever dries up my brains.~
[KINDR035],SELECT_RARE1)
    SetPlayerSound(Myself,~So that I may never see a wasteland again.~
[KINDR036],SELECT_RARE2)
    SetPlayerSound(Myself,~Oooooooh!~ [KINDR037],CRITICAL_HIT)
    SetPlayerSound(Myself,~Not possible!~ [KINDR038],CRITICAL_MISS)
    SetPlayerSound(Myself,~No! No one is immune to Disruptor!~
[KINDR039],TARGET_IMMUNE)
    SetPlayerSound(Myself,~I better not be carrying anything magical!~
[KINDR040],INVENTORY_FULL)
    SetPlayerSound(Myself,~When asked about his past, KINDREK grunts at you and boldly tells you that he is a fearless, merciless, tireless, unapologetic pursuer of magic.~,EXISTANCE5)
    SetPlayerSound(Myself,~I am pleased!~ [KINDR002],HAPPY)
    SetPlayerSound(Myself,~I find this company tiresome!~  [KINDR003],UNHAPPY_ANNOYED)
    SetPlayerSound(Myself,~I grow angry. You don't want to see me when I'm angry!~ [KINDR004],UNHAPPY_SERIOUS)
    SetPlayerSound(Myself,~Your good deeds sicken me!~
[KINDR005],UNHAPPY_BREAKING_POINT)
    SetPlayerSound(Myself,~Why the hell am I casting a spell?!~
[KINDR041],SPELL_DISRUPTED)
    SetPlayerSound(Myself,~I can set traps?~ [KINDR042],SET_A_TRAP)
    SetPlayerSound(Myself,~Somehow, the shadows mask my presence.~
[KINDR043],HIDDEN_IN_SHADOWS)
    SetPlayerSound(Myself,~Why steal when I can just kill and pillage
afterwards?~ [KINDR044],PICKED_POCKET)
    EndCutSceneMode()
END


now, in your npcs main J.d file (mine here is KINDREKJ.d), write this:

Code: [Select]

IF ~IsGabber(Player1)
CombatCounter(0)~ THEN BEGIN KindrekChatsSOA
SAY ~(Kindrek is brooding again.)~
++ ~There's something wrong with you, Kindrek.~ + KKChatFixerSOA
END

IF ~~ THEN BEGIN KKChatFixerSOA
SAY ~Says who? I guess I'll fix it anyway.~
IF ~~ THEN DO ~StartCutScene("KKFIX")~ EXIT
END




then KINDREKJ.d file then runs the KKFIX.baf and fixes Kindrek!

btw, this is a force-talk string-fixer, *not* a HOTKEY.

peace.
_________________
Let the Realms' wizards beware: Kindrek is here!
A female fighter who can hold her own with the boys. She is Yasraena.
How's about we go sort out a few chavs with Willie Bruce?
Doubt that the stars are fire, doubt that the sun doth move, doubt truth to be a liar, but never doubt Saerileth's love.
 

 
 
Sillara
 Posted: Fri Jan 21, 2005 4:03 pm    Post subject:    

--------------------------------------------------------------------------------
 
I will give the HotKey additions to the string-fixer instructions.

If you wish to do a HotKey string-fixer, you must still have the same script that a force-talk one would have, the one that nethrin listed above. (I will add notes on string-fixers for .tra-ified mods after this.)

After making the script, rather than putting anything in the J file, you would put the following code into your NPC's .baf (main script file). In this case, it would be SAERILET.baf. (Yes, Saeri's string-fixer is HotKey type.)

Code: [Select]

IF
  HotKey(L)
THEN
  RESPONSE #100
    StartCutSceneMode()
    StartCutScene("SAERIFIX")
END


So you would highlight Saeri's picture, press L, and voila, fixed strings.

Now, for a mod that has been .tra-ified (meaning it is a .d/.tra pair ) you would put a slightly altered bit of code into the script that nethrin mentioned. Your code would look like this (taken from Tsujatha's code and called TSJFIX):

Code: [Select]

IF
    True()
THEN
    RESPONSE #100
        CutSceneId("TSUJATH")
        SetName(@1)
    SetPlayerSound(Myself,@35,MORALE)
    SetPlayerSound(Myself,@40,LEADER)
    SetPlayerSound(Myself,@41,TIRED)
    SetPlayerSound(Myself,@42,BORED)
    SetPlayerSound(Myself,@43,BATTLE_CRY1)
    SetPlayerSound(Myself,@44,BATTLE_CRY2)
    SetPlayerSound(Myself,@45,BATTLE_CRY3)
    SetPlayerSound(Myself,@46,BATTLE_CRY4)
    SetPlayerSound(Myself,@47,BATTLE_CRY5)
    SetPlayerSound(Myself,@48,DAMAGE)
    SetPlayerSound(Myself,@49,DYING)
    SetPlayerSound(Myself,@50,HURT)
    SetPlayerSound(Myself,@51,AREA_FOREST)
    SetPlayerSound(Myself,@52,AREA_CITY)
    SetPlayerSound(Myself,@53,AREA_DUNGEON)
    SetPlayerSound(Myself,@54,AREA_DAY)
    SetPlayerSound(Myself,@55,AREA_NIGHT)
    SetPlayerSound(Myself,@56,SELECT_COMMON1)
    SetPlayerSound(Myself,@57,SELECT_COMMON2)
    SetPlayerSound(Myself,@58,SELECT_COMMON3)
    SetPlayerSound(Myself,@59,SELECT_COMMON4)
    SetPlayerSound(Myself,@60,SELECT_COMMON5)
    SetPlayerSound(Myself,@61,SELECT_COMMON6)
    SetPlayerSound(Myself,@62,SELECT_ACTION1)
    SetPlayerSound(Myself,@63,SELECT_ACTION2)
    SetPlayerSound(Myself,@64,SELECT_ACTION3)
    SetPlayerSound(Myself,@65,SELECT_ACTION4)
    SetPlayerSound(Myself,@66,SELECT_ACTION5)
    SetPlayerSound(Myself,@67,SELECT_ACTION6)
    SetPlayerSound(Myself,@68,SELECT_ACTION7)
    SetPlayerSound(Myself,@69,SELECT_RARE1)
    SetPlayerSound(Myself,@70,SELECT_RARE2)
    SetPlayerSound(Myself,@71,CRITICAL_HIT)
    SetPlayerSound(Myself,@72,CRITICAL_MISS)
    SetPlayerSound(Myself,@73,TARGET_IMMUNE)
    SetPlayerSound(Myself,@74,INVENTORY_FULL)
    SetPlayerSound(Myself,@2,EXISTANCE5)
    SetPlayerSound(Myself,@36,HAPPY)
    SetPlayerSound(Myself,@37,UNHAPPY_ANNOYED)
    SetPlayerSound(Myself,@38,UNHAPPY_SERIOUS)
    SetPlayerSound(Myself,@39,UNHAPPY_BREAKING_POINT)
    SetPlayerSound(Myself,@75,SPELL_DISRUPTED)
    SetPlayerSound(Myself,@76,SET_A_TRAP)
    SetPlayerSound(Myself,@77,HIDDEN_IN_SHADOWS)
    SetPlayerSound(Myself,@78,PICKED_POCKET)
    EndCutSceneMode()
END



These are the same lines that are given in the .tp2, and the .tra file in which they are located is the one that has your .tp2 lines, in this case called Setup-Tsujatha.tra. There the lines would look something like this:
@1 = ~Tsujatha~

And so on. The ones that include a sound clip have the appropriate clip in the *tra* file, NOT the string-fixer. (It would not help much to have German translation if Tsujatha kept speaking English out loud!) A sound clip would be added like this:

@56 = ~What is your will?~ [TSUJA021]

I hope that was helpful and not confusing!  If anyone has any more questions, please, do not hesitate to ask me!  

Sillara
Can you accept a necromancer? Can you trust a murderer? Can you love Tsujatha?
If you like Tsujatha, you should read his novels.
Natha ssin'urn lu' dwalc ilythiiri noamuth wund l' rivven: Yasraena zhah ghil!
Saerileth's bounty is as boundless as the sea; the more  she gives to you, the more she has, for her love is infinite.