| View previous topic :: View next topic |
| Author |
Message |
The Drizzle Who is the Drizzle?

Joined: 12 Nov 2003 Posts: 432
|
Posted: Thu Mar 23, 2006 3:12 pm Post subject: |
|
|
Things I want (off the top of my head):
1) Bitset to disable esc to run from battle (so you can use a "run" attack to escape from battle instead of holding esc)
2) Customizable number of max heroes in a party and the number of equipment slots (for heroes so that you can swap heroes with a maximum of less than four heroes. For the equipment so you don't have to use all 4 slots. Maybe you only want 2 or 3 types of equipment).
3) Equipment changing percentages of stats rather than raw numbers (for example, a sword that would raise a heroes attack by 5% instead of by 5.) _________________ My name is...
The shake-zula, the mic rulah, the old schoola, you wanna trip? I'll bring it to yah... |
|
| Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Thu Mar 23, 2006 3:36 pm Post subject: |
|
|
| Mike Caron wrote: | | NeoTA wrote: | Mike: That comes under the 'unforeseen sideeffects' category; You cannot guarantee that a script you call will not overwrite a specific slot, so graphics may change and make things look wrong.
Management is needed for complex scripting (and desirable for simple scripting) |
That's how many of the other features work, i.e. strings.
I think that this is better than dynamically allocating and deallocating sprites as we go along for two reasons:
1. If you accidentally not free a sprite, it'll continue to take up memory. And, making a new sprite won't free it. Then, the new sprite won't be freed, etc. This can eat up a lot of memory, and what happens when you create your 32768th sprite? IOW, it's better to leave the memory management burried in the engine.
2. It's faster and more convenient. For example, say you load up your sprites at the beginning of the game, and use them throughout.
If you accidentally overwrite a sprite because another function uses it, then you need to question why this happens, and then change one of them. |
You misunderstood me, I was talking about the internal implementation in GAME, not neccesaraly the plotscripting interface. I have not given any though to whether the plotscripting interface should be static slots, as you described, or a thin wrapper around loading and freeing, or both, or something else entirely. |
|
| Back to top |
|
 |
Mike Caron Technomancer

