 |
Castle Paradox
|
View previous topic :: View next topic |
Author |
Message |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Tue Oct 04, 2005 9:48 am Post subject: |
|
|
Nowhere does it say how many strings are available. This should ideally be in the HSpeak specification, but the psdict wouldn't be a bad place for it, either. _________________
|
|
Back to top |
|
 |
Slime Objection!!!

Joined: 27 Feb 2005 Posts: 170
|
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Tue Oct 04, 2005 12:09 pm Post subject: Re: Edit Menus |
|
|
pkmnfrk wrote: | Would the menus appear over other menus? |
It would be best to make it so it can go either way. A menu could load another menu over itself, or it could replace itself with another menu.
Moogle1 wrote: | Nowhere does it say how many strings are available. This should ideally be in the HSpeak specification, but the psdict wouldn't be a bad place for it, either. |
Oops! Yes, that definitely should have been in the docs!. There are 32 plotstrings, number 0-31 |
|
Back to top |
|
 |
Tsunamidog banned...but not really.

Joined: 14 Sep 2004 Posts: 330 Location: right behind you....
|
Posted: Tue Oct 04, 2005 12:23 pm Post subject: |
|
|
Dis update is teh awesomeness. The map thing's pretty cool. But too bad the menu thingie isn't up. _________________ The Following Statement is True.
The Above Statement Is False |
|
Back to top |
|
 |
Mr B
Joined: 20 Mar 2003 Posts: 382
|
Posted: Tue Oct 04, 2005 1:00 pm Post subject: |
|
|
DARNIT. I tried to preview my post and I was logged out. I knew I should have copied everything into the clipboard before pressing that button...
Anyhows.
How will the string assignment commands work? In the "whatsnew.txt" I see "destid $= srcid" and "$1="My string"". Will I also be able to write "$destid= srcid" and "1$="My string""?
Will I be able to refer to the string id number (0-31) via variables ($curString="Number"$+loopVal), or do the string id numbers have to be hardwired?
Plotscript Dictionary wrote: | positionstring (ID, x, y)
Positions the top left corner of string #ID at the given x,y coordinates. Unlike show string at, this command will not affect the visibility of a string. |
The entry for "show string at" doesn't say anything about visibility. What does this mean?
And finally (for now!), are there any string equivalents to "import/export globals"? |
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Tue Oct 04, 2005 3:43 pm Post subject: about strings (this needs to go in the docs) |
|
|
EDIT: many of the things I say in this post are incorrect! please see TMC's corrections further down this thread
Mr B wrote: | How will the string assignment commands work? In the "whatsnew.txt" I see "destid $= srcid" and "$1="My string"". Will I also be able to write "$destid= srcid" and "1$="My string""? |
$n="text" and $n+"text" are the only ways you can type an text directly in your script. Note that there can be no spaces around the "=" or "+"
Code: | $0="happy" # This works
$1 = "joy" # This results in a compiler error
|
Here is how these assignments work.
Gets translated into a call to the undocumented "setstring" command using the ascii code of each letter in the quoted text.
Code: | setstring(0,65,66,67) |
Which is implemented as a script in plotscr.hsd which (in effect) does this:
Code: | clear string(0)
append ascii(0,66)
append ascii(0,67)
append ascii(0,68) |
The $n+"" syntax works similarly, being converted into a call to the undocumented "appendstring" command, which does the same thing as setstring except without first clearing the string.
You can copy a string from one ID to another, but only by ID number.
Code: | 0 $= 1 # copies the contents of string 1 into string 0
0 $= "Puppies" # compiler error
0 $+ 1 # appends the contents of string 1 on the end of string 0
0 $= "Kittens" # compiler error |
Mr B wrote: | Will I be able to refer to the string id number (0-31) via variables ($curString="Number"$+loopVal), or do the string id numbers have to be hardwired? |
You cannot use variables for the string ID with the $n="" and $n+"" syntax. You must use hardcoded ID numbers
Code: | variable(n)
n:=0
$n="Goldfish" # compiler error |
I know this is confusing, since I keep refering to the syntax as $n="". Sorry. From now on, why don't we refer to $n="" as String Literal assignment, and $n+"" as String Literal appending.
The setstring and appendstring commands really should be documented. Although building a string out of ascii codes is a pain, at least it works with variables as the string ID number (as do all the other string manipulating comands)
Oh, by the way, the $= and $+ operators have no problems with variables.
Code: | variable(a,b)
$1="Happy"
$2="Joy"
a:=1
b:=2
a $+ b
show string (a) # this works, displaying "HappyJoy" |
Mr B wrote: | Plotscript Dictionary wrote: | positionstring (ID, x, y)
Positions the top left corner of string #ID at the given x,y coordinates. Unlike show string at, this command will not affect the visibility of a string. |
The entry for "show string at" doesn't say anything about visibility. What does this mean? |
"show string at" always makes the string visible. "position string" moves the string. if it was already visible, it stays visible, if it was hidden it stays hidden. I can see any common uses for it. The whole reason that "position string" exists is because the implementation of "show string at" in plotscr.hsd uses it.
Code: | script,showstringat,stringID,x,y,begin
setstringbit(stringID,0,1)
positionstring(stringID,x,y)
end |
Mr B wrote: | And finally (for now!), are there any string equivalents to "import/export globals"? |
You mean something that reads and writes strings stored in another save slot? No. But you can use the "string to globals" and "globals to string" commands to copy ascii codes back and forth from strings to globals.
Last edited by Bob the Hamster on Wed Oct 05, 2005 12:18 pm; edited 1 time in total |
|
Back to top |
|
 |
