Skip to content

modding newbie questions

amikaamika Member Posts: 34
edited June 2016 in General Modding
i am brand new to modding as of like a week ago, and truth be told i've never even coded anything more difficult than baby html and css for babies before.

To start easy, I just began adding to existing NPCs. In particular, Dorn felt a little strange in SoA after he got all this great character development in SoD, so I wanted to update the interactions with him, also because I am such an orc hound. Now you own my shame and secrets.

Is it generally a faux pas to modify existing NPCs? I want to... not to be a total jerk about adding onto someone else's writing. Is it a compliment? Because I got so attached to the NPC? I know nothing.

Anyway,

1. I put a vampire quest in Dorn's romance track because I could check my work against existing code - but I can rely mostly on append and extend because it's almost all new content. It works, but some of the code feels a little unnecessarily destructive. I replaced the dialogue block that includes the cutscene where Bodhi would normally fail to capture Dorn and had it reference my new cutscene, for example, so I was wondering if there was a less destructive way to replace that one line?

from bodhiamb.dlg
IF ~~ THEN BEGIN 26 // from: SAY #95199 /* ~You will submit to me, Dorn—one way or another.~ */ IF ~~ THEN DO ~ClearAllActions() StartCutSceneMode() StartCutSceneEx("OHDBODH1",FALSE) // < I only need to change this one. ~ EXIT END
Similar case for his final lovetalk which references a variable that doesn't exist instead of his patron variables, or (maybe this is a little different) if I want to make an existing dialogue reply set or increment a variable.

2. I'd like to modify a few existing bcs files, inserting variables, etc. I'm not sure how to do this because there's no state numbers or anything to reference. I am under the impression it has something to do with... patching in the .tp2 file? But all of the forum post/tutorial explanations I could find seem to be a little too sophisticated for me at the moment.

Say I want, depending on a timer, a different overhead string/journal entry when Adalon dies. I'm not sure how to insert a variable/timer into the "if" part here:
IF Die() !AreaCheck("AR2402") THEN RESPONSE #100 SetInterrupt(FALSE) SetGlobal("DrowCityHostile","GLOBAL",1) EraseJournalEntry(15797) AddJournalEntry(62079,QUEST_DONE) ActionOverride(Player1,ApplySpell(Myself,UNDER_NORM)) ActionOverride(Player2,ApplySpell(Myself,UNDER_NORM)) ActionOverride(Player3,ApplySpell(Myself,UNDER_NORM)) ActionOverride(Player4,ApplySpell(Myself,UNDER_NORM)) ActionOverride(Player5,ApplySpell(Myself,UNDER_NORM)) ActionOverride(Player6,ApplySpell(Myself,UNDER_NORM)) DisplayStringHead(Myself,62029) // ~With your attack on the dragon, the drow illusion fades away.~ SetGlobal("PlayerLooksLikeDrow","GLOBAL",0) SetInterrupt(TRUE) END
3. I understand why referencing string numbers should be avoided, because everyone is going to end up with different string numbers depending on how many mods they install, etc. Is it okay to reference strings from the vanilla install since they'd be the same for everyone?

Thank you!
Post edited by amika on

Comments

  • elminsterelminster Member, Developer Posts: 16,317
    edited June 2016
    No one seems to have responded here so I figured I would.


    1. Sorry, to clarify you are trying to replace this action?

    StartCutSceneEx("OHDBODH1",FALSE)

    If that is the case then in a .d file (probably the one you were using to append) use REPLACE_ACTION to replace that action with another (or to replace it with nothing)

    http://www.weidu.org/~thebigg/README-WeiDU.html

    (this is an example from a mod I am working on for BGEE but hopefully it provides some context)

    REPLACE_TRANS_ACTION BERRUN
    BEGIN 15 16 17 END BEGIN 0 END ~EscapeArea()~ ~SetGlobal("k9Berrun","GLOBAL",1)~

    2. I'll have to look into this one. I don't immediately recall what I've done in the past for it.

    3. For dialogue I would say this should be fine.
  • amikaamika Member Posts: 34
    @elminster thanks so much! that is what i meant.
  • elminsterelminster Member, Developer Posts: 16,317
    As far as the second one goes I think you can use REFACTOR_TRIGGER
Sign In or Register to comment.