Author Topic: Adding new areas  (Read 10947 times)

Offline Red Carnelian

  • Planewalker
  • *****
  • Posts: 24
Adding new areas
« on: December 07, 2006, 02:48:19 PM »
In my mod "The Stone of Askavar" there are two new areas that can be reached through existing areas. I'm at at point where I need to incorporate the new areas into the Tutu version. In the BG version I have simply edited the existing areas by adding travel regions so that you can travel to the new areas. The area files were then placed into the overide during install. Is it possible to actually edit the existing area files through WEIDU coding so that I don't have to alter the area files with DLTCEP. If so can someone direct me to a mod that edits area files so I can take a look at the TP2 to see how it was done.

Offline Miloch

  • Barbarian
  • Planewalker
  • *****
  • Posts: 1032
  • Gender: Male
Re: Adding new areas
« Reply #1 on: December 07, 2006, 03:16:53 PM »
Have you looked at these:

How to create your own WeiDU TP2 code to integrate a custom area (map) to the worldmap file (by Baronius):
http://www.blackwyrmlair.net/Tutorials/patchwmp.php

How to add a trigger to an existing map via WeiDU (by Creepin):
http://forums.gibberlings3.net/index.php?showtopic=6031

To my knowledge, the only Tutu-compatible mod that claims to do this is SoBH, and you're aware of its issues (which probably have more to do with BGT-Worldmap complexity than simply linking in new areas).

Offline Red Carnelian

  • Planewalker
  • *****
  • Posts: 24
Re: Adding new areas
« Reply #2 on: January 01, 2007, 04:03:31 PM »
I'm trying to add a trigger to the TUTU version of The Stone of Askavar. I have the trigger working but I also need the same trigger for the BG/TotSC version that uses the original area. Looking at the code it looks as if the only thing to change is the Area name within the COPY_EXISTING command that copies over the required area file. Would the following code be valid for both areas:

//check for Tutu installation otherwise TotSC

 ACTION_IF FILE_EXISTS ~Override/_AR3300.bcs~ THEN BEGIN

      COPY_EXISTING ~FW1900.ARE~ ~override~

   END ELSE BEGIN

      COPY_EXISTING ~AR1900.ARE~ ~override~

   END

//Prepare for the area modification.
READ_SHORT ~0x058~ ~#ofActor~
READ_SHORT ~0x054~ ~actorOff~
READ_SHORT ~0x05a~ ~#ofConta~
READ_SHORT ~0x05c~ ~contaOff~
READ_SHORT ~0x064~ ~#ofSpawn~
READ_SHORT ~0x060~ ~spawnOff~
READ_SHORT ~0x06c~ ~#ofEntra~
READ_SHORT ~0x068~ ~entraOff~
READ_SHORT ~0x074~ ~#ofConta~
READ_SHORT ~0x070~ ~contaOff~
READ_SHORT ~0x076~ ~#ofItems~
READ_SHORT ~0x078~ ~itemsOff~
READ_SHORT ~0x080~ ~#ofVerti~
READ_SHORT ~0x07c~ ~vertiOff~
READ_SHORT ~0x082~ ~#ofAmbia~
READ_SHORT ~0x084~ ~ambiaOff~
READ_SHORT ~0x08c~ ~#ofVaria~
READ_SHORT ~0x088~ ~variaOff~
READ_SHORT ~0x09c~ ~#ofExplo~
READ_SHORT ~0x0A0~ ~exploOff~
READ_SHORT ~0x0A4~ ~#ofDoors~
READ_SHORT ~0x0A8~ ~doorsOff~
READ_SHORT ~0x0AC~ ~#ofAnima~
READ_SHORT ~0x0B0~ ~animaOff~
READ_SHORT ~0x0B4~ ~#ofTiled~
READ_SHORT ~0x0B8~ ~tiledOff~
READ_SHORT ~0x0BC~ ~songsOff~
READ_SHORT ~0x0C0~ ~restcOff~
READ_SHORT ~0x0C8~ ~#ofAutom~
READ_SHORT ~0x0C4~ ~automOff~
.................

