Jump to content


Photo

VC and NeJ3 - final releases


  • Please log in to reply
77 replies to this topic

#41 Creepin

Creepin
  • Administrator
  • 1676 posts

Posted 29 October 2017 - 05:20 AM

Mirandel, I am afraid there's no good solution: I decide which script blocks to erase based on context and my knowledge of mods content. When in doubt, a little digging through bcs often is all what is needed to understand what certain block is for, while things like ones I used as an example are easily distinguishable on their own. The general rule, when you're evaluating yet another piece of content implemented via script in ever-running bcs, is asking yourself "is this piece important for my game enough to sacrifice a bit of performance for the sake of keeping it"? The answer would wary for everyone for every given piece.


The Old Gold - v0.2 WIP (mod for BGT/BWP/BWS)


#42 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5150 posts

Posted 29 October 2017 - 05:30 AM

But creepin, if you don't put the block pieces into a ledger so to speak, you can't ever know which one's are more trivial than others and know what you are sacrificing... All you would need to do is to quote the pieces you leave out, to find if everyone and their mother should kinda do the same .. and if you make them components of a mod that intentionally removes the pieces and lets the player then to do what they intent instead of the Megamod deciding it... so for example, a mod that adds dark elf stuff should yes perhaps remove the items at a rate. But the player could also remove the script by installing a mod that removes the targeted script command from the game, and the player then just decides to drop the items or not. But that should be up to the player, not the Megamod.

All this really needs is to have the script piece, and it's name:
Say the baldur.bcs has: ~IF
Delay(10)
Global("FoundMontaronBody","GLOBAL",0)
PartyHasItem("MISC5U") // Montaron's Body
THEN
RESPONSE #100
SetGlobal("FoundMontaronBody","GLOBAL",1)
AddexperienceParty(20000)
END
~
All that's needed to remove all that, as F'ed as that would be, is to make a component .tp2 that has this:

BEGIN ~Removing something the baldur scripts~
COPY_EXISTING ~baldur.bcs~ ~override~
DECOMPILE_AND_PATCH
REPLACE_TEXTUALLY EXACT_MATCH ~IF
Delay(10)
Global("FoundMontaronBody","GLOBAL",0)
PartyHasItem("MISC5U") // Montaron's Body
THEN
RESPONSE #100
SetGlobal("FoundMontaronBody","GLOBAL",1)
AddexperienceParty(20000)
END
~ //script we remove
~~
END

Edited by The Imp, 29 October 2017 - 05:45 AM.

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#43 Creepin

Creepin
  • Administrator
  • 1676 posts

Posted 29 October 2017 - 06:13 AM

All that's needed to remove all that, as F'ed as that would be, is to make a component .tp2 that has this

I guess it could be done as a mod: with checks for what is installed and prompts like "do you want to remove this?" and "do you want to remove that?". Hmm, worth thinking about... still, folks, let's keep it off Vlad's topic, huh? I would have split it to separate thread but I can't decide where to cut to keep Mirandel's question and answers coherent.


Edited by Creepin, 29 October 2017 - 06:13 AM.

The Old Gold - v0.2 WIP (mod for BGT/BWP/BWS)


#44 Mirandel

Mirandel
  • Member
  • 64 posts

Posted 29 October 2017 - 08:23 AM

Ok, I installed LStest and run the game. Lag is there. In chat window I got 8 lines with "Charname is Running block 3 of WDRUNSGT.BCS". After that - nothing. Changing map (leaving the building) did not produce new lines.

 

There is no lag in Option window or when global map is opened (mouse moves  smoothly). Inventory (pressing I) is lagging. 

 

P.S. I suspect a separate topic about lags and troubleshooting them (with links to the tools download) would be quite popular.


Edited by Mirandel, 29 October 2017 - 08:32 AM.


#45 Vonburen

Vonburen
  • Member
  • 32 posts

Posted 31 October 2017 - 05:00 AM

Disable party AI.



