11 DAYS OF PENT UP SCRIPT REQUESTS AND THOUGHTS

Posts

Pages: first 123 next last
Max McGee
with sorrow down past the fence
9159
I have no skill whatsoever with scripting. This even extends to skill in finding scripts that others have made. There are two things I'm looking for. Anyone who helps me find these things, if they are already in existence, will be thanked, and owed one. Anyone willing to actually script these things for me will be thanked profusely, credited, and owed two.

PRIORITY ONE. A script that allows for creating a significant number of additional character stats ("paramaters"): the catch/twist is that I don't necessarily need these parameters to effect battle algorythms at all, I need them to effect other things outside of combat, and since that will need to be done with eventing, I need to make sure that they can be tracked as variables. Alternatively, I suppose I am asking if certain in-game variables can be displayed on the status screen. To clarify, I am talking about things like 'Charisma', 'Cyber Affinity', that won't normally effect a battle but will be checked outside of battle for skill checks and things of that sort. I want to display those on the character status screen.

Also, if someone could give me the real fix so that RMVX does not freak out or fail upon setting variables to parameters/item count or when multiplying variables (Karsuman's fix didn't work for me) as well as step-by-step, idiot proof instructions for using it, that would be excellent.

PRIORITY TWO. A script that allows alternative determination of who can equip what items and weapons. I.E. rather than determining this solely by class, I would like it if only a character who had learned, say, the passive skill "SWORDS PROFICIENCY" could use swords. OR to link it to a variable, or a paramter, or one of the parameter/variables listed above. So only a character with Strength (attack) 10+ could use a great axe and only a character with Technology 10+ could use a Plasma Rifle.)

I have a feeling I might have been kind of unclear on some of these things, so if you have questions, please do not hesitate to ask.
I'm going to look into your 2nd Priority, since I would like to have something like this as well ... I'll see what i can come up with
*rere last-rerereedit*
This entire post is a clusterfuck. Let me fix that.

