Aller au contenu

Photo

Broken Functions List


  • Veuillez vous connecter pour répondre
46 réponses à ce sujet

#1
0100010

0100010
  • Members
  • 87 messages
Currently Broken Functions as of patch 1.23:

ActionSit
PC moves two steps towards chair, but not all the way, and does not perform sitting animation on it.
Workaround: KEMOs Chairs non the Vault

SetWeather
Does not work for WEATHER_TYPE_ SNOW or WEATHER_TYPE_LIGHTNING
WorkAround: GUI / Visual Special Effects?

SetEventHandler
Does not work for module or Area Objects

GetEventHandler
Does not work for module or Area Objects

ActionPlayAnimation
Does not loop a looping animation for the full time period specified by  fDurationSeconds.
Workaround: Wrap in a self-calling delaycommand  loop

SetFirstName
Does not work immediately on Items whose names have already been loaded by the UI (only updates after area
transition the object is moved in inventory)
Workaround: Force move the item in inventory

ActionRest
Ignores bIgnoreNoRest parameter (does not ignore AREA no rest flag, but does ignore nearby hostile creatures)
Workaround: Use ForceRest

SetDescription
Does not immediately effect the Examine window text upon inspection.
Workaround: Force Close and Reopen Examine Window

AddItemProperty
Does not work with ItemPropertyDamageReduction
Workaround: Use EffectDamage Reduction

GetFirstName
Does not return toolset edited FirstName value, will return correct value but only after SetFirstName has been called
Workaround: Assign value as variable, then set in OnSpawn

EffectDisintegrate
Does not appear to do anything
Workaround: Use a custom SEF file?

AddHenchman
Attempting to exit to the main menu while a henchman (not a companion) is added
crashes the client
Workaround: Don’t do it

StringToObject
Does not does properly handle Hex values which include A-F characters, which
is what ObjectToString can generates
Workaround: Use Custom function which correctly handles hex values

GetDescription
Does not retrieve the default description (original toolset defined description) Only retrieves correct value after SetDescription has been called
Workaround: Assign value as variable, then set in OnSpawn

GetclassByPosition
Does not return class_TYPE_INVALID when given OBJECT_INVALID
Workaround: Use wrapper function

DayToNight & NightToDay
Does not  work. Displays/removes stars but does not change lighting & skybox
Workaround: Advance the time instead

EffectCutsceneGhost
Does not cause effected creature to ignore collision
Workaround: Use SetCollision

ItemPropertySkillBonus
Does not work with SKILL_ALL_SKILLS constant
Workaround: Add each skill individually

GetResRef
Does not work for waypoints, stores, sounds, or areas
Workaround: Assign value as variable to object in toolset and use Wrapper function to retrieve

EffectDisappearAppear
Creature does not reappear at passed in location
Workaround: Use custom animation instead

EffectDisappear & EffectAppear
Does not perform the animation
Workaround: Use custom animation instead

SetActionMode
Does not turn on or off all modes (or does not update the UI)

SetCutsceneMode
Does not fully disable UI while active, open gui screens can still be manipulated, some feats and modes can still be toggled
Workaround: Close/Hide open GUI screens, and/or open a transparent, full screen gui to intercept all mouse clicks

FadeToBlack
Does not fully disable UI while active, keyboard shortcuts will still execute (hotbar
mode/feat/skill toggles, 'R' for rest, etc)

GetDamageDealtByType
DAMAGE_TYPE_SLASHING/ PIERCING/BLUDGEONING does not work.

ItemPropertyDamageResistance
DAMAGE_TYPE_SLASHING/ PIERCING/BLUDGEONING Do not work (are ignored, UI chat logs indicates absorption, underlying HP values do not)

EffectDamageResistance
DAMAGE_TYPE_SLASHING/ PIERCING/BLUDGEONING Do not work (are ignored, UI chat logs indicates absorption, underlying HP values do not)

SetOwnersControlledCompanion
Does not swap control to a controllable associate (ex: familiar, ASSOCIATE_TYPE_**) when original PC is the currently active character

ForceRest
Does not trigger poison and disease saving throw stages
Workaround: Perform check manually before calling ForceRest, and reapply effects
after if necessary

[Action]JumpToLocation/Object
Does not work if creature is uncommandable, (cannot move, is paralyzed, etc)
Workaround: Use JumpPartyToArea? (comments say uncommandable can be jumped)

SetFog
Does not work (signature and description identical to SetNWN2Fog  plus fFarPlaneClipDistance)

Get/SetCampaign**
Does not perform string length checking of the variable name for saving and retrieval
Workaround: Use Better Names or Globals instead

