Issues with making a creature companion

Post » Fri May 27, 2011 9:56 pm

Hey there, I'm having issues making my own custom creature companion. I have the topic setup properly for the dialog menu that happens to be very simple at this point but every time I click one of the 3 options the menu just reopens its self, stuck in a loop. The dialog options are as follow... So what am I missing here? I have looked at a dialog tutorial... As for the purpose I'm doing this to help my self learn how to make companions from scratch, as well as add a lesser version of some "god" characters as companions after they've been defeated in battle, they would also respawn by a leveled list in only 1 location. I also wondered what it would look like to see some of the qoute bosses battle other expansion monsters etc..

ID Almalexia_Companion

Follow me on my journey?

Choice "Come join me" 1 "Wait here for a time" 2 "Nevermind" 3
_____________________
ID Almalexia_Companion

Yes, on my way!

Function choice 1

AIFollow "Player" 0 0 0 0
_____________________
ID Almalexia_Companion

Wait here for a while!

Function Choice 2

AiWander 128 6 0 40 30 20 0 0 0 0 0 0

_____________________
ID Almalexia_Companion

Never-mind

Function choice 3

Goodbye
User avatar
Taylor Bakos
 
Posts: 3408
Joined: Mon Jan 15, 2007 12:05 am

Post » Fri May 27, 2011 10:10 pm

Your dialogs are listed in the wrong order the answer must be above the question. Dialog is read from the top down and the 1st true reply is used. Since "Follow me on my journey?" is highest it will be displayed. When the player makes a choice the dialog check starts back at the top and comes to "Follow me on my journey?" which is still true so the same dialog is repeated.
User avatar
Kelli Wolfe
 
Posts: 3440
Joined: Thu Aug 23, 2007 7:09 am

Post » Sat May 28, 2011 8:55 am

Oh, thanks. Is there a way to move the dialog pieces so they are in the correct order? Do I need to delete the responses and start over?

Added a bit later:

Ok never mind the above part of the post =P figured it out.
User avatar
Luis Reyma
 
Posts: 3361
Joined: Fri Nov 02, 2007 11:10 am

Post » Sat May 28, 2011 6:45 am

Thanks for the info there Nicholiathan, they're responding like they are supposed to now. I have both Vivec and Almalexia in the game they can follow hand around somewhere or cancel out of the command menu with the never mind topic. Now to work on the rest of it. :)
User avatar
Sweet Blighty
 
Posts: 3423
Joined: Wed Jun 21, 2006 6:39 am

Post » Fri May 27, 2011 8:43 pm

I've hit another issue, I've been expanding the dialog options and all works accept for one part. When getting the companion to levitate the levitate ability works accept for the glaring issue of it not adjusting height to match the players, other wise it follows me fine.

Is there an explanation somewhere as to how other companion mods get the companions to keep the same height as the player when levitate is active on said companion?

As for one dialog options I added that work, disabling/ removing ranged aoe attack's for almalexia for when around friendly npc's then reactivating it, and water walking and swimming speed boost's with removing effects and turning them back on or canceling out of the dialog if you changed your mind. Soon options for the companion to "travel a head of you" in-order to meet you in another spot in a main great house city. The ability of the vivec companion to meet you in mournhold, maybe clock work city could be kinda fun and helpful. I'm toying of the idea of the meeting locations being inns or temples but sadrith mora could be an issue for the temple cell with all the twisting hallways (as well as canceling out of the travel menu if you changed your mind).
User avatar
Adam Kriner
 
Posts: 3448
Joined: Mon Aug 06, 2007 2:30 am

Post » Sat May 28, 2011 10:52 am

