Neverwinter Citadel Project

Go Back   Neverwinter Citadel Project > Custom Content > Programming > Scripting and Functions

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-15-2009, 04:51 PM
pain pain is offline
Senior Member
 
Join Date: Dec 2007
Posts: 672
Default Area Modifiers - Maturing the Idea

Basically i've got water working the way i want for the most part and it's deployed on my PW and on Obisidian Shore. They seem to be helping to mature it by noting the various issues with it. So the basic concept of triggers defining water areas works even though it needs more work. Now i am working on implementing Wyverns OnBurn script, which allows me to cover both water and fire to some degree which makes me step back to focus on the bigger picture.

The basic concept so far is i have triggers used in the module itself as static definitions, which then define variables on the character ( ie "INWATER" = TRUE or FALSE ). Each is made possible with an onenter and onexit script, and since they are a trigger which can have up to i think it's about 125 points or so these can cover the Entire map or the can just define a puddle and be of any shape.

Supporting this i also define events for the entire area, this works the exact same way, and allows an entire area to be underwater.

This is suplemented by AOE's which also define things the same way. This allows spells to alter how things are working. This again is handled in a similar manner.

So i have a function that gets the variables in a certain spot as well. This allows someone outside of the water, to cast a spell on a target location which is water and have that wall of fire fizzle into a bunch of steam. It also can prevent stacking of the same AOE - perhaps even boosting the first AOE instead of making two expensive AOE's full of visual effects. Now if the caster is in water he has to contend with not being able to speak as he is holding his breath, but the spell target location also affects things.

So if a water elemental or a fire elemental are in an area defined as fire or water they are going to be a lot stronger or weaker, with custom effects, perhaps growing even. This is mainly being implemented by Wyvern, but my system i want to cater to this type of thinking.

So i am thinking i need a way to further allow multiple trigger types, a single variables on AOE's, Triggers and Areas which allows it to be defined as part of a given area type, just to make it so that function that checks for what is defined at a certain point in space does not have to check for 20 different variables -- instead of INWATER, FIRE, AIRBUBBLE, WILDMAGIC vars being checked it can just check ENVIROSTATE which has a 1 for WATER, 2 for fire, and a 4 for Airbubble ( or via bitwise math adding 1 and 2 and 4 allows it to be Airbubble AND underwater AND on fire at the same time ). And of course triggers can overlap at any time which can make things confusing but this will create a combined bit by adding anything it finds together ( if it finds a 1 and a 2, it will return a 3 which bitwise mathwise is a 1 and a 2 and i can check that in a single operation ).

Now then i have to ask all you folks out there, what should this entail besides just water. This includes all game effects, wild magic, dead magic, fire, water, brambles and quicksand of the wilderness. Basically it's important now to figure out the various things that are included in said system soas to make sure they have a cohesive spine and can work well together. Really the goal is to make the game mechanics for the environment work.

As a preliminary list i have the following.

Trigger/Area Terrain Markers