SignalEvent
Does not work for AOE object's user defined events

EffectAreaOfEffect
Does not properly display AOE if creator is the Module or an Area
Workaround: Use a placeable, creature or waypoint instead to create it

CreateObject
Does not work for creatures if the location is not walkable.
Workaround: Combine with GetIsLocationValid and CalcSafeLocation

ActionUseSkill
Does not work for all skills (Taunt, SetTrap)
Workaround: Use Wrapper function and/or ActionUseTalent

ActionStart Conversation
Does not work on DMs after they've possessed an NPC

ActionCastSpellAtObject/Location
Ignores the nMetaMagic parameter and does not set correct caster
level when bCheat = TRUE

ActionMoveToObject/Location
Does not work if target is in another area. Does not continue or log failure if location is blocked

ResistSpell
Causes GetSpellResistance result to reset to zero.

SetDescription and GetDescription
Do not have an identified parameter at all which is needed-see NWN1 version. GetDescription works on NPC's
but not on players.

EffectAbilityIncrease
Has trouble if the effect does not stack, does not give stat increase, but any secondary effects, slots, spells and the like get a boost. So if you get a con boost of 4, have a +4 magic item that gives you 4 con already, and are 1st level, your hit points go to 12 while your max hit points stay at 10. Also affects other stats but they are a lot harder to measure ( for example this can boost your spell slots above normal ). If you are not wearing magic gear it has no effect.

GetHasSpell()
Is broken for the Summon Creature I-IX spells. It always returns the sum of the squares of the sum of identical spells in the wizard and cleric spell level 1 slots. This means that it will return a positive number whether or not you have a Summon Creature spell (even if you can't cast it at all).
--------------------------------------

The following effects have no ID, and are thus unable to be detected, removed, replaced when they are in effect. ( those with ID 0 i specifically applied the effect, then iterated the effects on the target to get the ids that are active, and removed them as i echoed info about the effects. ).
  • EffectBABMinimum <- ID 0
  • EffectCutsceneDominated<- ID 0
  • EffectDarkVision <- ID 0
  • EffectKnockdown<-ID 0
  • EffectLowLightVision<- ID 0
  • EffectModifyAttacks<-ID 0
  • EffectNWN2SpecialEffectFile <- ID 0
  • EffectSeeInvisible
  • EffectSeeTrueHPs
  • EffectSetScale
  • EffectSummonCopy
  • EffectSummonCreature
These are instant effects, no constant needed or possible ( logically )
  • EffectHeal
  • EffectDeath
  • EffectDamage
  • EffectAppear<- are these deprecated with EffectAppearDisappear?
  • EffectDisappear<- are these deprecated with EffectAppearDisappear?
These seem to cause an error, the first a runtime error, the second does not
leave an effect to remove.
  • EffectNWN2ParticleEffect <-- causes an error if you use it???
  • EffectNWN2ParticleEffectFile<- no result at all
This are constant has no effect available for it (that i know of)

EFFECT_TYPE_NWN2_DEX_ACMOD_DISABLE

--------------------
The following functions should be deprecated or are otherwise NA to NWN2
OpenInventory (Workaround: use a Custom GUI)
CopyItemAndModify
GetItem
Appearance
Get/SetTile**
Dis/MountObject
RecomputeStatic
Lighting
SetPanel ButtonFlash
GetLastReSpawn ButtonPresser
SetPlaceable
Illumination
EffectTimeStop

--------------------
The following functions were listed as broken but I have not tested them to confirm if they still are.

ActivatePortal
Does not work

GetName
Only returns english names

AddJournalQuest Entry
Ignores bAllParty Members parameter

Adjust Reputation
Does not adjust only a single player w/ respect to NPC faction, adjusts all players. Need to be able to effect only a single player

OnAreaExit
Doesn’t fire for an inter-module transition

OnClientLeave
Doesn't fire for an inter-module transition

Modifié par 0100010, 20 juillet 2010 - 01:21 .


#2
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages
Hi,

Very useful list. I know I have come across some of these issues as well, so it's good to know the problem was not just me. Posted Image There are also one or two that I will keep an eye open for now.

I have also found I can use the SetCommandable function to get around some coding that would normally use SetCutsceneMode.

Lance.

Modifié par Lance Botelle, 19 juillet 2010 - 06:34 .


#3
SkywingvL

SkywingvL
  • Members
  • 351 messages
A couple of additional notes here:

- StringToObject/ObjectToString's behaviors are set in stone now as part of the API contract and can't change. Their contract doesn't allow for round-tripping as one operates in base 10 vs base 16.

- CreateObject: Not creating the creature if the location is invalid should be by design.

- ActionMoveToObject/ActionMoveToLocation: Not moving cross-area should be by design.

- Action/JumpToObject:  Not queuing the request when the object is not commandable should be by design.  (Even functions such as JumpToObject actually do create an action queue entry, just prepended.  Turning off the 'commandable' flag disables queuing of action queue entries.)

- ActivatePortal: Portal activation works. Please post details in scenarios where you observe it not working correctly.

Modifié par SkywingvL, 19 juillet 2010 - 11:52 .


#4
rjshae

rjshae
  • Members
  • 4 477 messages
Good information to have. Thank you.

Perhaps this should be stickyfied? :whistle:

#5
Morbane

Morbane
  • Members
  • 1 883 messages

rjshae wrote...

Good information to have. Thank you.

Perhaps this should be stickyfied? :whistle:


This shouldn't be allowed to get buried - Second the Sticky Motion <_<

#6
0100010

0100010
  • Members
  • 87 messages
please sticky

#7
dunniteowl

dunniteowl
  • Members
  • 1 559 messages
Und shtickivied eet eess.



dernachteule

#8
rjshae

rjshae
  • Members
  • 4 477 messages
AddItemProperty
When used to apply an itemproperty with a permanent duration on a non-equipable item that is already in a PC's inventory (such as might occur with a tag-based script), the new property does not go into effect until the item is moved to another inventory or dropped and re-equipped. A work-around is to duplicate the item using CopyItem, then delete the original item using DeleteItem.

I haven't tested this with a temporary duration or an equipable item.

Modifié par rjshae, 01 septembre 2010 - 09:58 .


#9
Morbane

Morbane
  • Members
  • 1 883 messages

rjshae wrote...

AddItemProperty
When used to apply an itemproperty with a permanent duration on a non-equipable item that is already in a PC's inventory (such as might occur with a tag-based script), the new property does not go into effect until the item is moved to another inventory or dropped and re-equipped. A work-around is to duplicate the item using CopyItem, then delete the original item using DeleteItem.

I haven't tested this with a temporary duration or an equipable item.


That is very useful information, thanks rjshae.

#10
rjshae

rjshae
  • Members
  • 4 477 messages
GetIsEffectValid
This function is unreliable and so I can't use it to check whether certain generated effects are valid. (I've only had it work correctly when used with GetFirstEffect/GetNextEffect.) A work-around is to call GetEffectType for the effect and check whether it returns EFFECT_TYPE_INVALIDEFFECT.

