Neverwinter Citadel Project

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

Reply
 
Thread Tools Display Modes
  #21  
Old 09-24-2009, 04:25 PM
pain pain is offline
Senior Member
 
Join Date: Dec 2007
Posts: 672
Default

These files have been updated again.

This is the overall documentation
http://dl.getdropbox.com/u/1172450/E...nvironment.pdf

These are the scripts, unzip these into your override.
http://dl.getdropbox.com/u/1172450/E...ideScripts.zip

This is the module, put it into your modules folder
http://dl.getdropbox.com/u/1172450/E...roExamples.mod

These are the haks, put into your hak folder
http://dl.getdropbox.com/u/1172450/Enviro/Haks.zip

Put this into your tlk folder, you probably have to create it
http://dl.getdropbox.com/u/1172450/Enviro/Dex.TLK



Includes
  • Counterspelling - feats are given on login to those who deserve them. The gong in the areas has an ogre mage that pops up when you step on it.
  • Favored soul favored weapon feat bug - there is a fix to this, if your deity gives the feat and you don't have it, due to going back, it will grant it to you now. Only works with default deities if their names are english, if it's a custom deity it will just be like before.
  • Weather, the fog effect is now working ( thanks weby ). This makes the snow look more realistic. Weather power affects density of the fog, probably need some artistic input on improving that. Available settings are White, Green, Red, Smoke, Haze, Sand and a few others. What i am doing is a light special effect file fog and the actual module property fog at the same time, which tends to make it look the best. Type in dm_weather help to see the settings.
  • Spell turning may or may not work - it's in there but not sure if i got it right. Really need to test it later with a cooperative player.

Last edited by pain; 09-24-2009 at 04:27 PM.
Reply With Quote
  #22  
Old 11-28-2009, 01:10 PM
Belurges's Avatar
Belurges Belurges is offline
Junior Member
 
Join Date: Nov 2009
Location: Mostly China and Australia
Posts: 16
Default

Hey Pain,
Thanks for directing me to this post and letting me have a look through.

I have only just begun to look through (basically just going through opening script files with notepad). There is alot of stuff. lol.
Thankfully despite not having much in the way of comments, you've done a pretty good job of keeping your code is clean so its not hard to see how it goes together. The flowchart you provided in the pdf file kind of helps too. Thanks for that.

