TRIANGLEGM'S PROFILE

I was born in January of 1982 on a U.S. airbase in Misawa, Japan. My family returned home before I was old enough to form memories, but between my uncle marrying a Japanese woman and my family keeping a lot of Japanese toys, cookware, and customs around the house, I've always felt a weird connection to the land of the rising sun. I'd love to visit Japan someday, but it hasn't happened yet.

I was raised on VHS tapes of G.I.Joe, The Last Unicorn, the Rankin/Bass version the Hobbit, and so on. I know what the song "Domo Origato, Mr. Roboto" is really about. I like to write. I like to create. When I can find time, I run table-top D&D, study screenplay writing, design board games, and well, I use RPG Maker XP.

Search

[SCRIPTING] [RMXP] ongoing toolbelt problems, updates

Progress...
I was getting a no method error for next_tool.
Fixed that by changing the definition to "def self.next_tool".

Then it said weapon_id was undefined.
Turns out "$game_party.actors.weapon_id = @tool" is invalid.
I had to change it to "$game_party.actors.equip(0, @tool)".


Currently:
Now the whole thing runs without errors, but nothing seems to happen.


You may notice I have not actually implemented the key ingredient: the L/R button activation. I've done that before with run scripts, so I'm more trying to get the rest of the functionality in place before I polish that up. For now it's just being called from an event.

Toolbelt module is currently after the changes to game_actor and _scene equip.
It has it's own heading block.

#By Triangle Games Master, as TriangleGM on rpgmaker.net
#
#ALTERS EXISTING: (including comments)
#Game_Actor: lines 36, 71-72
#Scene_Equip: lines 112-115
#
#==============================================================================
# ** Toolbelt
#------------------------------------------------------------------------------
# This script includes a re-write and original script.
# It is an inter-working part of the Crop Farming Toolkit.
# It references element 17 as set on the system tab of the database.
# It allows players to cycle through equipping tools from the map.
# The last non-tool weapon equipped is added to the toolbelt.
# Current Weapon variable (@current_w) added to Game_Actor.
# Toolbelt refresh in Scene_Equip.
# New module Toolbelt begins at line 128.
#==============================================================================

class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_reader :name # name
attr_reader :character_name # character file name
attr_reader :character_hue # character hue
attr_reader :class_id # class ID
attr_reader :weapon_id # weapon ID
attr_reader :armor1_id # shield ID
attr_reader :armor2_id # helmet ID
attr_reader :armor3_id # body armor ID
attr_reader :armor4_id # accessory ID
attr_reader :level # level
attr_reader :exp # EXP
attr_reader :skills # skills
attr_reader :current_w # last real weapon equipped

#--------------------------------------------------------------------------
# * Setup
# actor_id : actor ID
#--------------------------------------------------------------------------
def setup(actor_id)
actor = $data_actors[actor_id]
@actor_id = actor_id
@name = actor.name
@character_name = actor.character_name
@character_hue = actor.character_hue
@battler_name = actor.battler_name
@battler_hue = actor.battler_hue
@class_id = actor.class_id
@weapon_id = actor.weapon_id
@armor1_id = actor.armor1_id
@armor2_id = actor.armor2_id
@armor3_id = actor.armor3_id
@armor4_id = actor.armor4_id
@level = actor.initial_level
@exp_list = Array.new(101)
make_exp_list
@exp = @exp_list[@level]
@skills = []
@hp = maxhp
@sp = maxsp
@states = []
@states_turn = {}
@maxhp_plus = 0
@maxsp_plus = 0
@str_plus = 0
@dex_plus = 0
@agi_plus = 0
@int_plus = 0
#ADDED current weapon
@current_w = 0
# Learn skill
for i in 1..@level
for j in $data_classes[@class_id].learnings
if j.level == i
learn_skill(j.skill_id)
end
end
end
# Update auto state
update_auto_state(nil, $data_armors[@armor1_id])
update_auto_state(nil, $data_armors[@armor2_id])
update_auto_state(nil, $data_armors[@armor3_id])
update_auto_state(nil, $data_armors[@armor4_id])
end
end

class Scene_Equip
#--------------------------------------------------------------------------
# * Frame Update (when item window is active)
#--------------------------------------------------------------------------
def update_item
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Activate right window
@right_window.active = true
@item_window.active = false
@item_window.index = -1
return
end
# If C button was pressed
if Input.trigger?(Input::C)
# Play equip SE
$game_system.se_play($data_system.equip_se)
# Get currently selected data on the item window
item = @item_window.item
# Change equipment
@actor.equip(@right_window.index, item == nil ? 0 : item.id)
#ADDED SCRIPT to refresh toolbelt
if @actor = 0
$toolbelt.new_equip
end
# Activate right window
@right_window.active = true
@item_window.active = false
@item_window.index = -1
# Remake right window and item window contents
@right_window.refresh
@item_window.refresh
return
end
end
end

#==============================================================================
# ** Toolbelt
#------------------------------------------------------------------------------
# Cycles through available tools while on map screen with L/R buttons.
# Uses the variable @current_w to return to the last equipped non-tool weapon.
# Updates toolbelt if player uses standard equipment menu
#==============================================================================
module Toolbelt

@belt = []
@pocket = 0
@tool = 0

#This sets up the belt array
def refresh
@belt.clear
@belt[0] = $game_party.actors[0].current_w
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0
if $data_weapons[i].element_set.include?(17)
@belt.push($data_weapons[i])
end
end
end

#This sets the current pocket based on current tool
for i in 0...@belt.size
if @tool == @belt[i]
@pocket = @belt[i].index
end
end
end

