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 
 Usecode for Shapes above 1024?
Author: Knight Captain 
Date:   04-07-17 20:09

This old thread says NPCs must be in the 0x400+ range, but if that's the case, how can I add a new shape with Usecode short of overwriting ones below 1024?

Reply To This Message
 
 Re: Usecode for Shapes above 1024?
Author: DrCode (---.hsd1.or.comcast.net)
Date:   04-08-17 07:21

For higher numbered shapes, you can specify usecode for them using the "#shape(nnnn)" or "#object(nnnn)" directive in a function's definition.

So if you have, say, a piano with shape 0x701, you could write

void piano_function #object(0x701) {
...

Reply To This Message
 
 Re: Usecode for Shapes above 1024?
Author: agentorangeguy 
Date:   04-08-17 12:09

I was actually wondering about that again a few days ago, the npcs thing. NPC's higher than 255(?) or whatever it was, has the 0xffffffff or something that can be deleted and renamed... so i'm assuming you could make a function like "testnpc" which would be like a regular npc conversation, and call it by putting "testnpc" in ES npc window where you can delete the 0xffffff number?

-------------------------------------------------------------------------------------
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/

Reply To This Message
 
 Re: Usecode for Shapes above 1024?
Author: Knight Captain 
Date:   04-08-17 12:20

So void shapeTest shape#(0x405) () would not work?

The maximum number of shapes is 2048 (0-2047) currently, well beyond what mods would need. Or even a combined BG+SI.

Reply To This Message
 
 Re: Usecode for Shapes above 1024?
Author: agentorangeguy 
Date:   04-08-17 12:28

I'm actually up to shape number 1223 with no issues.

If i'm not mistaken, you can actually have more than one shapes.vga file? I've not tried this but seems like it might work.

-------------------------------------------------------------------------------------
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/

Reply To This Message
 
 Re: Usecode for Shapes above 1024?
Author: agentorangeguy 
Date:   04-08-17 12:29

hah dyslexic moment, just realized you said 2048 instead of 1248 :D

-------------------------------------------------------------------------------------
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/

Reply To This Message
 
 Re: Usecode for Shapes above 1024?
Author: Knight Captain 
Date:   04-08-17 12:43

NPCs set to Usecode 0xffffffff use the function connected to their shape. It is possible to change any NPC to use any function, and there is a Usecode intrinsic to do this as well.

Both BG and SI use 0x400-x04FF for the 0-255 NPCs, but did not use the 0x500-0x5FF space much. It looks like this was intended for NPCs 256-355 (0x500-0x563) but largely unimplemented.

So it is possible to assign them in sequence.



But as near as I can tell, there's no reason in a new mod to keep the 0x400-0x563 NPC functions tied to that range.

I hope that I can reimplement the NPCs in a higher range. Usecode seems to allow into several thousand functions. 0x5nnn worked in a quick test earlier.

Reply To This Message
 
 Re: Usecode for Shapes above 1024?
Author: Knight Captain 
Date:   04-08-17 12:45

Only one shapes file can be used, with the mod one acting as a patch on the original file. This is due to the way the shape number is tightly integrated with Usecode.

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)