Jump to content

General questions about creating mods for EET


Roxanne

Recommended Posts

I have the following situation regarding the continuous journal.

 

I have installed my mod on EET with new weidu 2.40. All quest journal entries now appear correctly (in quest section and grouped under their headlines etc)

I have advanced in the game beyond ToB end (see initial post of this thread http://gibberlings3.net/forums/index.php?showtopic=27913&page=1&do=findComment&comment=242897).

I am now in chapter 24 and have new journal pages for the stuff added during chapters 23 and 24 - fine.

 

There is only the *cosmetic* issue that all chapters after 22 are labelled (Black Pits). Thus I have a page Black Pits for chapter 23 entries, another Black Pits for chapter 24. Nothing gamebreaking - but if someone knows a way to change that I would like to apply that. I found a 2da file for names of savegames but none for journal pages.

Link to comment

I have the following situation regarding the continuous journal.

 

I have installed my mod on EET with new weidu 2.40. All quest journal entries now appear correctly (in quest section and grouped under their headlines etc)

I have advanced in the game beyond ToB end (see initial post of this thread http://gibberlings3.net/forums/index.php?showtopic=27913&page=1&do=findComment&comment=242897).

I am now in chapter 24 and have new journal pages for the stuff added during chapters 23 and 24 - fine.

 

There is only the *cosmetic* issue that all chapters after 22 are labelled (Black Pits). Thus I have a page Black Pits for chapter 23 entries, another Black Pits for chapter 24. Nothing gamebreaking - but if someone knows a way to change that I would like to apply that. I found a 2da file for names of savegames but none for journal pages.

add this code to your tp2 file:

COPY_EXISTING ~M_EET.LUA~ ~override~
  SET chapter23 = RESOLVE_STR_REF (@1) //change it to TRA reference for chapter 23 journal label
  SET chapter24 = RESOLVE_STR_REF (@2) //change it to TRA reference for chapter 24 journal label
  REPLACE_TEXTUALLY ~\(return Infinity_FetchString(71000 \+ chapter)\)~  ~\1
    elseif (chapter == 23) then
        return Infinity_FetchString(%chapter23%)
    elseif (chapter == 24) then
        return Infinity_FetchString(%chapter24%)~

edit: added missing \. Now the code should work.

Link to comment

 

I have the following situation regarding the continuous journal.

 

I have installed my mod on EET with new weidu 2.40. All quest journal entries now appear correctly (in quest section and grouped under their headlines etc)

I have advanced in the game beyond ToB end (see initial post of this thread http://gibberlings3.net/forums/index.php?showtopic=27913&page=1&do=findComment&comment=242897).

I am now in chapter 24 and have new journal pages for the stuff added during chapters 23 and 24 - fine.

 

There is only the *cosmetic* issue that all chapters after 22 are labelled (Black Pits). Thus I have a page Black Pits for chapter 23 entries, another Black Pits for chapter 24. Nothing gamebreaking - but if someone knows a way to change that I would like to apply that. I found a 2da file for names of savegames but none for journal pages.

add this code to your tp2 file:

OUTER_SET chapter23 = RESOLVE_STR_REF (@1) //change it to TRA reference for chapter 23 journal label
OUTER_SET chapter24 = RESOLVE_STR_REF (@2) //change it to TRA reference for chapter 24 journal label

COPY_EXISTING ~M_EET.LUA~ ~override~
  REPLACE_TEXTUALLY ~\(return Infinity_FetchString(71000 \+ chapter)\)~  ~\1
    elseif (chapter == 23) then
        return Infinity_FetchString(%chapter23%)
    elseif (chapter == 24) then
        return Infinity_FetchString(%chapter24%)~

edit: added missing \. Now the code should work.

 

Thanks for the help.

 

It fails in my case as M_EET-lua does not exist.

Applying it to Util.lua does the trick.

 

Would I need to do a check in tp2 to see if M_eet.lua exists THEN do it there ELSE apply it to util.lua? Or may there be even more options? (Honestly, these new lua stuff is all new to me)

Link to comment
Would I need to do a check in tp2 to see if M_eet.lua exists THEN do it there ELSE apply it to util.lua? Or may there be even more options? (Honestly, these new lua stuff is all new to me)

 

M_eet.lua was added in one of RCs, previously this code indeed was present in util.lua. No need for additional check going forward

Link to comment

 

Would I need to do a check in tp2 to see if M_eet.lua exists THEN do it there ELSE apply it to util.lua? Or may there be even more options? (Honestly, these new lua stuff is all new to me)

 

M_eet.lua was added in one of RCs, previously this code indeed was present in util.lua. No need for additional check going forward

 

OK thanks, I was waiting for RC7 to update my installation, so I am likely a bit behind. So I will use M_EET.lua for mymod.tp2

Link to comment

Is there somewhere a list of creatures etc that are removed by EET from later chapters?

 

I noticed that some (like Faldorn) have the leaving code added to their override script, while others (e.g.Emissary Tar) have a dedicated script (Leavech7.bcs) assigned to them.

Since I use some charaters in later chapters of my mod, I need to handle those on a case to case basis (noticing that they are missing) to keep them without spoiling the general clean-up done by EET (i.e. either adding additional conditions to the script or creating new copies of the creatures).

Link to comment
I noticed that some (like Faldorn) have the leaving code added to their override script

that's the case for all NPCs. The code responsible for it can be found here. And explanation what EET_NPC_TRANSITION function does is available in Modder's Notes (this function is reponsible for EET continuity system and it's recommended for mods to use it too, unless you know EET enough to code without it).

 

while others (e.g.Emissary Tar) have a dedicated script (Leavech7.bcs) assigned to them

this is vanilla stuff, not affected by EET

 

Since I use some charaters in later chapters of my mod, I need to handle those on a case to case basis (noticing that they are missing) to keep them without spoiling the general clean-up done by EET (i.e. either adding additional conditions to the script or creating new copies of the creatures).

 

Is there somewhere a list of creatures etc that are removed by EET from later chapters?

Let's see, full list is not available but it can be read from EET/lib/bg1_BCS.tph. Keep in mind that the latest version has duplicated BG1 cleaning (harmless) which won't be a case going forward

BG1:

  • BG1800.BCS, DV: LAKADAAR, chapter > 7
  • BG2700.BCS, DV: GORION, chapter > 7
  • BG2700.BCS, DV: BINKOS, chapter > 7
  • BG2800.BCS, DV: ANDOUT, chapter > 7
  • BG3900.BCS, DV: WILCO, chapter > 7
  • BG4200.BCS, DV: HOBGO5, chapter > 7
  • BG4400.BCS, DV: SPRAT, chapter > 7

SoD:

  • Every creature with following scripts, chapter > 13

BDFIST.BCS

BDASC.BCS

BD5200EN.BCS

BD5100EN.BCS

BDTHRUDD.BCS

BDCOAL50.BCS

  • Area scripts are patched to remove NPCs that shows up later in the story (EET doesn't block access to areas between SoD chapters, so this is needed to not have Mizhena in 6 areas etc.) Filtered from chapter to chapter
  • Additional cleaning for characters related to Flaming Fist and Crusade when chapter > 13, all done via area scripts, please refer to 'clean SoD areas' section of the bg1_BCS.tph

On top of that take a look at dialogue filtering based on chapter:

------

No changes in BG2 as of yet.

Link to comment

 

I noticed that some (like Faldorn) have the leaving code added to their override script

that's the case for all NPCs. The code responsible for it can be found here. And explanation what EET_NPC_TRANSITION function does is available in Modder's Notes (this function is reponsible for EET continuity system and it's recommended for mods to use it too, unless you know EET enough to code without it).

 

while others (e.g.Emissary Tar) have a dedicated script (Leavech7.bcs) assigned to them

this is vanilla stuff, not affected by EET

 

Since I use some charaters in later chapters of my mod, I need to handle those on a case to case basis (noticing that they are missing) to keep them without spoiling the general clean-up done by EET (i.e. either adding additional conditions to the script or creating new copies of the creatures).

 

Is there somewhere a list of creatures etc that are removed by EET from later chapters?

Let's see, full list is not available but it can be read from EET/lib/bg1_BCS.tph. Keep in mind that the latest version has duplicated BG1 cleaning (harmless) which won't be a case going forward

BG1:

  • BG1800.BCS, DV: LAKADAAR, chapter > 7
  • BG2700.BCS, DV: GORION, chapter > 7
  • BG2700.BCS, DV: BINKOS, chapter > 7
  • BG2800.BCS, DV: ANDOUT, chapter > 7
  • BG3900.BCS, DV: WILCO, chapter > 7
  • BG4200.BCS, DV: HOBGO5, chapter > 7
  • BG4400.BCS, DV: SPRAT, chapter > 7

SoD:

  • Every creature with following scripts, chapter > 13

BDFIST.BCS

BDASC.BCS

BD5200EN.BCS

BD5100EN.BCS

BDTHRUDD.BCS

BDCOAL50.BCS

  • Area scripts are patched to remove NPCs that shows up later in the story (EET doesn't block access to areas between SoD chapters, so this is needed to not have Mizhena in 6 areas etc.) Filtered from chapter to chapter
  • Additional cleaning for characters related to Flaming Fist and Crusade when chapter > 13, all done via area scripts, please refer to 'clean SoD areas' section of the bg1_BCS.tph

On top of that take a look at dialogue filtering based on chapter:

------

No changes in BG2 as of yet.

 

Thanks a lot. Seems I caught most of it but was unaware of vanilla doing some stuff as well. I will look into that deeper to see if it has any impact on my mod.

Thanks again.

 

PS - I did a search on the Leavech7.bcs from vanilla - it affects all creatures in the BG1 Iron Throne Building but nothing beyond that (so my finding it with the Emissary was pure chance).

Link to comment
PS - I did a search on the Leavech7.bcs from vanilla - it affects all creatures in the BG1 Iron Throne Building but nothing beyond that (so my finding it with the Emissary was pure chance).

 

It looks like Leavech7.bcs is a leftover from BG:EE in BG2:EE (not used there) that I didn't notice, so it shouldn't be affected by code that automatically updates BG2:EE chapter references. It should be chapter = 7. Will be fixed in next version.

 

edit: same problems were present in few more leftover scripts: AMNISH3.BCS, BRILLA.BCS, FERGUS.BCS, GATEWARD.BCS, POGHMA8.BCS, TETHTORL.BCS. All fixed, thanks for report.

Link to comment

 

Would I need to do a check in tp2 to see if M_eet.lua exists THEN do it there ELSE apply it to util.lua? Or may there be even more options? (Honestly, these new lua stuff is all new to me)

 

M_eet.lua was added in one of RCs, previously this code indeed was present in util.lua. No need for additional check going forward

 

I am still playing my previous install (since I just have two more days to go until I finish the complete test playthrough) so using the modification discussed above with Util.lua still and not yet M_EET.

The observation is the following - using your method I have added chapters up to 36. I am now in chapter 34 (according to first post in this thread). Until chapter 29 all journal entries appeared correctly. With chapter 30 and onward, a new page is created when the chapter increases but all journal entries are put to chapter 29, the later pages remain empty even if new quests appear (and are put to page 29).

Question I have is whether code in M_EET would be different here or the same - such that problem will go away or stay with your new version?

 

PS - this is similar to old BGT where you could add chapters to the end after ToB final and the globals would be set and read just fine, just all the journal entries would go into chapter 10 (hardcoded limit). Is 29 the new limit here?

Anyway, it is mostly a cosmetic issue since no journal entries are lost, everything updates fine, you just have to leaf a couple of pages back if you want to consult your journal in the higher chapters.

Link to comment

 

 

Would I need to do a check in tp2 to see if M_eet.lua exists THEN do it there ELSE apply it to util.lua? Or may there be even more options? (Honestly, these new lua stuff is all new to me)

 

M_eet.lua was added in one of RCs, previously this code indeed was present in util.lua. No need for additional check going forward

 

I am still playing my previous install (since I just have two more days to go until I finish the complete test playthrough) so using the modification discussed above with Util.lua still and not yet M_EET.

The observation is the following - using your method I have added chapters up to 36. I am now in chapter 34 (according to first post in this thread). Until chapter 29 all journal entries appeared correctly. With chapter 30 and onward, a new page is created when the chapter increases but all journal entries are put to chapter 29, the later pages remain empty even if new quests appear (and are put to page 29).

Question I have is whether code in M_EET would be different here or the same - such that problem will go away or stay with your new version?

 

PS - this is similar to old BGT where you could add chapters to the end after ToB final and the globals would be set and read just fine, just all the journal entries would go into chapter 10 (hardcoded limit). Is 29 the new limit here?

Anyway, it is mostly a cosmetic issue since no journal entries are lost, everything updates fine, you just have to leaf a couple of pages back if you want to consult your journal in the higher chapters.

 

I have meanwhile finished my playthrough and made a new installation wirh RC7.

The observation is the same - the journal pages are added on each increment but beginning with chapter 29 all entries are only made to that page for the rest of the game.

Link to comment

Roxanne, I don't know if it's possible to lift this 30 pages (including prologue) journal limitation. Can't find anything in GUI code that would explain this behaviour. Which means EET leaves 7 free chapter journal pages for modders (ToB last chapter is 22)

 

You can however stop the following journal pages from showing up and you have full control what label will be used for page 29 (you can change it between chapters).

 

First of all add this code to M_EET.lua by hand (it will be part of next release since it fixes Prologue page)

--increase chapter variable
function incrChapter(amount)
    if ( ((chapter + amount) > Infinity_GetMaxChapterPage()) or ((chapter + amount) < 0 ) ) then
        return
    end
    chapter = chapter + amount
end

Add this code to your mod:

COPY_EXISTING ~M_EET.lua~ ~override~
    REPLACE_TEXTUALLY ~chapter = chapter \+ amount~ ~if ((chapter + amount) > 29) then
        chapter = 29
    else
        chapter = chapter + amount
    end~
BUT_ONLY

COPY_EXISTING ~UI.MENU~ ~override~
    REPLACE_TEXTUALLY ~chapter = math\.max(0,Infinity_GetMaxChapterPage());~ ~if (Infinity_GetMaxChapterPage() > 29) then
            chapter = 29
        else
            chapter = math.max(0,Infinity_GetMaxChapterPage())
        end~
BUT_ONLY

Now the journal pages will end on chapter 29. To not confuse players you can change the label after chapter 29 by using:

elseif (Infinity_GetMaxChapterPage() == 29) then
        return Infinity_FetchString(%chapter29%)
elseif (Infinity_GetMaxChapterPage() == 30) then
        return Infinity_FetchString(%chapter30%)
elseif (Infinity_GetMaxChapterPage() == 31) then
        return Infinity_FetchString(%chapter31%)
//and so forth

instead of previously mentioned GUI chapter variable (do not confuse it with in-game vriables). Infinity_GetMaxChapterPage() always returns correct in-game chapter number.

 

Or you could for example assign single page 29 label for whole Sandrah Time of Troubles Revisited (ToT) like this:

elseif (Infinity_GetMaxChapterPage() > 29) then
Link to comment

Thanks once more for your support - considering the options (I use Global("Chapter","Global") in scripts and dialogues, so I need to maintain the in-game variable) , it would be best to have all my ToT entires on one page which I can name "Time of Trouble" and which contains everything >29.

I am not a coder for GUI, so this is what I think I need to do?:

 

 

 

ACTION_IF FILE_EXISTS_IN_GAME ~M_EET.lua~ THEN BEGIN

 

OUTER_SET chapter23 = RESOLVE_STR_REF (@980)
OUTER_SET chapter24 = RESOLVE_STR_REF (@981)
OUTER_SET chapter25 = RESOLVE_STR_REF (@982)
OUTER_SET chapter26 = RESOLVE_STR_REF (@983)
OUTER_SET chapter27 = RESOLVE_STR_REF (@984)
OUTER_SET chapter28 = RESOLVE_STR_REF (@985)
OUTER_SET chapter29 = RESOLVE_STR_REF (@986)
//Do I need those or are they now set automatically?

 

OUTER_SET chapter30 = RESOLVE_STR_REF (@987) // @987=~Time of Trouble~

 

COPY_EXISTING ~M_EET.lua~ ~override~
REPLACE_TEXTUALLY ~chapter = chapter \+ amount~ ~if ((chapter + amount) > 29) then
chapter = 29
else
chapter = chapter + amount
end~

BUT_ONLY

COPY_EXISTING
~UI.MENU~ ~override~
REPLACE_TEXTUALLY ~chapter = math\.max(0,Infinity_GetMaxChapterPage());~ ~if (Infinity_GetMaxChapterPage() > 29) then
chapter = 29
else
chapter = math.max(0,Infinity_GetMaxChapterPage())

elseif (Infinity_GetMaxChapterPage() > 29) then
return Infinity_FetchString(%chapter30%)

end~

BUT_ONLY

END

 

 

Not sure about that last block, it may need to be i reverse order maybe (then - elseif - else)?

Link to comment

no, the M_EET.lua and UI.MENU code should look exactly as I've posted in my previous post. What you need to adjust is the code posted in this post

And the only change there if you want a single label for everything above in-game chapter 29 is

elseif (Infinity_GetMaxChapterPage() == 29) then
        return Infinity_FetchString(%chapter29%)
elseif (Infinity_GetMaxChapterPage() > 29) then
        return Infinity_FetchString(%chapter30%)

instead of this and following chapters

elseif (chapter == 29) then
        return Infinity_FetchString(%chapter29%)
elseif (chapter == 30) then
        return Infinity_FetchString(%chapter30%)

Everything else from that post is still valid (previous chapters should be still referenced as 'chapter' instead of 'Infinity_GetMaxChapterPage()').

Link to comment

ok, this may sound confusing, so here is full code.

1. Add this code at the beginning of M_EET.lua by hand (it will be part of next release since it fixes Prologue page, so you should not add it via mod)

 

 

--increase chapter variable
function incrChapter(amount)
    if ( ((chapter + amount) > Infinity_GetMaxChapterPage()) or ((chapter + amount) < 0 ) ) then
        return
    end
    chapter = chapter + amount
end

 

 

2. And paste this to your tp2:

 

 

COPY_EXISTING ~UI.MENU~ ~override~
    REPLACE_TEXTUALLY ~chapter = math\.max(0,Infinity_GetMaxChapterPage());~ ~if (Infinity_GetMaxChapterPage() > 29) then
            chapter = 29
        else
            chapter = math.max(0,Infinity_GetMaxChapterPage())
        end~
BUT_ONLY

COPY_EXISTING ~M_EET.lua~ ~override~
    REPLACE_TEXTUALLY ~chapter = chapter \+ amount~ ~if ((chapter + amount) > 29) then
        chapter = 29
    else
        chapter = chapter + amount
    end~
    SET chapter23 = RESOLVE_STR_REF (~@1~)
    SET chapter24 = RESOLVE_STR_REF (~@2~)
    SET chapter25 = RESOLVE_STR_REF (~@3~)
    SET chapter26 = RESOLVE_STR_REF (~@4~)
    SET chapter27 = RESOLVE_STR_REF (~@5~)
    SET chapter28 = RESOLVE_STR_REF (~@6~)
    SET chapter29 = RESOLVE_STR_REF (~@7~)
    SET chapterToT = RESOLVE_STR_REF (~@8~)
    REPLACE_TEXTUALLY ~\(return Infinity_FetchString(71000 \+ chapter)\)~  ~\1
    elseif (chapter == 23) then
        return Infinity_FetchString(%chapter23%)
    elseif (chapter == 24) then
        return Infinity_FetchString(%chapter24%)
    elseif (chapter == 25) then
        return Infinity_FetchString(%chapter25%)
    elseif (chapter == 26) then
        return Infinity_FetchString(%chapter26%)
    elseif (chapter == 27) then
        return Infinity_FetchString(%chapter27%)
    elseif (chapter == 28) then
        return Infinity_FetchString(%chapter28%)
    elseif (Infinity_GetMaxChapterPage() == 29) then
        return Infinity_FetchString(%chapter29%)
    elseif (Infinity_GetMaxChapterPage() > 29) then
        return Infinity_FetchString(%chapterToT%)~
BUT_ONLY

 

 

change TRA references (@) to correct ones

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...