Page 1 of 2
SI BG Merge
Posted: Wed May 09, 2007 8:50 pm
by Malignant Manor
Paperweight version
This has BG shapes imported into SI. There are 277 shapes added as of now with a few SI repeats to use for BG usecode functions. Right now the items haven't been adjusted. The file is archived in
7z format to dramatically reduce file size. Just add the files to your patch directoy. I hope to edit the shapes within the next few weeks or months so that only the ones that requre usecode to fuction properly will be setup. The usecode functions will propably take me forever to do if I can even do it myself. I plan to implement the BG book and scroll text, deeds required for sailing, BG blackock sword and Rudyom's wand fuctionality, spells that aren't used in SI, and whatever else I can think of that is missing. I forgot to add another sail.
here is a picture of the shapes added. Help would definetly be appreciated.
Re: SI BG Merge
Posted: Fri May 11, 2007 12:37 pm
by Donfrow
Thanks for this! Finally, another child model to use in SI !
Re: SI BG Merge
Posted: Fri May 11, 2007 1:40 pm
by Malignant Manor
I plan to have some more changes soon. I have armor, shield, weapons, and clothing ready to use now as long as that use doesn't require usecode (Black sword talk and teleport function, cannon, black rock and R wand, swamp boot immunity to swamp poison, thats all I can think of offhand. None of the imports have paperdolls yet. The child NPC isn't setup yet. Neither are any of the other NPCs. You can compare it to the other child though and make the necessary adjustments. I haven't tested most of the weapons to verify. I also need to know if there is a sound effect difference between the 2 versions.
SI BG Merge ver 0.05
Re: SI BG Merge
Posted: Fri May 11, 2007 2:08 pm
by SB-X
Is there a way to make the conversion automated?
Re: SI BG Merge
Posted: Fri May 11, 2007 2:32 pm
by Malignant Manor
I hope so, but I don't know of a way. I think it would have to be build into ES when the frame or shape is extracted. Even then the paperdoll and usecode probably wouldn't match up. I think shapes and corresponding corpses are linked threw usecode as well. The equipment list wouldn't match up either. There seems to be a edit button for equipment, but it won't let me change anything. There also seems to be a bug with ES where ammo type doesn't allow a change. I think it happens when you save data from a weapon that doesn't use it. I'm not sure how reproduce able it is.
Sound effects matching is questionable too. Quality flags would be screwed up too. I want to know if there is an easy way to extract and import chunks into ES (win 32). I would like to get the tiles that SI eliminates from BG into the program.
These are just my guesses. I don't really know anything much at all about usecode. I know that imported doors won't function as is. I don't care as much about plot objects, but I definitely want the more common items to be more than just stationary objects.
Re: SI BG Merge
Posted: Fri May 11, 2007 3:17 pm
by Malignant Manor
I am having problems in ES with some shapes saving in-hand offsets. I was thinking earlier that I just forgot to set them. All the weapons are saved properly so it isn't a big deal.
Re: SI BG Merge
Posted: Fri May 11, 2007 5:07 pm
by Skutarth
If you're going to base it off of existing artwork, I suggest looking at the Savage Empire SNES game. It was only released in Japan, and amounted in gameplay similar to the SNES version of Black Gate, but it had U7 style graphics. Email me about it, and I'll send you screenshots.
Re: SI BG Merge
Posted: Fri May 11, 2007 6:10 pm
by SB-X
What?
Re: SI BG Merge
Posted: Fri May 11, 2007 7:04 pm
by marzo
I think shapes and corresponding corpses are linked threw usecode as well.
No, they are linked through a file called "bodies.txt". For BG and SI, they are bundled in their respective flx files in Exult's "data" dir, but a file of the same name (and format) can be placed in the desired "patch" dir.
Re: SI BG Merge
Posted: Fri May 11, 2007 7:56 pm
by Malignant Manor
Thanks Marzo. I found the file and Just have to find what corpse goes to what shape and hope I do everything right.
About this version. I have tested weapons and armor. I cannot equip armor and maybe shields probably because of not having their paperdoll setup. Musket didn't fire ammo (should be quick easy fix). Starbursts didn't appear in paperdoll in most frames (may take awhile. I hope the offset will save correctly).
My progress
I have added a few more items. I've setup all shapes through liche. Lot of usecode functions and needs to be done. I will probably fix what weapons aren't working right without usecode and then setup bodies and paperdolls before finishing shape setup.
Re: SI BG Merge
Posted: Sat May 12, 2007 5:00 am
by marzo
I cannot equip armor and maybe shields probably because of not having their paperdoll setup. [...] Starbursts didn't appear in paperdoll in most frames (may take awhile. I hope the offset will save correctly).
Correct on both cases. The "paperdol_info.txt" (found in the same places as "bodies.txt") is responsible for that (I keep meaning to make ES edit them, but I am lacking the time to do so...).
Re: SI BG Merge
Posted: Sat May 12, 2007 10:15 am
by Malignant Manor
I found all that stuff already but thanks. I actually thought I posted a question about where it and BG paperdolls were located last night, but when I went to post that I found them, I found that it wasn't there. I have them uploaded, but am in the process of implementing them.
Is there a way to do the usecode so that I can get the FoV book to work properly (the one that drops a scroll) when I try to implement it? How do I manually set up extra equipment settings? I can't use the edit button to create new ones. Also how do I set the quality of a dropped it ie. food items for a horse.
Re: SI BG Merge
Posted: Sat May 12, 2007 6:24 pm
by Malignant Manor
SI BG Merge ver 0.51
This new version has new items, all the bodies, shapes, animations and SFX setup correctly (I hope
). I didn't set the offsets for objects that have to be hack moved as there are a whole lot of frames to do with very little to gain. Anything that requires usecode still isn't going to function properly. Horses spawn one food item as I don't know how to set the quality to rib. Bees don't drop stingers.
I don't really know what I to do when it comes to Usecode. I am trying to get the compiler to work so that I can atleast test if things are done correctly. Maybe my brain will work better after some sleep.
Re: SI BG Merge
Posted: Sat May 12, 2007 7:42 pm
by Malignant Manor
I discovered a big problem while testing. Monsters that spawn take the identities of NPC's. If they are friendly or neutral I can talk to them. Does anyone know what is causing this?
Re: SI BG Merge
Posted: Sun May 13, 2007 4:18 am
by Skutarth
Ignore that SE post. Apparently I was on drugs and didn't know which thread I was posting in.
Re: SI BG Merge
Posted: Mon May 14, 2007 12:05 pm
by Malignant Manor
Shape_info.txt is in the patch folder. The only thing that I really tested was explosions and it was broken. I followed the same format as the original (actually I just added to it in the appropriate sections). It seems like it may not like me doing that if this file is talking about Shape_info.txt. If that is the case then sections don't seem correct even in the original file.
stderr.text=
Line #82 has the wrong section name: items != characters
Line #16 has the wrong section name: bodylist != bodyshapes
Line #21 has the wrong section name: shape_sfx != explosions
Line #104 has the wrong section name: usecode_events != animation
shape_info.txt=
# Various shape information for Serpent Isle.
#
# February 6, 2006
#
%%section version
:1
%%endsection
%%section explosions
#Format
# :shapenum/spritenum
#The 'default' explosion is spritenum 5, and may be left out.
:399/13 # Delayed blast
:639/8 # Death Vortex
:554/19 # Burst Arrow
:78/4 # Explosion
:621/4 # Delayed Blast
:702/1 # Cannon
:704/1 # Powder Keg
:565/18 # Starburst
:287/23 # Swordstrike
# SI BG Merge
:1233/18 #Starburst
%%endsection
%%section shape_sfx
#Format
# :shapenum/sfxnum
# SI BG Merge
# Moongates
:1178/77
:1178/77
:1178/77
:1178/77
# Sphere generator
:1225/80
:1226/80
:1227/80
# Tetrahedron generator
:1242/81
:1243/81
:1244/81
# Cube generator
:1125/82
:1125/82
:1125/82
# Black gate
:1247/78
# Vortex cube
:1262/79
# Grandfather clock
:695/116
# Fountains
:1198/36
# end SI BG Merge SFX
# Surf (47 or 49)
:612/49
:613/49
:632/49
:736/49
:737/49
:751/49
:808/49
:834/49
:875/49
:907/49
:911/49
:918/49
:1012/49
:1020/49
:1022/49
# Bubbles (54, 56)
:334/56
:335/56
:780/56
# Fountains
:893/36
%%endsection
%%section animation
#Format
# :shapenum/0/first_frame/frame_count/offset
# SI BG Merge
# Vertical shaft
:862/0/0/1/0
:862/0/1/3/0
# Horizontal shaft
:1215/0/0/1/0
:1215/0/1/3/0
# Sawmill
:1214/0/0/1/0
:1214/0/1/3/0
# End SI BG Merge
#Sundials
# :shapenum/1
#Energy fields
# :shapenum/2
#The dafault animation starts at frame 0, goes through all
#frames and returns to frame 0 again. This list is only for
#animations which are NOT like that.
#For other animation cycles, the animation starts at
#first_frame, goes through frame_count frames (including the
#first one) and returns to first_frame. offset is an overall
#phase shift in the animation. If offset is '%', then Exult
#will calc offset as sframe%frame_count, where sframe is the
#frame with which the animation was created. If offset is
#ommited, Exult will set it equal to sframe.
#
# Sundial
:284/1
# Energy field
:768/2
# Fountain
:153/0/0/6/%
:153/0/6/6/%
:153/0/12/6/%
# Lava
:184/0/0/6/%
:184/0/6/6/%
# Pennant
:222/0/0/6/%
:222/0/6/6/%
:222/0/12/6/%
# Fire
:289/0/0/6/%
:289/0/6/6/%
# Serpent Statue
:305/0/0/6/%
:305/0/6/6/%
# Fountain
:326/0/0/6/%
:326/0/6/6/%
:326/0/12/6/%
# Flux analyzer
:456/0/0/6/%
:456/0/6/6/%
# Magic music player
:614/0/0/6/%
# Planets
:655/0/0/6/%
:655/0/6/6/%
:655/0/12/6/%
:655/0/18/6/%
:655/0/24/6/%
# Grandfather clock
:695/0/0/6/%
:695/0/6/6/%
# Pulsating object
:726/0/0/6/%
:726/0/6/6/%
:726/0/12/6/%
:726/0/18/6/%
:726/0/24/6/%
# statue
:743/0/0/6/%
:743/0/6/6/%
# Severed limb
:794/0/0/6/%
:794/0/6/6/%
:794/0/12/6/%
:794/0/18/6/%
:794/0/24/6/%
# Burning urn
:992/0/0/6/%
:992/0/6/6/%
# Magic wave
:779/0/0/6/1
:779/0/6/6/0
# Bubbles
:335/0/0/6
:335/0/6/7
# Basin
:322/0/0/6
:322/0/6/1
# Basin
:714/0/0/6
:714/0/6/1
%%endsection
%%section usecode_events
#List of which items receive usecode events when readied/unreadied.
:209 # Quest items
:296 # Rings
:701 # Lit torch
:338 # Lit light source
:806 # Black sword
:990 # Erinons Axe
:996 # Belt of Strength
:1001 # Guantlets of Quickness
:1013 # Helm of Light
%%endsection
I also listed a problem about non hostile monsters taking clone identities of NPC's earlier in the thread.
Re: SI BG Merge
Posted: Mon May 14, 2007 1:23 pm
by marzo
First things first: you don't have to include all the information from the original "shape_info.txt" file, only what you are modifying. In your case, the following would suffice:
Code: Select all
%%section version
:1
%%endsection
%%section explosions
#Format
# :shapenum/spritenum
#The 'default' explosion is spritenum 5, and may be left out.
:1233/18 #Starburst
%%endsection
%%section shape_sfx
#Format
# :shapenum/sfxnum
# Moongates
:1178/77
:1178/77
:1178/77
:1178/77
# Sphere generator
:1225/80
:1226/80
:1227/80
# Tetrahedron generator
:1242/81
:1243/81
:1244/81
# Cube generator
:1125/82
:1125/82
:1125/82
# Black gate
:1247/78
# Vortex cube
:1262/79
# Grandfather clock
:695/116
# Fountains
:1198/36
%%endsection
%%section animation
#Format
# :shapenum/0/first_frame/frame_count/offset
#Sundials
# :shapenum/1
#Energy fields
# :shapenum/2
#The dafault animation starts at frame 0, goes through all
#frames and returns to frame 0 again. This list is only for
#animations which are NOT like that.
#For other animation cycles, the animation starts at
#first_frame, goes through frame_count frames (including the
#first one) and returns to first_frame. offset is an overall
#phase shift in the animation. If offset is '%', then Exult
#will calc offset as sframe%frame_count, where sframe is the
#frame with which the animation was created. If offset is
#ommited, Exult will set it equal to sframe.
#
# Vertical shaft
:862/0/0/1/0
:862/0/1/3/0
# Horizontal shaft
:1215/0/0/1/0
:1215/0/1/3/0
# Sawmill
:1214/0/0/1/0
:1214/0/1/3/0
%%endsection
As for the error message/being broken: this is a crlf/lf issue which is being incorrectly handled by Exult; the next snapshot will work correctly, but you can convert your "shape_info.txt" to lf-only in the meantime.
I also listed a problem about non hostile monsters taking clone identities of NPC's earlier in the thread.
This is probably because the NPC's usecode function is a value 'reserved' for the function called when you double-click an item.
Re: SI BG Merge
Posted: Mon May 14, 2007 2:03 pm
by Malignant Manor
I am including the whole file because I plan on making the patch easy to modify for any shape. The added text size is negligable. Thanks for clarifying it though. I thought that was how it worked.
So shapes_info.txt won't work now but will when you fix the bug associated with it?
This is probably because the NPC's usecode function is a value 'reserved' for the function called when you double-click an item.
So how do I go about fixing this. Sorry I really don't know that much about how things function yet. Doing this is how I am learning. This is also my only experience coding so things obvious for a coder are oblivious to me. I basically have to work off of examples.
Re: SI BG Merge
Posted: Mon May 14, 2007 2:34 pm
by marzo
So shapes_info.txt won't work now but will when you fix the bug associated with it?
Like I said, you can convert it to Unix-style line endings and it will work now; you can (e.g.) use
ToFroWin shell extension to do that. Or you can wait for the next snapshot.
So how do I go about fixing this.
Shape functions fall in two categories: "normal" shapes (shape # = 1024). For normal shapes, their function # is equal to the shape #. For high shapes, the function # depends on the version of the compiler used; the most recent compilers generate a table which maps functions declared with "shape#(XXX)"* to the shape XXX. Since your compiler was an older version, it set the function # to be the shape # + 0xC00. It is possible that this problem will go away now that you updated your ucc compiler.
*: I would recommend declaring any functions intended for a shape using the "shape#(XXX)" construct, not only for high shapes; this makes the usecode clearer. Examples (from Keyring mod):
Code: Select all
Key shape#(0x281) ()
{
// usecode goes here
}
Keyring shape#(0x44C) ()
{
// usecode goes here
}
The function number does not need to be in hex; you could just as well have used "shape#(641)" or "shape#(1100)" in the above examples instead.
Re: SI BG Merge
Posted: Mon May 14, 2007 3:48 pm
by Malignant Manor
I tried your fix and it didn't work for me.
Here is an example of what is happening. My horse shape number is 1148.
It seems to be exult studio is automatically assigning a usecode (0x47c [1148] aka Steffano's ? dream npc) to monsters created from an egg that high and it doesn't correspond properly. It happens with and without a usecode file in the patch directory. Problem is when I assign the horse a usecode function, it assigned it to usecode 00000H (Function). I have to manually change the usecode of the NPC the egg creates for it to function properly. I have no way of doing so until after it spawns.
I hope I have explained it well enough for you to be able to figure out what is happening.
Re: SI BG Merge
Posted: Mon May 14, 2007 4:59 pm
by marzo
Problem is when I assign the horse a usecode function, it assigned it to usecode 00000H (Function).
Sorry, I forgot to mention: you must add a line similar to the line below to the start of your usecode code:
You can change 0xA00 to another value, but I don't recommend lowering it (as it might overwrite normal usecode functions).
It seems to be exult studio is automatically assigning a usecode (0x47c [1148] aka Steffano's ? dream npc) to monsters created from an egg that high and it doesn't correspond properly.
Ack. The bug is actually in Exult, but there is indeed a bug; when Exult creates the monster, it assigns the monster's shape as its usecode function (being clearly wrong for high shapes). It will be fixed in the next snapshot.
Re: SI BG Merge
Posted: Mon May 14, 2007 6:33 pm
by Malignant Manor
Do I include "#autonumber 0xA00" under each shape that I add usecode to or do I need to write usecode for every shape that has been added to Shapes.vga?
Re: SI BG Merge
Posted: Mon May 14, 2007 7:10 pm
by marzo
Do I include "#autonumber 0xA00" under each shape that I add usecode to or do I need to write usecode for every shape that has been added to Shapes.vga?
Neither; you add it once at the very top of your usecode file; the usecode you write will be either in this file or in files included by it, so placing it at the very top will affect all functions in the correct way; you can check out the "usecode.uc" file of Keyring, TFL or SI Fixes mods to see it done (I am writing some sort of usecode tutorial, but it will take a while).
Re: SI BG Merge
Posted: Fri May 18, 2007 9:29 pm
by Malignant Manor
SI BG Merge version 6.0
First time I included usecode and bothered to write any documentation.
Well text on scrolls, tombstones, books, plaques, and signs work now. Weapons and armor can be used properly except the cannon (won't fire), Black Sword (won't talk), firedoom staff(won't fire), blackrock (doesn't explode), flaming oil (no damage from usecode), swamp boots (don't protect you from swamps), ring of protection (doesn't have the spell effect of protection). Cloth map is functional. All monsters and NPC properties should be set up. Laurianna needs stats reworked if you want to use her as a PC. Goblins don't have their usecode function (steal?). Bees don't drop a stinger. Horses drop a random food item. All portraits that I know of are included. I fixed the sound effects for the weapons. Double click effects other than than described earlier don't work yet.
Malignant Manor (me)
Made the custom Sherry head that looks more like a funny cartoon raccon dog than a mouse. I liked the way it looked so I included it for her anyway and also because the human heads wouldn't look right either. It looks really cool with a lot of the different helmets on.
I did all of the graphic importing, setting up the imported items, paperdolls, and the scroll, plaque, book, sign, cloth map, and tombstone usecode.
Various people did the ucc files that I didn't. Their work if they bothered to credit it will be in the file itself.
Crysta the Elf
Made shldbkcsnexam.gif and most or all of the other custom paperdoll artwork.
They and the rest of the custom pictures and usecode not contained here can be obtained via at the download section of
http://exult.info/ and or
http://www.u7feudallands.com/.
Special thanks to Marzo because I've bugged him a lot while trying to figure out what to do.
Re: SI BG Merge
Posted: Fri May 18, 2007 9:58 pm
by Malignant Manor
Oops, I forgot to mention about the text properties.
Shape 1301, book= English
Shape 1302, book= English ~The only other choice would be Ophidian and they weren't around or runes that might be too big to fit properly. I just realized earlier that the stone font is a bit smaller than the wood one I tested so I might be changing it later if it will work better.
Shape 1303, plaque= Runes and English are the same as the original
Shape 1356, plaque= Runes and English are switched
Shape 1305, scroll= English
Shape 1306, scroll= English ~The only other choice would be Ophidian and they weren't around or runes that might be too big to fit properly. I just realized earlier that the stone font is a bit smaller than the wood one I tested so I might be changing it later if it will work better.
Shape 1308, tombstone= Runes and English are the same as the original
Shape 1355, tombstone= Runes and English are switched
Shape 1330, sign= Runes and English are the same as the original
Shape 1357, sign= Runes and English are switched
Re: SI BG Merge
Posted: Sun May 20, 2007 1:47 pm
by Malignant Manor
What does "atend" mean in ucxt output (basically var atend =?;)"
Example from Func02A3 0x2A3 (var var0000)
labelFunc02A3_07F8:
for (var0027 in var0024 with var0025 to var0026) atend labelFunc02A3_082D;
if (!((UI_get_item_frame(var0027) > 0x0016) && (UI_get_item_frame(var0027) < 0x001A))) goto labelFunc02A3_082A;
var0002 = UI_set_item_quality(var0027, var0023);
It occurs a few times and in the function and I need to have it declared in order to compile it. I am just adding a doubleclick function to a frame of the shape and don't and can't rewrite the code for it without it.
Re: SI BG Merge
Posted: Mon May 21, 2007 5:45 am
by marzo
It is not a var; it is a ucxt-specific thing to make up for the lack of formatting. It basically defines where to go after the command has finished; it is akin to a goto. If you can provide me with the full example above from the point you give up until labelFunc02A3_082D, I can show you what it is supposed to be in UCC.
For the record: ucxt output is really the worst possible way to learn usecode; many things in it are not recognized by UCC, and UCC has many capabilities which ucxt lacks.
Re: SI BG Merge
Posted: Mon May 21, 2007 12:11 pm
by Malignant Manor
Yeah UCXT is horrible in the way the output text is written. The problem with UCC is that the things I want to do don't really have examples. I tried to learn how to create a new item but can only use it to delete, because I haven't found an example in UCC where they use get_item_position () to set it near an object. Actually I need to see an example with just basic X,Y,Z put in there. I think that is the main (probably only) problem I have with your tutorial. Some stuff fits like it seems it should, others don't.
I am only inserting a function for a frame and am leaving the rest alone so I'm not really messing with the ucxt. Here is the entire function from SI with the new code put in just so you can see what I am doing and "atend" occurs two or three times. I am using the seal to seal the unsealed box. I even have a new green box for the green wax. I already have the patch working for BG now I just need to get this function worked out for SI.
extern Func097F 0x97F (var var0000, var var0001, var var0002);
extern var Func090F 0x90F (var var0000, var var0001, var var0002, var var0003);
extern Func090D 0x90D (var var0000, var var0001, var var0002, var var0003, var var0004, var var0005, var var0006);
Func02A3 0x2A3 (var var0000)
{
var var0001;
var var0002;
var var0003;
var var0004;
var var0005;
var var0006;
var var0007;
var var0008;
var var0009;
var var000A;
var var000B;
var var000C;
var var000D;
var var000E;
var var000F;
var var0010;
var var0011;
var var0012;
var var0013;
var var0014;
var var0015;
var var0016;
var var0017;
var var0018;
var var0019;
var var001A;
var var001B;
var var001C;
var var001D;
var var001E;
var var001F;
var var0020;
var var0021;
var var0022;
var var0023;
var var0024;
var var0025;
var var0026;
var var0027;
var var0028;
var var0029;
var var002A;
var var002B;
var var002C;
if (!(event == 0x0001)) goto labelFunc02A3_097B;
UI_clear_item_say(0xFE9C);
var0000 = UI_get_item_frame(item);
//**** New code ends here ****
if (!(UI_get_item_frame(item) == 0x0008)) goto label_01;
var AVATAR= -356;
var click = UI_click_on_item();
var get_shape_click = UI_get_item_shape(click);
if (event == 1)
if (UI_count_objects(-357, 675, -359, 7) >= 1){
if (get_shape_click == 1211)
UI_set_item_shape(click, (UI_get_item_shape(click) -1));
UI_remove_party_items(1, 675, -359, 7);
}
else if (UI_count_objects(-357, 1367, 675, 12) >= 1){
if (get_shape_click == 1211)
UI_set_item_shape(click, (UI_get_item_shape(click) +155));
UI_remove_party_items(1, 1367, 675, 12);
}
else AVATAR.say("We need to get some more wax");
//**** New code ends here ****
label_01:
if (!(var0000 == 0x0000)) goto labelFunc02A3_00BA;
var0001 = UI_click_on_item();
UI_play_sound_effect2(0x0038, item);
if (!UI_is_npc(var0001)) goto labelFunc02A3_0045;
UI_item_say(var0001, "@Yipe! Thou didst strike me!@");
return;
labelFunc02A3_0045:
if (!(UI_get_item_shape(var0001) == 0x02A3)) goto labelFunc02A3_00BA;
if (!(UI_get_item_frame(var0001) == 0x000A)) goto labelFunc02A3_00BA;
var0002 = UI_execute_usecode_array(var0001, [0x23, 0x52, "@Dost thou truly think@"]);
var0002 = UI_delayed_execute_usecode_array(var0001, [0x23, 0x52, "@that would work@"], 0x0010);
var0002 = UI_delayed_execute_usecode_array(var0001, [0x23, 0x52, "@this time, Avatar?@"], 0x0020);
var0002 = UI_delayed_execute_usecode_array(var0001, [0x23, 0x52, "@Think again!@"], 0x0030);
labelFunc02A3_00BA:
if (!(var0000 == 0x000A)) goto labelFunc02A3_01D7;
var0003 = UI_die_roll(0x0001, 0x0007);
if (!(var0003 == 0x0001)) goto labelFunc02A3_00ED;
var0002 = UI_execute_usecode_array(item, [0x23, 0x52, "@Squawk!@"]);
labelFunc02A3_00ED:
if (!(var0003 == 0x0002)) goto labelFunc02A3_0109;
var0002 = UI_execute_usecode_array(item, [0x23, 0x52, "@Polly want a cracker?@"]);
labelFunc02A3_0109:
if (!((var0003 == 0x0003) || (var0003 == 0x0004))) goto labelFunc02A3_0142;
var0002 = UI_execute_usecode_array(item, [0x23, 0x52, "@I know where@"]);
var0002 = UI_delayed_execute_usecode_array(item, [0x23, 0x52, "@the treasure is!@"], 0x0010);
labelFunc02A3_0142:
if (!(var0003 == 0x0005)) goto labelFunc02A3_015E;
var0002 = UI_execute_usecode_array(item, [0x23, 0x52, "@Gimmee a cracker!@"]);
labelFunc02A3_015E:
if (!((var0003 == 0x0006) || (var0003 == 0x0007))) goto labelFunc02A3_01D7;
var0002 = UI_execute_usecode_array(item, [0x23, 0x52, "@Pretty bird!@"]);
if (!UI_npc_nearby(0xFFFE)) goto labelFunc02A3_01D7;
var0002 = UI_delayed_execute_usecode_array(UI_get_npc_object(0xFFFE), [0x23, 0x52, "@Ugly Bird!@"], 0x0010);
var0002 = UI_delayed_execute_usecode_array(item, [0x23, 0x52, "@Speak for thyself!@"], 0x0020);
var0002 = UI_delayed_execute_usecode_array(UI_get_npc_object(0xFFFE), [0x23, 0x52, "@Hey!!@"], 0x0030);
labelFunc02A3_01D7:
if (!((var0000 == 0x0011) || ((var0000 == 0x0012) || (var0000 == 0x0013)))) goto labelFunc02A3_023C;
if (!(!UI_in_usecode(item))) goto labelFunc02A3_023C;
var0002 = UI_execute_usecode_array(item, [0x58, 0x0075, 0x46, 0x0011, 0x58, 0x0076, 0x46, 0x0013, 0x0B, 0xFFF8, 0x000C, 0x46, 0x0012]);
if (!UI_npc_nearby(0xFFB3)) goto labelFunc02A3_023C;
Func097F(0xFFB3, "@That is truly strange!@", 0x0005);
labelFunc02A3_023C:
if (!(var0000 == 0x000B)) goto labelFunc02A3_041F;
var0004 = UI_get_array_size(UI_get_party_list());
if (!(var0004 > 0x0001)) goto labelFunc02A3_0264;
var0005 = "we";
goto labelFunc02A3_026A;
labelFunc02A3_0264:
var0005 = "I";
labelFunc02A3_026A:
var0006 = UI_count_objects(0xFE9B, 0x0284, 0xFE99, 0xFE99);
var0007 = UI_count_objects(0xFE9B, 0x03B7, 0xFE99, 0xFE99);
var0008 = UI_count_objects(0xFE9B, 0x03B4, 0xFE99, 0xFE99);
var0009 = UI_count_objects(0xFE9B, 0x03B8, 0xFE99, 0xFE99);
var000A = UI_count_objects(0xFE9B, 0x02F8, 0xFE99, 0xFE99);
var000B = UI_count_objects(0xFE9B, 0x0285, 0xFE99, 0xFE99);
var000C = UI_count_objects(0xFE9B, 0x03A9, 0xFE99, 0xFE99);
var000D = UI_count_objects(0xFE9B, 0x0286, 0xFE99, 0xFE99);
var000E = "gold coins";
if (!(var0006 == 0x0001)) goto labelFunc02A3_0318;
var000E = "gold coin";
labelFunc02A3_0318:
var000F = "gems";
if (!(var000A == 0x0001)) goto labelFunc02A3_032E;
var000F = "gem";
labelFunc02A3_032E:
var0010 = "pieces of jewelry";
if (!(var000C == 0x0001)) goto labelFunc02A3_0344;
var0010 = "piece of jewelry";
labelFunc02A3_0344:
var0011 = "guilders";
if (!(var0009 == 0x0001)) goto labelFunc02A3_035A;
var0011 = "guilder";
labelFunc02A3_035A:
var0012 = "bars of gold";
if (!(var000D == 0x0001)) goto labelFunc02A3_0370;
var0012 = "bar of gold";
labelFunc02A3_0370:
var0013 = "gold nuggets";
if (!(var000B == 0x0001)) goto labelFunc02A3_0386;
var0013 = "gold nugget";
labelFunc02A3_0386:
if (!(var0006 || (var0007 || (var0008 || (var0009 || (var000A || (var000B || (var000C || var000D)))))))) goto labelFunc02A3_0417;
UI_show_npc_face0(0xFE9C, 0x0000);
message("\"Let's see... ");
message(var0005);
message(" have -- ");
message(var0007);
message(" monetari, ");
message(var0006);
message(" ");
message(var000E);
message(", ");
message(var0009);
message(" ");
message(var0011);
message(", ");
message(var0008);
message(" filari, ");
message(var000B);
message(" ");
message(var0013);
message(", ");
message(var000A);
message(" ");
message(var000F);
message(", ");
message(var000C);
message(" ");
message(var0010);
message(", and ");
message(var000D);
message(" ");
message(var0012);
message("!\"");
say();
UI_remove_npc_face0();
goto labelFunc02A3_041F;
labelFunc02A3_0417:
UI_item_say(item, "No money in party!");
labelFunc02A3_041F:
if (!(var0000 == 0x0010)) goto labelFunc02A3_0563;
var0014 = UI_get_item_flag(0xFFFE, 0x0006);
var0015 = UI_get_item_flag(0xFFFD, 0x0006);
var0016 = UI_get_item_flag(0xFFFF, 0x0006);
var0017 = "him";
var0018 = "he";
var0019 = "himself";
var001A = "handsome";
if (!UI_is_pc_female()) goto labelFunc02A3_0487;
var0017 = "her";
var0018 = "she";
var0019 = "herself";
var001A = "beautiful";
labelFunc02A3_0487:
UI_show_npc_face0(0xFE9C, 0x0000);
message("\"Hmm... not bad looking!\"");
say();
UI_remove_npc_face0();
if (!var0014) goto labelFunc02A3_04DD;
UI_show_npc_face0(0xFFFE, 0x0000);
message("\"Thou art truly ");
message(var001A);
message(", Avatar!\"");
say();
if (!var0016) goto labelFunc02A3_04D9;
UI_show_npc_face1(0xFFFF, 0x0000);
message("\"As thou art not!\"");
say();
UI_show_npc_face0(0xFFFE, 0x0000);
message("\"Thou art dung, Dupre!\"");
say();
UI_remove_npc_face1();
labelFunc02A3_04D9:
UI_remove_npc_face0();
labelFunc02A3_04DD:
if (!var0015) goto labelFunc02A3_051F;
UI_show_npc_face0(0xFFFD, 0x0000);
message("\"Avatar, let us proceed. Cease this dallying!\"");
say();
if (!var0014) goto labelFunc02A3_051B;
UI_show_npc_face1(0xFFFE, 0x0000);
message("\"Oh, let ");
message(var0017);
message(" be, old man -- ");
message(var0018);
message(" is only admiring ");
message(var0019);
message("!\"");
say();
UI_remove_npc_face1();
labelFunc02A3_051B:
UI_remove_npc_face0();
labelFunc02A3_051F:
if (!var0016) goto labelFunc02A3_0563;
UI_show_npc_face0(0xFFFF, 0x0000);
message("\"Let us press on, Avatar!\"");
say();
if (!var0014) goto labelFunc02A3_055F;
UI_show_npc_face1(0xFFFE, 0x0000);
message("\"Thou dost not want ");
message(var0017);
message(" to show precisely how ugly thou art!\"");
say();
UI_remove_npc_face1();
UI_show_npc_face0(0xFFFF, 0x0000);
message("\"Thou impudent snot!\"");
say();
labelFunc02A3_055F:
UI_remove_npc_face0();
labelFunc02A3_0563:
if (!(var0000 == 0x0014)) goto labelFunc02A3_05DE;
var001B = [0x0001, 0x0001, 0x0001, 0x0000, 0x0000, 0xFFFF, 0xFFFF, 0xFFFF];
var001C = [0x0001, 0x0000, 0xFFFF, 0x0001, 0xFFFF, 0x0001, 0x0009, 0xFFFF];
var001D = 0xFFFA;
if (!(!Func090F(item, var001B, var001C, var001D))) goto labelFunc02A3_05CA;
UI_flash_mouse(0x0000);
goto labelFunc02A3_05DE;
labelFunc02A3_05CA:
Func090D(item, var001B, var001C, var001D, 0x02A3, item, 0x000A);
labelFunc02A3_05DE:
if (!(var0000 == 0x0015)) goto labelFunc02A3_06B2;
var001E = UI_game_hour();
var001F = "am";
if (!(var001E > 0x000C)) goto labelFunc02A3_060F;
var001E = (var001E - 0x000C);
var001F = "pm";
labelFunc02A3_060F:
if (!(var001E == 0x000C)) goto labelFunc02A3_061F;
var001F = "pm";
labelFunc02A3_061F:
if (!(var001E == 0x0000)) goto labelFunc02A3_0635;
var001E = 0x000C;
var001F = "am";
labelFunc02A3_0635:
var0020 = UI_game_minute();
if (!(var0020 0x0016) && (UI_get_item_frame(var0027) 0x0016) && (UI_get_item_frame(var0027) < 0x001A))) goto labelFunc02A3_0978;
var002A = UI_get_object_position(var0027);
UI_remove_item(var0027);
UI_sprite_effect(0x0004, var002A[0x0001], var002A[0x0002], 0x0000, 0x0000, 0x0000, 0xFFFF);
UI_play_sound_effect(0x002A);
labelFunc02A3_0978:
goto labelFunc02A3_091C;
labelFunc02A3_097B:
if (!((var0000 == 0x001A) || (var0000 == 0x001B))) goto labelFunc02A3_09A5;
Func097F(0xFE9C, "I cannot read this.", 0x0001);
Func097F(0xFE9C, "This book is ruined.", 0x0012);
labelFunc02A3_09A5:
if (!(event == 0x000A)) goto labelFunc02A3_09D6;
if (!(UI_get_item_frame(item) == 0x0014)) goto labelFunc02A3_09D6;
var002B = UI_execute_usecode_array(item, [0x58, 0x001C, 0x27, 0x0005, 0x0B, 0xFFFC, 0x0004]);
labelFunc02A3_09D6:
return;
}
Re: SI BG Merge
Posted: Mon May 21, 2007 3:17 pm
by marzo
The problem with UCC is that the things I want to do don't really have examples.
You haven't noticed that the full UCC source is available for the Keyring, TFL and SI Fixes mods, have you?
(Keyring & SI Fixes are in Exult CVS -- available if you download the Exult source of viewable online, whereas TFL includes the source in the distribution and is also viewable in TFL CVS)
There was no need to post the entire function; the relevant portion for the example is this:
Code: Select all
[...] labelFunc02A3_07F8:
for (var0027 in var0024 with var0025 to var0026) atend labelFunc02A3_082D;
if (!((UI_get_item_frame(var0027) > 0x0016) && (UI_get_item_frame(var0027) 0x0016) && (UI_get_item_frame(var0027) get_item_frame() > 22) && (var0027->get_item_frame() set_item_quality(var0023);
}
if (var0023 == 0x0001)
{
Func097F(0xFE9C, "Origin presents...", 1);
Func097F(0xFE9C, "The few...", 16);
Func097F(0xFE9C, "The proud...", 32);
Func097F(0xFE9C, "The well-armed...", 48);
Func097F(0xFE9C, "Strike Commander!", 64);
}
[...]
The latter uses the fact that everything from the "with" aftwerwards in the "for" is optional, and that the other two variables haven't been used. Also, the intrinsics are called in pseudo-"object oriented" notation.
Note that in both cases, I eliminated the goto's, and that the "atend XXXX" was replaced by curly braces surrounding everything from the line after the for until the line before the label XXXX; this is a good rule of thumb, but it won't always work (there are some functions which do weird things with the use of labels and gotos so that more careful analysis of the code flow is necessary).
Re: SI BG Merge
Posted: Mon May 21, 2007 7:18 pm
by Malignant Manor
Unfortunately that causes the game to crash when I double click the computer frames. At the bottom of wat you altered "labelFunc02A3_082A:" tells you to go back to the "labelFunc02A3_07F8:" which is the beginning of what you altered. I'm not sure if that helps any.
I have tried changing things for quite awhile. The most I have got it to do is repeat the first message each time. Once I was able to get it to get through U8 message and then crash when it was time to explode. I didn't make a separate save so I don't know what I did.
If this is too much trouble I will just alter a seal and import it as a different shape labeled "Avatar's seal". It isn't very virtuous for him to use other people's seals anyway.
labelFunc02A3_07F8:
for (var0027 in var0024 with var0025 to var0026) atend labelFunc02A3_082D;
if (!((UI_get_item_frame(var0027) > 0x0016) && (UI_get_item_frame(var0027) < 0x001A))) goto labelFunc02A3_082A;
var0002 = UI_set_item_quality(var0027, var0023);
labelFunc02A3_082A:
goto labelFunc02A3_07F8;
labelFunc02A3_082D:
if (!(var0023 == 0x0001)) goto labelFunc02A3_0873;
Func097F(0xFE9C, "Origin presents...", 0x0001);
Func097F(0xFE9C, "The few...", 0x0010);
Func097F(0xFE9C, "The proud...", 0x0020);
Func097F(0xFE9C, "The well-armed...", 0x0030);
Func097F(0xFE9C, "Strike Commander!", 0x0040);
labelFunc02A3_0873:
if (!(var0023 == 0x0002)) goto labelFunc02A3_08AD;
Func097F(0xFE9C, "Even during war,", 0x0001);
Func097F(0xFE9C, "some people still", 0x0010);
Func097F(0xFE9C, "make a profit...", 0x0020);
Func097F(0xFE9C, "Privateer", 0x0030);
labelFunc02A3_08AD:
if (!(var0023 == 0x0003)) goto labelFunc02A3_08E7;
Func097F(0xFE9C, "Ultima 8?", 0x0001);
Func097F(0xFE9C, "Pagan?", 0x0010);
Func097F(0xFE9C, "This omen doth not", 0x0020);
Func097F(0xFE9C, "bode well...", 0x0030);
labelFunc02A3_08E7:
if (!(var0023 == 0x0004)) goto labelFunc02A3_097B;
var0002 = UI_delayed_execute_usecode_array(0xFE9C, [0x23, 0x52, "Curse that Stokes!"], 0x0001);
var0024 = UI_find_nearby(0xFE9C, 0x02A3, 0x001E, 0x0000);
//enum();
labelFunc02A3_097B:
if (!((var0000 == 0x001A) || (var0000 == 0x001B))) goto labelFunc02A3_09A5;
Func097F(0xFE9C, "I cannot read this.", 0x0001);
Func097F(0xFE9C, "This book is ruined.", 0x0012);
labelFunc02A3_09A5:
if (!(event == 0x000A)) goto labelFunc02A3_09D6;
if (!(UI_get_item_frame(item) == 0x0014)) goto labelFunc02A3_09D6;
var002B = UI_execute_usecode_array(item, [0x58, 0x001C, 0x27, 0x0005, 0x0B, 0xFFFC, 0x0004]);
labelFunc02A3_09D6:
return;
Re: SI BG Merge
Posted: Tue May 22, 2007 4:20 am
by marzo
Unfortunately that causes the game to crash when I double click the computer frames.
That is because I gave an example; the whole function needs a treatment similar to the one I gave.
At the bottom of wat you altered "labelFunc02A3_082A:" tells you to go back to the "labelFunc02A3_07F8:" which is the beginning of what you altered.
The "labelXXX", "goto labelXXX" and "atend labelXXX" from ucxt output are there because ucxt does not process the output more than convert it from raw usecode byte code; it is just a (slightly) higher-level dump than what produced by raw wud. UCC does not need any of those (although it understands all but "atend labelXXX").
I am only inserting a function for a frame and am leaving the rest alone so I'm not really messing with the ucxt.
I had missed this the first time around. There are two things to note:
(1) This doesn't work; while ucxt output is similar to that of UCC, it is *not* compatible. Most of the times, UCC will compile rubbish from ucxt output *if* it compiles at all.
(2) There is a better way of doing this:
const int AVATAR = -356;
const int PARTY = -357;
const int QUALITY_WILDCARD = -359;
DeskItems 0x2A3 ()
{
if (event == 1)
{
AVATAR->clear_item_say();
if (get_item_frame() == 8)
{
var click = UI_click_on_item();
var get_shape_click = click->get_item_shape();
if (PARTY->count_objects(675, QUALITY_WILDCARD, 7))
{
if (get_shape_click == 1211)
click->set_item_shape(click->get_item_shape() - 1);
UI_remove_party_items(1, 675, QUALITY_WILDCARD, 7);
}
else if (PARTY->count_objects(1367, QUALITY_WILDCARD, 12))
{
if (get_shape_click == 1211)
click->set_item_shape(click->get_item_shape() + 155);
UI_remove_party_items(1, 1367, QUALITY_WILDCARD, 12);
}
else AVATAR.say("We need to get some more wax");
return;
}
}
DeskItems.original();
}
(I also fixed a couple bugs in your code where you specify quality 675 (!) when calling intrinsics).
Re: SI BG Merge
Posted: Tue May 22, 2007 12:32 pm
by Malignant Manor
Thanks, that works alot better than trying to include the rest of the code.
Yeah, I noticed I messed up after I posted. I wrote shape number over the quality number when I altered it. I didn't say anything about it since you only talked about the "atend" part. I also messed up where the code ended because, I added it quickly before I posted. I also fixed a problem with the wax disapperaring whenever you double clicked on the seal. I had to add another && to get the shape of the unsealed box. Not that it really matters that much.
Quick question, are doors hard coded as to whether they are unlocked, locked, or magically sealed based on shape #, or do I have to state which base frames are that way? I remembered when I did a quick try of it the function for finding out the door state didn't work.
Re: SI BG Merge
Posted: Tue May 22, 2007 2:34 pm
by marzo
are doors hard coded as to whether they are unlocked, locked, or magically sealed based on shape #, or do I have to state which base frames are that way?
Is is semi-hard-coded. All doors in the originals had four frames (unlocked, open, locked, magically locked); while you can do just about anything in usecode, Exult assumes that all doors are like this for path-finding and schedules.
Re: SI BG Merge
Posted: Tue May 22, 2007 4:58 pm
by Malignant Manor
There is a problem with sound effects in ES created eggs not sounding the same as identical numbered sound effects in SI. Here is a quick example with the egg SFX 24 sounds like a spittoon or the strength tester bell. In items it sounds kind of like knocking on a door.
Also with items track 255 doesn't stop music like it should in SI or BG, if it is from an item. If it is an egg, it stops the music. This is with the "Sound pack for Serpent Isle" and " Sound pack for Black Gate". It is making it really difficult to find the correct sound effects for items.
Actually, it seems like the sound effects that are created by ES are using the BG sound effects. After a bit of testing. It seems to happen in older versions of ES (tested one from June 2005) too so it doesn't have anything to do with the "z" coordinate addition). If this is a bug with ES, maybe you can have eggs be able to select whether the SFX (music and speech too) come from BG or SI. (bit of wishful thinking) Unless you think this is a configuration problem on my part.
Well the vertical abbey doors only have 2. It probably won't problem when I do coding though except they can't be locked or magically locked without additional frames.
Re: SI BG Merge
Posted: Tue May 22, 2007 6:52 pm
by marzo
There is a problem with sound effects in ES created eggs not sounding the same as identical numbered sound effects in SI.
Duly noted; it will be fixed in a future snapshot (I have already fixed the bug, but I am revamping the sfx code; I will commit the changes when I am done). As you noted, this is due to translation of SI-to-BG sfx values which Exult (not ES) does. This also happens with the sfx data specified in shape_info.txt, and I am also eliminating it (as well as adding as many shape sfx from the originals as I can identify the sfx # of).
Also with items track 255 doesn't stop music like it should in SI or BG, if it is from an item.
This should happen only for jukebox eggs or UI_play_music intrinsic, not general sfx eggs or UI_play_sound_effect/UI_play_sound_effect2 intrinsics.
Re: SI BG Merge
Posted: Tue May 22, 2007 7:21 pm
by Malignant Manor
That is with items set to play music. Not SFX items or eggs. It fails to stop music from playing. Use the music box. It is set in the usecode to play track 255 when you double click on the open lid frame. It fails to stop music from playing in both SI and BG (in Exult). I tested under dosbox and it stops the music there.
Another small bug is with the tombstone gump (50 in BG, 45 in SI) it displays the wood sign font (font 1 in both) instead of the stone font (3 in both, 9 seems to be Ophidian stone). You say it is hardcoded in your intrinsic list, but is that in Exult or the original games? I know I tested it out in doxbox and the stone font is what shows up in BG. It is only a minor problem though. It looks alright most of the time. The worst that happens is a tiny portion is shown off the tombstone (it is still visable and readable).
Re: SI BG Merge
Posted: Tue May 22, 2007 7:27 pm
by Malignant Manor
Oops, left out that it is UI_display_runes() that does it. The Ucxt output shows that that is what is being used (by UUC anyway). The SI part was tested from when I imported in tombstones and text.
Re: SI BG Merge
Posted: Fri May 25, 2007 3:15 pm
by Malignant Manor
I can't set shape size in ES more than 8x8x7. Z doesn't matter to me but, the X and Y does. I have created psedo-chunks so that SI can have sand and they are 16 by 16. I can break them into 4 shapes, but that makes it extremely hard to find the correct ones to place. It is a very big change from 30 frames to 120 on top of that they are pretty similar.
Re: SI BG Merge
Posted: Thu May 31, 2007 12:35 am
by Malignant Manor
SI BG Merge ver 6.5
It is at a new filehosting site since Marzo pointed out the problems with the last one. This site has better features anyway. This is a good sized update with lots of text to follow.
There are 330 shapes added as of now with a few SI repeats to use for BG usecode functions. Right now the items haven't been adjusted. The file is archived in
7z format to dramatically reduce file size (Original is 14MB). Just add the files to your patch directory.
I have added some new features for old items and am in the process of getting most of the stuff to work. Quest items are a lower priority since most of them need multiple functions and NPCs scripted. The next thing I plan to work on is spells and party members. I probably will be moving spellbooks, but besides that I don't think I will need to delete anything.
Flying carpet now works. The only thing that has changed from the original is that the carpet will not fly until seated and double clicked.The best I could do otherwise was have it switch on Sailor flag and hover at 0 altitude. This introduced bugs as the engine isn't made to have barges going under floating objects and a good deal of the time they will attach to the carpet in mid air. Another reason it was left out is to avoid confusion about the height the carpet can go.
BG Ship deeds are on the SI deeds to determine ownership starting with quality 214. This will allow you to use the SI sails for ships. I originally wanted the BG sails to be different so that you could use the BG scroll shape for them, but this didn't turn out that well, because I couldn't get both sails to open at the same time.
Cart works although the animation isn't there. It uses BG scrolls to determine ownership.
Setup more paperdoll shapes and fixed shield backs.
Rudyom's Wand now explodes blackrock. It will also explode blackrock when wielded as a weapon in combat mode and double click on the blackrock.
Abbey doors open and close, but still don't work properly. They are usable. They can't be locked, the left door gets partially obscured by the wall when open, and there is a tiny area where you can't walk when it is open.
Rat face cage opens and closes.
Silverleaf can be eaten.
FoV firepit works with SI bellows (animation and SFX) although it can't forge anything and NPCs can't use the blacksmith schedule with it.
Invisibility dust works.
Venom can be consumed although it will be awhile until I add the effects of withdrawal. Right now it just adds 5 to STR, DEX, and INT.
Flaming oil now works properly. Instead of someone saying that you should attack with it when you double click it a target cursor will appear and the target will receive the flaming joy.
Guillotine works now. Instead of having to double click it several times to raise it. It is done with one double click.
Horn, lyre, music box, and mysterious craft now play music when you double click them.
The sealed box and unsealed box work properly. I have added a new feature where you can reseal the box using green or red wax. There is a new green sealed box graphic to support this. If you have both colors in your backpack, it will seal the box as the red color. Each time a box is sealed, it consumes one wax item from party inventory.
Kite flys. Instead of the Avatar having to walk to it. It teleports to him instead. (more fun than the original, but still not that great.)
The fountain works. It has the same values as the SI equivalent.
Strength tester works, alas the Avatar is still too lazy to walk over to items to use them. It isn't setup with the NPC who gives you a dragon.
Mining machine turns and makes noise. I still need to implement the conveyor belt moving at the same time and mineral creation.
Gremlins now steal your food and eat it in front of you while they pummel you.
Pick axe now allows you to mine lead and iron chunks by double clicking the axe and targeting them or striking them in attack mode. The axe must be in your hand while attempting this.
Smoke bomb emits smoke, but doesn't make bees flee.
FoV well now works. In getting it to work, It caused a small bug where the bucket needs to be clicked twice on most targets. I don't know how to fix this and have the well function. Avatar doesn't walk up to the well to turn it and the filled bucket goes into his backpack.
The large sand tiles (chunk size) can't be properly used until Exult Studio and/or Exult get changed to allow tile sizes larger that 8x8x7. They need to be set to 16x16x0.
Puppet show works now. It isn't setup with the NPC who takes your gold.
*** Corrections ***
Firedoom staff really did work. I forgot to check the quality when I tested it.
Ring of protection didn't seem to add protection status in the original. From testing, it happened in older Exult versions of BG, but it doesn't seem to happen in recent ones. It is already really powerful since you can wear another ring and gloves as well. I am leaving it as is.
Re: SI BG Merge
Posted: Thu May 31, 2007 3:55 am
by SB-X
Thanks for all your hard work. A lot of people have asked for this kind of project for a while now.
What do you need 16x16 "psuedo-chunks" for? Could you post a screenshot and explain where something like this is used. (it's been a while since I played BG)
You can create a shape combo and use it like a brush. And why can't you use a real chunk with custom tiles? (since I don't understand what you're trying to do, a picture should help explain it better)
I should have asked earlier, but would you be interested in a complete list of SI's function names? The list was generated by UCXT, from the Spanish version of SI, which was compiled with some debugging information left in. (like the names) You may already have this. If not, it may help you when modding SI.
A partial list of functions was also created by Artaxerxes and myself, but you probably already discovered many more of them than we did.
Re: SI BG Merge
Posted: Thu May 31, 2007 12:45 pm
by Malignant Manor
Psudochunks are just shapes the same size as chunks that are set at 16x16x0. Right now only a quarter of the shape can be used properly. I drew the purple line to show the approximate cutoff point. The Avatar is on the side that cannot have objects placed on it. Also if you try and hack move him, you will pick up the shape instead.
And why can't you use a real chunk with custom tiles?
Last I knew there were problems with chunk editing. It has been quite awhile though. On a side note, I could never get the Gimp 2 plugin to work in ES because it gives me a dead link to download a file from a foreign language site. I will have to try experimenting with it. I know the non updated document on the site says that windows saved them in the wrong place.
Would you be interested in a complete list of SI's function names?
I have only seen partial lists. It would probable help a bit later when configuring some of the items. The main problem with some items is a vast difference in usecode array function. Most BG functions ask you yes, no, haggle so I have to redo everything myself if there is no SI equivalent.
Re: SI BG Merge
Posted: Thu May 31, 2007 2:44 pm
by Malignant Manor
Chunk editing is working although buggy (single tile shapes shown with an extra green box to the left and very hard drive expensive. One chunk added 2.25 MB chunk file and a 72 kb map file. That would make 67.5 MB from just the chunk files alone. That wouldn't even count the extra ones that would be needed for BG roads and whatever else is added. Right now my shape file contains all of those shapes plus hundreds more at about 14MB uncompressed.
Re: SI BG Merge
Posted: Thu May 31, 2007 3:05 pm
by Malignant Manor
Seems like the inital file is that large. I created 29 more chunk duplicates and it only increased in size by 2 kb. I still need to cut the shapes I have into quarters in order to use them since there is still that large area that can't be used since it goes by how the shapes are configured in ES. That is 120 frames and 30 chunks that I don't feel like editing right now since it would be a major pain in the ass.
There is no way that I can see those tiny one tile files in order to draw properly and if I chose the wrong one at the end stages, I would have to try lots of frames just to see if they match. With terrain editing, I would also have to run another client of Exult to see what the shape looks like since all the non chunk shapes are invisible.
I really need an edit button on these forums.
Re: SI BG Merge
Posted: Fri Jun 01, 2007 6:15 am
by SB-X
Ah ok, I understand now (i think). Thanks for the clarification.
Regarding filesize, you didn't make a new tile for every spot on the chunk, did you? There should be a way to export the tiles from BG and import them to SI. (in Exult Studio) You can tell that desert chunk repeatedly uses the same tiles. But like you said, that's a lot of work editing those small tiles to match. It would be nice if there was a tool to do the conversion work.
Fortunately with Exult we don't have the same memory limitations that U7 on DOS had. I heard one of the reasons they couldn't make Moonshade more impressive was that they were already pushing the graphics capabilities as it was.
This function list actually is one of those partial lists (sort of), but I will post it anyway in case someone could get some use out of it. (if anything it's interesting getting to see some text from the original code)
si-header.es.ucc
Two caveats:
1) This function list does not really show the true function names at all. There are many duplicate strings, and they are all no greater than 8 characters in length. My guess is that these are really the filenames of the original usecode sources. Related functions would have all been in the same module/source-file. The most obvious example of that is all the UTIL & UTILSI functions. Various utility functions, but there's no clue about what any of them do. (some of them were copied from BG)
2) The usecode the list was extracted from was apparently from a version of SI without Silver Seed, so all of its add-on functions are missing.
Re: SI BG Merge
Posted: Fri Aug 17, 2007 11:32 am
by EarthquakeDamage
What would adding Protection status to rings of protection entail? Is it particularly complicated? I like the idea but, with no usecode experience, have no idea how easy it'd be to add.
Re: SI BG Merge
Posted: Sun Sep 02, 2007 4:27 pm
by Donfrow
This is really nice and well done. Thanks
Now, of course I'm having an issue with it
I can copy it all over and it works fine, but if I want to add custom shapes (starting at 1369) it crashes.
Also, is tfa.dat the file that makes blood from a corpse not "glow"? For some reason when I use that file in the latest download it locks up in one area so I have to use the one already in my patch directory. Using my original tfa.dat the blood glows, but using the tfa.dat with the download the blood doesn't glow.
Any thoughts?
Thanks
Re: SI BG Merge
Posted: Sun Sep 02, 2007 4:37 pm
by Donfrow
Bah once again I figure out half of my issue right after I make a post. I try and figure it out for awhile, give up and post then it just comes to me
The custom shapes at 1369+ is fine, it was a dumb mistake on my part, but the tfa.dat question still lingers.
Re: SI BG Merge
Posted: Sun Oct 28, 2007 10:11 pm
by Malignant Manor
Also, is tfa.dat the file that makes blood from a corpse not "glow"?
I'm not sure offhand what that file is. It isn't a file that I've modified. It is probably autocreated by Exult Studio.
What would adding Protection status to rings of protection entail? Is it particularly complicated? I like the idea but, with no usecode experience, have no idea how easy it'd be to add.
You should look at Marzo's code for the invisibility ring. Add basically the same code for the protection ring and change the flag to protection. You would also have to change the item frame to zero or remove the reference to frame.
My computer with my SI BG Merge files has major problems and I'm trying to get files moved onto this computer. I took a long break partly because of that and the fact that trying to balance the classes somewhat is a pain since Ultima 7's stats are way different than 6 (and even more so than previous versions) and the Avatar wasn't penalized in magical ability when not being a mage for some reason. Sorry for taking so long to respond.
Re: SI BG Merge
Posted: Mon Oct 29, 2007 9:34 am
by marzo
Also, is tfa.dat the file that makes blood from a corpse not "glow"?
Yes. The "not glowing" thing is the translucency option which you can set for a shape which is stored in tfa.dat.
Re: SI BG Merge
Posted: Mon Oct 29, 2007 1:18 pm
by Malignant Manor
Quote:
For some reason when I use that file in the latest download it locks up in one area so I have to use the one already in my patch directory. Using my original tfa.dat the blood glows, but using the tfa.dat with the download the blood doesn't glow.
What area does it lockup at? Do you at least know which body/bodies are having problems?
I know sometimes that you need to restart a game when problems occur with custom files and are they are fine afterwards. I'm not sure why though. I know that I could get a repeated crash at one point from double clicking some objects and that fixed it. The usecode didn't have any problems, but when it was in the patch directory it caused them.