logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Wishlist
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
 
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux development
View previous topic :: View next topic  
Author Message
xorbaxian



Joined: 18 Dec 2007
Posts: 45

PostPosted: Thu Mar 11, 2010 17:25    Post subject: WISHLIST item: GetEffectParameter() Reply with quote

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... Wink

doable?
Back to top
View user's profile Send private message
elven



Joined: 28 Jul 2006
Posts: 259
Location: Germany

PostPosted: Thu Mar 11, 2010 19:48    Post subject: Reply with quote

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
View user's profile Send private message
Ginden



Joined: 07 Feb 2009
Posts: 4

PostPosted: Thu Mar 11, 2010 20:08    Post subject: Reply with quote

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
View user's profile Send private message
xorbaxian



Joined: 18 Dec 2007
Posts: 45

PostPosted: Fri Mar 12, 2010 1:44    Post subject: Reply with quote

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. Smile
anyone know if this has been ported to windoze?? or is it just on linux?
Back to top
View user's profile Send private message
Fireboar



Joined: 17 Feb 2008
Posts: 323

PostPosted: Fri Mar 12, 2010 2:12    Post subject: Reply with quote

Nope. Linux only. If you want to request Windows plugins, try the Windows development forum.
Back to top
View user's profile Send private message
Snoteye



Joined: 05 Jun 2010
Posts: 4

PostPosted: Sat Aug 14, 2010 21:37    Post subject: Reply with quote

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
View user's profile Send private message
Zebranky



Joined: 04 Jun 2006
Posts: 415

PostPosted: Sat Aug 14, 2010 22:03    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Snoteye



Joined: 05 Jun 2010
Posts: 4

PostPosted: Sat Aug 14, 2010 22:17    Post subject: Reply with quote

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
View user's profile Send private message
Timear



Joined: 23 Aug 2005
Posts: 31

PostPosted: Sun Dec 19, 2010 17:38    Post subject: Reply with quote

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
View user's profile Send private message
Epitaffio



Joined: 13 Jul 2010
Posts: 29
Location: Italy

PostPosted: Mon Dec 20, 2010 16:26    Post subject: Reply with quote

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
View user's profile Send private message
NorthWolf



Joined: 30 Oct 2010
Posts: 5

PostPosted: Tue Dec 21, 2010 18:09    Post subject: Reply with quote

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
View user's profile Send private message
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Wed Dec 22, 2010 1:24    Post subject: On Windows Reply with quote

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
View user's profile Send private message
NorthWolf



Joined: 30 Oct 2010
Posts: 5

PostPosted: Wed Dec 22, 2010 12:54    Post subject: Reply with quote

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
View user's profile Send private message
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Wed Dec 22, 2010 13:54    Post subject: Reply with quote

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
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Wed Dec 22, 2010 14:24    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux development All times are GMT + 2 Hours
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
Page 6 of 7

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group