or do I have to copy he whole code for the trigger again for the other area. The Trigger for both areas is exactly the same.

 

Offline Miloch

  • Barbarian
  • Planewalker
  • *****
  • Posts: 1032
  • Gender: Male
Re: Adding new areas
« Reply #3 on: January 01, 2007, 05:23:45 PM »
That should work, though we decided on G3 to use standard area checks to make it easier to identify platform-dependent code across mods.  In the mods I'm converting, I just assign a variable declaration section up front for all the platform-dependent resources, with three subsections (one for Tutu, one for BGT and one for BG1) for example:
Code: [Select]
ACTION_IF FILE_EXISTS_IN_GAME ~FW0100.ARE~ THEN BEGIN //Tutu
 SPRINT "Z1900" "FW1900"
END
ACTION_IF FILE_EXISTS_IN_GAME ~AR7200.ARE~ THEN BEGIN //BGT
 SPRINT "Z1900" "AR####" //not sure what this is offhand, but I have a conversion list on G3 if you're interested
END
ACTION_IF FILE_EXISTS_IN_GAME ~AR0100.ARE~ THEN BEGIN //BG1
 SPRINT "Z1900" "AR1900"
END
COPY_EXISTING ~%Z1900%~ ~override~
That saves having 3 separate sections of code otherwise (just 3 separate variable sections, which is a lot shorter in my TP2).

Offline Red Carnelian

  • Planewalker
  • *****
  • Posts: 24
Re: Adding new areas
« Reply #4 on: January 01, 2007, 05:32:52 PM »
Thats great. The SPRINT command is just what I need thanks  :)

Guest

  • Guest
Re: Adding new areas
« Reply #5 on: January 01, 2007, 08:15:28 PM »
You'll be wanting OUTER_SPRINT ~myvar~ ~somearea~

And COPY_EXISTING ~%somearea%.are~ ~override~

Offline Miloch

  • Barbarian
  • Planewalker
  • *****
  • Posts: 1032
  • Gender: Male
Re: Adding new areas
« Reply #6 on: January 02, 2007, 04:44:36 PM »
What exactly is the difference between SPRINT and OUTER_SPRINT?  Unless I'm missing something, the description in the WeiDU documentation is the same.  But then I don't really understand all these OUTER/INNER commands.

Offline Nythrun

  • Planewalker
  • *****
  • Posts: 89
  • Gender: Female
Re: Adding new areas
« Reply #7 on: January 03, 2007, 09:31:32 AM »
They do exactly the same thing: assign an ASCII string to a variable.

SPRINT is a patch - that means, loosely, that it's something you do inside of an action (which is almost always a COPY action of some kind).

OUTER_SPRINT is an action - which means you can use it only outside of another action (because it is, itself, an action).

Other than where you can use them, they're not different :)

You can use a "dummy" COPY to use patch commands between meaningful actions - but it's not necessary here.

Offline Miloch

  • Barbarian
  • Planewalker
  • *****
  • Posts: 1032
  • Gender: Male
Re: Adding new areas
« Reply #8 on: January 05, 2007, 02:25:09 AM »
You'll be wanting OUTER_SPRINT ~myvar~ ~somearea~
Ok, so OUTER_SPRINT instead of SPRINT in the context above, only because it is an action (Guest = Nythrun)?
Quote
And COPY_EXISTING ~%somearea%.are~ ~override~
Um, really?  Instead of my COPY_EXISTING ~%myvar%.are~ ~override~ example above (though, yeah, I forgot the .are extension... comes from typing instead of pasting existing code :P)?

Offline Nythrun

  • Planewalker
  • *****
  • Posts: 89
  • Gender: Female
Re: Adding new areas
« Reply #9 on: January 05, 2007, 04:10:33 AM »
You've got it :) (was my post above, yes - I can't log in at work without sabotaging the inane nanny/privacy protector software on their computers)