#This keeps current weapon and tool up to date
def new_equip
@tool = $game_party.actors[0].weapon_id
#If the tool is a real weapon, update current weapon
unless $data_weapons[@tool].element_set.include?(17)
$game_party.actors[0].current_w = $game_party.actors[0].weapon_id
end
@refresh
end

#This moves forward one pocket on the belt
def self.next_tool
@refresh
@pocket += 1
@tool = @belt[@pocket]
$game_party.actors[0].equip(0, @tool)
#TO DO: WINDOW TO ALERT PlAYER TO TOOl CHANGE
end
end

[RMXP] Crop Farming: Tool Switching Methods

I'm working on this crop farming toolkit to help non-scripters make farming games through events (and for myself, of course).

Current Progress:
I've got Self Variables (need to check permission with DrakoShade to include that, WAY beyond my level, but from his post I found it in, I don't expect any problem), an overnight water-check (generously re-written for me by KK20), a run button, front activated 'through' events (so you're not hoeing under your own feet), and a working event methodology for the crops.


Style Goals:
In general, I do NOT want to transform RMXP into Harvest Moon (I actually found someone had over-ridden virtually all the default scripts to completely re-create the original SNES Harvest Moon, and he ALMOST finished the project. It was interesting, and certainly impressive, but useless for my purposes).
What I want, is RMXP + farming. I want to make a party-based full scale RPG that includes farming. It's more like an RMXP version of Rune Factory. My plan is, time of day works like farming games when on the farm, then halts or slows for exploring the "wider world." Players will simply have to remember to use a warp spell to go back and forth to visit home and look after things each day when they sleep at an inn on the road (or find some "farm claws" to help with that...)


Next thing I want is a way to switch tools faster. The tools are designed as weapons with an element set called "Tool." Even while play-testing the other features, it's getting tedious to enter the menu, go down and select equip, select the lead party member, THEN select weapon to equip a hoe, use it, then all that again for a seed, and again for the watering can, then AGAIN to go back to a weapon so I don't accidentally walk into battle with a watering can. Clearly, there's a reason farming games don't work that way.

I've been working on setting up the L/R buttons to work on the map screen to cycle through available tools (and the last-equipped actual weapon). I've already had to add lines to Game_Actor and Scene_Equip to set up this tool-belt, and I haven't even gotten started on creating a display to show the change. It's fun figuring out how to do all this, but it has occurred to me that the player might find it more convenient to pick a tool from a list than have to cycle through all of them, especially since the seeds are included in the list of tools.

Then I realized I could probably just make a button that takes you directly to the lead party member's equip screen, and then back to the map. I could also put in the extra work to actually make a whole separate "Tool-belt Select Window" that would appear over the map. I don't really WANT to do that, but it would be the most like modern farming games, and I do understand the basic concept of drawing a window (a selection window would be new to me).

I partly want to make my own game, but I like all these ideas about the same from a player perspective, and I also want to make the completed framework available for other users. So, what do you think? I'm curious to hear from scripters and other designers or even just people who play farm games:
cycle tools, direct to standard equip screen, or whole new selection window?

[RMXP] error involving MapInfos.rxdata [resolved]

This is an RPG Maker XP project. I am trying to create the scripts needed for non-scripters to make their own Harvest Moon style crops. I got as far the script for checking if plants are watered overnight, and I am getting an error that is well out of my league. I tried googling it, but I got nothing. I needed to cycle through every event on every map, and the only solution I found involves the rxdata, which I have avoided like the plague up to now. I don't even know a good tutorial for learning that, I just know that some people know it well, and I don't.
I am using the Self Variables from DrakoShade, as well as an original code I put together.
Here's the error:


And just to be thorough, here's the "bedtime" event with the script call:


The game starts fine, but when I try to call the Overnight script, that error comes up. Here's my script:

class Overnight

def initialize
@maps = []
@farm = 1

map_data = load_data('MapInfos.rxdata')

for i in map_data.keys
@maps.push(load_data(sprintf("Data/Map%03d.rxdata", i)))
end

end


def water_check
for f in 0...@maps[]

@farm = @maps[f]
for e in 0...@farm.events[]

if $game_self_vaiables[[@farm, e, 1]] > 3

if $game_self_switches[[@farm, e, "A"]] == on
$game_self_switches[[@farm, e, "A"]] = off
$game_self_variables[[@farm, e, 1]] += 1

else if $game_self_switches[[@farm, e, "B"]] == off
$game_self_variables[[@farm, e, 1]] = 3
end
end
end
end
end
end
end

I feel like there's one too many "ends" in there, but it won't run with any less or more.
Self variable 1 is the main control for the crop event page.
Self switch A is used to check whether the crop has been watered.
Self Switch B checks if the crop is done growing.
If you want to look at the actual game, it can be downloaded from here: https://uploadfiles.io/xqshg

Legend Maker

I just downloaded the alpha demo for Legend Maker (formerly Zelda Maker). This has once again reminded me of the difference between an alpha and a beta. It's not bad, it's just very early in development. I had some fun playing around with it anyway though.

What's there right now is rather limited, and nothing is explained, but it's enough to make a dungeon with chests, enemies, items, and some simple old-school "puzzles" in the way of movable blocks, bomb walls, key-doors, etc.

I was very excited when I saw it come back up with the new name. I had seen it a while back and didn't know what happened to it. Evidently they had to do a lot of redesigning graphics and so forth in addition to the name change. If anybody's interested they do have a facebook page at Dream Mix, and the kickstarter just went live a couple of days ago.

I had started making a "Zelda parody" with RMXP, but being able to do it as an actual adventure in the proper style is going to be so much cooler.

Has anybody around here been following this? Are people excited about it?
Pages: 1