Zelaron Gaming Forum

Zelaron Gaming Forum (http://zelaron.com/forum/index.php)
-   RPGMaker (http://zelaron.com/forum/forumdisplay.php?f=188)
-   -   I'm actually asking blue for help??? (http://zelaron.com/forum/showthread.php?t=38154)

Wed-G 2005-11-20 09:32 PM

I'm actually asking blue for help???
 
Hey, bluecube

Do you think you could help design a skill menu with me?

I'll do all the coding, I just need a plan with scripting examples.

Please, give input in a TXT file

Code:

Rough Draft -

"0" key- brings main menu.

Items
Skills
Equip
Options
Exit

"enter" key- select Skills

List- 4 columns, 10 slots per column. 1 column per character when 4 characters total.

Displays learned skills depending on character in party. Easy.

-> Fork option "char1" in party
  -> true
  -> Fork option "skill 1" learned
    -> true
    -> show pic "skill 1, char 1"
->
    -> false
  ->
->
etc.

now, how can I apply them to a hack 'n' slash???


Grav 2005-11-20 09:33 PM

*SUMMON BLUECUBE*

Wed-G 2005-11-23 05:50 PM

Blue???

Sovereign 2005-11-23 05:51 PM

Check his profile for contact information. he doesn't seem to visit all that often.

BlueCube 2005-11-23 06:54 PM

I just check in every once in a while to see if anyone needs things, but usually this forum is dead for the most part.

Anyway, I'm not sure how that applies to any hack and slash game, nor what kinds of skills we are talking about here (which DOES affect how the code is done and routines that are needed - stuff like damage checking and movement skills are completely different and require different routines). Also the way they are gotten is important - are they simply "level" based (and go in a straight line from "Crappy Stab" to "Awesome Super Slash") or do you get them in random orders depending on what you do/read/buy/etc. That would affect whether or not you'd use a variable or a ton of switches.

The general gist is to make sure all skills are evenly spaced (not just for looks, but for coding purposes as well). Then you'd take input and simply change a number - if you hit right, you add 10, if you hit up, you subtract 1, etc. So it would be something like this:

11 21 31 41
12 22 32 42
13 23 33 43
14 24 34 44

etc. Easy enough. You'd then figure out where to place a "cursor" for selection purposes based on a multiple of something like "VirtX = VirtualCoordinates / 10" and "VirtY = VirtualCoordinates MOD 10" to find the virtual coordinates, and map those to whatever you want, like "RealX = VirtX * 15" and then use THOSE to tell where the selection picture is. Sounds complicated, but it's actually much simpler to do this and simply calculate where you are then having it directly say where it is for 40 things with a branch for each (and then branch AGAIN when it's selected).

On a skill selection, you'd just take the number (32, 41, whatever) and go through and do a long list of branches to figure out what to do at that point, whether it be damage or not. Not much of a way around this one.

Edit: Should probably draw a picture or something, the muliplying is tough to visualize unless you've done it before

Wed-G 2005-11-23 09:25 PM

I've done this all before, but I just can't focus when I try.

BlueCube 2005-11-23 09:38 PM

1 Attachment(s)
Quote:

Originally Posted by BlueCube
Edit: Should probably draw a picture or something, the muliplying is tough to visualize unless you've done it before

Okay, here goes. The attachment should be at the bottom of this post.

Fig. A is the basis for planning everything. For icons or whatever, it's usually much, much easier to have odd numbers for the width/height so you can plan for the Offset (Fig B.) Actually the Offset involves rounding (I THINK it's ceil(x/2)) but using odd numbers just makes everything so much simpler. Fig 3. is used to help you understand all this math I get to put down. OKAY THEN


In the [####:Whatever] variable type of stuff, the #### is implied and doesn't help you much anyway since you'll be using different numbers. So I don't use numbers, just the names. Comments are in green, don't need the "Comment" thing in there.

The below code is incomplete because there's really no way to build the code until I know how the skills are obtained and if they're going to be known via switches or variables and how the cursor is going to be done (is it going to be via changing a picture, or is it going to be a selection target that surrounds the picture and glows or something, or is it going to be the good old "pointing finger" selection thing.)



Code:


Main Menu Part

-- Initialize variables so you can change spacing and size easily.
-- Offset/Spacing are obvious, VarIconMax is the last block that you use (See Fig C on the attachment)
<> Variable [VarIconOffset] = 5
<> Variable [VarIconSpacing] = 10
<> Variable [VarIconMax] = 44
<> Variable [VarIconTop] = 50
<> Variable [VarIconLeft] = 50
-- ---------------------------------------
<> Now it is time to place the icons










CursorPlacer (called)

-- Assumes: [VarCursorLocation] is where the cursor should go, in a "23" or whatever format.
<> FFFFFFFFFF





GetVirtCoords (called)

-- Assumes: [VarBlockNum] is something like "22"
-- Returns: [VarRealX], [VarRealY]
-- ---------------------------------------
-- Variable Init
<> [VarVirtY] = 0
<> [VarVirtX] = 0
-- ---------------------------------------
<> [VarVirtY] = [VarBlockNum] MOD 10
<> [VarVirtX] = [VarBlockNum] - [VarVirtY]
<> [VarRealX] = [VarRealX] / 10
<>



GetRealCoords (called)

-- Assumes: [VarVirtX] and [VarVirtY] have been set correctly
-- Returns: [VarRealX], [VarRealY]
-- ---------------------------------------
-- Variable Init
<> [VarRealY] = 0
<> [VarRealX] = 0
-- ---------------------------------------
<> [VarRealY] = [VarVirtY] * [VarIconSpacing]
<> [VarRealY] = [VarRealY] + [VarIconOffset]
<> [VarRealY] = [VarRealY] + [VarIconTop]


sciencekid 2005-11-24 05:02 PM

this guy must be a genius.... I gotta learn this stuff soon somehow. :( hey blue, where did you learn all this programming?

Wed-G 2005-11-24 05:40 PM

Quote:

Originally Posted by sciencekid
this guy must be a genius.... I gotta learn this stuff soon somehow. :( hey blue, where did you learn all this programming?

Blue is good. Me, I learned from trial and error and hours infront of rm2k's help file.

Though, with what he posted, it kinda stumps me. Not utterly stomping my mind, but kind of puzzling. Easier if I could see it in action.

BlueCube 2005-11-24 06:54 PM

The code is completely useless until I know how the selection is to be done / skills are obtained


All times are GMT -6. The time now is 01:17 AM.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
This site is best seen with your eyes open.