And I just wanted to make sure that you didn't forget the .are extention, yes - I've forgotten silly, obvious things like that so many times!

Offline Red Carnelian

  • Planewalker
  • *****
  • Posts: 24
Re: Adding new areas
« Reply #10 on: January 05, 2007, 01:00:34 PM »
After a little effort I managed to get everything working. Heres a snippet of code for the TotSC and DSotSC part. I still don't quite understand the various SPRINT commands. SPRINT wouldn't work so I changed it to OUTER_SPRINT as shown and that seemed to work although it may not be the most efficient way. 

ACTION_IF NOT FILE_EXISTS ~override/_AR3300.bcs~ THEN BEGIN

//ELEMENTS COMMON TO TotSC AND DSotSC

 OUTER_SPRINT "Z1900" "AR1900"
 OUTER_SPRINT "Z4300" "AR4300"
 OUTER_SPRINT "Z5200" "AR5200"
 OUTER_SPRINT "Z3500" "AR3500"

......items, spells, stores etc

END

ACTION_IF FILE_EXISTS ~Override/FW1900.ARE~ THEN BEGIN

 //TUTU

 OUTER_SPRINT "Z1900" "FW1900"
 OUTER_SPRINT "Z4300" "FW4300"
 OUTER_SPRINT "Z5200" "FW5200"
 OUTER_SPRINT "Z3500" "FW3500"

......items, spells, stores etc

END

//START OF AREA MODIFICATION

COPY_EXISTING ~%Z1900%.ARE~ ~override~

........


« Last Edit: January 05, 2007, 01:03:13 PM by Red Carnelian »

Offline Red Carnelian

  • Planewalker
  • *****
  • Posts: 24
Re: Adding new areas
« Reply #11 on: January 06, 2007, 07:21:32 AM »
One of the areas I'm adding is to the east of FW3500. This new area is revealed after a certain dialog. To make this work I have placed travel triggers along the east border of FW3500 which become active when needed. This means that I don't have to edit the search map of FW3500 but as a result, moving between FW3500 and ARS005 (MyArea) is seemless and the worldmap doesn't appear. If I edit the search map for FW3500 to include a travel region for the east side the worldmap appears but its active before travel should occur. How to I get around this problem? how did they do it for the Bandit camp?.

EDIT:

On further testing I don't think I need the travel triggers at all, just an entrance for the east side of FW3500 and a new search map. Icon of the new area won't appear on the worldmap until its revealed anyway.
« Last Edit: January 06, 2007, 07:59:16 AM by Red Carnelian »

Offline Miloch

  • Barbarian
  • Planewalker
  • *****
  • Posts: 1032
  • Gender: Male
Re: Adding new areas
« Reply #12 on: January 08, 2007, 09:33:33 AM »
I'm not sure how they managed it for the Bandit Camp, but grepping the Bioware code might help (assuming it isn't hardcoded).  If you've managed to get new area worldmap links working, it'd be great help if you could post the code.  There are a number of other mods (SoBH, DSotSC, Drizzt Saga, one of my own) that will need to do this for Tutu compatibility.

Offline Red Carnelian

  • Planewalker
  • *****
  • Posts: 24
Re: Adding new areas
« Reply #13 on: January 08, 2007, 11:48:25 AM »
I have a version working now that edits the world map that is packaged with EasyTutu. This same code block also works with the BG1 worldmap although I've noticed some of the icon index's don't match between maps. One of them must have an extra icon or two. If I try to travel to any of my new areas that aren't revealed then It simply won't allow me to travel there. Once revealed then I can travel which is exactly what I needed.


Last time I tried to download the Big world map it wasn't available. I've also spoken to Erebusant who will provide support for The Stone of Askavar directly in the next version mainly for BGT. Until then I should be able to use the same code to edit the Big world map. If v6.4 of the Big world map becomes available for download the Tutu version should be done this week. I'm wondering whether to provide support for the existing world map or insist on the Big worldmap being installed. What do you think?
« Last Edit: January 08, 2007, 11:52:15 AM by Red Carnelian »

