Jump to content
The Dark Mod Forums

[2.12] Multi-addons support


Dragofer

Recommended Posts

  • Dragofer changed the title to [2.12] Multi-addons support
6 minutes ago, jaxa said:

I hear these addons make saves incompatible between installations (relevant when swapping saves during beta testing)? That should be noted if accurate.

This would be accurate since saves are specific to the scripts (and TDM build) that were installed at the time, so getting a newer version of an addon will make saves incompatible. Changing other custom files like entityDefs will probably cause issues as well. I added this to the creators' notes.

  • Thanks 1
Link to comment
Share on other sites

This is very much appreciated. Many thanks @Dragofer & Co!

Thinking of the "transition period", I have a question: what happens if by the time 2.12 comes out an add-on has both a "tdm_user_addons.script" and a "tdm_user_addons_spiders.script"?

1 hour ago, Dragofer said:

Addon creators will need to choose unique names, however, which could for example include one's username.

First come first served, I guess.

In the case of conflict the Modder (Addoner?) publishing his/her work last should be around listening and can be warned and take action.

TDM Modpack 4.0

Link to comment
Share on other sites

2 hours ago, snatcher said:

Thinking of the "transition period", I have a question: what happens if by the time 2.12 comes out an add-on has both a "tdm_user_addons.script" and a "tdm_user_addons_spiders.script"?

There's nothing really hindering it, you just have to make sure that both scripts dont try to run at the same i.e. by starting with a version check to pick the right script.

2 hours ago, snatcher said:

First come first served, I guess.

In the case of conflict the Modder (Addoner?) publishing his/her work last should be around listening and can be warned and take action.

Core scripts already include the identifier "tdm" to minimise the risk of conflicts with FM scripts (originally: with Doom3 scripts). You could make up your own identifier such as "snatch", and in a community of this size it'll be unlikely that anyone else will think of the exact same one.

Link to comment
Share on other sites

21 hours ago, Dragofer said:

There's nothing really hindering it, you just have to make sure that both scripts dont try to run at the same i.e. by starting with a version check to pick the right script.

Not sure I was clear enough, sorry, but it is ok. With the information at hand I understand updating add-ons today to be 2.12-ready is a pointless exercise.

Let's then resume this topic sometime in February. Thanks for your work.

TDM Modpack 4.0

Link to comment
Share on other sites

  • 2 months later...
41 minutes ago, snatcher said:

Tag: Exceeded global memory size (196608 bytes)

This is total size of all global variables.

Here are the limits:

#define MAX_STRING_LEN		128
#define MAX_GLOBALS			196608			// in bytes
#define MAX_FUNCS			3072
#define MAX_STATEMENTS		81920			// statement_t - 18 bytes last I checked

I suppose everything except for MAX_STRING_LEN can be raised.

Perhaps create an issue for 2.13?

Link to comment
Share on other sites

6 hours ago, stgatilov said:

Perhaps create an issue for 2.13?

And shelve new initiatives for 12 months.

At a glance, the below script-heavy missions are orbiting close to the boundaries:

  • A house of locked secrets
  • Hazard Pay
  • Iris
  • Painter's Wife
  • Shadows of Northdale ACT I
  • Seeking Lady Leicester
  • Written in stone

All it takes is a little push.

Each new release of TDM comes with new core scripts and sooner or later something needs to happen. Let's hope the next "big one" doesn't get impacted.

  • Like 1

TDM Modpack 4.0

Link to comment
Share on other sites

I tried to debug this.

It turns out that "global variables" includes all immediate values (including string literals which take 128 bytes each) and all global function declarations (4 byte per function, including even engine events).

I see 119240 bytes before starting Iris, and 124924 bytes after starting it.
On Bakery Job, I see 109680 before starting game, 109700 bytes after starting it.

So It seems that core game takes about 110K, but Iris itself takes only about 10K, and the limit is at 196K.
Does not sound like a big problem for missions.
With addons, you have to compile all of them at once, and perhaps there is a lot of code, so you reach the limit.

Ok, let's double MAX_GLOBALS for 2.12.

  • Like 2
Link to comment
Share on other sites

Very good assessment. Thank you.

I was surprised to reach the limit and I think it had to do with this:

10 hours ago, stgatilov said:

(including string literals which take 128 bytes each)

What I am trying to do looks very ugly (lack of arrays, unable to feed data from files) but I don't consider I abused of it (yet).

10 hours ago, stgatilov said:

Ok, let's double MAX_GLOBALS for 2.12.

Whoo-hoo! Thanks a a lot! 😀

Edited by snatcher

TDM Modpack 4.0

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 1 reply
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...