Jump to content

Photo

Modder Discussion: Additional AreaType() Flagging for Mods

weidu tp2 coding mod development AreaType() AreaCheck() aran whitehand dialog coding scripting extending functionality

66 replies to this topic

#1 berelinde

berelinde

    The Typo Queen

  • Gibberlings
  • 8594 posts
  • Gender:Male
  • Location:New Jersey, USA

Posted 23 January 2011 - 06:32 PM

Discussion started from Aran Whitehand development -

Synopsis:
  • AreaCheck() does not cover mod added areas without specific addition
  • AreaType() does not cover mod added areas without specific addition
  • AreaType(CITY) was intended to cover city outdoor areas
  • Looking for a way of getting all areas, vanilla and modded, to be able to be checked for being in a city and an inn, so that the appropriate movie can be triggered and content can be tailored and still make sense
Suggestions so far:
  • Worse: Research and create mass "MYAREA" script extensions for all such areas
  • Better: Create and identify new AreaType()s and set them up as community resources
[-cmorgan




AreaType() checks fail. Keep that in mind. You will need a more robust check than AreaType(CITY) to determine where the party is sleeping and cue the appropriate cutscene. You may need to do an extensive OR() block area check for this. Just saying. I've got the code up elsewhere and can post it here if you need it.

Edited by cmorgan, 18 November 2011 - 07:45 PM.

Must. Write. Faster.

cmorgan: "None of us get old around here, just more proficient at doing more stuff with less braincells!"

berelinde's mods
TolkienAcrossTheWater website
TolkienAcrossTheWater Forum

#2 cmorgan

cmorgan

    journeyman investigator

  • Gibberlings
  • 7097 posts
  • Gender:Male
  • Location:Glencoe, IL, USA

Posted 24 January 2011 - 05:56 AM

Yep - I need to raid everyone's "things I learned the hard way' and create a checklist ???

I'd love the code, if you could - I have a number of PID things that rely on AreaType().

I do remember that putting an AreaType() at the beginning of the evaluation caused disaster back in bg1npc testing.
I love deadlines. I love the whooshing noise they make as they go by. - Douglas Adams

#3 the bigg

the bigg

    The Avatar of F/Ts

  • Modders
  • 2337 posts
  • Gender:Male
  • Location:Modena (Italy)

Posted 24 January 2011 - 06:20 AM

A list of AreaCheck() wouldn't match against custom areas; perhaps you can ask Ascension to make AreaType() work, and use EVALUATE_BUFFER to compile AreaType() if ToBEx is installed and AreaCheck() if it isn't?
Italian users: help test the Stivan NPC!

Author or Co-Author: WeiDU - Widescreen - Generalized Biffing - Refinements - TB#Tweaks - IWD2Tweaks - TB#Characters - Traify Tool - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics - Nalia Mod - Nvidia Fix
Code dumps: Detect custom secondary types - Stutter Investigator

If possible, send diffs, translations and other contributions using Git.

#4 Ardanis

Ardanis

    A very GAR character

  • Modders
  • 2630 posts
  • Gender:Male
  • Location:Saint-Petersburg, Russia

Posted 24 January 2011 - 02:40 PM

Did I miss something crucial, or AreaType() works? Every romance checks for !AreaType(DUNGEON), etc.

Retired from modding.


#5 Kaeloree

Kaeloree

    beluga

  • Modders
  • 833 posts
  • Gender:Male

Posted 24 January 2011 - 02:48 PM

I must admit, I've never had a situation where it hasn't worked.

I would think that the problem would be more that it doesn't check for mod added areas?

#6 cmorgan

cmorgan

    journeyman investigator

  • Gibberlings
  • 7097 posts
  • Gender:Male
  • Location:Glencoe, IL, USA

Posted 24 January 2011 - 03:22 PM

I didn't know that they fail, but the mod-added areas not correctly flagged is a point, and I think the remembered problem with AreaType() was that if you *start* an evaluation seqiuence with it in Tutu it crashed. Hold on, let me google the workroom...

heh. Still looking, but I may have mis-remembered - here is the upshot of most of the conversation, as reported to igi by Jastey for the IESDP:

http://forums.gibber...amp;hl=AreaType

so dead NPC with AreaType() on all i.e. games causes troubles.

Solution for this one,
#1 - incorporate other triggers that check for alive-ness first,
#2 or only put them in scripts where the actor has to be alive to run them... ???

second interesting thing - without Fixpack, some oddities on what is and isn't flagged correctly for Resting movies animations, is that what we are talking baout? http://forums.gibber...s...ost&p=67578


Berelinde, any clarification on the AreaType problem?

Edited by cmorgan, 24 January 2011 - 03:39 PM.

I love deadlines. I love the whooshing noise they make as they go by. - Douglas Adams

#7 cmorgan

cmorgan

    journeyman investigator

  • Gibberlings
  • 7097 posts
  • Gender:Male
  • Location:Glencoe, IL, USA

Posted 24 January 2011 - 04:02 PM

...aaand the AreaType() crashes are in BG1NPC workrooms;

from CamDawg:

In all honesty, I think it may be that an AreaCheck may automatically fail for a dead character. Try a re-ordering of the triggers and see if you get the same crashes. For example, that second block from cmorgan would be

IF
!StateCheck(Myself,CD_STATE_NOTVALID)
%BGT_VAR%
AreaType(FOREST)
InParty("%IMOEN_DV%")
InParty(Myself)
CombatCounter(0)
!See([ENEMY])
See("%IMOEN_DV%")
!StateCheck("%IMOEN_DV%",CD_STATE_NOTVALID)
RealGlobalTimerExpired("X#DreamTalk","GLOBAL")
Global("X#XZIM1","GLOBAL",2)
THEN
RESPONSE #100
IncrementGlobal("X#XZIM1","GLOBAL",1)
RealSetGlobalTimer("Xz1BackUpTimer","GLOBAL",18)
RealSetGlobalTimer("X#DreamTalk","GLOBAL",180)
StartDialogueNoSet("%IMOEN_DV%")
END


This may not apply to regular BG2, as we just decided to be safe rather than sorry and move all the AreaType() checks further down the condition list.

Edited by cmorgan, 24 January 2011 - 04:03 PM.

I love deadlines. I love the whooshing noise they make as they go by. - Douglas Adams

#8 berelinde

berelinde

    The Typo Queen

  • Gibberlings
  • 8594 posts
  • Gender:Male
  • Location:New Jersey, USA

Posted 25 January 2011 - 09:39 AM

Sorry for posting only half an explanation.

The problem that I was having was that areas are flagged inconsistently. Inns are not necessarily flagged as CITY, etc. I wanted to use AreaType(CITY) instead of an OR() AreaCheck() block because I wanted the flexibility of including mod-added inns, but half the time, the wrong cutscene would cue and the NPC would take the PC out for a walk in the woods in the middle of Athkatla.
Must. Write. Faster.

cmorgan: "None of us get old around here, just more proficient at doing more stuff with less braincells!"

berelinde's mods
TolkienAcrossTheWater website
TolkienAcrossTheWater Forum

#9 Kaeloree

Kaeloree

    beluga

  • Modders
  • 833 posts
  • Gender:Male

Posted 25 January 2011 - 03:34 PM

Ahh, that makes sense. Wouldn't this be something the fixpack would fix? Otherwise, surely it wouldn't be too difficult to fix those incorrectly flagged areas.

#10 the bigg

the bigg

    The Avatar of F/Ts

  • Modders
  • 2337 posts
  • Gender:Male
  • Location:Modena (Italy)

Posted 25 January 2011 - 03:36 PM

How could the Fixpack fix incorrectly flagged mod areas?
Italian users: help test the Stivan NPC!

Author or Co-Author: WeiDU - Widescreen - Generalized Biffing - Refinements - TB#Tweaks - IWD2Tweaks - TB#Characters - Traify Tool - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics - Nalia Mod - Nvidia Fix
Code dumps: Detect custom secondary types - Stutter Investigator

If possible, send diffs, translations and other contributions using Git.

#11 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Gibberling Poobah
  • 9751 posts
  • Gender:Not Telling

Posted 25 January 2011 - 04:07 PM

How could the Fixpack fix incorrectly flagged mod areas?

Mmmmmmmmmmmmmmmagic!

Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.


#12 Kaeloree

Kaeloree

    beluga

  • Modders
  • 833 posts
  • Gender:Male

Posted 25 January 2011 - 04:21 PM

Ahh, I didn't realise she was talking solely about mod-added areas. Okay, yeah, that may be a little more magical.

But-but, I thought Cam was like Santa Claus... ???

#13 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Gibberling Poobah
  • 9751 posts
  • Gender:Not Telling

Posted 25 January 2011 - 05:27 PM

But-but, I thought Cam was like Santa Claus... :D

It's not terribly inaccurate since most of my mods are lumps of coal... ???

Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.


#14 berelinde

berelinde

    The Typo Queen

  • Gibberlings
  • 8594 posts
  • Gender:Male
  • Location:New Jersey, USA

Posted 26 January 2011 - 07:41 AM

I wasn't talking about mod-added areas. I was talking about regular inns. Maybe it's because my testers were using a "rest anywhere" component of Tweaks, but inns like the Mithrest Inn are not flagged as city.
Must. Write. Faster.

cmorgan: "None of us get old around here, just more proficient at doing more stuff with less braincells!"

berelinde's mods
TolkienAcrossTheWater website
TolkienAcrossTheWater Forum

#15 the bigg

the bigg

    The Avatar of F/Ts

  • Modders
  • 2337 posts
  • Gender:Male
  • Location:Modena (Italy)

Posted 26 January 2011 - 07:47 AM

Appears to be a BG2 bug that the Fixpack isn't fixing.

Edited by the bigg, 26 January 2011 - 07:48 AM.

Italian users: help test the Stivan NPC!

Author or Co-Author: WeiDU - Widescreen - Generalized Biffing - Refinements - TB#Tweaks - IWD2Tweaks - TB#Characters - Traify Tool - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics - Nalia Mod - Nvidia Fix
Code dumps: Detect custom secondary types - Stutter Investigator

If possible, send diffs, translations and other contributions using Git.



Reply to this topic



  



Also tagged with one or more of these keywords: weidu tp2 coding, mod development, AreaType(), AreaCheck(), aran whitehand, dialog coding, scripting, extending functionality

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users