Jump to content

making a clone of the PC


Recommended Posts

Is this possible? I vaguely recall that if you create a Simulacrum of someone, the simulacrum has no script name by which to refer to it. 

I would like to create an NPC that. matches the PC - race, sex, hair/skin color… well hat’s really it. The same sprite, basically. I guess this is done in Durlag’s Tower, and in Spellhold, and in the ToB spirit temple… does anyone know if I can generate such a clone without showing the cloning process, and have it appear in a different area?

Or maybe better to cheat? Just have a bunch of different .CRE files, and have the area script check Charname’s race and sex, and spawn the most appropriate NPC?

What about the BG2 dream sequence where dream-Charnane blasts the vampire/lich/pit fiend? Does anyone know if that sprite matches Charname’s?

I don’t have a computer handy to look at those cut scenes, but if anyone has advice, it is appreciated. 

Link to comment

Here is how the second pocket plane trial does cloning the player:

 

Spoiler
IF
	Global("BeginChallenge2","GLOBAL",1)
	GlobalGT("Bhaal25Dream1","GLOBAL",0)
	OR(2)
		Race(Player1,HUMAN)
		Race(Player1,HALFORC)
	Gender(Player1,MALE)
THEN
	RESPONSE #100
		SetGlobal("BeginChallenge2","GLOBAL",2)
		SetGlobal("OpenDoor5","AR4500",0)  // Pocket Plane
		StartCutSceneMode()
		StartCutScene("cutch2a")
END

IF
	Global("BeginChallenge2","GLOBAL",1)
	GlobalLT("Bhaal25Dream1","GLOBAL",1)
	OR(2)
		Race(Player1,HUMAN)
		Race(Player1,HALFORC)
	Gender(Player1,MALE)
THEN
	RESPONSE #100
		SetGlobal("BeginChallenge2","GLOBAL",2)
		SetGlobal("OpenDoor5","AR4500",0)  // Pocket Plane
		StartCutSceneMode()
		StartCutScene("cutch2b")
END

IF
	Global("BeginChallenge2","GLOBAL",1)
	GlobalGT("Bhaal25Dream1","GLOBAL",0)
	OR(3)
		Race(Player1,HALF_ELF)
		Race(Player1,ELF)
		Race(Player1,TIEFLING)
	Gender(Player1,MALE)
THEN
	RESPONSE #100
		SetGlobal("BeginChallenge2","GLOBAL",2)
		SetGlobal("OpenDoor5","AR4500",0)  // Pocket Plane
		StartCutSceneMode()
		StartCutScene("cutch2c")
END

IF
	Global("BeginChallenge2","GLOBAL",1)
	GlobalLT("Bhaal25Dream1","GLOBAL",1)
	OR(3)
		Race(Player1,HALF_ELF)
		Race(Player1,ELF)
		Race(Player1,TIEFLING)
	Gender(Player1,MALE)
THEN
	RESPONSE #100
		SetGlobal("BeginChallenge2","GLOBAL",2)
		SetGlobal("OpenDoor5","AR4500",0)  // Pocket Plane
		StartCutSceneMode()
		StartCutScene("cutch2d")
END

IF
	Global("BeginChallenge2","GLOBAL",1)
	GlobalGT("Bhaal25Dream1","GLOBAL",0)
	OR(2)
		Race(Player1,DWARF)
		Race(Player1,GNOME)
	Gender(Player1,MALE)
THEN
	RESPONSE #100
		SetGlobal("BeginChallenge2","GLOBAL",2)
		SetGlobal("OpenDoor5","AR4500",0)  // Pocket Plane
		StartCutSceneMode()
		StartCutScene("cutch2e")
END

IF
	Global("BeginChallenge2","GLOBAL",1)
	GlobalLT("Bhaal25Dream1","GLOBAL",1)
	OR(2)
		Race(Player1,DWARF)
		Race(Player1,GNOME)
	Gender(Player1,MALE)
THEN
	RESPONSE #100
		SetGlobal("BeginChallenge2","GLOBAL",2)
		SetGlobal("OpenDoor5","AR4500",0)  // Pocket Plane
		StartCutSceneMode()
		StartCutScene("cutch2f")