AdrianX ..yeah.

Joined: 13 Feb 2003 Posts: 286 Location: Batangas City,Philippines
|
Posted: Tue Oct 04, 2005 4:04 pm Post subject: |
|
|
..now that's a lotta features..and i have a lotta questions,specifically:
1. what's the purpose of "no rewards for targets killed"?
2. ..transparent tile?you mean the OHR have layers now like other game makers?
3. what's the "attack bitset to ignore attackinh hero's/enemy's extra hit stat"?
4.finnaly,what's "pause on battle menus"?
..thank you.. |
|
Back to top |
|
 |
Pako the True G pako

Joined: 26 Mar 2005 Posts: 184 Location: Bleh-ville
|
Posted: Tue Oct 04, 2005 4:09 pm Post subject: |
|
|
Now that we have "layers" Will we be able to make rain? _________________
 |
|
Back to top |
|
 |
Iblis Ghost Cat

Joined: 26 May 2003 Posts: 1233 Location: Your brain
|
Posted: Tue Oct 04, 2005 4:23 pm Post subject: |
|
|
Quote: | 1. what's the purpose of "no rewards for targets killed"? |
This lets the enemies have a "run away" or perhaps "self destruct" attack that doesn't give the heroes experience or gold. Or, you could put it on an instant-death attack or something, like many rpgs have in the past.
Quote: | 2. ..transparent tile?you mean the OHR have layers now like other game makers? |
It has nothing to do with layers, I'm afraid. Basically it means that you can copy a tile in the tile editor and paste it over another one in such a way that will combine the tiles rather than overwriting the target tile entirely. This makes drawing trees and rocks and other such things easier, you can just paste them onto your ground tile.
So, if you have a tile that is half colored and half transparent (first color in the palette), you can copy the former, paste onto the latter with Ctrl-t (not Ctrl-v, that's the normal paste), and you'll get a tile that is half the first tile and half the second tile.
Quote: | 3. what's the "attack bitset to ignore attackinh hero's/enemy's extra hit stat"? |
This allows some attacks to only be performed once regardless of the hero's extra hit stat. Used to be, if your hero had a extra hit stat of 1, and he cast ultima, you'd get two ultimas. And that's no good!
Quote: | 4.finnaly,what's "pause on battle menus"? |
Unless I'm mistaken, this means that nothing will happen if any battle menu is up. With the old pause-on-menu bitset it'd only pause if you had the skill or item menus open, this one should also pause if the main battle menu is open. It's just a way of getting closer to turn-based battles. _________________ Locked
OHR Piano |
|
Back to top |
|
 |
JSH357

Joined: 02 Feb 2003 Posts: 1705
|
Posted: Tue Oct 04, 2005 4:32 pm Post subject: |
|
|
Iblis is correct, but one note:
if you are using Pause on All Battle Menus, make sure none of the attacks in your game have delays! (Unless they're text or something) For instance, if you had some spell that takes 200 delay to charge, the player could just camp out on another hero's turn until the spell activates, thus removing the original intent of the delay. |
|
Back to top |
|
 |
Iblis Ghost Cat

Joined: 26 May 2003 Posts: 1233 Location: Your brain
|
Posted: Tue Oct 04, 2005 4:36 pm Post subject: |
|
|
Quote: | if you had some spell that takes 200 delay to charge, the player could just camp out on another hero's turn until the spell activates, thus removing the original intent of the delay. |
That seems like a bug to me. Shouldn't pausing include things like attack delays? _________________ Locked
OHR Piano |
|
Back to top |
|
 |
JSH357

Joined: 02 Feb 2003 Posts: 1705
|
Posted: Tue Oct 04, 2005 5:05 pm Post subject: |
|
|
Pause on battle menus has always behaved that way. |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Tue Oct 04, 2005 5:57 pm Post subject: Re: about strings (this needs to go in the docs) |
|
|
WHOA there!
James Paige wrote: |
Mr B wrote: | Will I be able to refer to the string id number (0-31) via variables ($curString="Number"$+loopVal), or do the string id numbers have to be hardwired? |
You cannot use variables for the string ID with the $n="" and $n+"" syntax. You must use hardcoded ID numbers
Code: | variable(n)
n:=0
$n="Goldfish" # compiler error |
I know this is confusing, since I keep refering to the syntax as $n="". Sorry. From now on, why don't we refer to $n="" as String Literal assignment, and $n+"" as String Literal appending.
The setstring and appendstring commands really should be documented. Although building a string out of ascii codes is a pain, at least it works with variables as the string ID number (as do all the other string manipulating comands)
Oh, by the way, the $= and $+ operators have no problems with variables.
Code: | variable(a,b)
$1="Happy"
$2="Joy"
a:=1
b:=2
a $+ b
show string (a) # this works, displaying "HappyJoy" |
|
Actually, I made sure to implement strings in HSpeak so you could use any expression you wanted for string id.
Hspeak simply takes everything between the $ and the =" or +" and sticks it between setstring( and the list of ascii codes, and it is parsed normally later on.
For instance, in Phoeret, a typical couple of lines was
Code: | $next menu string="Build City $"
append number (next menu string, cost) |
Mr B wrote: | And finally (for now!), are there any string equivalents to "import/export globals"? |
Strings aren't saved in saved games. They are just like the number displayed at the bottom of the screen with showvalue (which showstring also usefully does with plotstrings)
Also, it seems we never updated the hamterspeak specification.
Max. string length is 40 characters, because that is the width of the screen. All strings formed will automatically be trimmed to 40 characters. If you write a string in your script with more than 40 characters, you would problably get a "too many arguments" error.
You can use any ascii character in a string at all, except for return. You can use # without a problem in the string text because strings are converted before comments are stripped, and you can also comment out a string like a normal statement. There are 2 'escape sequences' you can use. If you want to use " write ". If you want to use \ write \\.
Tiem for some fun examples:
Code: | $1="Man: \"Hello!\""
$2="C:\\DOS"
$3="# $2=\"C:\\\\DOS\""
|
will set string 1 to Man: "Hello!"
and string 2 to C:\DOS
and string 3 to # $2="C:\\DOS"
(PS: if you write a single \ HSpeak will overlook your mistake as long as it does not form a valid escape sequence, and will treat it as \\)
You can also put multiple strings on one line, but you won't really want to, it won't be very clear.
Finally, if HSpeak doesn't like your string, like you did not close it with a ", it will simply ignore it, in case you have been using $'s in your variable names or something else odd and happened to form half a string. This made lead to some very odd "Unrecognised name ___. It has not been defined as script, constant, variable, or anything else" errors later on.
Any more questions? _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Tue Oct 04, 2005 6:03 pm Post subject: Re: Edit Menus |
|
|
James Paige wrote: | The Mad Cacti wrote: | I knew I was meant to remind you to do something! I was going to remind you to increase the stack, but it didn't crash for me (I didn't try multiple battles.) |
That is because I remembered on my own to increase the stack size
With the old stack size, it was consistently crashing on exit after fighting two or more battles... It puzzles me that it did not crash on exit after just one battle. It makes me wonder if there is a meory leak (stack leak?) in battle, and two battles was just enough to push it over the limit.
I increased the stack-size from 2650 to 2700, an increase of 50... um... 50 of whatever units the stack is in
I am curious what happens after you fight 50 battles. Do you get a crash on exit? What about 100 battles? |
(bytes)
There are other stack leaks. Every time you jump out of a WHILE with a GOTO in QB, you leak a little bit of stack. So if you quit to the title screen enough times, you will get an out of stack error. I think there was also another jump out of a while loop in the script interpreter. _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
Pepsi Ranger Reality TV Host

Joined: 05 Feb 2003 Posts: 493 Location: South Florida
|
Posted: Tue Oct 04, 2005 9:51 pm Post subject: |
|
|
Hey Guys,
Great update, though I haven't really opened the package yet. The map additions are much appreciated. And thanks for clarifying the strings element, sounds like a useful tool.
One request--a request I've been asking awhile for...
Please...please somebody write in a plotscript that offers the ability to turn off the map name upon entry. I need this for smooth cutscenes.
Please. Please!!!
PLEASE!!!
At your leisure of course.
Oh, and kudos to whoever decided to allow foot offset adjustments through plotscripting. The transparency tiles are an excellent addition as well. _________________ Progress Report:
The Adventures of Powerstick Man: Extended Edition
Currently Updating: General sweep of the game world and dialogue boxes. Adding extended maps.
Tightfloss Maiden
Currently Updating: Chapter 2 |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot 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
|