I am interested in your 'altars'. I think that atleast for the sake of balance that there should be one altar for each SPECIFIC alignment.
I also think that there should be a single item (one per server) for each altar type that allows for the creation of a destroyable altar placeable (after checking to make sure one isn't already in area.)
The specifically aligned altars should be tied to atleast one and at most three diety/s and have the ability for anyone of same alignment to pray or pay penance/money (on-used with converstion tied to so can have attached diety quests aswell) and recieve a blessing. (With a local var on PC with num of times prayed so that the on-used script can read the var and either/both slightly alter the PC's alignment or perhaps change to altars diety based on number of prayers/fealty and quests completed.)
The quests should include and lead up to destroying altars of opposing alignments (which will obviously then be created somewhere else later by an item holding PC.)
There should also be some kind of negative affect for anyone who has prayed at the altar until it is reconstructed somewhere.

One particular result of this will be things such as 'secret' shrines/locations where some altars may be hidden away and most likely guarded. And where PC's may be wary of people following them and put conditions on answers of people asking about the shrines/altars.

Of course the opposite side of this would be PC's trying to infiltrate the group of PC's assossiated with the altar on the premise of 'changing heart' or somewhat similar OR perhaps trying to bribe associated PC's with money or items/materials sometimes even forming large parties and making a group gold pool for bribes in order to complete a quest. (An evil character may even betray fellows and run away with money. lol)
Of course the actions chosen should agree with the alignment of the quest giving altar.

The DM may even instigate 'monster' based attacks or requests for help (through possession of creature) in order to stop locations from getting too cosy.

I will make you a preview module to show you what I have in mind. (I'll throw something together tonight and post a link for it tomorow. Perhaps day after if I get carried away. lol)
I'll be doing it for fun, so you don't have to use any of it. However if perhaps you do find any of it useful, then that would just make it fun and productive aswell. lol.

P.S. Our perceptions and ideas come from our interactions with the things around us. If I describe green. Will I use the leafs an example? Can anything I say be TRULY original. I say no. This is how I feel about stuff I do.
If I am lucky enough for you to find anything I do useful. Don't feel any need to include me or put my name on it. It's not mine. I stole it from trees or something like that. lol.

Last edited by Belurges; 11-28-2009 at 01:18 PM.
Reply With Quote
  #23  
Old 11-28-2009, 03:44 PM
pain pain is offline
Senior Member
 
Join Date: Dec 2007
Posts: 672
Default

You can make your own on enter and on exit events, the lights are an example of this. If you look they just set vars on the player.

I only implemented law, chaos, evil and good as specific areas, even though a single area can be both evil and chaos at the same time. Specifically they support the spells desecrate, consecrate and law and chaos are kind of just there. I am limited to how many environment types can be in the core system so i merged things and chose things to give the most versatility.

I don't really see lawful evil as a single thing, i see it as something that happens to both be lawful and evil at the same time. So you'd just set these both at once. Just like ice would be both slippery and cold, and snow could be hard terrain and cold. Basically mix the ingredients to get new things.

I am pretty sure you can implement what you are thinking about without having to modify the core system.
Reply With Quote
  #24  
Old 11-28-2009, 04:57 PM
Belurges's Avatar
Belurges Belurges is offline
Junior Member
 
Join Date: Nov 2009
Location: Mostly China and Australia
Posts: 16
Default Understanding the system

Hey Pain,
I WAS going to be playing with your stuff... I still might. lol. I have come across some things that have put a bit of damper on though. Sadly the content lacks any kind of backward compatability. Currently I am working on stuff using a 'modified', but 'original' install for that exact reason. Hasn't stopped me from playing around with the scripts though.

As you just mentioned in your last post I saw that you were using 'BITS' and that there doesn't appear to be any room for additional types. However just like you also mentioned in last post I did see, it apeared that you allowed for 'stacking?' different area affects. I am not sure though...

I can't honestly get a complete picture though, because the '_mod_arealoaded' file appears to suggest that each area has its own individual on-entry script? is that right? (looks like provided....except inside mod maybe. lol)

Also it appears that even though each area has its own script that the affects are executed from trigger objects instead of from the areas? is that right? meaning that a trigger for each type would need to be placed in every single area?
Its still do-able. You could actually just place a single blank trigger and have the on-activate script for the item/s set a local integer (called "Aligned") for the trigger and then just have one code 'TG_AM_Aligned_OnEnter' instead of the four currently used.
You could then simply modify the script in the trigger, so that instead of:

CSLEnviroEntry( oPC, CSL_ENVIRO_XXXX );
//CSLEnviroCheckDeadMagicState( oPC );

Where XXXX is the type, you would have:

int nAligned = GetLocalInt(OBJECT_SELF, "Aligned");
int nViroA;
int nViroB;
if (nAligned = 1)
{
nViroA = CSL_ENVIRO_LAW;
nViroB = CSL_ENVIRO_HOLY;
}
if (nAligned = 2)
{
nViroB = CSL_ENVIRO_HOLY;
}
CSLEnviroEntry(oPC, nViroA);
CSLEnviroEntry(oPC, nViroB);
//CSLEnviroCheckDeadMagicState( oPC );
}

The "Aligned" variable would be set to zero on the trigger itself to start off with. This is the variable that the on-activate script of the item/s would modify when creating the 'altar' placeable object.

Of course this is taking into consideration that integers are set to zero when declared and that zero means no affect.
Also the code would need to include for all types, not just Lawful Good and Neutral Good... and this would only be the way to do it if you ARE using triggers the way it looks like...
It may be right, maybe wrong. Either way...

I don't want to be a pain (Thats not referring to your callsign/alias btw... lol), so no fuss I'll leave things for now and come back later to check for posts and answers.
...worst case I'll have to wait until I finish what I'm working on now and upgrade the install with the expansions so I can check it out proper.

Last edited by Belurges; 11-28-2009 at 05:10 PM.
Reply With Quote
  #25  
Old 11-28-2009, 05:52 PM
pain pain is offline
Senior Member
 
Join Date: Dec 2007
Posts: 672
Default

There is nothing that needs to be compatible, however i only work with 1.23 and SOZ, MOTB installed. However i have players on my module who don't have anything except 1.23.

The on entry and on exit scripts just need to be there to work, there is nothing specific. Technically i can put those scripts in place via scripts dynamically on "hostile" modules like MOW or SOZ, but i figure if you want an underwater area you can set my scripts. The bits set on the area - which are described in the pdf are what determine how it works.

As for triggers, go ahead and make your own, those are examples. If you look the main difference is the bits being set.

The other things are set via modifiers to the magic system, HKPERM_* named variables being added and removed as you enter and leave triggers allow you to do a lot of things, the example is changing the element type of spells but it supports all the modifiers in the pdf.
Reply With Quote
Reply

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 05:25 AM.


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