END

IF
	Global("BeginChallenge2","GLOBAL",1)
	GlobalGT("Bhaal25Dream1","GLOBAL",0)
	Race(Player1,HALFLING)
	Gender(Player1,MALE)
THEN
	RESPONSE #100
		SetGlobal("BeginChallenge2","GLOBAL",2)
		SetGlobal("OpenDoor5","AR4500",0)  // Pocket Plane
		StartCutSceneMode()
		StartCutScene("cutch2g")
END

IF
	Global("BeginChallenge2","GLOBAL",1)
	GlobalLT("Bhaal25Dream1","GLOBAL",1)
	Race(Player1,HALFLING)
	Gender(Player1,MALE)
THEN
	RESPONSE #100
		SetGlobal("BeginChallenge2","GLOBAL",2)
		SetGlobal("OpenDoor5","AR4500",0)  // Pocket Plane
		StartCutSceneMode()
		StartCutScene("cutch2h")
END

IF
	Global("BeginChallenge2","GLOBAL",1)
	GlobalGT("Bhaal25Dream1","GLOBAL",0)
	OR(2)
		Race(Player1,HUMAN)
		Race(Player1,HALFORC)
	Gender(Player1,FEMALE)
THEN
	RESPONSE #100
		SetGlobal("BeginChallenge2","GLOBAL",2)
		SetGlobal("OpenDoor5","AR4500",0)  // Pocket Plane
		StartCutSceneMode()
		StartCutScene("cutch2i")
END

IF
	Global("BeginChallenge2","GLOBAL",1)
	GlobalLT("Bhaal25Dream1","GLOBAL",1)
	OR(2)
		Race(Player1,HUMAN)
		Race(Player1,HALFORC)
	Gender(Player1,FEMALE)
THEN
	RESPONSE #100
		SetGlobal("BeginChallenge2","GLOBAL",2)
		SetGlobal("OpenDoor5","AR4500",0)  // Pocket Plane
		StartCutSceneMode()
		StartCutScene("cutch2j")
END

IF
	Global("BeginChallenge2","GLOBAL",1)
	GlobalGT("Bhaal25Dream1","GLOBAL",0)
	OR(3)
		Race(Player1,HALF_ELF)
		Race(Player1,ELF)
		Race(Player1,TIEFLING)
	Gender(Player1,FEMALE)
THEN
	RESPONSE #100
		SetGlobal("BeginChallenge2","GLOBAL",2)
		SetGlobal("OpenDoor5","AR4500",0)  // Pocket Plane
		StartCutSceneMode()
		StartCutScene("cutch2k")
END

IF
	Global("BeginChallenge2","GLOBAL",1)
	GlobalLT("Bhaal25Dream1","GLOBAL",1)
	OR(3)
		Race(Player1,HALF_ELF)
		Race(Player1,ELF)
		Race(Player1,TIEFLING)
	Gender(Player1,FEMALE)
THEN
	RESPONSE #100
		SetGlobal("BeginChallenge2","GLOBAL",2)
		SetGlobal("OpenDoor5","AR4500",0)  // Pocket Plane
		StartCutSceneMode()
		StartCutScene("cutch2l")
END

IF
	Global("BeginChallenge2","GLOBAL",1)
	GlobalGT("Bhaal25Dream1","GLOBAL",0)
	OR(2)
		Race(Player1,DWARF)
		Race(Player1,GNOME)
	Gender(Player1,FEMALE)
THEN
	RESPONSE #100
		SetGlobal("BeginChallenge2","GLOBAL",2)
		SetGlobal("OpenDoor5","AR4500",0)  // Pocket Plane
		StartCutSceneMode()
		StartCutScene("cutch2m")
END

IF
	Global("BeginChallenge2","GLOBAL",1)
	GlobalLT("Bhaal25Dream1","GLOBAL",1)
	OR(2)
		Race(Player1,DWARF)
		Race(Player1,GNOME)
	Gender(Player1,FEMALE)