Modifié par rjshae, 10 septembre 2010 - 05:19 .


#11
rjshae

rjshae
  • Members
  • 4 477 messages
The ItemPropertyOnHitCastSpell call can be used to add a spell of type IP_CONST_ONHIT_CASTSPELL_ONHIT_UNIQUEPOWER to a weapon. When this is applied to a throwing weapon, however, an attack hit does not fire the on-hit-cast-spell script named "i_{THROWING ITEM TAG}_hc". This also does not work if you build a throwing weapon item with the property "On Hit Cast Spell: Unique Power (On Hit)".

There doesn't appear to be a convenient work-around that I could find. About the best I could do was to use one of the other "On Hit" properties as a marker on the target to show that a hit occurred, then search the target creature effects to see if that effect was functional. If found, I remove that effect and add my own. Pretty ugly really. If anybody has a better fix, I'd be grateful to hear about it. Thank you.

#12
popcorn_eater

popcorn_eater
  • Members
  • 27 messages

0100010 wrote...

Currently Broken Functions as of patch 1.23:
 
ActionPlayAnimation 
Does not loop a looping animation for the full time period specified by  fDurationSeconds.
Workaround: Wrap in a self-calling delaycommand  loop

Hello, could you please be more specific on how to avoid problems with this function?

I can't understand what "Wrap in a self-calling delaycommand  loop" means.

Thanks in advance.

#13
dethia

dethia
  • Members
  • 146 messages

popcorn_eater wrote...
Hello, could you please be more specific on how to avoid problems with this function?

I can't understand what "Wrap in a self-calling delaycommand  loop" means.

Thanks in advance.


make a function