Offline pro5

  • Planewalker
  • *****
  • Posts: 68
Re: Adding new areas
« Reply #14 on: January 08, 2007, 12:21:37 PM »
(X,Y) locations of 4 new areas from Drizzt Saga on EasyTutu worldmap:

(571, 46)
(285, 13)
(597, 241)
(599, 345)

So you can check to avoid area icons overlapping.

Offline Miloch

  • Barbarian
  • Planewalker
  • *****
  • Posts: 1032
  • Gender: Male
Re: Adding new areas
« Reply #15 on: January 08, 2007, 12:41:46 PM »
If v6.4 of the Big world map becomes available for download the Tutu version should be done this week. I'm wondering whether to provide support for the existing world map or insist on the Big worldmap being installed. What do you think?
Well I already expressed my opinion on this on G3 but I don't mind expressing it again. :)  I think mods should avoid making the BGT-BP Worldmap a required component.  In general, because mod dependencies suck - the next version of the Worldmap might render your mod incompatible (as happened with SoBH).  Specifically for Tutu, because the BGT Worldmap covers a much greater area than that available in BG1/Tutu.

Good news on your mod progress though - looking forward to it (when I actually get around to *playing* a mod - too busy working on mods at present :D).

Offline Red Carnelian

  • Planewalker
  • *****
  • Posts: 24
Re: Adding new areas
« Reply #16 on: January 08, 2007, 01:11:37 PM »
(X,Y) locations of 4 new areas from Drizzt Saga on EasyTutu worldmap:

(571, 46)
(285, 13)
(597, 241)
(599, 345)

So you can check to avoid area icons overlapping.

All those are fine apart from (285, 13) as that overlaps the City of Baldurs Gate. I suggest (320, 28) as a better position. You can use DLCEP to check area positions quite easily. Load the worldmap.Change the Area to a woodland area then enter your position values, press the set position then select all from the bottom. 

Offline pro5

  • Planewalker
  • *****
  • Posts: 68
Re: Adding new areas
« Reply #17 on: January 08, 2007, 02:30:12 PM »
All those are fine apart from (285, 13) as that overlaps the City of Baldurs Gate. I suggest (320, 28) as a better position. You can use DLCEP to check area positions quite easily. Load the worldmap.Change the Area to a woodland area then enter your position values, press the set position then select all from the bottom. 

