cirerrek Posted December 12, 2005 Posted December 12, 2005 From IESDP 140 PUPPETTYPE The image can return true on the following values: 1 = Mislead, 2 = Project Image, 3 = Simulacrum I tested this and PUPPETTYPE does not appear to work as listed. // * Detect Clone IF  CheckStatGT(Myself,0,PUPPETMASTERTYPE)  Global("EK_CloneIdentity","LOCALS",0) THEN  RESPONSE #100  SetGlobal("EK_CloneIdentity","LOCALS",1)  DisplayStringHead(Myself,9292)        // say "Escaped Clone" END // * Detect Mislead IF  CheckStat(Myself,1,PUPPETMASTERTYPE)  Global("EK_CloneIdentity","LOCALS",1) THEN  RESPONSE #100  SetGlobal("EK_CloneIdentity","LOCALS",2)  DisplayStringHead(Myself,8291)        // say "Mislead" END // * Detect Projected Image IF  CheckStat(Myself,2,PUPPETMASTERTYPE)  Global("EK_CloneIdentity","LOCALS",1) THEN  RESPONSE #100  SetGlobal("EK_CloneIdentity","LOCALS",3)  DisplayStringHead(Myself,8296)        // say "Projected Image" END // * Detect Simulacrum IF  CheckStat(Myself,3,PUPPETMASTERTYPE)  Global("EK_CloneIdentity","LOCALS",1) THEN  RESPONSE #100  SetGlobal("EK_CloneIdentity","LOCALS",4)  DisplayStringHead(Myself,26234)        // say "Simulacrum" END Just for grins I tested stats 138, 139, 140, & 141 to see what they returned. Here are the results //----------------------------- // Test 1: 138 PUPPETMASTERID // ---------------------------- // odd result, clones displayed "Escaped Clone" but nothing else //------------------------------- // Test 2: 139 PUPPETMASTERTYPE // ------------------------------ // Mislead - displayed "Escaped Clone and Mislead" // Projected Image - displayed "Escaped Clone and Projected Image" // Simulacrum - displayed "Escaped Clone and Simulacrum" //------------------------- // Test 3: 140 PUPPETTYPE //------------------------- // No effect //----------------------- // Test 4: 141 PUPPETID //----------------------- // No effect So 139 PUPPETMASTERTYPE appears to be the winner here. Thanks,
Avenger Posted December 12, 2005 Posted December 12, 2005 Some explanation: puppetmasterID's did report escaped clone when there was NO clone. (hence ID is 0). The ID is an object ID which is assigned dynamically. It is the so called 'internal object identifier' which falsely was placed among the IDS values, actually the object ID is 2 words (global/local counters) and it is saved near the end of the creature header. The new dltcep shows this value, also IWD2 shows this value ingame at an object dump. The type is set by the appropriate effect opcode. The master gets a puppet tag, and the puppet gets a master tag. (So they are linked together). You should look for puppetmasterID/type in the clone and puppetID/type in the master.
cirerrek Posted December 12, 2005 Author Posted December 12, 2005 Some explanation: puppetmasterID's did report escaped clone when there was NO clone. (hence ID is 0). <{POST_SNAPBACK}> Let me have a quick check for understanding here. From your statement above, you are saying the clone was displaying "Escaped Clone" because its master's ID was greater than 0? That would definitely only make sense if they were linked, because the code in script is checking for Myself.
Avenger Posted December 13, 2005 Posted December 13, 2005 No, i assumed that the script ran on the PC not the clone. And there is no reason to look for a puppetmasterID/type on the PC. In my understanding puppetmasterid/type works on the clone, and puppetid/type works on the PC. But i already wrote this. I also wrote what ID is, it isn't a constant number from the 0-4 interval, it is a 16 bit number which is unique for each cre in the game. The ID is normally nonzero, but if there is no existing referenced object (for example, no clone for a creature) it will be set to zero. I have absolutely no idea how could you get the ID of a creature itself
cirerrek Posted December 13, 2005 Author Posted December 13, 2005 No, i assumed that the script ran on the PC not the clone. And there is no reason to look for a puppetmasterID/type on the PC. I tested the PC here. http://forums.gibberlings3.net/index.php?showtopic=5068 In my understanding puppetmasterid/type works on the clone, and puppetid/type works on the PC. But i already wrote this. Stat wise, 139 PUPPETMASTERTYPE works for the clone 140 PUPPETTYPE works for the caster I also wrote what ID is, it isn't a constant number from the 0-4 interval, it is a 16 bit number which is unique for each cre in the game.The ID is normally nonzero, but if there is no existing referenced object (for example, no clone for a creature) it will be set to zero. That is some cool info. Thanks for sharing that. I have absolutely no idea how could you get the ID of a creature itself I agree. Could the number be interpreted by the engine in some other manner such as a Scriptname or Death Variable? Thanks,
Avenger Posted December 13, 2005 Posted December 13, 2005 Actually, you can see the ID in a saved creature, dltcep shows it as 'internal object identifier iwd2'. But this identifier confirmedly works in all IE games. It is just that iwd2 shows this ID when you hit ctrl-m on a creature. Btw, the ID consists of 2 16 bits word. A global and a local (in an area). I don't know which ID is used here.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.