Klokreations

You are not connected. Please login or register

RiskyPLUS' Question(s)

Go to page : Previous  1, 2, 3

View previous topic View next topic Go down  Message [Page 3 of 3]

51 Re: RiskyPLUS' Question(s) on Sun Dec 30, 2012 3:28 pm

Charlotte


Chick
I would suggest using the default RNG function (something like game_get_rng, I don't remember), then if it rolls a 25 or under, you get 2 attacks, otherwise roll it again, and 50 or under is 3 attacks, otherwise 75 or under is 4 attacks, otherwise you get 5 attacks.

52 Re: RiskyPLUS' Question(s) on Sun Dec 30, 2012 3:32 pm

Guest


Guest
The code is $game_system.get_rng, found it in another script, but trying to use it in the activation chances script just returns an 'undefined method' error.

I'm a complete Ruby nub so I'm probably missing something really obvious.

53 Re: RiskyPLUS' Question(s) on Sun Dec 30, 2012 3:36 pm

Charlotte

avatar
Chick
Could you post your Astra script so far?

54 Re: RiskyPLUS' Question(s) on Sun Dec 30, 2012 4:22 pm

Guest


Guest
Was:
ASTRA_HITS = 5

Changed:
ASTRA_HITS = (rand(3) + 2), made it choose a number between 2 and 5 and use that number every time Astra is activated.

Attempted:
num = $game_system.get_rng
if num < 50
ASTRA_HITS = 2
else
ASTRA_HITS = 5
end

which returned the error saying get_rng is an undefined method.

55 Re: RiskyPLUS' Question(s) on Mon Dec 31, 2012 2:46 pm

Charlotte

avatar
Chick
Out of curiosity, why do you have the whole
num = $game_system.get_rng
if num < 50
instead of just
if $game_system.get_rng < 50
?

56 Re: RiskyPLUS' Question(s) on Mon Dec 31, 2012 3:14 pm

Guest


Guest
Charlotte wrote:Out of curiosity, why do you have the whole
num = $game_system.get_rng
if num < 50
instead of just
if $game_system.get_rng < 50
?

I found the num = $game_system.get_rng etc etc code in another script, so I figured if I just used that exact code, there's no way it wouldn't accept it, because it uses the code elsewhere already.

57 Re: RiskyPLUS' Question(s) on Mon Dec 31, 2012 5:43 pm

Primefusion

avatar
Admin
Because readability > everything else. Plus if the script would need to use the rng elsewhere in the code you could just type num instead of that long ass thing.

58 Re: RiskyPLUS' Question(s) on Tue Jan 01, 2013 3:54 am

Charlotte

avatar
Chick
But num = $game_system.get_rng appears, like, almost nowhere, but if $game_system.get_rng < rate litters the Activation Skills script.

59 Re: RiskyPLUS' Question(s) on Tue Jan 01, 2013 3:06 pm

Primefusion

avatar
Admin
Sounds like the script could be more readable then.

60 Re: RiskyPLUS' Question(s) on Tue Jan 01, 2013 3:10 pm

Guest


Guest
It could have been, yeah, but I was just trying to see if it would even accept the code, which it didn't. I didn't see any point in writing it out in a more readable or efficient way if I couldn't even use $game_system.get_rng at that point in the script without getting an error.

I did later start directly modifying the 'if $game_system.get_rng < rate' part of the code that Charlotte mentioned, splitting it into four different rates that would each give a different number of Astra hits, but that was just too buggy. No matter how I tried to do it, Astra just wouldn't end anymore. I think it was just going through every 'if' statement systematically, not choosing one and ignoring the rest, but I tried everything I knew to fix that and I just couldn't, so I gave up.

61 Re: RiskyPLUS' Question(s) on Sun Jan 06, 2013 3:53 am

Guest


Guest
Just thought of something. How hard do you guys think it would be to allow units to equip two different things at once - one weapon, and one piece of armor with a +def bonus? I could make armor pieces consumable with a static bonus to health or defence, but I feel like having armor you can swap out between units depending on the situation would be much more engaging.

62 Re: RiskyPLUS' Question(s) on Sun Jan 06, 2013 4:33 am

Charlotte

avatar
Chick
Having armor with the +def shouldn't be hard, I'm pretty sure. But limiting the unit to equipping one at a time? I think for that, you could basically duplicate all the scripts defining what weapon a unit has equipped, dependent on an Element flag for Armor. That probably wouldn't be TOO hard.

63 Re: RiskyPLUS' Question(s) on Sun Jan 06, 2013 5:06 pm

Klokinator

avatar
Admin
Just use equip items, bro. It's possible to limit a unit to only one/two equip items, then from there you can limit it to either characters, classes, or neither.

http://klokreations.forumotion.com

64 Re: RiskyPLUS' Question(s) on Sun Jan 06, 2013 5:07 pm

Charlotte

avatar
Chick
Lool or that XD

65 Re: RiskyPLUS' Question(s) on Sun Jan 06, 2013 5:08 pm

Guest


Guest
I'm just not sure how you'd go about changing it so units can have more than one thing equipped at the same time. Obviously the system is currently built around weapons being the only equippable item type, and only one weapon being equipped at any time.

Unless I'm misinterpreting what you're saying?

66 Re: RiskyPLUS' Question(s) on Sun Jan 06, 2013 5:11 pm

Klokinator

avatar
Admin
Set an item's uses to -1, and it becomes an equip item, like the Iron Rune from FE7. You know what that is, right?

http://klokreations.forumotion.com

67 Re: RiskyPLUS' Question(s) on Sun Jan 06, 2013 5:12 pm

Guest


Guest
I vaguely remember it, yeah. Hang on, let me try this out real quick.

68 Re: RiskyPLUS' Question(s) on Sun Jan 06, 2013 5:14 pm

Klokinator

avatar
Admin
If you need a better description, I covered it in my tutorials.

http://klokreations.forumotion.com

69 Re: RiskyPLUS' Question(s) on Sun Jan 06, 2013 5:28 pm

Guest


Guest
Ahh, now I see what you meant! Thanks Klok, I sorta skipped over the items section of your tutorial a while back (figured I'd go back to it later) so I never even knew there were equip items. Should be fairly easy to do what I was thinking of doing, then.

70 Re: RiskyPLUS' Question(s) on Sun Jan 06, 2013 5:40 pm

Guest


Guest
Actually, wait, spoke too soon -

Klokinator wrote:It's possible to limit a unit to only one/two equip items.
How do you go about doing this? I couldn't find it in the tutorial, sorry.

71 Re: RiskyPLUS' Question(s) on Mon Jan 07, 2013 2:26 pm

Klokinator

avatar
Admin
I don't actually know how, but I assume making an invisible Skill that limits the equipped item or something would work. I'm no coded though so I have no idea.

By definition though, the player would have to limit the number of equip items on their units or else their inventory space would be nonexistant.

http://klokreations.forumotion.com

Sponsored content


View previous topic View next topic Back to top  Message [Page 3 of 3]

Go to page : Previous  1, 2, 3

Permissions in this forum:
You cannot reply to topics in this forum