Author Topic: Request: Accessing the VERSION string  (Read 556 times)

Offline DavidW

  • Planewalker
  • *****
  • Posts: 275
Request: Accessing the VERSION string
« on: January 09, 2019, 09:58:23 AM »
Would it be possible to store the mod's VERSION in a string (say, MOD_VERSION) that the tp2 could access? (I can set it manually, of course, but then the two could get out of sync)

Offline The Imp

  • Planewalker
  • *****
  • Posts: 280
  • Gender: Male
Re: Request: Accessing the VERSION string
« Reply #1 on: January 09, 2019, 10:29:34 AM »
Would it be possible to store the mod's VERSION in a string (say, MOD_VERSION) that the tp2 could access? (I can set it manually, of course, but then the two could get out of sync)
It is... but you mean a formally installed mods VERSION tag, well that's a bit harder... especially as you don't want to mix and match, but sure. But use the .tp2 name as another variable too, so that won't happen.
If the weidu.log was a .2da, this would be easy,-er lets say.

Offline DavidW

  • Planewalker
  • *****
  • Posts: 275
Re: Request: Accessing the VERSION string
« Reply #2 on: January 09, 2019, 10:54:27 AM »
I don't understand any of that.

Offline AL|EN

  • Planewalker
  • *****
  • Posts: 316
  • Gender: Male
Re: Request: Accessing the VERSION string
« Reply #3 on: January 09, 2019, 04:52:18 PM »
And a README also,  such requests are connected to this:
Quote
I don't think the TP2 file is the right place for metainformation. You shouldn't need to run WeiDU to get at it. The manifest file of the proposed new packaging format would seem like a more appropriate place to put it. The manifest can itself be in JSON and be directly parseable, without first invoking WeiDU.
and this: http://forums.pocketplane.net/index.php/topic,29663.msg338630.html#msg338630
Quote
Package format it is. I'll revisit when the day comes.
You cannot have progress without committing changes...A Basic Modder's Guide to Git and Github

Offline DavidW

  • Planewalker
  • *****
  • Posts: 275
Re: Request: Accessing the VERSION string
« Reply #4 on: January 09, 2019, 07:06:04 PM »
I don't want it as metadata, I want to use it in the TP2 code itself. VERSION is already, and necessarily, information in the mod, I just want access to it.

Offline CamDawg

  • Infidel
  • Planewalker
  • *****
  • Posts: 832
  • Dreaming of a red Xmas
    • The Gibberlings Three
Re: Request: Accessing the VERSION string
« Reply #5 on: January 09, 2019, 07:21:08 PM »
Version and sprint accept strings, so you could do some combo of

Code: [Select]
VERSION @0
...
OUTER_SPRINT version @0

That would keep it to updating one source of info, the @ string contents.
« Last Edit: January 09, 2019, 07:22:54 PM by CamDawg »
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.

Offline DavidW

  • Planewalker
  • *****
  • Posts: 275
Re: Request: Accessing the VERSION string
« Reply #6 on: January 09, 2019, 07:24:18 PM »
That's cute. Thanks, will try.

Offline Wisp

  • Moderator
  • Planewalker
  • *****
  • Posts: 1050
Re: Request: Accessing the VERSION string
« Reply #7 on: January 12, 2019, 08:26:31 AM »
Done. %MOD_VERSION% evaluates to the string set by the TP2 flag VERSION.

Offline AL|EN

  • Planewalker
  • *****
  • Posts: 316
  • Gender: Male
Re: Request: Accessing the VERSION string
« Reply #8 on: January 12, 2019, 10:32:24 AM »
How about %MOD_README% for README line ?
You cannot have progress without committing changes...A Basic Modder's Guide to Git and Github

Offline DavidW

  • Planewalker
  • *****
  • Posts: 275
Re: Request: Accessing the VERSION string
« Reply #9 on: January 12, 2019, 11:07:19 AM »
Great - thanks!

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: