Home   Help Search Login Register  

Author Topic: PBO crosslinks  (Read 875 times)

0 Members and 1 Guest are viewing this topic.

Rubble_Maker

  • Guest
PBO crosslinks
« on: 12 Jun 2003, 22:02:22 »
Hi

just today I realised that having a script in one .pbo file call a script in another .pbo file is NOT a good idea: It adds MASSIVE lag.

Now my question: What experience do you have with sharing sounds and textures between different .pbo's? Does it get laggy also?

thx for any replies


BraTTy

  • Guest
Re:PBO crosslinks
« Reply #1 on: 12 Jun 2003, 22:39:22 »
No? I call scripts from other pbos...maybe if the other pbo isnt used and loaded for the mission?

Baphomet

  • Guest
Re:PBO crosslinks
« Reply #2 on: 13 Jun 2003, 06:16:33 »
I wonder why it'd add lots of lag? Bah. That's annoying. So if I made a cpp variant of an addon that used scripts the game would lag to all hell?

Dammit!

Rubble_Maker

  • Guest
Re:PBO crosslinks
« Reply #3 on: 13 Jun 2003, 08:37:37 »
There's no problem with calling a script *once*, but if you call them many times or hook them to and event handler where they're used often, it adds terrible lag.

This is probably because ofp needs to load the pbo each time the script is called or something stupid like that.. (?)

Offline Dinger

  • Contributing Member
  • **
  • where's the ultra-theoretical mega-scripting forum
Re:PBO crosslinks
« Reply #4 on: 13 Jun 2003, 13:07:30 »
That is interesting, RM.

Could you provide more information on the exact conditions under which this occurred to you?
Did both addons have units placed in the map, or was it the case that one addon was calling up scripts in a second that had no units placed in map?

For example, is this an issue that folks might encounter with snYpir's MP/SP support pack, or with any addon containing scripts?


What I'm thinking is that those two lists of addons at the beginning of a mission.sqm file tell OFP what to load in memory and when.  You might look and see if copying the cross-linked pbo into the addons field of the mission.sqm solves the problem.  If it does, then we'll know exactly what is happening, and how to solve it.

Dinger/Cfit

Rubble_Maker

  • Guest
Re:PBO crosslinks
« Reply #5 on: 13 Jun 2003, 15:11:34 »
>Did both addons have units placed in the map, or was it the case that one >addon was calling up scripts in a second that had no units placed in map?

The second case: One addon included the unit, and its init line and various EH's called scripts from another addon, which included ONLY scripts. There was nothing else inside.

Tried what you suggested, and copied the addon name to the mission.sqm. Interestingly, this gives an "missing addon bla" error. So I copied the name to the AutoAddons section, and it gave no error, but the lag was still there.

I will try adding a dummy config.cpp which defines some dummy unit later, maybe then it loads the .pbo as static.