View previous topic :: View next topic |
Author |
Message |
xorbaxian
Joined: 18 Dec 2007 Posts: 45
|
Posted: Thu Mar 11, 2010 17:25 Post subject: WISHLIST item: GetEffectParameter() |
|
|
int GetEffectParameter(effect e);
this function would return the specific parameter associated w/the effect passed as the arg, in order to query the state of the object affected by the effect. a valid value is returned only for temporary and permanent duration types, not instant.
examples:
- for an effect of type EFFECT_TYPE_SAVING_THROW_INCREASE, return how many the save was increased.
- for an effect of type EFFECT_TYPE_DISEASE, return which disease is affecting the creature [e.g. index# into diseases.2da]
- for an effect of type EFFECT_TYPE_MOVEMENT_SPEED_INCREASE, return how much faster.
- for an effect of type EFFECT_TYPE_ABILITY_DECREASE, return how many the ability was nerfed.
...etc. in other words, return the parameter that was passed to the engine when the effect was instantiated.
==> this could also be on the windoze wish-list as well...
doable? |
|
Back to top |
|
|
elven
Joined: 28 Jul 2006 Posts: 259 Location: Germany
|
Posted: Thu Mar 11, 2010 19:48 Post subject: |
|
|
I'm fairly certain you can do that with Get/SetEffectInteger from nwnx_structs/effects. You just need to figure out what's what. |
|
Back to top |
|
|
Ginden
Joined: 07 Feb 2009 Posts: 4
|
Posted: Thu Mar 11, 2010 20:08 Post subject: |
|
|
Code: | int SetFavoredEnemyFeat(int nRace, int nFeat) |
Code: | int GetTouchAC(object oTarget) |
Code: | void SetMonkFlurryOfBlowsWeapon(int nWeapon, int nMonkLevel) |
Code: | void SetKiStrike(int nEnhacement, int nMonkLevel) |
_________________ In Soviet Russia, NWNX edit you! |
|
Back to top |
|
|
xorbaxian
Joined: 18 Dec 2007 Posts: 45
|
Posted: Fri Mar 12, 2010 1:44 Post subject: |
|
|
elven wrote: | I'm fairly certain you can do that with Get/SetEffectInteger from nwnx_structs/effects. You just need to figure out what's what. |
excellent.
anyone know if this has been ported to windoze?? or is it just on linux? |
|
Back to top |
|
|
Fireboar
Joined: 17 Feb 2008 Posts: 323
|
Posted: Fri Mar 12, 2010 2:12 Post subject: |
|
|
Nope. Linux only. If you want to request Windows plugins, try the Windows development forum. |
|
Back to top |
|
|
Snoteye
Joined: 05 Jun 2010 Posts: 4
|
Posted: Sat Aug 14, 2010 21:37 Post subject: |
|
|
I don't suppose it would be possible to detect when the game attempts to execute a script that does not exist? |
|
Back to top |
|
|
Zebranky
Joined: 04 Jun 2006 Posts: 415
|
Posted: Sat Aug 14, 2010 22:03 Post subject: |
|
|
Snoteye wrote: | I don't suppose it would be possible to detect when the game attempts to execute a script that does not exist? |
Pretty sure this wouldn't be too hard. What would you want to have happen in the event it doesn't exist? _________________ Win32 SVN builds: http://www.mercuric.net/nwn/nwnx/
<Fluffy-Kooshy> NWNx plugin is to this as nuclear warheads are to getting rid of fire ants.
<ThriWork> whenever I hear nwn extender, I think what does NWN need a penis extender for? |
|
Back to top |
|
|
Snoteye
Joined: 05 Jun 2010 Posts: 4
|
Posted: Sat Aug 14, 2010 22:17 Post subject: |
|
|
I was hoping for some way to define a master script that could run whenever a non-existent (or monitored) script, possibly also dialogue, was attempted executed. I just spent three hours combing a module because some placeables were discovered to be using a legacy script and had to be updated. |
|
Back to top |
|
|
Timear
Joined: 23 Aug 2005 Posts: 31
|
Posted: Sun Dec 19, 2010 17:38 Post subject: |
|
|
Is it possible to convert those two functions from NWN2 to nwnx2?
Code: | object GetFirstSubArea (object oArea, vector vPosition);
object GetNextSubArea(vector vPosition);
|
In NWN2 with those two functions it is possible to determine the triggers/AOEs/Traps/... vPosition is within. |
|
Back to top |
|
|
Epitaffio
Joined: 13 Jul 2010 Posts: 29 Location: Italy
|
Posted: Mon Dec 20, 2010 16:26 Post subject: |
|
|
Repost a request *_*
Is there any way to edit this:
It seem there is only SetTileMainLightColor and SetTileSourceLightColor in default script, but i need the area lighting :_( |
|
Back to top |
|
|
NorthWolf
Joined: 30 Oct 2010 Posts: 5
|
Posted: Tue Dec 21, 2010 18:09 Post subject: |
|
|
Thought I might chip in and say that I've asked the fellow doing some debugging on my behalf to try to hook ambient/diffuse area lighting, but it's only recently either of us have tried mucking about with NWNX so it might take a while. I'll let you know if he manages to produce something unless one of the awesome folks here beats him to it. |
|
Back to top |
|
|
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Wed Dec 22, 2010 1:24 Post subject: On Windows |
|
|
CNWTile::SetMainLightColor(unsigned char, unsigned char)
But I think that just deals with the lighting of a single tile. Is it possible that the Toolset just sets 'all' the tile colors, to simulate an ambient color of the area?
Perhaps the data is stored statically inside the resource file for the area itself, and can be accessed via directly changing bytes inside the area struct? |
|
Back to top |
|
|
NorthWolf
Joined: 30 Oct 2010 Posts: 5
|
Posted: Wed Dec 22, 2010 12:54 Post subject: |
|
|
Pretty sure that'd just be used for Main Light 1 and Main Light 2 of the particular tile. The way lighting acts for tiles doesn't make me think that the Toolset does the coverage that way; if it does, it must do some sort of averaging between the tile's lighting and the ambient/diffuse.
I should say, though, that when I was helping set up IDA I remember seeing a lot of stuff pursuant to area properties when testing it. Something along the lines of "aMoondiffuse," "aMoonambient," etc. in the names tab. But my experience with debugging NWN is zilch, so I don't know if that's helpful or just nonsense. |
|
Back to top |
|
|
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Wed Dec 22, 2010 13:54 Post subject: |
|
|
I searched all the functions in the Windows Verion for anything with the word Ambient in it.
All I got was sound effects, and the ambient light for tiles.
I will have a look at the Name/String list db when I get home.
Its possible, and I suspect that bioware intended that the ambient and diffuse to be static after compileing the module, so they did not create any internal functions for reading or writing to the area ambient/diffuse lighting.
That being said, the data must be there somewhere, so it would be possible to alter it via unsafe modifications to the area struct.
Just finding out what bytes are the ones we need, is the problem.
I suppose one way of debugging it, would be to create 2 modules, with 1 area in each, and the only differences between them is area colors.
Debug/step through the code, and look for any bytes in the area struct that differ, and they could potentially be the locations of the ambient/diffuse light. |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Wed Dec 22, 2010 14:24 Post subject: |
|
|
CNWSArea::LoadAreaHeader
Somewhere around 0x080CE6D8 it initializes these values. It may be possible to change them later, but the changes won't be reflected on the client until the player re-enters the area. _________________ In Soviet Russia, NWN plays you! |
|
Back to top |
|
|
|