Jump to content


Feature Request


  • Please log in to reply
2 replies to this topic

#1 -CBisson-

-CBisson-
  • Guest

Posted 15 February 2004 - 04:17 PM

Ok, weidu can add npcs, stores, extend scripts, and whole lot of cool stuff. Why were area files left out? We can't add triggers or actors or containers or other things. Can't we get some commands to ADD_AREA_CREATURE and ADD_AREA_AMBIANT and ADD_AREA_WHATEVER?

Upon seeing the ADD_AREA_CREATURE command, weidu reads the actors offset and the number of actors in that .are file, multiplies the number of actors by 218 (for v1.0 .are files) and then Inserts 218 bytes at that point, adjusting the other offsets in the header by +218. Then we can toss in the creature name, the location, the facing, any scripts, and the .cre resref. So the commands could look something like:

Copy_Existing ~AR0400.ARE~ ~override/AR0400.ARE~
ADD_AREA_CREATURE ~AR0400.ARE~ %Gaelan Bayle% x1200 y345 z12 $ ~WEIDUGB.DLG~ #0 ~None~ #1 ~None~ #2 ~None~ #3 ~None~ #4 ~WTASIGHT.BCS~ #5 ~None~  ~WEIDUGB.CRE~
COPY ~somefolder/WEIDUGB.CRE~ ~override/WEIDUGB.CRE~

And if Wes want's to go all out with that sort of stuff, weidu could also adjust the Visibility Schedule, the animate.ids reference, an override dialog file, etc.

Of course, the same idea could be used for triggers and containers (though that may be a bit harder depending on vertices), exit points, ambiants, etc.

So, how about it?

(CB waits patiently here.)

#2 Rastor

Rastor

    Yes, I really am a dragon. Yes, I am a jerk. Live with it.

  • Member
  • 2001 posts

Posted 15 February 2004 - 07:32 PM

I would like to see this as well.

Coupled with this, how about an easy way to update the World Map.

ADD_WORLD_MAP_AREA ~Area File~ ~WMP graphic to use~
Home of Kitanya, Improved Asylum, more...

Posted Image

#3 weimer

weimer
  • Member
  • 1569 posts

Posted 16 February 2004 - 11:18 AM

One reason is that extending the area script to create the CRE is simple and basically always works. I haven't needed to modify AREs so I haven't coded something up. The other is that there are a lot of offsets in an ARE file:

0x64 ; (* actors *)
0x6c ; (* info points *)
0x70 ; (* spawn *)
0x78 ; (* entrances *)
0x80 ; (* containers *)
0x88 ; (* items *)
0x8c ; (* vertices *)
0x94 ; (* ambients *)
0x98 ; (* variables *)
0xb0 ; (* explored bitmap *)
0xb8 ; (* doors *)
0xc0 ; (* animations *)
0xc8 ; (* tiled objects *)
0xcc ; (* tiled objects *)
0xd0 ; (* rest spawn *)
0xd4 ; (* automap *)

And if I extend the "actors" area I have to push all of the others back, but only if they point to buffers that occur later. That's not rocket science but I'm sure I'd get it wrong the first time, etc. If someone wants to code up a patch, I'll include it. :-) The reason that we have ADD_GAM this and ADD_STORE that is because someone else wanted them enough to code them up for me.