Jump to content


Photo

Consensus on extending map icons


  • Please log in to reply
11 replies to this topic

#1 Azkyroth

Azkyroth
  • Modder
  • 3496 posts

Posted 21 August 2009 - 09:55 AM

What's the present consensus on extending the map icons bam files (mapicons.bam and 25mapic.bam) independently of the worldmap mod? Is there a good tutorial on how to go about this properly?

"Tyranny is a quiet thing at first, a prim and proper lady pursing her lips and shaking her head disapprovingly, asking, well what were you doing (wearing that dress, walking home at that hour, expressing those inappropriate thoughts) anyway? It's subtle and insidious, disguised as reasonable precautions which become more and more oppressive over time, until our lives are defined by the things we must avoid. She's easy enough to agree with, after all, she's only trying to help -- and yet she's one of the most dangerous influences we face, because if she prevails, it puts the raping, robbing, axe-wielding madmen of the world in complete control. Eventually they'll barely need to wield a thing, all they'll have to do is leer menacingly and we fall all over ourselves trying to placate them." -godlizard


#2 Yovaneth

Yovaneth

    The newly-appointed Master Builder of Baldur's Gate

  • Modder
  • 3058 posts

Posted 21 August 2009 - 04:07 PM

I think the real question is: can Weidu do it i.e. both patch in the frames to the .bam file and also recognise where the new area number lies in the .tp2 .wmp patching code? I suspect that the latter is no great problem but I'm no Weidu guru as regards the former. Bigg? Any input on specifically this bit?

-Y-

#3 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 23 August 2009 - 03:34 AM

You might be able to patch it by adding to the BAM manually, then saving it as a new version and doing (from a command prompt): 'weidu --cmp-from original.bam --cmp-to new.bam --out output.txt'. If, say, you've added a frame toward the end, you could potentially get away with an INSERT_BYTES and then a WRITE_ASCII to insert the new frame data in the BAM. All that is theoretical though. I tried this technique with a modified TIS file, but unfortunately DLTCEP does not save TISes in exactly the same format as the game's version (even if you don't make any changes and export the tileset). It does work quite well for patching a modded searchmap (Taimon gave me this tip).

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#4 Yovaneth

Yovaneth

    The newly-appointed Master Builder of Baldur's Gate

  • Modder
  • 3058 posts

Posted 23 August 2009 - 07:26 AM

Ah right - if I've understood you correctly the sequence of events is:

1. Make my own mapicon.bam file with the new added icons
2. Copy it in as part of the mod installer
3. Force Weidu to do a comparison between mapicons.bam and my new one
4. If it finds any differences (it will), patch in the differences to mapicons.bam.

If I've got that right, then there's no problem with every man and his goat adding new map icons. Except that I don't have a clue how to do the code either... :P

-Y-

#5 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 23 August 2009 - 10:26 AM

Ah right - if I've understood you correctly the sequence of events is:

1. Make my own mapicon.bam file with the new added icons
2. Copy it in as part of the mod installer
3. Force Weidu to do a comparison between mapicons.bam and my new one
4. If it finds any differences (it will), patch in the differences to mapicons.bam.

If I've got that right, then there's no problem with every man and his goat adding new map icons. Except that I don't have a clue how to do the code either... :P

Mostly right, except you don't want to copy it in as part of the mod installer. Just export the existing (unmodded) mapicon.bam, then add your frames in with your favourite BAM program (e.g. BAM Workshop or DLTCEP) and save it as something else. Then put a weidu.exe in the same folder and use the syntax above from the command line to generate a pseudopatch. A real patch might take some analysis of that output.txt (if it's even possible), because WeiDU might not understand properly the insertion of a bunch of frame data to a BAM. It works best with two files of the same size. Anyway, then you would copy the patch into your tp2 and tweak/test it from there. If you have doubts, attach your modded BAM and I'll see if I can have a go at it.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#6 Yovaneth