void MyNewFunction(input parameters same as the function you are wrapping, possibly additional parameters)
{
some function I am wrapping in here(it's parameters)
}

now you can do more stuff with the original function like have it run say 3 times instead of once with some delay commands etc...

#14
rjshae

rjshae
  • Members
  • 4 477 messages
void SetTime( int nHour, int nMinute, int nSecond, int nMillisecond )

The documentation for this command says that valid values for the nMinute parameter are 0 to 59. Unfortunately, the game engine clock actually uses 2 minutes of game time equals one hour. Hence, for example, if you pass a value of 5 for nHour and 45 for nMinute, it will convert this into 5 + int(45 / 2) = 27 hours and (45 % 2) = 1 minute, for an actual clock setting of 3 hours and 1 minute. Instead, to get the desired result, multiply 2 minutes by the fraction of the hour represented by nMinute. In this example: 2 minutes * (45/60) = 1 minute, 30 seconds. Hence: SetTime( 5, 1, 30 ); This conversion can be readily implemented through a custom function.

#15
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
Minutes per game hour can be set in the module properties tab. 2 minutes per hour is the default setting.

#16
rjshae

rjshae
  • Members
  • 4 477 messages

Lugaid of the Red Stripes wrote...

Minutes per game hour can be set in the module properties tab. 2 minutes per hour is the default setting.

Thanks, I'll make mention of that in my notes.

#17
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages
 The following constants are flip flopped, the 2da is not matching. 1089 is darkness, and 1088 is resistance in the 2da.

int FEAT_TIEFLING_DARKNESS                   = 1088;int FEAT_TIEFLING_RESISTANCE                     = 1089;

My solution is to just flip flop the rows in the 2da, since i cannot change nwscript.nss without causing major compatibility problems.

Note that both of these are handed out at the same time, so doubt it can cause any issues, but I'm looking at feats for an AI function and don't want to use the darkness constant when i am really after is resistance to damage, and doing this is pretty low risk for issues and reduces future confusion.

#18
kevL

kevL
  • Members
  • 4 052 messages
done & done *hic*

#19
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages
Line 83
kinc_trade_system.NSS ( campaign script for SOZ )

int ProcessCompanyIncome();

should be

void ProcessCompanyIncome();

Prototype does not match implementation...

#20
Dann-J

Dann-J
  • Members
  • 3 161 messages
[Deleted]

Modifié par DannJ, 12 janvier 2012 - 09:42 .


#21
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages

DannJ wrote...

I've run into some trouble with ActionEquipItem(). It seems to refuse to equip a two-handed weapon into INVENTORY_SLOT_RIGHTHAND (I also tried _LEFTHAND) unless the creature has the 'Monkey Grip' feat - in which case, it equips it as a one-handed weapon even though the off-hand is empty.

The creature is question had the correct weapon feats, and wasn't a small creature, so it could use the weapon (in this case it was a quaterstaff). The script also identified the weapon prior to equipping it. However the creature also had creature weapons equipped, which might be confusing the function.


Please start a new thread for that. This is for functions that just plain broken and for posting the actual confirmed bug and how it is reproduced. I usually use the dm client to test things, possess the creature and try equipping the item and you probably will get the same issue. Please post response in new thread as the discussion will have to cover a lot of topics.

#22
Dagesh

Dagesh
  • Members
  • 30 messages
I thought I was going crazy or I somehow bugged my module. I'm glad to see that neither is true but disappointed that there are so many broken functions.

Thank you for this list and for the workaround ideas.

#23
kevL

kevL
  • Members
  • 4 052 messages
// Get an integer between 0 and 100 (inclusive) that represents how oSource
// feels about oTarget.
// -> 0-10 means oSource is hostile to oTarget
// -> 11-89 means oSource is neutral to oTarget
// -> 90-100 means oSource is friendly to oTarget
// * Returns -1 if oSource or oTarget does not identify a valid object
int GetReputation(object oSource, object oTarget);

oSource and oTarget seem to be inverted. cf, nwnLexicon

Parameters
oSource
The creature (or object) is the subject of oTarget's feelings.

oTarget
The creature (or object) whose feelings we wish to know.



#24
kevL

kevL
  • Members
  • 4 052 messages
void SetIsTemporaryEnemy(object oTarget, object oSource=OBJECT_SELF,
    int bDecays=FALSE, float fDurationInSeconds=180.0f);

ditto. The description reads, "Make oSource into a temporary enemy of oTarget using personal reputation." It actually makes oTarget into a temporary enemy of oSource, as in

SetIsTemporaryEnemy(oPC, oSource);


nb. SetIsTemporaryFriend/Neutral are likely the same.

#25
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages
Hi,

I have been meaning to add a link to this here for a while ....

AddHenchman game crash fix.

Cheers,

Lance.

Modifié par Lance Botelle, 19 mai 2012 - 08:45 .