THEN
	RESPONSE #100
		SetGlobal("BeginChallenge2","GLOBAL",2)
		SetGlobal("OpenDoor5","AR4500",0)  // Pocket Plane
		StartCutSceneMode()
		StartCutScene("cutch2n")
END

IF
	Global("BeginChallenge2","GLOBAL",1)
	GlobalGT("Bhaal25Dream1","GLOBAL",0)
	Race(Player1,HALFLING)
	Gender(Player1,FEMALE)
THEN
	RESPONSE #100
		SetGlobal("BeginChallenge2","GLOBAL",2)
		SetGlobal("OpenDoor5","AR4500",0)  // Pocket Plane
		StartCutSceneMode()
		StartCutScene("cutch2o")
END

IF
	Global("BeginChallenge2","GLOBAL",1)
	GlobalLT("Bhaal25Dream1","GLOBAL",1)
	Race(Player1,HALFLING)
	Gender(Player1,FEMALE)
THEN
	RESPONSE #100
		SetGlobal("BeginChallenge2","GLOBAL",2)
		SetGlobal("OpenDoor5","AR4500",0)  // Pocket Plane
		StartCutSceneMode()
		StartCutScene("cutch2p")
END

 

 

Link to comment

This is how it's done in the Spellhold Irenicus encounter:

Spoiler
IF
  See(NearestEnemyOf(Myself))
  Global("AsylumPlot","GLOBAL",54)
  Global("Sim","LOCALS",0)
THEN
  RESPONSE #100
    CloseDoor("Door11")
    Lock("Door11")
    ForceSpell(Myself,DO_NOTHING)  // SPIN905.SPL (No such index)
    DisplayString(Myself,48812)  // Spawn Clones
    CreateVisualEffectObject("SPPROIMG",Player1)
    CreateVisualEffectObject("SPPROIMG",Player2)
    CreateVisualEffectObject("SPPROIMG",Player3)
    CreateVisualEffectObject("SPPROIMG",Player4)
    CreateVisualEffectObject("SPPROIMG",Player5)
    CreateVisualEffectObject("SPPROIMG",Player6)
    Wait(2)
    CreateCreatureObjectCopy("jclone01",Player1,0,0,0)  // Calahan
    CreateCreatureObjectCopy("jclone01",Player2,0,0,0)  // Calahan
    CreateCreatureObjectCopy("jclone01",Player3,0,0,0)  // Calahan
    CreateCreatureObjectCopy("jclone01",Player4,0,0,0)  // Calahan
    CreateCreatureObjectCopy("jclone01",Player5,0,0,0)  // Calahan
    CreateCreatureObjectCopy("jclone01",Player6,0,0,0)  // Calahan
    MoveToPoint([937.976])
    SetGlobal("Sim","LOCALS",1)
END

 

There are actually two different clone actions:

CreateCreatureObjectCopy(S:ResRef*,O:Object*,I:Usage1*,I:Usage2*,I:Usage3*)
CreateCreatureCopyPoint(S:ResRef*,O:Object*,P:Dest*)

The second variant is probably more useful since you can simply choose a coordinate outside of the current viewport to hide the cloning process.

Link to comment

The dream cutscene (CUT69A through CUT69D) uses CreateCreatureCopyPoint, so that's an actual clone of player 1. That action also assigns a script name, which is used to control the creature in the remainder of the dream.

Note that creating a clone strips scripts from the clone; if you want your clone to do stuff, you need an outside impetus.

Link to comment
Posted (edited)

Thanks all. This is fantastically helpful information and gives me a nice shortcut  between concept and implementation. 

15 hours ago, jmerry said:

The dream cutscene (CUT69A through CUT69D) uses CreateCreatureCopyPoint, so that's an actual clone of player 1. That action also assigns a script name, which is used to control the creature in the remainder of the dream

This should be exactly what I am looking for. I can spawn the clone in a cutscene, in a particular location outside the fog of war, giving the visual impression that it was there already when you enter the area. And then have a script name for use in dialogue and a further cut scene. (This is a blue-circle clone, solely for exposition - not a combat encounter.)

Edited by subtledoctor
Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...