Yovaneth

    The newly-appointed Master Builder of Baldur's Gate

  • Modder
  • 3058 posts

Posted 24 August 2009 - 11:18 AM

If I have any doubts...? I have a lot of doubts as to my ability with the recesses of Weidu! Give me a while to create some new bam frames; I think that if we can get this sorted, it will make a very useful library addition for Weidu users.

Talking of which, with the G3 wiki down, where do we put things like that? I have a huge chunk of code produced by Seb which allows new areas to be patched into the game without the player having to start again from scratch. If you've looked at the FFT .tp2, you've seen it. Lord-Jyssev is now using it in TotDG and it's too good to keep hidden.

Sorry 'bout the thread hijack, Azy - I figured it was all related and useful.

-Y-

#7 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 24 August 2009 - 12:14 PM

Talking of which, with the G3 wiki down, where do we put things like that? I have a huge chunk of code produced by Seb which allows new areas to be patched into the game without the player having to start again from scratch.

I dunno, maybe the Modders' Lounge? Does it work for adding sub-areas to existing areas (like what we did with the caves)? If so, I need to use it.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#8 Kaeloree

Kaeloree

    Head Molder

  • Administrator
  • 9198 posts

Posted 24 August 2009 - 01:13 PM

Feel free to use the SHS wiki. :)

#9 Yovaneth

Yovaneth

    The newly-appointed Master Builder of Baldur's Gate

  • Modder
  • 3058 posts

Posted 24 August 2009 - 01:50 PM

Does it work for adding sub-areas to existing areas (like what we did with the caves)? If so, I need to use it.

Not the way you want it to. It adds completely new areas to the worldmap. However, I do have another piece of code that adds entrances and exits to existing areas - didn't I pass it on to you?

<serious thread hijack going on here>

Kae - good point.

-Y-

Edited by Yovaneth, 24 August 2009 - 01:52 PM.


#10 GeN1e

GeN1e

    A very GAR character

  • Modder
  • 1604 posts

Posted 24 August 2009 - 02:19 PM

However, I do have another piece of code that adds entrances and exits to existing areas

That's no longer needed, as there're proper macros ready. Which thankfully reminds me, I should finally append them to weidu.

you could potentially get away with an INSERT_BYTES and then a WRITE_ASCII to insert the new frame data in the BAM. All that is theoretical though.

This should definitely work.

Edited by GeN1e, 24 August 2009 - 02:21 PM.

Retired from modding.


#11 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 24 August 2009 - 03:10 PM

However, I do have another piece of code that adds entrances and exits to existing areas - didn't I pass it on to you?

Yeah, you did, but it requires starting a game before you've visited the parent area. I don't see a way around that really.

That's no longer needed, as there're proper macros ready. Which thankfully reminds me, I should finally append them to weidu.

These macros are quicker :P. Pretty sure they are anyway, when they can add a couple new regions, entrances, animation structures, a bunch of vertices and other stuff, and update all the offsets, all in a fraction of a second.

Now a macro for adding a new frame to a BAM, possibly even from a bitmap source, or extracting a frame from a BAM to a BMP... that would be priceless.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#12 Azkyroth

Azkyroth
  • Modder
  • 3496 posts

Posted 24 August 2009 - 06:44 PM

<serious thread hijack going on here>


Fine by the thread author; all this may well become relevant eventually.

"Tyranny is a quiet thing at first, a prim and proper lady pursing her lips and shaking her head disapprovingly, asking, well what were you doing (wearing that dress, walking home at that hour, expressing those inappropriate thoughts) anyway? It's subtle and insidious, disguised as reasonable precautions which become more and more oppressive over time, until our lives are defined by the things we must avoid. She's easy enough to agree with, after all, she's only trying to help -- and yet she's one of the most dangerous influences we face, because if she prevails, it puts the raping, robbing, axe-wielding madmen of the world in complete control. Eventually they'll barely need to wield a thing, all they'll have to do is leer menacingly and we fall all over ourselves trying to placate them." -godlizard