Environment States
  • SC_ENVIRO_NONE BIT0 - nothing going on
  • SC_ENVIRO_AIRPOCKET BIT1- works as a cutter for water, poison or the like
  • SC_ENVIRO_WATER BIT2- water environment ( fire does not work well, has complete water rules )
  • SC_ENVIRO_FIRE BIT3- area is in flames ( damaging, water or ice does not work well ) Triggers burning effect which is mitigated by how soaked a person is.
  • SC_ENVIRO_MAGMA BIT4- areas floor is very hot ( damaging )
  • SC_ENVIRO_COLD BIT5- area is very cold ( damaging )
  • SC_ENVIRO_ELECTRICAL BIT6- area is electrically active ( thunder and lightning damaging )
  • SC_ENVIRO_ACIDIC BIT7- area is acidic ( damaging )
  • SC_ENVIRO_NEGATIVE BIT8- area is negative ( damaging to living ) healing is weakened.
  • SC_ENVIRO_POSITIVE BIT9- area is positive ( damaging to dead ) healing is boosted and players heal.
  • SC_ENVIRO_GALE BIT10- ( gust of wind type effect ) tiny creatures are blown around.
  • SC_ENVIRO_LIGHTVEGETATION BIT11- ( cover - hiding in reeds for example )
  • SC_ENVIRO_VEGETATION BIT12- ( movement )
  • SC_ENVIRO_SLIPPERY BIT13- ( movement includes slipping - grease effect )
  • SC_ENVIRO_HARDTERRAIN BIT14- ( slow movement rocky, sand, mud )
  • SC_ENVIRO_BLINDING BIT15- ( sandstorm or icestorm )
  • SC_ENVIRO_DISEASE BIT16- ( contagious )
  • SC_ENVIRO_POISON BIT17- ( poison gas )
  • SC_ENVIRO_STENCH BIT18- ( ambience, just to tell it stinks like sulphur)
  • SC_ENVIRO_FLAMMABLE BIT19- ( combat, prone to fires )
  • SC_ENVIRO_BRIGHT BIT20- area is bright ( affect hiding )
  • SC_ENVIRO_DARK BIT21- area is dark ( affect hiding )
  • SC_ENVIRO_HOLY BIT22- ( boosts good magic, weakens evil )
  • SC_ENVIRO_PROFANE BIT23- ( boosts evil magic, weakens good )
  • SC_ENVIRO_LAW BIT24- ( boosts lawful magic, weakens chaos )
  • SC_ENVIRO_CHAOS BIT25- ( boosts chaos magic, weakens law )
  • SC_ENVIRO_DEADMAGIC BIT26- magic does not work
  • SC_ENVIRO_WILDMAGIC BIT27- magic works too well
  • SC_ENVIRO_TOWN BIT28- for server management
  • SC_ENVIRO_REST BIT29- for server management
  • SC_ENVIRO_NOREST BIT30- for server management
  • SC_ENVIRO_ANCHORED BIT31- no teleport blocker, blocks all by subschool having teleportation or calling.

Character States - these combine with the above and their purpose is to flag the character with a given state and then targeting scripts or a single heartbeat on that player. ( currently each effect spawns it's own heartbeat which is not a good idea in a larger system if multiple triggers are involved )

Note that these are applied along with the effects of a given state, so if water is left, these remain and are removed along with the water slowing effect. ( this allows me to only check for water code when they are in SC_ENVIRO_WATER or if they still have a state of WATER and thus remove the water effects. More indirect but it allows triggers to be more complicated. )
  • NONE
  • WATER - Character is to some degree in water-note an air bubble he is in water but not in water really.
  • SPLASHING - Character is on wet terrain
  • WADING - Character is partially in water
  • SUBMERGED - Character is holding breath underwater
  • DROWNING
  • PANICKED
  • ACIDIC
  • GALE
  • LTVEGETATION
  • VEGETATION
  • SLIPPERY
  • HARDTERRAIN
  • BLINDING
  • DISEASE
  • POISON
  • STENCH
  • FLAMMABLE
  • BRIGHT
  • DARK
  • HOLY
  • PROFANE
  • LAW
  • CHAOS
  • DEADMAGIC
  • WILDMAGIC
  • CONFUSED
  • ANCHORED

Variables stored on the character. Either bitmasks or integers ( DC's in some cases, and to show the amount of the effect on others. )
  • CSL_ENVIRO - bitmask ( see above )
  • CSL_CHARSTATE - bitmask ( see above )
  • CSL_BURNING - integer, 0 being not burning, 1 and above doubles as the DC
  • CSL_FLAMMABLE - indicates player is extra flammable
  • CSL_STOPDROPANDROLL - indirect means of indicating player is rolling on ground to put out fires
  • CSL_GUSTED - indirect means to note a gust of wind effect
  • CSL_SOAKED - adjusted from 1-20 and based on if in rain, water, lakes, wading, or from certain spells, decreases by 1 per round so it effective is how long you are soaked. Reduces non magical ( area ) fire damage by the given amount.
  • CSL_HOLDBREATH - 0 is not holding, above 0 is number of rounds that has been holding breath
  • CSL_LOSTBREATH - applies a reduction in how long they can hold their breath indirectly
  • CSL_AIRBUBBLES - applies an increase in how long they can hold their breath indirectly
  • CSL_WATERDC - DC for water saves ( goes up each round )
  • CSL_CURRENTHPS - the the heartbeat can detect damage and thus do concentration checks
  • CSL_WATERSURFACEHEIGHT - the height of the water area stored on the character
  • CSL_TERRAINSLOWINGFACTOR - the slowing caused by various terrain
  • CSL_WATERSLOWINGFACTOR - the slowing caused by water

Last edited by pain; 06-25-2009 at 05:42 PM.
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 08:04 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.