Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

HSI Help

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
mack2404




Joined: 05 Jul 2006
Posts: 7

PostPosted: Wed Jul 05, 2006 1:04 am    Post subject: HSI Help Reply with quote

I'm a newbie to plotscripting, and i read the tutorial. It said it would explain a HSI script. It didn't, so could someone please help me with one?
_________________
"I've never been good at making action games. I prefer telling stories..."
Back to top
View user's profile Send private message
Iblis
Ghost Cat




Joined: 26 May 2003
Posts: 1233
Location: Your brain

PostPosted: Wed Jul 05, 2006 2:19 am    Post subject: Reply with quote

A .hsi file isn't a script, it's a list of constants. A constant is like a variable, in that it has a name and represents a number, but as you might guess from their names, a constant's value doesn't change.

In the .hsi file are constants specific to your game, like the names of heroes and items and such. So if, in your game, hero 1 is named "Joe," your .hsi file will contain a constant named "hero:joe" and it will have a value of 1. This is mainly to make plotscripts easier to read. So you could have a line that says:

Add hero (hero:joe)

instead of

Add hero (1)

For most people, the former is simpler and clearer.

To use .hsi files, you first have to export them from your game. So you go into custom, go to "Script Management," and then go to "export names for plotscripts (.hsi)." That will make a .hsi file for that game. It won't do this automatically though, so if you add anything that has a name (items, attacks, heroes, songs, etc...), or rename something, or delete something, you'll want to do this again so your .hsi file will be up-to-date. To use these constants in your plotscripts, you need this line at the beginning:

include, gamename.hsi

Where gamename is whatever your game's filename is.

If this is confusing, well, it's not really all that important, so you probably don't need to worry about it. "Add hero (1)" works just as well as "Add Hero (hero:joe)" does. I don't tend to use these constants myself, but I know they're useful to some people. It doesn't change how your script works, just how it looks.
_________________
Locked
OHR Piano
Back to top
View user's profile Send private message Send e-mail
mack2404




Joined: 05 Jul 2006
Posts: 7

PostPosted: Wed Jul 05, 2006 9:51 am    Post subject: Reply with quote

Ok thanks. I've had OHRRPGCE for about a week now, and thought it was time to plot-script.
_________________
"I've never been good at making action games. I prefer telling stories..."
Back to top
View user's profile Send private message
mack2404




Joined: 05 Jul 2006
Posts: 7

PostPosted: Wed Jul 05, 2006 12:09 pm    Post subject: Reply with quote

Ok, so I've made a script which displays some legal info. i added another script to my hss file, it compiled, but when i tried to import it into my game, it only imported my "legal" script. so i made a separate hss script, and that wouldn't compile to a hs file, so i couldn't import it.

So would some kind, generous person out there PLEASE help me out? I'm a flash/java/c++/html programmer, and it annoys me that I can't use something as simple as this!
_________________
"I've never been good at making action games. I prefer telling stories..."
Back to top
View user's profile Send private message
Jack
the fool




Joined: 30 Jul 2004
Posts: 773

PostPosted: Wed Jul 05, 2006 12:35 pm    Post subject: Reply with quote

post the script so we can see what's wrong first.
_________________
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Mike Caron
Technomancer




Joined: 26 Jul 2003
Posts: 889
Location: Why do you keep asking?

PostPosted: Wed Jul 05, 2006 5:13 pm    Post subject: Reply with quote

First off, I'll assume we have the same definition of script, namely a chunk of text that looks something like this:

Code:
script, my script, begin
  do stuff
end


If that's not what you consider a script, let me know, and I'll help you get sorted out.

So, assuming that you have two scripts in a .hss file, they will both be compiled together into the same .hs file. What it sounds like to me is that your second script has an error in it (a typo, or something) that is causing the compiler (HSPEAK) to stop compiling.

The result is that you keep importing the same .hs file over and over, since a new one isn't created.

