-
Jet10985's code snippetsIntroductionSnippetsIf you use any of these snippets, please credit me and anyone I credit in the snippet
-
Wow, that's a ton of scripts. I'll have to check them out :)
-
Well, most are pretty small, but thanks for checking them out ;)
-
Some times the small ones make the biggest im packs.
[edit] your menu is odd, when you click load it moves the selector up to save. NVM, i just realized that its not a demo only a holder for the scripts, my bad. Nice collection.
-
I had a quick look and have some comments for your JetEngine
I would suggest that you don't expose the inner data structures through global variables, but rather provide module methods for what you currently are using them for.
You already have come a good way with current module method.
Instead of
unless $engine_scripts.nil?
JetEngine.active("Run/Guard Hotkey", 1)
end
you can use
if Module.constants.include?("JetEngine")
JetEngine.active("Run/Guard Hotkey", 1)
end
*hugs*
-
Well, it looks pretty good jet :) I'm adding them to the index now.
A couple things have popped out at me so far. First of all, this:
if $engine_scripts.include?(name)
return true
else
return false
end
It's not a big deal, but it could be replaced with: return $engine_scripts.include?(name)
It's just a little nicer. If you take Zeriab's advice, then you'd be getting rid of that global variable, but all I'm talking about is the if else branch aspect of it.
Also, your Change Actor Options script doesn't really work - it modifies the $data_ array but it doesn't actually modify the data file (which you wouldn't want either), so the next time you load the game it will revert to the default.
Also, when you use the change_two_swords_style method you should be careful and unequip whatever the actor might have in his second hand before doing it. Otherwise, it will convert whatever armor/weapon he has in it to the weapon/armor of the same ID.
-
@zeriab: Thanks for the advice, i really appreciate new ways to do things. I think i'll keep it the way it is for now though, so i don't have to go through changing stuf ;)
@MA: Yeah, the method isn't my best.
As for the change Actor Options, i had no idea about the reverting thing. Any way you can help me with that?
-
Sorry, I never got back to you with that I just realized :( Whoops. Anyway, it's not too difficult - all you'd need to do is save the change in a variable, probably in Game_Actor. Then you could just make it so that those methods in Game_Actor, instead of returning the data, return the one you saved.
-
Well uh, been a while since i was on here, just letting ya know i updated the demo to hold all my current snippets (44 now, not 34) and scripts. Also MA, i fixed that Actor Options snippet ;)
-
Nice job Jet! These snippets seem to be nice ways of adding in small features that make the game look more professional, or ways of making things easier for regular people. I took a look at your demo and I walked around a bit and I got an error.
Script: 'Hunger/Thirst' line 546 NoMethodError
undefined method 'hunger' for Nil:NilClass
I kept everything as it was in the demo.
Also, I looked around at some other scripts. They should work fine, but there are some parts that could look a bit nicer. Unless I'm mistaken,
def screen
if $game_temp.in_battle
return $game_troop.screen
else
return $game_map.screen
end
end
Could just as easily be:
def screen
return $game_troop.screen if $game_temp.in_battle
return $game_map.screen
end
Which doesn't really matter, but it looks nicer IMO and takes up less lines in the Script Editor.
-
Help it dosent work! :'( when i run demo it says
Script hunger/thirst no method error undefined method hunger for nil:nilclass
-
On mediafire can't download so it's delete
-
link is broken. please give us a new one.
-
Here's a link: http://www.mediafire.com/?z3iw7cw1asii2o2
-
Please forgive me if this is an egregious necropost, but I searched on the forum for any other posts dealing with issues concerning the snippet collection and found only one- unresolved. So, I thought it would be best to post on the original thread in the slim chance someone was watching. Here it is:
Jet, I get two errors using your script:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg.photobucket.com%2Falbums%2Fv22%2Fmerryjest%2FApprovalError-1.png&hash=8a0877e18d3835881a36b24d79ca8e95f213d686)
The first, A, is from my own game, when I try to increase actor approval by a called script.
The second, B, is from your own demo with no add-ons, again trying to do the same thing (I decided to test it on the demo itself to see what was going on)--- the instructions say to use the format of change_approval(1,2) in called script (actor 1 gets +2 approval), but this is the error that pops up when you try them. Any ideas of what could be wrong?
-
For the second error, put a line in after line 196 that simply says:
include ActorApprovalRating
For the first error, can you tell us what you used as the script call?
-
Thanks for replying, Pacman!
Well, in the instructions it says:
To increse/decrease approval, use this in the event "Script..." command:
change_approval(actor, amount)
actor = actor id you want to change approval of.
amount = how much you want to change it by. Use a negative number to subtract.
So that's basically what I did, I had it call a script after a conversation branch choice with: change_approval(1,2)
-
Interesting. Try changing all mentions of approval_rating from lines 200-208 to
approval_rating?
That error occurred because there's no method for "approval_rating" in Game_Actor, but there is one for "approval_rating?". That's all I can do for now.
-
Unfortunately that causes a syntax error :/
-
Your Scripts Are Awesome ;D
but
im having some problems with the cheats scripts ;9
and i dont know how to pm you cuz im new to this website
ok so here my problem.. when i put the script below materials OR above main,i run the game and everything is going fine until i open the menu window ,, its said scipt ''window_selectable'' line 100
no methoderror Occur undefined method for (nil,nil,nil,nil,nil,nil,nil,nil,nil)array ;9
can You Please Help Me out? :(
-
Yo!
Nicely done!
I´m using the Set Actor's Max Level-snippet, and I wonder if there
is some way (maybe via a script call) to change the max level for
the actors in-game?
EDIT:
Jet updated his script to support this feature:
#===============================================================================
# Set Actor's Max Level Snippet
# By Jet10985 (Jet)
#===============================================================================
# This snippet will allow you to set each actor to have an individual maximum
# level that they can reach in-game.
# This script has: 1 customization options.
#===============================================================================
# Overwritten Methods:
# None
#-------------------------------------------------------------------------------
# Aliased methods:
# Game_Actor: make_exp_list
#===============================================================================
=begin
How to Use:
Below these instructions is the area to choose actor maximum levels. The format
is stated next to the example. If you want more actors on these, add a comma
then follow the format of
actor id => max level
--------------------------------------------------------------------------------
To change an actor's max level, use this in an Event "Script..." command:
change_max_level(actor_id, new_max_level)
actor_id = the database id of the actor
new_max_level = the new max level of course
=end
module ActorMaxLevel
MAX_LEVELS = {
1 => 99, # actor id => max level
2 => 20, # actor id => max level
3 => 30,
4 => 2 # actor id => max level
}
MAX_LEVELS.default = 99 # The max level for any undefined actor.
end
#===============================================================================
# DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO.
#===============================================================================
class Game_Actor
include ActorMaxLevel
alias jet8888_make_exp_list make_exp_list unless $@
def make_exp_list(*args, &block)
jet8888_make_exp_list(*args, &block)
if @exp_list[MAX_LEVELS[@actor_id] + 1] != 0
@exp_list[MAX_LEVELS[@actor_id] + 1] = 0 if MAX_LEVELS[@actor_id] != nil
end
end
def exp_list
return @exp_list
end
end
class Game_Interpreter
def change_max_level(actor_id, new_max_level)
f = $game_actors[actor_id]
f.change_exp(f.exp_list[ActorMaxLevel::MAX_LEVELS[actor_id]], false)
ActorMaxLevel::MAX_LEVELS[actor_id] = new_max_level
f.make_exp_list
end
end
-
I'm new at the forum and I'm sorry for the necroposting, but i'm using the "learn skill item" snippet. There's no way to exclude the actors that can consume an specific Item? I'm not a programmer but i'm sure it would be something like this:
21 => 3, 1 # Item id => Skill id, Classes that can use this item
22 => 5, 1 # Item id => Skill id, Classes that can use this item
23 => 7, 8 # Item id => Skill id, Classes that can use this item
EDIT: Bump, and have another request. Theres no way to call the the cheat system from a NPC instead of the menú? :'( I'm really looking for that feature
-
I don't know if it's cause I'm using a Laptop or what but I can't get the Record Window to Pop up. Is there a quick fix to that problem?