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 
 SI Magical Barges and seats
Author: Donfrow 
Date:   05-14-17 13:38

It seems in my mod the magical barge can be used without having a scroll of the appropriate quality by clicking on the seats (shape 292) instead of the engine. Does the magical barge in SI behave differently than the sail boats? I can click on the seats in a sail boat and it does not let me move the sail boat, though they are the same shape.

I'm thinking my issue stems from lingering SI code in my mod as the magical barge is originally set with usecode flags for use rather than a scroll. I thought flag 236 did this but setting this as true or false does not seem to make a difference.

I also tried setting the seats in the barge to the same quality as the engine but the Avatar can happily sail away as long as the seat is clicked instead of the engine.

Any idea how to have the seats work the same way as the engine with the magical barge in SI?

Thanks

Reply To This Message
 
 Re: SI Magical Barges and seats
Author: Knight Captain 
Date:   05-14-17 14:21

Yes, the magical barges, sail boats, ice raft, and turtle all have different Usecode behind them. There are a few utility functions, but most of the flag-specific stuff is tied to the shapes themselves. The shapeSeat shape#(0x124) has some checks, including for the Quality of the engine. If it is 1, you should see the message about it belonging to Filbercio.

From reading the code a bit deeper, there's some hard coded parts to it. And that's just in the seat code. There's also more code for the engine itself.

Are you having magical barges for sale in your mod?

Reply To This Message
 
 Re: SI Magical Barges and seats
Author: Donfrow 
Date:   05-14-17 14:31

I don't have them for sale but I do have it so that you need to complete a quest before you can use a magical barge. Upon completion of this quest I give a scroll that is the same quality as the engine. This works fine, for the engine.

Since you can click the seats and bypass the engine quality+scroll requirement it lets you move the barge without actually completing the quest. This wouldn't be much of an issue, except it's my way of locking the player onto the main land until I'm ready to let them leave.

Reply To This Message
 
 Re: SI Magical Barges and seats
Author: KC (---.sub-174-199-29.myvzw.com)
Date:   05-14-17 14:40

Does setting gflag 5 make a difference?

What happens if you use a different seat shape? Or even replace the original code with:

void shapeSeat shape#(0x124) ()
{
return;
}

Reply To This Message
 
 Re: SI Magical Barges and seats
Author: Donfrow 
Date:   05-14-17 15:04

gflag 5 made no difference.

I used a different seat shape and the Avatar will sit, but not let it move.

Looks like replacing the seat usecode completely does stop it. Double clicking doesn't allow the Avatar to sit anymore. If I use the engine (with appropriate scroll) the Avatar will still path and sit down, and let it be used.

If I try with a different seat shape and click the engine the Avatar will not path to a seat, so I assume the engine code is specifically looking for shape 292.

Thanks for all your help by the way, you seem to be on top of a bunch of stuff around here!

Reply To This Message
 
 Re: SI Magical Barges and seats
Author: Knight Captain 
Date:   05-15-17 06:14

Thank you. I stand upon the shoulders of giants.

Like the magic wine press, there's hard-coded coordinates in the code, plus the gflags. My early guess is that this was coded before they put the teleporter between the lake island and MageLord's palace.

This will take me longer to untangle than I have available tonight, sadly.

Reply To This Message
 
 Re: SI Magical Barges and seats
Author: Donfrow 
Date:   05-16-17 01:02

Thanks for the code you sent over. Looking at it, I suspect this is my issue:

if ((UI_get_item_quality(engine) == 1) && (!gflags[CAN_USE_FILBERCIOS_BARGE]))
{
partyUttersSameWithFace("This is Filbercio's barge!");
abort;
}
else // Have approval
{
var0001 = Func08E7(item);

Func088D(item, 292);
distance_to_seat = (UI_get_distance(item, AVATAR) + 15);
var0001 = UI_delayed_execute_usecode_array(item, [no_halt, call_usecode, 292], distance_to_seat);
}

I'm guessing in my case, since my engine isn't quality 1, it's always reaching the else statement which near as I can tell is the path to sit down on the seat, and calling the scripted block?

I'm thinking if I were to remove all the code and simply have it a sit down code like any other chair it should work though you would always have to click the barge to move it. I think this would be fine overall, other than mangling the existing seat code for this and possibly breaking the sailboat as they use the same seats.

Is there common code that doesn't call external functions to sit down in a regular chair? I'm thinking a straight copy and paste of that may work if that's the case.

Thanks again for all your help.

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)