Exult Logo
 
Home | Download | Documentation | FAQ | Studio | Screen Shots
Development | Discussion | About Us | Letters | History | Links
 
Exult Discussion
Before posting, make sure you've read the FAQ and searched the message board for previous discussions. When reporting problems/bugs, please include details about your setup (Exult version, OS, sound and video cards).

 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Newer Topic  |  Older Topic 
 changing resurrection location
Author: agentorangeguy (---.146.19.98.dynamic.ip.windstream.net)
Date:   01-17-12 00:34

How would I go about changing the resurrection location of the Avatar from the fellowship shelter? I don't think I was successful in editing the Avatar's usecode for that, it wouldn't work on the death event. Can someone help me figure this out?

Reply To This Message
 
 Re: changing resurrection location
Author: DominusMobile1 
Date:   01-17-12 04:15

When you tested this out, did you finish trinsic?

--
Read the documentation and the FAQ are your friends! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!

Reply To This Message
 
 Re: changing resurrection location
Author: agentorangeguy (---.155.19.98.dynamic.ip.windstream.net)
Date:   01-18-12 22:07

Hmm..... I never thought about that.....it may have been before I manually tripped the flag to allow the winches to work. i'll try again

Reply To This Message
 
 Re: changing resurrection location
Author: Dominus 
Date:   01-18-12 22:16

That was just what came to me on first look. Other than that I can offer no usefull help :(

--
Read the documentation and the FAQ are your friends! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!

Reply To This Message
 
 Re: changing resurrection location
Author: agentorangeguy (---.155.19.98.dynamic.ip.windstream.net)
Date:   01-18-12 22:24

I still keep resurrecting in the fellowship hall in Paws. Here is just a basic code I made, maybe it isn't functioning properly:

void Avatar object# (0x400) ()
{
if (event == DEATH)

	{
	AVATAR->move_object([0x2f8, 0x237, 0x0]);
	return;
	}

}

Reply To This Message
 
 Re: changing resurrection location
Author: Marzo Sette Torres Junior 
Date:   01-19-12 11:37

In BG, the function called when the Avatar dies is not 0x400, and the event is not the same as in SI; instead, it is function 0x60e event 4. You can alter this with a custom avatar_data.txt file, but you would need to manually call the old function instead of being able to use the .original syntax.

------
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
How To Ask Questions The Smart Way

Reply To This Message
 
 Re: changing resurrection location
Author: agentorangeguy (---.155.19.98.dynamic.ip.windstream.net)
Date:   01-21-12 01:10

I wouldn't know the first thing to do in that case. How would I go about doing that?

Reply To This Message
 
 Re: changing resurrection location
Author: Marzo Sette Torres Junior 
Date:   01-21-12 12:16

Calling the old function using .original or shipping a custom avatar_data.txt?

If the former, then it goes like this:
void AvatarFun object#(0x60E) ()
{
    // code goes here
    if (x == true)    // Some random condition
        AvatarFun.original();    // Calls the original function from BG
}


As for the latter: you create a text file called "avatar_data.txt" in the same directory as your mod's other data (shapes.vga, usecode, etc.). In this file, you paste the following:
%%section usecode_info
#Format
#	:type/function/event
#type is one of:
#	0 for death usecode
#function is either, the function number or :functionname
#event is the event id to use or -1 if event is not important
:0/0x60e/4
%%endsection

You replace 0x60e by the name (prepended with ':') or number of the function you want to call (in your case, either ':Avatar' or '0x400', without the single quotes); the function must be declared as object# or shape#. The '4' is the event number; to make it consistent with the si_tournament, you should swap it with a '7'.

Going this route means that you can't call the old function with the .original syntax I mention above; instead, you would have to do something like this:
extern void OldAvatar object#(0x60e) ();

void Avatar shape#(0x400) ()
{
    // Code goes here
    if (x == true)    // Some random condition
    {
        event = 4;    // The old function only works for death with this event
        OldAvatar();    // Call the original function from BG
    }
}


------
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
How To Ask Questions The Smart Way

Reply To This Message
 
 Re: changing resurrection location
Author: agentorangeguy (---.18.190.173.dynamic.ip.windstream.net)
Date:   01-21-12 17:00

Ok, let me make sure I state exactly what I need and if I'm following you correctly.

When the Avatar dies, I need a few things to happen:

-fade to black
-probably the normal 'death music'
-all nearby party resurrected
-all party healed
-teleported to LB's throne room (coords 0x3a7, 0x42f, main map, on my mod)
-unfade from black

So, one question I have is, if I go with the avatar_data.txt route, do I still need to make a seperate code, say 'avatar.uc' that calls the 'void Avatar shape(0x400)' function and make it 'if (event == DEATH)' as I tried in my original code?

Also, will I have to manually 're-create' what happens when the Avatar resurrects, as I mentioned in my above list? I've probably made this more confusing than it actually is lol

Reply To This Message
 
 Re: changing resurrection location
Author: Marzo Sette Torres Junior 
Date:   01-21-12 21:07

Yes to all.

------
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
How To Ask Questions The Smart Way

Reply To This Message
 Go to Top  |  Go to Topic  |  Threaded View   Newer Topic  |  Older Topic 


 
 Reply To This Message
 Your Name:
 Your E-mail:
 Subject:
 Subject:
   
 
SourceForge   phorum.org
 
Problems with Exult or this webpage? Contact us.
Last modified: 24 Oct 2001(GMT)