Joined: 26 Jul 2003 Posts: 889 Location: Why do you keep asking?
|
Posted: Thu Mar 23, 2006 4:42 pm Post subject: |
|
|
Ah, yes, I see.
Well, how about a comprimise? An algorythim like this:
| Code: | Type Sprite
width as integer
height as integer
dat as ubyte ptr 'or however we store pixels
end type
dim shared sprites() as sprite
sub loadsprite(slot, type, index)
do while slot > ubound(sprites)
redim preserve sprites(ubound(sprites) * 1.1 - 1) 'some number to balance memory usage with speed
loop
'load sprite #index of type into sprites(slot)
end sub |
We could do something similar with regular sprites (i.e. NPCs' sprites), but probably not indexed the same way.
Anyway, the net result of this is that the sprites are indexed statically, but simultaneously unbounded.
And, of course, when we shut down:
| Code: | for i = 0 to ubound(sprites)
if sprite(i).dat then deallocate sprite(i).dat
next |
Not that it's really needed on windows, but yeah. _________________ 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 |
|
 |
msw188
Joined: 02 Jul 2003 Posts: 1041
|
Posted: Mon Mar 27, 2006 1:33 pm Post subject: |
|
|
| How about attack bitsets to hide the 'miss' and 'fail' messages, just as there is a bitset to hide the damage? |
|
| Back to top |
|
 |
The Drizzle Who is the Drizzle?

Joined: 12 Nov 2003 Posts: 432
|
Posted: Mon Mar 27, 2006 2:34 pm Post subject: |
|
|
| Quote: | | How about attack bitsets to hide the 'miss' and 'fail' messages, just as there is a bitset to hide the damage? |
I like that idea too... Now I don't know anything about programming but it seems like it wouldn't be too hard to program. And I base that assumption on absolutely nothing. Equipment that raises stats by percentages would be nice toooooo. (Can I beg for this one?) _________________ My name is...
The shake-zula, the mic rulah, the old schoola, you wanna trip? I'll bring it to yah... |
|
| Back to top |
|
 |
Mike Caron Technomancer

Joined: 26 Jul 2003 Posts: 889 Location: Why do you keep asking?
|
Posted: Tue Mar 28, 2006 11:48 am Post subject: |
|
|
How about a bitset "Stat increases are percentages"? So, you'd punch in 33 for, say, HP, and you'll get 33% more HP if the bitset is on.
However, by default (i.e. without extra programming on our part), this would only be calculated once.
Example:
* Start with HP of 100
* Equip an item with 50% HP bonus (HP = 150)
* Level up, Base HP is 200 (HP = 250)
* Unequip item (HP = 200 again)
* Equip item (HP = 300)
Actually, I just realized that there would be a problem. When you equip an item, it adds the stat on the item to whatever the stat is currently (same with leveling up). Unequipping that item subtracts it.
So, in other words:
100 + 50% = 150
150 - 50% = 75
Hmm, that would be a problem. So, I guess that will have to wait for now. Perhaps we could store the "increase at time of equip" somewhere. That would take care of the problem nicely... _________________ 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 |
|
 |
Fenrir-Lunaris WUT

Joined: 03 Feb 2003 Posts: 1747
|
Posted: Tue Mar 28, 2006 12:45 pm Post subject: |
|
|
| Just to report, I'm not sure if the stat caps are working or not. Can someone else verify this? |
|
| Back to top |
|
 |
JC
Joined: 25 Mar 2006 Posts: 8
|
Posted: Tue Mar 28, 2006 4:37 pm Post subject: |
|
|
Or calculate what it would have been. But then you may have rounding errors.
100 * 150/100 = 150
(150 * 100) / 150 = 100
75 * 150/100 = 112
(112 * 100) / 150 = 74
So I guess you'll just have to store how much it is... and every time the Hero levels up, have it update automatically... |
|
| Back to top |
|
 |
Mike Caron Technomancer

Joined: 26 Jul 2003 Posts: 889 Location: Why do you keep asking?
|
Posted: Tue Mar 28, 2006 6:45 pm Post subject: |
|
|
Well, the problem is that we would have no way of calculating what it would have been, since... bah, I'm sure I'll figure something out. _________________ 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 |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Sat Apr 01, 2006 5:46 am Post subject: |
|
|
Would have to unequip whenever a fixed amount stat increase occurs. But as JC pointed out, this will pile up rounding errors. Also, how should scripted stat changes be handled? _________________ "It is so great it is insanely great." |
|
| Back to top |
|
 |
Mr B
Joined: 20 Mar 2003 Posts: 382
|
Posted: Sat Apr 01, 2006 12:01 pm Post subject: |
|
|
Okay, this is bizzare...
In the "Forgotten (?) Features and Changes Thread" I had asked for a "system day" and "system year" command, which got a favorable response from a couple of people, including at least one developer (I believe).
I was reading through the whatsnew.txt file for the Rusalka release (which I am still using), and it lists those commands as having been implemented! Surprised, I went and checked them in a test game, and there are indeed commands for the system day, month, and year. However, the day and the month commands seem to return each other's data -- on April 1st (today), "system day" returns '4', while "system month" returns '1'.
In short, we have them, but weirdly! |
|
| Back to top |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Sat Apr 01, 2006 12:29 pm Post subject: |
|
|
Maybe it's a bizarre April Fool's prank planned months in advance by the programmer of those functions. _________________
|
|
| Back to top |
|
 |
PlayerOne

Joined: 07 Sep 2005 Posts: 143 Location: UK
|
Posted: Sat Apr 01, 2006 2:12 pm Post subject: |
|
|
| You're right. They aren't documented in the plot dictionary, which is why I didn't notice them, and looking at the code it seems to make some bad assumptions about the date format. |
|
| Back to top |
|
 |
Mike Caron Technomancer

Joined: 26 Jul 2003 Posts: 889 Location: Why do you keep asking?
|
Posted: Sat Apr 01, 2006 2:44 pm Post subject: |
|
|
Yes, that's my fault. Unfortunately, that's the best way to find the date in QB. FB has a couple more things, like Day() and whatnot, but you need to include stuff to use them. _________________ 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 |
|
 |
PlayerOne

Joined: 07 Sep 2005 Posts: 143 Location: UK
|
Posted: Sat Apr 01, 2006 2:53 pm Post subject: |
|
|
| Looks like it's just the wrong way round. DATE$ will always be in mm-dd-yyyy format by the look of it, no matter what your local settings are. I've just checked in a fix. |
|
| Back to top |
|
 |
|