Is there an explanation somewhere as to how other companion mods get the companions to keep the same height as the player when levitate is active on said companion?
if ( GetFlying > 0 )   ; flying	if ( player->GetEffect sEffectLevitate ) ; player flying		float z1		set z1 to ( player->GetPos Z )   ; player vertical position		set z1 to ( z1 + 15 )   ; a little higher is usually better		SetPos Z z1 	endifendif
You can probably just test every few frames/seconds, for instance
float t1if ( t1 < 3 )	set t1 to ( t1 + GetSecondsPassed )else	set t1 to 0	if ( GetFlying > 0 )		if ( player->GetEffect sEffectLevitate )			float z1			set z1 to ( player->GetPos Z )			set z1 to ( z1 + 15 )			SetPos Z z1		endif	endifendif
You will probably have similar problem/solution diving
[EDIT] added float z1
User avatar
Jason White
 
Posts: 3531
Joined: Fri Jul 27, 2007 12:54 pm

Post » Sat May 28, 2011 11:17 am

if ( GetFlying > 0 )   ; flying	if ( player->GetEffect sEffectLevitate ) ; player flying		float z1		set z1 to ( player->GetPos Z )   ; player vertical position		set z1 to ( z1 + 15 )   ; a little higher is usually better		SetPos Z z1 	endifendif
You can probably just test every few frames/seconds, for instance
float t1if ( t1 < 3 )	set t1 to ( t1 + GetSecondsPassed )else	set t1 to 0	if ( GetFlying > 0 )		if ( player->GetEffect sEffectLevitate )			float z1			set z1 to ( player->GetPos Z )			set z1 to ( z1 + 15 )			SetPos Z z1		endif	endifendif
You will probably have similar problem/solution diving
[EDIT] added float z1


Thank you for the above info, companions are adjusting height to match the player now. :) I've also made another adaptation for it which is rather useful in Sotha Sil, the alteration skill jump spell... helps me get Vivec threw the traps with out killing him but my adaptation is a bit klunky...

if ( vivec_god_companion->GetEffect sEffectJump )
if ( player->GetEffect sEffectJump ) ; player alt jumping
float x1
float y1
float z1
set x1 to ( player->GetPos X ) ; east positive to west negative
set x1 to ( x1 + -1 )
SetPos X x1
set y1 to ( player->GetPos Y ) ;north positive south negative
set y1 to ( y1 + -1 )
SetPos Y y1
set z1 to ( player->GetPos Z ) ; player vertical position
set z1 to ( z1 + 15 ) ; a little higher is usually better
SetPos Z z1
endif
Endif


Only other strange issue I've ran into thus far is a graphics glitch of sorts... Almalexia when using the travel dialog commands sometimes leaves a ghost image above her positioncell coordinates on loading the cell she was moved into. It vanishes when you save and reload the game but it looks kinda icky to have either a "flat black" Almalexia floating motionless or even when full textures is displayed of that ghost image. I'm guessing it may be due to something with the Almalexia mesh replacer by "Plangkye and others" I'm using as the Vivec replacer 1.1 by Psymoniser doesn't do this. I'm not planing on including those above mentioned visual replacers just saying what exact one seemed to have issues.

Other then that I can't tell the companions to teleport just after killing the Almalexia warrior or the game crashes. I have to leave them behind in the dome use the ring then use the ring to get back to the dome then I can safely tell them to move. I guess I'll be seeing about having them and their respawning from their own leveled list at only one point (their own personal leveled list at one location each) be disabled untill their original counterparts death in game after the player kills them which is optional for Vivec... Getting the Almalexia companion is a given any way, as for now Almalexia must be killed for the tribunal main quest to be completed.

As for getting this to happen I may be looking at the Bloodmoon's scripts for werewolf spawns, I remember seeing talk of them being scripted to only appear during the Bloodmoon main quest and vanish after.
User avatar
Kayla Bee
 
Posts: 3349
Joined: Fri Aug 24, 2007 5:34 pm

Post » Fri May 27, 2011 8:39 pm

Well I've tried searching the list of scripts to find what disables the werewolf spawns till the Bloodmoon main quest gets started are re disables them and I can't seem to find it. If anyone could point me to the name of the script that handles werewolves being disabled and enabled I'd appreciate it. :)
User avatar
Sharra Llenos
 
Posts: 3399
Joined: Wed Jan 17, 2007 1:09 pm


Return to III - Morrowind