ucxtread.txt
来自「一个制作3d游戏的源程序」· 文本 代码 · 共 747 行 · 第 1/3 页
TXT
747 行
*/ "ChangeNPCStat", /* 21 */ /* AvatarNPCID() - returns Avatar's NPC ID */ "AvatarNPCID", /* 22 */ /* GetPartyMembers() - returns the array of NPCs which are party members currently */ /* ??? NPC IDs returned??? */ "GetPartyMembers", /* 23 */ /* CreateItem(Type) - creates an item of given Type, returns itemref Must be followed by SetItemFrame()??? */ "CreateItem", /* 24 */ NULL, /* 25 */ NULL, /* 26 */ /* GetNPCName(npc_id_or_array) - returns an NPC name by NPC ID Returns an array of names if array was specified */ "GetNPCName", /* 27 */ /* Counts the amount of party gold if called as Func28(-357, 644, -359, -359) 644 is for sure the Type of gold heap 649 is for sure the Type of serpent venom 839 for hourglass Last parameter seems to be the frame number of the items - -359 means "any" */ "CountNoItems", /* 28 */ /* Returns itemref of the given item in Avatar's (or party's??? - parameter 4???) posessions 0 if no such item Func28(-357, 761, -359, -359) - spellbook. Func28(-357, 839, -359, 0) - Nicodemus's hourglass (known as Hourglass Of Fate in SI). */ "ReturnItemsItemRef", /* 29 */ /* GetContainerItems(container_itemref, type, quality, ???) - returns an array */ /* ??? of itemrefs */ "GetContainerItems", /* 2a */ /* Reduces the amount of party gold if called Func2b(delta, 644, -359, -359, true) Reduces the amount of party eggs if called Func2b(delta, 377, -359, 24, true) */ "ReduceNoItems", /* 2b */ /* Increases the amount of party gold if called Func2c(delta, 644, -359, -359, true) Returns false if party is overloaded & cannot accept this */ "IncreaceNoItems", /* 2c */ /* Not used at all */ NULL, /* 2d */ /* PlayMusic(song#, itemref) - plays a MIDI music track. */ /* Song# = 255 means - mute the MIDI channel. */ "PlayMusic", /* 2e */ /* IsNPCInParty(npc_id) - returns true if given NPC is in party, */ /* otherwise returns false */ "IsNPCInParty", /* 2f */ /* Takes a Type(???), returns an array of all visible items/NPCs of this type */ NULL, /* 30 */ /* IsNPCxxx(itemref) - returns true if given NPC is ????? */ NULL, /* 31 */ /* DisplaySign(gump#, array_of_strings) - displays a sign/plaque */ /* of given gump number & given text (array of strings or single string). */ "DisplaySign", /* 32 */ /* ItemSelectModal() - switches the engine to cross-cursor "use" mode. Returns an itemref of the item selected by user by single-click. Does not return till user will single-click on something. The entity returned can be treated as array with coords at array[2], array[3] */ "ItemSelectModal", /* 33 */ /* Not used at all */ NULL, /* 34 */ /* ItemsNearItem(itemref, type, distance, ???) - returns an array of items of given Type which are closer then Distance to the item specified by Itemref Parameter 4 is possibly frame number to compare??? Type of -1 means - all NPC??? (Fear spell) (Powder keg & cannon ball near the cannon) */ "ItemsNearItem", /* 35 */ /* Takes an NPCID as a single parameter, seems to return the amount of free space in its inventory */ NULL, /* 36 */ NULL, /* 37 */ /* GetTimeHour() - returns hour part of current game time - 0-23 */ "GetTimeHour", /* 38 */ /* GetTimeMinute() - returns minute part of current game time - 0-59 */ "GetTimeMinute", /* 39 */ /* GetItemRef(NPCID) - returns Itemref from NPCID - possibly does-nothing function??? */ "GetItemRef", /* 3a */ NULL, /* 3b */ /* GetNPCxxx(NPCID) - returns the same??? NPC mode as set in function 3d */ NULL, /* 3c */ /* SetNPCxxx(NPCID, mode) - ???sets some NPC mode often called with mode=2 before entering combat ???alignment */ NULL, /* 3d */ /* TeleportItem(itemref, array) - teleports an NPC array[1] - X coord array[2] - Y coord array[3] - height Help spell calls this with (3a8, 47a, 0) array - LB throne room Recall spell calls this with (5aa, 500, 0) array (House of the Dead) - in some cases. Also interesting location - (217, 489, 0) - back from the Sphere. Function 6cf teleports there is Sphere is not destroyed & party does not posesses item 0x347 (the hourglass, maybe parameter 4 in 0x28 checks the Frame number to check whether the hourglass is enchanted??? BTW - there is a known bug in BG that sometimes you can enter the Sphere with non-enchanted hourglass - cause???) What are these locations? */ "TeleportItem", /* 3e */ /* VanishNPC(NPCID) - only parameter is NPCID, no return value Called in eventid 2 for the plaque - never mind what - and NPC -23 (LB) - plaque falling on LB's head Called on Weston (-69) when LB frees him Called on Batlin (GetNPCID(-26)) when he vanishes, feeling the Cube at Avatar's posession Called on -214 in Vesper - when Yvella want to tell Catherine's father & Mara something.... Called on Kreg/Kraig(-245) after he laughs when invis. potion is given to him Called on Addom (-164) after Brion attaches to crystal & completes the orrery viewer Called on -156 (Balayna???) when Rankin says he did not see Balayna for some time Called on all Scara Brae ghosts in For Each loop when Forsythe jumps into the Well The exact logic is not clear - what appears with the vanished NPC? Where it is teleported??? */ "VanishNPC", /* 3f */ /* ItemSay(itemref, str) - displays a string on the screen near the specified item */ "ItemSay", /* 40 */ NULL, /* 41 */ /* GetItemZCoord(itemref) - returns Z coordinate of the item */ "GetItemZCoord", /* 42 */ /* SetItemZCoord(itemref, coord) - sets a Z coordinate for the item */ "SetItemZCoord", /* 43 */ /* GetWeather() - returns current weather - 0-3 3 seems to negate magic */ "GetWeather", /* 44 */ /* SetWeather(weather) - sets new current weather - 0-3 */ "SetWeather", /* 45 */ NULL, /* 46 */ /* SummonCreature(Type, boolean) - engine under Kal Bet Xen (Swarm), Kal Xen (???) an Kal Vas Xen (Summon). Summons a creature of given Type. Second parameter is true only for Kal Vas Xen Return value??? */ "SummonCreature", /* 47 */ /* Shows a map of Britannia. Double-click on the map, Vas Wis (Peer) spell or reading the Brommer's Britannia book */ "ShowMap", /* 48 */ /* KillNPC(itemref) - kills the given NPC. Owen's suicide is this function alone. Plaque falling on LB's head - KillNPC, then VanishNPC. Balayna takes the vial from you & dies - this function alone Death bolt spell uses it too. These are all occurences. */ "KillNPC", /* 49 */ /* Some kind of comparing 2 numbers (2 params) - returns boolean Used to compare somebody' Strength to item's Quality */ "???", /* 4a */ /* SetNPCAttackMode(NPCID, mode) - sets a combat mode for the NPC Mode 7 is Fleeing - others are in men Fear spell, using dirty diapers on people (it is the same as Fear spell) - mode 7 LB attacking in an LB cheat room - mode 0 */ "SetNPCAttackMode", /* 4b */ /* SetTargetNPCToAttack(attacker_NPCID, target_NPCID) - sets target NPC to attack ??? how it is called in a cheat menu? Usually called with Avatar as target NPC */ "SetTargetNPCToAttack", /* 4c */ /* CloneNPC(NPCID) - clones an NPC - Clone spell Returns something - return value never used. */ "CloneNPC", /* 4d */ /* Not used at all */ NULL, /* 4e */ /* ShowCrystalBall(coords_array) - shows a crystal ball view of a given world point */ "ShowCrystalBall", /* 4f */ /* ShowWizardEye(parm1, parm2) - shows a view for telescope or Wizard Eye spell For telescope - ShowWizardEye(10000, 1000) For Wizard Eye spell - ShowWizardEye(45, 200) */ "ShowWizardEye", /* 50 */ /* ResurrectNPC(itemref) - resurrects an NPC. Itemref is a dead body's itemref Returns false is cannot resurrect - LB in this case says "Alas..." and then about burial. ???what is the cause of such LB's behaviour? */ "ResurrectNPC", /* 51 */ /* AddSpellToBook(spellnum, 0, spellbook_itemref) - Adds a new spell to the spellbook Returns false if there was already such spell in the book Maybe calling with 1 (never called such in BG) will remove the spell from the book? */ "AddSpellToBook", /* 52 */ /* ExecuteSprite(sprite, coordx, coordy, speedx, speedy, ???, ???) - executes an explosion-like sprite First parameter is sprite number in SPRITES.VGA speedx & speedy are non zero is the sprite floats away (smoke from smokebomb) Last parameters is usually -1 (not so for smokebomb) */ "ExecuteSprite", /* 53 */ /* Powder keg burst??? */ NULL, /* 54 */ /* DisplayBook(itemref) - Displays book or scroll Text will be displayed further by "say" opcode */ "DisplayBook", /* 55 */ /* StopTime(???) - freezes all NPCs for some time. Parameter is duration???? Type 6be object (Egg???) calls this with its Quality as a parameter on eventid 3 Also called in Stop Time spell with the parameter 100 */ "StopTime", /* 56 */ /* CauseLight(duration) - Glimmer/Light/Great Light spell logic duration is 110 for Glimmer, 500 for Light, 5000 for Great Light */ "CauseLight", /* 57 */ /* itemref as a parameter, returns some boolean... ???NPC is on barge At least true return from this blocks Mark spell - even mantra is not shouted */ "???", /* 58 */ /* CauseEarthquake(???) - causes an earthquake. Parameter is 40 for Armageddon spell & variable for Tremor spell Also called from func 85e (Forsythe jumping in the Well of Souls) - with parameter 15 */ "CauseEarthquake", /* 59 */ /* IsPlayerFemale() - returns 0 if male, 1 if female */ "IsPlayerFemale", /* 5a */ /* CauseArmageddon() - all logic of Armageddon spell except shouting mantras, weather change, earthquake, & setting the game flag which affects Batlin's & LB's behaviour. Walks through the all NPC list & makes all of the Dead with Hits < 0 Called also in LB's cheat room - "Busted, you thieving...." */ "CauseArmageddon", /* 5b */ /* Sets NPC to some state - like VanishNPC() or KillNPC() */ "???", /* 5c */ /* CauseBlackout() - darken the whole screen for some time */ "CauseBlackout", /* 5d */ /* ArraySize(a) - returns number of elements in the array */ "ArraySize", /* 5e */ /* Something for Mark spell??? */ "???", /* 5f */ /* Called only once, something in a Recall spell
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?