Page 1 of 1

Exult Studio's Difficult

Posted: Tue Oct 01, 2002 9:36 pm
by Morg
Yeah i was banging my head against the wall all day trying to figure out why i couldn't get my usecode to work. I finally figured out i was typing If instead of if.

Re: Exult Studio's Difficult

Posted: Tue Oct 01, 2002 10:32 pm
by drcode
My big question is still this: Are there GUI tools out there for creating plots that are preferable to writing a script? I realize learning a script language is harder; but once you learn it, it should make you more productive than having to click through hundreds of dialogs. But maybe there's some sort of hybrid.

Re: Exult Studio's Difficult

Posted: Wed Oct 02, 2002 9:35 am
by Morg
Im right now working on a little dialog creator but i don't know how far i'll go with it.

Re: Exult Studio's Difficult

Posted: Mon Oct 07, 2002 5:12 pm
by Morg
ok i wanna say if(response == "job" && gflags[1008] = false)

what would be the proper syntax

Re: Exult Studio's Difficult

Posted: Mon Oct 07, 2002 9:25 pm
by drcode
I think that's it. Have you downloaded the 'island patch' from our Sourceforge site? It has an example ('usecode.uc') of source.

Re: Exult Studio's Difficult

Posted: Mon Oct 07, 2002 9:36 pm
by Morg
yeah i did but it didn't have an example of an and operator and i can't get it to use an and. the island patch is what im basing all of my mad guessing into usecode

Re: Exult Studio's Difficult

Posted: Tue Oct 08, 2002 4:47 am
by Telemachos
if(response == "job" && gflags[1008] = false)


Be careful - there's an important mistake in that line of code ;)

- Tele

Re: Exult Studio's Difficult

Posted: Tue Oct 08, 2002 8:57 am
by RazorBlade
if((response == "job") && (gflags[1008] == false))

Its in my top-ten-mistake list.

Re: Exult Studio's Difficult

Posted: Tue Oct 08, 2002 10:02 am
by Morg
Well none of that worked for me my only guess is that the use code if doesn't accept multiple paramiters . . . or i screwed up some how . . . but it works just fine if i only give it one parameter at a time

Re: Exult Studio's Difficult

Posted: Tue Oct 08, 2002 10:15 am
by wjp
Could you post your script? Maybe one of us can spot a bug in it, or if not, see if there's a bug in the compiler.

Re: Exult Studio's Difficult

Posted: Tue Oct 08, 2002 11:27 am
by Morg
As a preface i wrote this peice while my cat blaze was herassing me.

ive tried everything i can think and i can't get the and operator to work.
i tried a single &
ive tried leaving the inner () out

Blaze 0x56d ()
{
if (event != 1)
return;
UI_show_npc_face(item);
say("Hi im blaze pet me");
UI_add_answer("pet me");
UI_add_answer("Bye");
converse
{
if (response == "Bye")
break;
else if ((response == "pet me") && (gflags[1008] == false))
{
say("Please pet me some more ", gflags[1008]);
gflags[1008] = true;
}
else if ((response == "pet me") && (gflags[1008] == true))
{
say("PURURURURRRR i like being pet ",gflags[1008]);
}
}
UI_remove_npc_face(item);
}

this is what i get when i run ucc.exe

usecode2.uc:913: Must use UcResponse in 'if (UcResponse == ...)'
usecode2.uc:918: Must use UcResponse in 'if (UcResponse == ...)'

This version of the code does work

Blaze 0x56d ()
{
UI_show_npc_face(item);
say("Hi im blaze pet me");
UI_add_answer("pet me");
UI_add_answer("Bye");
converse
{
if (response == "Bye")
break;
else if (response == "pet me")
{
if (gflags[1008] == false)
{
say("Please pet me some more ", gflags[1008]);
gflags[1008] = true;
}
else if (gflags[1008] == true)
{
say("PURURURURRRR i like being pet ",gflags[1008]);
}
}
}
UI_remove_npc_face(item);
}

and i don't get any messages from ucc.exe

so i'm assumming that you can only have 1 test in the if statements

Re: Exult Studio's Difficult

Posted: Tue Oct 08, 2002 12:08 pm
by wjp
Hmm... yes... because of the special nature of response variable, you can't use it in a complex boolean expression. (I should've remembered that earlier)

The reason is that the underlying bytecode has a special opcode for checking the response of a conversation.


By the way, Jeff recently added another way of coding conversations to ucc, resembling a C switch statement. Take a look at the most recent content/islefaq/usecode.uc for an example. (in DrCode's usecode function)

It'll look something like:

converse (["pet me", "Bye"])
{
case "Bye":
break;
case "pet me":
if (gflags[........
.....
}

Re: Exult Studio's Difficult

Posted: Tue Oct 08, 2002 1:24 pm
by Morg
cool thanks for the assist

Re: Exult Studio's Difficult

Posted: Tue Oct 08, 2002 7:11 pm
by drcode
Yes, sorry for the wrong response; I'd forgotten that "response == xxx" was a special case. I'm thinking of removing it entirely, since the example WJP gives is the new preferred way.

Re: Exult Studio's Difficult

Posted: Wed Oct 09, 2002 1:12 am
by Telemachos
"if((response == "job") && (gflags[1008] == false))

Its in my top-ten-mistake list."

A small trick (which I admit I doesn't like to use myself though) is to always put the constants on the left side like this:

if(("job" == response) && (false == gflags[1008]))

Then the compiler will tell you if you forgot to make a '=' a '=='

- Tele

Re: Exult Studio's Difficult

Posted: Wed Oct 09, 2002 6:30 am
by RazorBlade
Nice idea, Ill try to remember that. Thanks!:)

Re: Exult Studio's Difficult

Posted: Sun Oct 20, 2002 6:15 pm
by Morg
Ok as far as im conserned the greatest obstical to making an original exult game would be custom graphics i was wondering if anybody had been working on that and if so how far they had gotten

Re: Exult Studio's very Difficult

Posted: Mon Oct 21, 2002 5:45 am
by Dino3
Um... I never figured out how to use Exult Studio...

Re: Exult Studio's Difficult

Posted: Mon Oct 21, 2002 7:29 am
by drcode
Morg: I agree. It seems especially difficult to get the 3D items drawn so that everything is consistent and fits together. My thought was that it might be best to use a 3D modelling program to start, then touch them up by hand in Photoshop or Gimp. But that's also a tremendous amount of work.

Re: Exult Studio's Difficult

Posted: Mon Oct 21, 2002 10:47 am
by Morg
yeah while it would be time consuming, it would be possible for me to come up with a worthy plot, and create the use code to control the dialog and egg events but it is way out of my capablilties to do any art . . . even my stick figures are sub par

Re: Exult Studio's Difficult

Posted: Mon Oct 21, 2002 11:35 am
by artaxerxes
aren't we all the same ?!? :)

I guess we should hang in MacOS forums are they might be more art inclined (I know. Exult runs on Mac).

In any case, it seems noone know how to make art. If you happen to read that post and you've done art before (for computers and preferably for computer games) then _please_ post your experience here. What is involded? What is the best way to proceed? Draw on paper first? Make a 3D model first (like what Jeff mentioned)?
Or maybe, do you have friends who make art? Can you ask them?

I've got a plot, I can write usecode but like the rest, I can't even draw an apple!

Artaxerxes

Re: Exult Studio's Difficult

Posted: Mon Oct 21, 2002 11:51 am
by artaxerxes
and btw, I've created a tool to convert a 192x192 8 bpp BMP image into a u7map using a text file to map coloursu7chunk.

You make a quick sketch and your map is ready for polishing.

http://si-french.sf.net/mock_up.tar.gz

Compiled for Linux including sources. Should compile on Win32 and others but I didn't try. You need SDL to compile.

Artaxerxes

Re: Exult Studio's Difficult

Posted: Mon Oct 21, 2002 2:11 pm
by SB-X
If I had a tablet, or even a scanner, I might be able to draw some game art... but I'm no good at it with the mouse. As far as the angle goes, I've noticed that if I rotate Exult screens right 45 degrees they take on a "normal" perspective. So I assume that you could draw some shapes in that angle and rotate them left by 45 degrees to get Ultima 7's "skewed" perspective.

Re: Exult Studio's Difficult

Posted: Tue Oct 22, 2002 6:13 am
by artaxerxes
Just tested something and it seems it works good for pattern drawing (like making grass):

First point: Don't use too many colours. In a 8x8 tiles, 3 colours are enough.

Second point: in your 8x8, make sure the 3 colours are distributed evenly on the rows _AND_ on the columns. Each row should have: 3 pix of colour 1, 3 pix of colour 2 and 2 pix of colour 3. Also, each column should have 3 pix of colour a, 3 pix of colour b and 2 pix of colour c. Mix-and-match the 1,2,3 a,b,c combinaison from column to column.

If you keep that idea, your grass will look real and it will be hard to find a pattern.

For instance, here wha'ts I've just done using 3 colours: 1 for light green, 2 for med green and 3 for dark green (note: make sure the greens aren't too far apart either):

21323121
33212131
22131312
13231223
12322313
31213212
13121232
21312323


Have fun,
Artaxerxes

Re: Exult Studio's Difficult

Posted: Tue Oct 22, 2002 6:53 am
by artaxerxes
Try with these colours:
1 = #375721
2 = #244909
3 = #205103

looks pretty good to me!
make you own combinaison to vary the results.

Artaxerxes

Re: Exult Studio's Difficult

Posted: Sat Oct 26, 2002 4:56 am
by Skutarth
Hey Axtererxes, can you send me a precompiled version for Windows of your tool to me plz?

Re: Exult Studio's Difficult

Posted: Mon Oct 28, 2002 4:37 am
by artaxerxes
Unfortunately, I don't have a compiler on Windows.
You might want to ask other members of Exult who do.

Sorry about that. On the other hand, the code should be fairly platform independant.

I've also added a feature so that you need SDL_image too but you can load _ANY_ image file supported by SDL_Image and that uses index (PNG, BMP, GIF and maybe more).

Enjoy!

Artaxerxes

Re: Exult Studio's Difficult

Posted: Mon Oct 28, 2002 6:57 am
by artaxerxes
in his generosity, Colourless has compiled it for Windows users.

D/l at:

http://www.users.on.net/triforce/mock_up.zip

Artaxerxes

Re: Exult Studio's Difficult

Posted: Wed Oct 30, 2002 1:42 pm
by Skutarth
Thanks, dude! I'll have to check this out...