Jump to content


Photo

Question to setting area flags via tp2


11 replies to this topic

#1 jastey

jastey
  • Gibberlings
  • 7331 posts
  • Gender:Female

Posted 11 February 2018 - 02:13 PM

In NTotSC, for eet the mod areas are supposed to be flagged as BG1 areas (flag 8 at 0x48)

 

In the tp2 is the following:

 

PATCH_IF (GAME_IS ~eet~) BEGIN
        WRITE_SHORT 0x48 THIS | (1 << BG1AREA)
    END

 

Problem: This flaggs the areas as Outdoor, not BG1areas. What would be the correct syntax?



#2 argent77

argent77
  • Modders
  • 804 posts
  • Gender:Male

Posted 11 February 2018 - 02:24 PM

No need to shift the value. You can use it directly.

PATCH_IF (GAME_IS ~eet~) BEGIN
  WRITE_SHORT 0x48 THIS | IDS_OF_SYMBOL(~AREATYPE~ ~BG1AREA~)
END


#3 jastey

jastey
  • Gibberlings
  • 7331 posts
  • Gender:Female

Posted 11 February 2018 - 09:32 PM

Thank you!



#4 Wisp

Wisp
  • Modders
  • 1108 posts
  • Gender:Male

Posted 18 February 2018 - 12:35 AM

If the IDS type is guaranteed to already exist, you can retrieve the value like how Argent77 posted. You need to bit-shift the value if you get it from ADD_AREA_TYPE, which you do if you are adding the type for the first time or if you are uncertain whether the type already exists or not. Presumably the variable BG1AREA was improperly set in the code you posted (e.g., because ADD_AREA_TYPE was never called to set it). You'd get the behaviour you describe if the variable was 0.



#5 jastey

jastey
  • Gibberlings
  • 7331 posts
  • Gender:Female

Posted 18 February 2018 - 12:44 AM

Ah, I see. Thank you!

#6 Roxanne

Roxanne

    Modder

  • Modders
  • 2041 posts
  • Gender:Female
  • Location:Auckland, NZ

Posted 18 February 2018 - 01:04 AM

The behavior in the OP seems strange (or the test was not conducted correctly).

The EET already introduces the Flag  in order to handle worldmap display for the various campaigns. So if you install a mod after EET (i.e. after the BGEE conversion, which should be the case for the NTotSC), the flag should already exist in the gameand all the BG1 areas should have this flag.

HighHedge.jpg

High Hedge in my EET

 

Edit - from my own experience with the NTotSC interim for EET, I found no need to set this flag - but maybe I missed some subtle detail.


Edited by Roxanne, 18 February 2018 - 01:23 AM.

The Sandrah Saga!

another piece of *buggy, cheesy, unbalanced junk*

 

 

 


#7 Roxanne

Roxanne

    Modder

  • Modders
  • 2041 posts
  • Gender:Female
  • Location:Auckland, NZ

Posted 18 February 2018 - 02:05 AM

 

Looking into EET again, I suggest that you do not need that flag in your mod.

 

EET allows you to visit all areas explored before (e.g. during BG1 part) in all subsequent parts. However, when you start your game in ToB or Irenicus dungeon, you are not supposed to have access to BG1 areas. This is what the flag does.

 

The case with NTotSC areas is that they are

- accessible from adjacent BG1 areas which already have the flag

- revealed by quest givers who are in BG1 areas which already have the flag

So in either case the original EET behavior already does the job.


Edited by Roxanne, 18 February 2018 - 02:08 AM.

The Sandrah Saga!

another piece of *buggy, cheesy, unbalanced junk*

 

 

 


#8 jastey

jastey
  • Gibberlings
  • 7331 posts
  • Gender:Female

Posted 18 February 2018 - 10:45 AM

With argent77's syntax, the flag is set correctly. Before, the areas were flagged as Outdoor (leading to vamoires in a dungeon to turn into their bugshape). The setting of the flag for the NTotSC areas was from k4thos, or at least it was in the NTotSC version I took over from k4thos.

#9 Roxanne

Roxanne

    Modder

  • Modders
  • 2041 posts
  • Gender:Female
  • Location:Auckland, NZ

Posted 18 February 2018 - 10:50 AM

With argent77's syntax, the flag is set correctly. Before, the areas were flagged as Outdoor (leading to vamoires in a dungeon to turn into their bugshape). The setting of the flag for the NTotSC areas was from k4thos, or at least it was in the NTotSC version I took over from k4thos.

Did you find any other use for it than what I described in the previous post?

I am asking that because some of my mods add areas to EET worldmap as well during BG1 part. I have never encountered any issues with NOT having that flag, I just want to make sure that I miss nothing.


The Sandrah Saga!

another piece of *buggy, cheesy, unbalanced junk*

 

 

 


#10 jastey

jastey
  • Gibberlings
  • 7331 posts
  • Gender:Female

Posted 18 February 2018 - 11:04 AM

I'm not the one to ask I'm afraid, because I don't know what consequences there could be for BG1 areas without the flag in EET. If you encountered no problems then I guess they can't be grave, but my suggestion would be to ask k4thos once he is back. I just found the setting of the flag in his NTotSC version and thought it a good idea to keep it.



#11 Roxanne

Roxanne

    Modder

  • Modders
  • 2041 posts
  • Gender:Female
  • Location:Auckland, NZ

Posted 18 February 2018 - 11:19 AM

Thanks.

I hope I will not encounter problems in my mod that revisits some of the NTotSC areas in later campaigns. This has always worked in old BGT and also in EET with my former interim version. That one did not have the flags but it always worked as expected. On the other hand, you can visit all the other BG1-flagged areas throughout the whole game, so I cannot see a reason why the NTotSC ones should be different. I keep my fingers crossed. (I am currently playing through 2 different full EET installs and it will still take some time until at least one of them is finished and I can make a new install on that PC with the updated mods...)


The Sandrah Saga!

another piece of *buggy, cheesy, unbalanced junk*

 

 

 


#12 jastey

jastey
  • Gibberlings
  • 7331 posts
  • Gender:Female

Posted 18 February 2018 - 11:31 AM

If there are problems let me know and I'll remove the flag until k4thos explains what it actually does in terms of EET playing (and suggests a solution).





Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users