It doesn't really overlap on EasyTutu bg2-style worldmap, except for a bit of area name. Unfortunately, game treats area name letters as part of area image - meaning you can click on them to travel there and while cursor is over them it's hard to select another area under them. The area name in this case is 4 words: "Mountain of the Dead", so it will overlap something in any case :(, either BG or FW0400 (zombie-infested area). In original BG1 mod it was located even worse, very close to the north-east from FW0400.

When I next get around to fixing all things which all likely to come up after DS-weidu release, I'll probably move it to (300, 18) which looks more suitable.

Offline Red Carnelian

  • Planewalker
  • *****
  • Posts: 24
Re: Adding new areas
« Reply #18 on: January 09, 2007, 12:05:05 PM »
I had the same problem with one of my areas so the simple solution for me was not to include the name. I can see this map getting congested. Dark Side will add four areas also. I suppose it won't be that much of a problem if your code detects whats installed as then you could change the area icons of other modders area icons easily to make room for your own. What Mods add areas to this map? Those I know are:

The Stone of Askavar
Drizzt Saga
Dark Side of the Sword Coast

What about SoBH where are its areas? 

Offline pro5

  • Planewalker
  • *****
  • Posts: 68
Re: Adding new areas
« Reply #19 on: January 09, 2007, 02:24:52 PM »
SoBH requires WM6.4 to work, I think.

I'd really like to keep area names because original BG1 mod has them.

DSotSC/NTotSC for Tutu will most likely overlap with Drizzt Saga, they also have their new areas in the northern part of map. Supporting several variants of Tutu area locations is not something I've always dreamt wasting time on, so I guess for them to work together WM6.4 will also be a must. I already have to keep track of 4 different worldmaps as it is: BG1, BGT, Tutu and BP-BGT WM6.4. :P

Offline Miloch

  • Barbarian
  • Planewalker
  • *****
  • Posts: 1032
  • Gender: Male
Re: Adding new areas
« Reply #20 on: January 09, 2007, 05:24:57 PM »
You can always shorten your area name on the map (e.g. "Mt. of the Dead") or possibly break it on two lines.  I guess there's also potential for an expanded "Tutu Worldmap" project in the same vein as the BGT-BP Worldmap.

Offline Red Carnelian

  • Planewalker
  • *****
  • Posts: 24
Re: Adding new areas
« Reply #21 on: January 10, 2007, 04:55:44 PM »
Have you tried installing the world map V6.4 yet. I've just given it ago with Easy Tutu. The map is available to me but some areas seem out of bounds. I can't get to High Hedge for example from Beregost. Also can't get beyond the badlands which means I can't get to Nashkel.

I think an enlarged Sword Coast map for Tutu is a good idea or at least a map unique to the Tutu environment. 

Offline Miloch

  • Barbarian
  • Planewalker
  • *****
  • Posts: 1032
  • Gender: Male
Re: Adding new areas
« Reply #22 on: January 11, 2007, 05:00:18 PM »
Well, I was troubleshooting the revised 6.3 version with erebusant for a while.  We ran into some of the same problems... wasn't sure if they were fixed.  Was hoping someone with Tutu skills could help, but it seems an area of expertise that is lacking, being as how no mods have modded the area map until yours and the few others we've mentioned (and I'm not sure the others have got to that point yet).  Just wondering - do you actually patch the Tutu area map or do you provide a new version of it with your links?

I expanded the Tutu map just a bit on the west, so I could fit in links for off-the-map areas while leaving the open areas open.  I could do the same thing on the other sides of the map, if people have areas to add there.  The BGT-BP map is a bit overkill for Tutu (even if they get it working, which I hope they do, but it seems they still need to do some work).
« Last Edit: January 11, 2007, 05:08:24 PM by Miloch »

Offline Red Carnelian

  • Planewalker
  • *****
  • Posts: 24
Re: Adding new areas
« Reply #23 on: January 11, 2007, 06:07:58 PM »
The Tutu area map is patched. I've decided to release the Tutu version of The Stone of Askavar this weekend with support only for the exising Tutu world map. You will see two code blocks for the world map, one for each area but with some work you should be able to use just one block of code for however many areas you are adding. If you intend using the same code for a BG1 install as I have then you will need to ensure you have the right icons for your area as both maps differ in their icon indexes.

I agree with you the BGT map is really for BGT. An enlarged map is fine but we would all need to agree with it.

Offline Miloch

  • Barbarian
  • Planewalker
  • *****
  • Posts: 1032
  • Gender: Male
Re: Adding new areas
« Reply #24 on: January 13, 2007, 04:39:07 PM »
The Tutu area map is patched. I've decided to release the Tutu version of The Stone of Askavar this weekend with support only for the exising Tutu world map. You will see two code blocks for the world map, one for each area but with some work you should be able to use just one block of code for however many areas you are adding.
Great work.  I'll check out your code when I'm done with the other CoM mods.  The areas I'm planning for my next mod are subareas (smaller areas linked within existing larger areas, not the worldmap) so I probably won't run into this issue, but it's still useful to know (who knows, I may get ambitious with larger area maps someday :D).
Quote
I agree with you the BGT map is really for BGT. An enlarged map is fine but we would all need to agree with it.
What would you suggest?  Expanding the existing worldmap by say 25% on each border?  Or zooming in to a higher degree of magnification on the existing map to allow more areas?  An easy (and perhaps lazy) method would be to take a subset of the BGT-BP Worldmap that matches BG1/Tutu, but I noticed a lot of the areas don't match up that closely in placement on the two, for some reason.

 

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)?: