Jump to content

Two functions someone should code up


Recommended Posts

Programmers on these boards can turn their attention to these applications.

First, some Weidu function for deleting automap notes would fill a real gap. There is one for adding them, but deleting them has to be done via fj_are_structure, and it requires for every note the exact x and y coordinates, to be looked up among a stack of similar numbers, and the text reference - I hope the content of the string and not its number! Getting rid of a handful of notes on a map is proving an unexpected big hassle.

Second, there is a call for a tool to make Infinity Engine music tracks. it is time-consuming and dull to make them by hand. For music the engine plays lists of consecutive ACM files, which are actually OGG files, only with a different extension. They are short, a few seconds long, and to each corresponds a fade-out track from the next portion of the tune for when music is interrupted, usually by the switch to or out of combat. In my experience, 3-second long mainline cuts followed by 1.5 second-long interrupts work the best, but it is not fun to split a long OGG file this way manually. The MUS playlist files that control the sequence of play are simple enough to produce. When I cut up tunes, I name mainline tracks with numbers and their interrupts get a minus on the end: 1.OGG and 1-.OGG, and so on for all of them. Later I rename them and change the extension, and it's easy to pair off mainline tracks with their interrupts. But the cutting itself should be automated. A program could split up tunes in segments of preferred length, add tune prefix and modder prefix (or suffix) and take care of conversions.

Link to comment

I too noticed the lack of a function for deleting automap notes. So I found a different solution. For the notes I wanted to delete, I edited the area script instead, creating blocks with the RemoveMapNote() script action. Since I had to edit area scripts anyway with AddMapNote() blocks, this wasn't a big issue.

Yes, you need the coordinates and string reference number. But you can look those up in the area file (if you want to delete a note, it's already there), so that part's not bad either.

Link to comment

You don't need scripts to add notes. There is a Weidu function for that, only not for deleting them. And, as I found out, in BGEE it is not necessary to feed fj_are_structure either coordinates or the text reference. The deletion works without, just by targeting the number of the structure, from note 0 onwards, but it is unreliable. In the area I had to edit there was a bunch of notes, and no matter what I tried, what numbers I repeated the function for, I could not get rid of one. It stayed there. But, being the last one, it was structure 0, so I was able to copy the ARE a second time and then run the delete again precisely for note 0, and only afterwards did I use ADD_MAP_NOTE for my replacement notes to go in the same places. I had to enter the coordinates manually. What would be good to have is a function that combined deletion with editing, with something like delete = 1 for when you want the note gone and new values for the rest when you want it changed.

I am being SO constructive. What a turnaround. 🦉

Link to comment

You do need scripts to add map notes during gameplay; the component I wrote had things like the Baldur's Gate thieves' guild only getting marked once your characters were told about it. Which really has to be done via script actions. And once I'm doing that, deleting the notes in the same area script to get to what should be the initial state is no real burden.

Link to comment

For the sake of arguing: you can also add notes with spells. Deleting them with effects... I don't think I've been able to do that. What may be a little more worth recalling, since I made you look, is that it is possible to use tokens in the text of notes, and they will retain their content after reloading. I once had a time-traveling spell that pushed the party back in the calendar by a day, and it left behind a reminder sign with a corresponding note reading "Day Six" - the content of the <GAMEDAY> token at the time of departure. Names of creatures, characters and so on are also retained, once they are fixed inside the notes, but, unfortunately, the main character has no name string, so you can't immure his name somewhere without running OnCreation-type actions that fill the token every time he enters the area etc. Still, this is nice, if you want to erect map notes with epitaphs like "Branwen died here" or "Minsc scored a critical here."

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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.

×
×
  • Create New...