Alas, it's difficult to actually see what the error is when you compile by dragging the .hss on to HSPEAK. So, I reccommend you get a slightly newer version (that will be included in the next OHR version), which displays a window for you to look at. http://hamsterrepublic.com/ohrrpgce/nightly/hspeak-win-nightly.zip
_________________
I stand corrected. No rivers ran blood today. At least, none that were caused by us.

Final Fantasy Q
OHR Developer BLOG
Official OHRRPGCE Wiki and FAQ
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
mack2404




Joined: 05 Jul 2006
Posts: 7

PostPosted: Wed Jul 05, 2006 11:56 pm    Post subject: Reply with quote

I don't think that's it. the script compiles (i know cos i used print screen to capture the hspeak window during compilation and read the text). I just want to know why it doesn't create a .HS file for me.

But thanks for the link. I'll try it
_________________
"I've never been good at making action games. I prefer telling stories..."
Back to top
View user's profile Send private message
mack2404




Joined: 05 Jul 2006
Posts: 7

PostPosted: Thu Jul 06, 2006 1:15 am    Post subject: Reply with quote

The script:

Code:

include, plotscr.hsd
include, soh.hsi

define script (1,legal,none)
define script (2,boss,none)

script, legal, begin
suspend player
show text box (1)
wait for text box
show text box (2)
wait for text box
end

script, boss, begin
suspend player
show text box (7)
wait for text box
fight formation (2)
give item (Sword)
give item (Rod)
give item (Dagger)
give item (Knuckles)
show text box (8)
wait for text box
end


and does anyone know a good site for learning to draw decent graphics. I can easily draw down and up walkabouts, but thats it.
_________________
"I've never been good at making action games. I prefer telling stories..."
Back to top
View user's profile Send private message
msw188




Joined: 02 Jul 2003
Posts: 1041

PostPosted: Thu Jul 06, 2006 9:31 am    Post subject: Reply with quote

I'm going to throw out the same suggestion I made to 'Mike' (not 'Mike Caron'): make sure that your .hs file is not read-only, or else the computer will not allow it to get rewritten by your newly compiled .hss file. Also, I should recommend that if you use the command 'suspend player' in your script, the command 'resume player' should also exist somewhere in that script. 'Suspend player' does not go away when the script ends; you have to end it yourself with 'resume player'.

Are you sure that this script is saving and compiling correctly? I don't think that your 'give item' commands should work like that. If you have items from you game called "Sword", "Rod", etc. you need to refer to them as 'item:Sword', 'item:Rod' in your script.
Back to top
View user's profile Send private message Visit poster's website
Mike Caron
Technomancer




Joined: 26 Jul 2003
Posts: 889
Location: Why do you keep asking?

PostPosted: Thu Jul 06, 2006 2:06 pm    Post subject: Reply with quote

Yeahhh... that script is almost certainly wrong.

Constants in "soh.hsi" are in the form "item:whatever" or "song:whatever". Thusly, I'm almost positive I'm right. If the output never says "writing output file whatever.HS", then it did not compile properly, and there is an error near by.
_________________
I stand corrected. No rivers ran blood today. At least, none that were caused by us.

Final Fantasy Q
OHR Developer BLOG
Official OHRRPGCE Wiki and FAQ
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
mack2404




Joined: 05 Jul 2006
Posts: 7

PostPosted: Thu Jul 06, 2006 11:51 pm    Post subject: Reply with quote

that might be why then, if (item:name) is needed, not just (item)

many thanks to both of you!
_________________
"I've never been good at making action games. I prefer telling stories..."
Back to top
View user's profile Send private message
Ysoft_Entertainment
VB Programmer




Joined: 23 Sep 2003
Posts: 810
Location: Wherever There is a good game.

PostPosted: Fri Jul 07, 2006 6:16 am    Post subject: Reply with quote

Hey, I know this may sound lame or something, but use this tool: http://hamsterrepublic.com/dl/hssed.zip

It will help you track down errors. Plus it lets you compile the scripts as you make them, no need to switch between the editor and compiler. It also has a built in help(for plotscript commands).
_________________
Try my OHR exporter/importer.
OHRGFX
Striving to become better pixel artist then Fenrir Lunaris. Unfortunately the laziness gets in the way of my goals.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group