#46 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5150 posts

Posted 31 October 2017 - 05:19 AM

Disable party AI.

That shouldn't work(as in fix the lag problem), as LStest will also show what the player character scripts do, but ... at this point I have already given up, so sure try it.
Also it might be a good idea to just surround the PartyHasItem("***") with active GLOBALs... instead of having one passive one(=0) at a side.


Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#47 Mirandel

Mirandel
  • Member
  • 64 posts

Posted 31 October 2017 - 09:40 AM

Disable party AI.

That shouldn't work(as in fix the lag problem), as LStest will also show what the player character scripts do, but ... at this point I have already given up, so sure try it.
Also it might be a good idea to just surround the PartyHasItem("***") with active GLOBALs... instead of having one passive one(=0) at a side.

 

Err... Your last sentence is an impressive high-coding gibberish to me but I gave up anyway and simply re-install the game, this time without BGT and any additional mods - pure BG2+VC+NEJ. No lag but I did not try to add Bag of Holding yet. 



#48 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5150 posts

Posted 31 October 2017 - 10:14 AM

Err... Your last sentence is an impressive high-coding gibberish to me but I gave up anyway and simply re-install the game, this time without BGT and any additional mods - pure BG2+VC+NEJ. No lag but I did not try to add Bag of Holding yet.

As Global("FoundMontaronBody","GLOBAL",0) is ALWAYS true, unless it's fixed to be more than zero, you can't lock the with it ... but say it were 1 by some miracle at a half of a game, then this...

IF
Global("FoundMontaronBody","GLOBAL",1)
PartyHasItem("MISC5U") // Montaron's Body
Global("FoundMontaronBody","GLOBAL",1)
THEN
RESPONSE #100
SetGlobal("FoundMontaronBody","GLOBAL",2)
AddexperienceParty(20000)
END

would only be true a half of the game. Or the 3 seconds it actually needs to be true, for the action to actually happen.


Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#49 Mirandel

Mirandel
  • Member
  • 64 posts

Posted 31 October 2017 - 11:00 AM

Let's see if I learned a bit of high-coding:

 

So, in normal (means - broken in my game) situation I have several "PartyHasItem" entries. Something like:


PartyHasItem("MISC5U") // Montaron's Body
PartyHasItem("MISC3B") // Flamedance Ring

PartyHasItem("MISC9Z") // Unicorn Run 

 

And when it's written like that - script checks out the presence of the items at every occasion. To make it check for presence of the item only once I have to add Global("Foundxxx","GLOBAL",1) around every PartyHasItem entries? Like this?

 

Global("FoundMontaronBody","GLOBAL",1)
PartyHasItem("MISC5U") // Montaron's Body
Global("FoundMontaronBody","GLOBAL",1)

 

Global("FoundFlamedanceRing","GLOBAL",1)
PartyHasItem("MISC3B") // Flamedance Ring
Global("FoundFlamedanceRing","GLOBAL",1)

 

Global("FoundUnicornRun","GLOBAL",1)
PartyHasItem("MISC9Z") // Unicorn Run
Global("FoundUnicornRun","GLOBAL",1)


#50 Roxanne

Roxanne

    Modder

  • Member
  • 3564 posts

Posted 31 October 2017 - 11:12 AM

Let's see if I learned a bit of high-coding:

 

So, in normal (means - broken in my game) situation I have several "PartyHasItem" entries. Something like:

PartyHasItem("MISC5U") // Montaron's Body
PartyHasItem("MISC3B") // Flamedance Ring

PartyHasItem("MISC9Z") // Unicorn Run 

 

And when it's written like that - script checks out the presence of the items at every occasion. To make it check for presence of the item only once I have to add Global("Foundxxx","GLOBAL",1) around every PartyHasItem entries? Like this?

 

Global("FoundMontaronBody","GLOBAL",1)
PartyHasItem("MISC5U") // Montaron's Body
Global("FoundMontaronBody","GLOBAL",1)

 

Global("FoundFlamedanceRing","GLOBAL",1)
PartyHasItem("MISC3B") // Flamedance Ring
Global("FoundFlamedanceRing","GLOBAL",1)

 

Global("FoundUnicornRun","GLOBAL",1)
PartyHasItem("MISC9Z") // Unicorn Run
Global("FoundUnicornRun","GLOBAL",1)

This makes little sense.

What you would need is something like this

IF
Global("FoundFlamedanceRing","GLOBAL",0)
PartyHasItem("MISC3B") // Flamedance Ring
THEN
RESPONSE #100
SetGlobal("FoundFlamedanceRing","GLOBAL",1)
END

And then - you do not put this stuff into Baldur.bcs but into an area script of the area where you can find that ring, as there is no need to check for this throughout a BGT game until you reach ToB. But this does not work for all cases.

In an EE game, you can avoid a large amount of such checks with an opdcode(319) that limits personal items to a singel NPC, so no need to search by script. In addition, there are now much better ways to check e.g. for drow items. More and more of the masses of baldur.bcs garbage can be avoided by using other means.

 

And in the above example, ask yourself the question: why, where and when do you actually need to check that the party has the flamedance ring? Really on every turn of the game from beginning to end? If you can name the conditions, then code them.


Edited by Roxanne, 31 October 2017 - 11:18 AM.

The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*

 


#51 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5150 posts

Posted 31 October 2017 - 11:57 AM

Well, Roxanne, sometimes the area scripts keep running even after you exit from the area, so a proposal of removing the check from baldur.bcs and placing it to the area script is not that much better ... while you could close the search to a global... as that doesn't actually search the inventory unless the global is true. Which in most cases it doesn't need to be. Constructing items being a good case for example, Cespenar can for example check all the GLOBALs of 0 to being 1's, after which the game can search the inventory all it wants with a slowdown... after which the globals are set back to zeroes and the search won't ever even occur.

PS, Mirabel, Roxanne doesn't see my replies as she has removed me from the post filter that she sees. ... just so you figure why the difference between the replies.


Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#52 Mirandel

Mirandel
  • Member
  • 64 posts

Posted 31 October 2017 - 02:20 PM

Well, Roxanne, sometimes the area scripts keep running even after you exit from the area, so a proposal of removing the check from baldur.bcs and placing it to the area script is not that much better ... while you could close the search to a global... as that doesn't actually search the inventory unless the global is true. Which in most cases it doesn't need to be. Constructing items being a good case for example, Cespenar can for example check all the GLOBALs of 0 to being 1's, after which the game can search the inventory all it wants with a slowdown... after which the globals are set back to zeroes and the search won't ever even occur.

 

It's quite complicated for an outsider to understand all nuances in relationships but I'll try. 

 

Anyway, whether it is baldur.bcs , area script or global opdcode - it does not sims to be worth the trouble. Too much editing (with the risk to break something else on the way) for adopting something that was not meant to be adopted for the mod combinations of my choosing. I am curious enough about NEJ to run it clean.



#53 Roxanne

Roxanne

    Modder

  • Member
  • 3564 posts

Posted 31 October 2017 - 03:03 PM

 

It's quite complicated for an outsider to understand all nuances in relationships but I'll try. 

 

Anyway, whether it is baldur.bcs , area script or global opdcode - it does not sims to be worth the trouble. Too much editing (with the risk to break something else on the way) for adopting something that was not meant to be adopted for the mod combinations of my choosing. I am curious enough about NEJ to run it clean.

It is nothing a user of BGT can correct anymore these days. It is more a lesson for modders on how to do it better. You cannot really blame anyone for what they did long ago, nobody really could foresee the size a modded trilogy game could one day reach.

You can radically clean up your baldur.bcs, by deleting loads of (especially item checks) things there. Most of them cover cases you may never run into or which you can simply avoid by gameplay (e.g.do not equip NPCs with another one's personal items).

 

It is hust...if you play and install very large modded games, it helps to know a bit about the background. You are about to enter *Expert* territory (the title comes from old BWS classification) where you become more than a mere player/consumer because you need to care about fixing things now and then to be able to continue the game, etc.

 

Beware - after that, you start to write scripts and tweaks - then you start to write mods...


The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*

 


#54 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5150 posts

Posted 31 October 2017 - 10:26 PM

...
Beware - after that, you start to write scripts and tweaks - then you start to write mods...

Nope. You'll be starting writing scripts in your dreams, tweaking other games too and you'll start to be come a horrible person. Just like us... :devil: Or not, but it's a choice you have to make. :P


Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#55 Mirandel

Mirandel
  • Member
  • 64 posts

Posted 01 November 2017 - 01:24 AM

Oh, my choice about modding is made. It's the will to finish anything that I lack. But I am working on it :) So, not going anywhere anytime soon and truly grateful for detailed explanations even if not using some advises because of their complexity. 



#56 Mirandel

Mirandel
  • Member
  • 64 posts

Posted 07 November 2017 - 02:52 PM

Final verdict - it's not NEJ, it's BGT or classic BG/BG2 itself on that particular machine. After playing a bit with with different configurations I found out that lag begins as soon as 5th companion joins the group (in clean BGT as well). And only on that particular computer - granted, very weak computer, but heavy modded EET (or BGEE/BG2EE) runs without any problem on it, so, it's not hardware itself.

 

Anyway, NEJ has nothing to do with the lag.  



#57 Miksip

Miksip
  • Member
  • 50 posts

Donator

Posted 07 November 2017 - 10:04 PM

@Mirandel

NEJ has nothing to do with the lag - it is component from VCv10 (or Baldurdash part of it to be exactly) called "Bottomless Bag" that adds to the lag. That's the only thing that I have complained about.

I'm going to make a topic about editing baldur.bcs in a few days so just wait a bit.


P.S. Don't listen to The Imp - it is voice of the Devil.


#58 Senka

Senka
  • Modder
  • 134 posts

Posted 08 November 2017 - 01:40 AM

@Mirandel

NEJ has nothing to do with the lag - it is component from VCv10 (or Baldurdash part of it to be exactly) called "Bottomless Bag" that adds to the lag. That's the only thing that I have complained about.

I'm going to make a topic about editing baldur.bcs in a few days so just wait a bit.

You are wrong. I tested VC+NEJ (without BGT) a lot of time a never see it. And original BD hasn't "Bottomless Bag". And VC too. Additionally, I added "Bottomless Bag" in my override and haven't discussed lags. This is smtg else I afraid. 



#59 Miksip

Miksip
  • Member
  • 50 posts

Donator

Posted 08 November 2017 - 02:10 AM

@Senka

I'm not wrong.

See this post on previous page http://www.shsforums...e-2#entry597745 .

Look for Botomless Bag of Holding inside Baldurdash and VCv10 tp2 and you will see it.

I bet Vlad forgotten that he even has this piece of code. It is not a problem for normal NEJ playthrough but it is a pitfall for performance in a megamod.


P.S. Don't listen to The Imp - it is voice of the Devil.


#60 Mirandel

Mirandel
  • Member
  • 64 posts

Posted 08 November 2017 - 02:26 AM

@Senka

I'm not wrong.

See this post on previous page http://www.shsforums...e-2#entry597745 .

Look for Botomless Bag of Holding inside Baldurdash and VCv10 tp2 and you will see it.

I bet Vlad forgotten that he even has this piece of code. It is not a problem for normal NEJ playthrough but it is a pitfall for performance in a megamod.

 

This problem can exist too - on some computers. Because in my case BGT itself - without any single mod! - produces lag when party is full. While BG2+VC+NEJ on another computer (a good one this time) run very smoothly without a single hiccup no matter the size of the party (or cheated in Bag of Holding and 999 stack of scrolls).