This script fixes the Control Variable problem with multipliying (somebody forgot to make the script actually multiply) and using items (which was a line of code that shouldn't even been there).

Instructions:
1) Open the script editor
2) Scroll down to the "? Materials" on the left window and go to the script below it.
3) Push Insert
4) In the new script paste the above script into the right window
5) Name it something like "Control Variable Fix"
6) Post here in rage when it crashes RMVX, wipes your hard drive, and seeks an army of midly annoying gnats to your house (or if it doesn't work or something)

The script:

# Fixes the bug where variables aren't multiplied correctly.
# Insert this script after the Game_Interpreter class and it should fix the
# error (Somebody forgot to include the multiply symbol)

class Game_Interpreter

alias command_122_bug command_122
def command_122

value = 0
case @params[3] # Operand
when 0 # Constant
value = @params[4]
when 1 # Variable
value = $game_variables[@params[4]]
when 2 # Random
value = @params[4] + rand(@params[5] - @params[4] + 1)
when 3 # Item
value = $game_party.item_number($data_items[@params[4]])
actor = $game_actors[@params[4]]
if actor != nil
case @params[5]
when 0 # Level
value = actor.level
when 1 # Experience
value = actor.exp
when 2 # HP
value = actor.hp
when 3 # MP
value = actor.mp
when 4 # Maximum HP
value = actor.maxhp
when 5 # Maximum MP
value = actor.maxmp
when 6 # Attack
value = actor.atk
when 7 # Defense
value = actor.def
when 8 # Spirit
value = actor.spi
when 9 # Agility
value = actor.agi
end
end
when 5 # Enemy
enemy = $game_troop.members[@params[4]]
if enemy != nil
case @params[5]
when 0 # HP
value = enemy.hp
when 1 # MP
value = enemy.mp
when 2 # Maximum HP
value = enemy.maxhp
when 3 # Maximum MP
value = enemy.maxmp
when 4 # Attack
value = enemy.atk
when 5 # Defense
value = enemy.def
when 6 # Spirit
value = enemy.spi
when 7 # Agility
value = enemy.agi
end
end
when 6 # Character
character = get_character(@params[4])
if character != nil
case @params[5]
when 0 # x-coordinate
value = character.x
when 1 # y-coordinate
value = character.y
when 2 # direction
value = character.direction
when 3 # screen x-coordinate
value = character.screen_x
when 4 # screen y-coordinate
value = character.screen_y
end
end
when 7 # Other
case @params[4]
when 0 # map ID
value = $game_map.map_id
when 1 # number of party members
value = $game_party.members.size
when 2 # gold
value = $game_party.gold
when 3 # steps
value = $game_party.steps
when 4 # play time
value = Graphics.frame_count / Graphics.frame_rate
when 5 # timer
value = $game_system.timer / Graphics.frame_rate
when 6 # save count
value = $game_system.save_count
end
end
for i in @params[0] .. @params[1] # Batch control
case @params[2] # Operation
when 0 # Set
$game_variables[i] = value
when 1 # Add
$game_variables[i] += value
when 2 # Sub
$game_variables[i] -= value
when 3 # Mul
$game_variables[i] *= value
when 4 # Div
$game_variables[i] /= value if value != 0
when 5 # Mod
$game_variables[i] %= value if value != 0
end
if $game_variables[i] > 99999999 # Maximum limit check
$game_variables[i] = 99999999
end
if $game_variables[i] < -99999999 # Minimum limit check
$game_variables[i] = -99999999
end
end
$game_map.need_refresh = true
return true
end
end
I think this is what your looking for Max ... you might have to customize it a bit but here you go:
http://www.rpgrevolution.com/forums/index.php?showtopic=17705&hl=equipment+stats

Although it is not depending on the character's stats, it's their "ranking" maybe you can find some use for it
Hmm, it didn't work huh? I'll take another look at that again.
Max McGee
with sorrow down past the fence
9159
Thank you very much, GRS, that should fix 1/3 of my problems. I haven't tried it yet, I will later, and I'll let you know how it works out.

I know another request occured to me, but I seem to have forgotten what it is.

Verifyed Rasta: That is close to what I want, but needs too much customization for it to be viable for me to use it. For instance, I want the techy character to be able to use energy weapons and the fighter character to be able to use martial weapons, so it's not 'linear', it's options, and that script's fucntionality is very much a linear functionality.

Actually, this seems to include that functionality. I'll have to mess around with it a little.
author=Max McGee link=topic=2577.msg47691#msg47691 date=1227915434
Actually, this seems to include that functionality. I'll have to mess around with it a little.

Yeah I was encouraging you mess around with it :P
But yeah I get what your saying ... I'm getting a lot better with scripts, I'll see if i can try something out with it
Craze
why would i heal when i could equip a morningstar
15170
I call the Solution-Man class! Problems to-be solved.
For the first script, did you want something like this?

If so, then the script is pretty much done and I'll look it over tomorrow to clean up anything horrible that I'll spot then.
Max McGee
with sorrow down past the fence
9159
Egads....but...but Craze is already doing this.

anyway...GRS:

Yes, that is what I want, but those parameters need to be variables, i.e. they need to be the same as in-game variables so I can increase/decrease them as variables and/or check them as variables.

Anyway, I feel bad because Craze is already working on this but you already worked on it.
author=Max McGee link=topic=2577.msg47944#msg47944 date=1228010968
Egads....but...but Craze is already doing this.

anyway...GRS:

Yes, that is what I want, but those parameters need to be variables, i.e. they need to be the same as in-game variables so I can increase/decrease them as variables and/or check them as variables.

Anyway, I feel bad because Craze is already working on this but you already worked on it.

Can't you just make those parameters be dependent on a variables value?
They are variables. Accessing the game variables within a script is the same as a global variable. You can change them via F9 or "Control Variables".

Anyways, I completely missed Craze's post (this entire thread is showing my failure at reading shit) so its my fault I spent the ten minutes putting it together. Sorry if it puts you on the spot though, I can always just sit on it.
Max McGee
with sorrow down past the fence
9159
If you have yours now I will use it now and when Craze's is done (not for a few days, I think) I will use his and I will credit you both and no one will be mad at me I hope. (I would ultimately use Craze's over yours primarily because he's wiring in some other functionality.)
author=Max McGee link=topic=2577.msg47979#msg47979 date=1228025904
If you have yours now I will use it now and when Craze's is done (not for a few days, I think) I will use his and I will credit you both and no one will be mad at me I hope. (I would ultimately use Craze's over yours primarily because he's wiring in some other functionality.)

I thought Craze was a girl
Craze
why would i heal when i could equip a morningstar
15170
No, Rasta, I'm just gay.

That basically makes me a girl with a penis and better logic.
Max McGee
with sorrow down past the fence
9159
That basically makes me a girl with a penis and better logic.

Penis? Logic? These things are the opposite of a girl in every way. Unless you have like, firm, supple breasts. Which I sincerely doubt.
It'd be best if you didn't use mine as just stuck with Craze's script. That way when you do switch scripts there'll be as little headache as possible.

If you want it, here it is (and I don't use i as a counter or as an array index so I can post it without code tags! Ya~ay!)


# ==============================
# Display Extra Actor Parameters v1.1
# by GreatRedSpirit
# ==============================
# Displays actor parameters tied to variables in an actor's status window.
# The extra paramters are drawn to mimic the actor's default parameters and
# are shown in a list below the default parameters. If there isn't enough room
# to draw a parameter the script stops drawing paramters. Under a default
# Window_Status there's enough room to draw five parameters.
#
# Vocab::Actor_Parameters is an array of the name of the parameters to use.
# Add or remove elements to change the number of parameters to display or
# change PARAMETERS_DISPLAY to the number that you want to show. If you make
# it greater than the number of elements available to show it will throw
# an exception.
#
# FIRST_ACTOR_PARAMETER is the index where the script starts pulling actor
# parameters from the game's variable array. The extra parameters are stored
# sequentially starting at FIRST_ACTOR_PARAMETER as a list of the values for
# each parameters in Vocab::Actor_Parameters for an actor before moving onto
# the next actor.

# Set the strings to use when displaying the parameters
module Vocab

Actor_Parameters =

end

# Changes to the Window_Status class to include displaying the extra paramters
class Window_Status < Window_Base

# Set the variable index that is the first actor's first extra parameter
FIRST_ACTOR_PARAMETER = 1

# Set the number of parameters to display
PARAMETERS_DISPLAY = Vocab::Actor_Parameters.size

# Add an extra method call when refreshing the window
alias refresh_aep_ori refresh
def refresh
# Call the original method
refresh_aep_ori
# Draw the extra actor parameters
self.draw_extra_parameters(@actor, 32, 256)
end

# Draw the set of extra parameters
def draw_extra_parameters(actor, x, y)
# Make sure that there's enough parameters to show
if PARAMETERS_DISPLAY > Vocab::Actor_Parameters.size
raise "ActorExtraParameters: Not enough created parameters to display"
end
# Set the x/y to draw at
x_draw = x
y_draw = y
# For each extra actor parameter
for counter in 0...PARAMETERS_DISPLAY
# Draw the parameter
self.draw_extra_parameter(actor, x_draw, y_draw, counter)
# Increment x_draw and y_draw
y_draw += WLH
# If there isn't room to draw another parameter
if y_draw + WLH > self.contents.height
# Stop drawing parameters
break
end
end
end

# The method for drawing an individual parameter
def draw_extra_parameter(actor, x, y, parameter)
# Get the name of the extra parameter
name = Vocab::Actor_Parameters
# Calculate the variable index of the parameter for the actor
param_num = PARAMETERS_DISPLAY
index = FIRST_ACTOR_PARAMETER + (actor.id-1) * param_num + parameter
# Get the value from $game_variables
value = $game_variables
# Draw the parameter name
self.contents.font.color = system_color
self.contents.draw_text(x, y, 120, WLH ,name)
# Draw the parameter value
self.contents.font.color = normal_color
self.contents.draw_text(x + 120, y, 36, WLH, value, 2)
end
end



Insert it somewhere under Materials (same as the Control Variable fix script), change the strings in Vocab::Actor_Parameters to what you want, and set FIRST_ACTOR_PARAMETER to the first variable where you want to store this stuff.

Quick example of how the parameters are stored (if my instructions are that bad):
If FIRST_ACTOR_PARAMETER = 34 and you use 4 parameters, the variables would be used as such:

Variable Use
33 Not used by the script
34 Actor 1 Parameter 1
35 Actor 1 Parameter 2
36 Actor 1 Parameter 3
37 Actor 1 Parameter 4
38 Actor 2 Parameter 1
39 Actor 2 Parameter 2
...

Until its the last actor's fourth parameter. Hopefully this makes sense, directions aren't my strong suite.
Max McGee
with sorrow down past the fence
9159
As Craze's script is not yet forthcoming and I feel like tinkering, how difficult would it be to modify Window_Status to allow seven parameters? That is how many there are in the game.

Don't answer that. I will mess around with this, if only just for fun. Thanks GRS.

Wow, I am oddly grateful to Jeanine Meyer's programming games class because without it I would not understand Arrays. : )
Max McGee
with sorrow down past the fence
9159
GRS, this makes me smile. But I have a question. How does this script handle multiple actors with different parameters? I couldn't figure that out. Nevermind, for some reason even I can't fathom I assumed that I had to double the array, I was creating the problem myself, this works perfectly.

NEXT ANNOYING REQUEST: Does a script exist that prevents RANGED weapons from being effected by an actor's attack (strength, whatever) parameter? How difficult would this be to script? I.E. I mean some way to make attacks with a gun or whatever have their damage ignore the basic attack parameter and rely only on weapon damage.
author=Max McGee link=topic=2577.msg48139#msg48139 date=1228094364
NEXT ANNOYING REQUEST: Does a script exist that prevents RANGED weapons from being effected by an actor's attack (strength, whatever) parameter? How difficult would this be to script? I.E. I mean some way to make attacks with a gun or whatever have their damage ignore the basic attack parameter and rely only on weapon damage.


Damn, good point Max, it should be a default option in RM... so will keep waiting to see if anyone posts to this :P
Pages: first 123 next last