changing resurrection location
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
-
- Posts: 565
- Joined: Thu May 14, 2020 1:34 pm
changing resurrection location
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?
-------------------------------------------------------------------------------------
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/
Re: changing resurrection location
When you tested this out, did you finish trinsic?
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
-
- Posts: 565
- Joined: Thu May 14, 2020 1:34 pm
Re: changing resurrection location
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
-------------------------------------------------------------------------------------
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/
Re: changing resurrection location
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! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
-
- Posts: 565
- Joined: Thu May 14, 2020 1:34 pm
Re: changing resurrection location
I still keep resurrecting in the fellowship hall in Paws. Here is just a basic code I made, maybe it isn't functioning properly:
Code: Select all
void Avatar object# (0x400) ()
{
if (event == DEATH)
{
AVATAR->move_object([0x2f8, 0x237, 0x0]);
return;
}
}
-------------------------------------------------------------------------------------
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/
Re: changing resurrection location
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
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
-
- Posts: 565
- Joined: Thu May 14, 2020 1:34 pm
Re: changing resurrection location
I wouldn't know the first thing to do in that case. How would I go about doing that?
-------------------------------------------------------------------------------------
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/
Re: changing resurrection location
Calling the old function using .original or shipping a custom avatar_data.txt?
If the former, then it goes like this:
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:
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:
If the former, then it goes like this:
Code: Select all
void AvatarFun object#(0x60E) ()
{
// code goes here
if (x == true) // Some random condition
AvatarFun.original(); // Calls the original function from BG
}
Code: Select all
%%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
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:
Code: Select all
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
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
-
- Posts: 565
- Joined: Thu May 14, 2020 1:34 pm
Re: changing resurrection location
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
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
-------------------------------------------------------------------------------------
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/
Re: changing resurrection location
Yes to all.
------
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]