View Full Version : List of global variables like 'Room'?
Eodus
07-13-2016, 11:45 AM
I'm aware that I can get a room's ID with Room.id, and how to work with GameObj to get more specific data on the contents of a room, but wondering what other globals are available like room? Is there a list out there somewhere, or is 'Room' the only one?
Hazado
07-13-2016, 12:46 PM
XMLData.
mana
max_mana
health
max_health
spirit
max_spirit
last_spirit
stamina
max_stamina
stance_text
stance_value
mind_text
mind_value
prepared_spell
encumbrance_text
encumbrance_full_text
encumbrance_value
indicator
injuries
injury_mode
room_count
room_title
room_description
room_exits
room_exits_string
familiar_room_title
familiar_room_description
familiar_room_exits
bounty_task
injury_mode
server_time
server_time_offset
roundtime_end
cast_roundtime_end
last_pulse
level
next_level_value
next_level_text
society_task
stow_container_id
name
game
in_stream
player_id
active_spells
prompt
current_target_id
room_window_disabled
Hazado
07-13-2016, 01:11 PM
Map.
outside?
to_i
to_s
inspect
get_free_id
list
get_location
current
current_or_new
tags
clear
reload
load(filename=nil)
load_dat(filename=nil)
load_xml(filename="#{DATA_DIR}/#{XMLData.game}/map.xml")
save(filename="#{DATA_DIR}/#{XMLData.game}/map-#{Time.now.to_i}.dat")
save_xml(filename="#{DATA_DIR}/#{XMLData.game}/map-#{Time.now.to_i}.xml")
estimate_time(array)
dijkstra(source, destination=nil)
findpath(source, destination)
path_to(destination)
find_nearest_by_tag(tag_name)
find_all_nearest_by_tag(tag_name)
find_nearest(target_list)
Char.
name
health
mana
spirit
maxhealth
maxmana
maxspirit
stamina
maxstamina
dump_info
load_info(string)
info
skills
citizenship
Society.
status
rank
step
member
task
Spellsong.
renewed
renewed_at
timeleft
duration
renew_cost
sonicarmordurability
sonicbladedurability
sonicweapondurability
sonicshielddurability
tonishastebonus
depressionpushdown
depressionslow
holdingtargets
Skills.
twoweaponcombat
armoruse
shielduse
combatmaneuvers
edgedweapons
bluntweapons
twohandedweapons
rangedweapons
thrownweapons
polearmweapons
brawling
ambush
multiopponentcombat
combatleadership
physicalfitness
dodging
arcanesymbols
magicitemuse
spellaiming
harnesspower
emc
mmc
smc
elair
elearth
elfire
elwater
slblessings
slreligion
slsummoning
sldemonology
slnecromancy
mldivination
mlmanipulation
mltelepathy
mltransference
mltransformation
survival
disarmingtraps
pickinglocks
stalkingandhiding
perception
climbing
swimming
firstaid
trading
pickpocketing
Spells.
minorelemental
minormental
majorelemental
minorspiritual
majorspiritual
wizard
sorcerer
ranger
paladin
empath
cleric
bard
get_circle_name(num)
active
known
Spell.
load
active
active?
list
upmsgs
dnmsgs
time_per_formula(options={})
time_per(options={})
timeleft=(val)
timeleft
minsleft
secsleft
active?
stackable?
refreshable?
multicastable?
known?
available?
to_s
max_duration
putup
putdown
remaining
affordable?
cast(target=nil, results_of_interest=nil)
_bonus
_cost
circle_name
clear_on_death
duration
cost
manaCost
spiritCost
staminaCost
boltAS
physicalAS
boltDS
physicalDS
elementalCS
mentalCS
spiritCS
sorcererCS
elementalTD
mentalTD
spiritTD
sorcererTD
castProc
stacks
command
circlename
selfonly
Stats.
race
prof
gender
age
level
str
con
dex
agi
dis
aur
log
int
wis
inf
exp
Hazado
07-13-2016, 01:17 PM
There are a few more obscure ones but if your that interested, just open lich.rbw inside a text editor and look at the code.
Thats how I found all these.
If your unsure how a particular function works, open the code and do a search for it.
Some of these may freeze or crash your game, so ya.
Gnomad
07-13-2016, 03:03 PM
It's worth noting that Room is essentially the same as Map, so Map methods will apply to Room as well.
Also, if you're looking to study Ruby coding on your own, these aren't global variables, they're classes.
Eodus
07-13-2016, 03:25 PM
There are a few more obscure ones but if your that interested, just open lich.rbw inside a text editor and look at the code.
Phenomenal! Exactly what I was looking for. Will spend some time digging into the source as well. Thank you so much :)
It's worth noting that Room is essentially the same as Map, so Map methods will apply to Room as well.
Also, if you're looking to study Ruby coding on your own, these aren't global variables, they're classes.
Haha, total brain fart... of course they're classes. Thanks for clarifying. Never coded in Ruby until downloading Lich. Logic and syntax is similar enough to other languages I've worked with. This is going to be a lot of fun.
Thank you again.
Donquix
07-13-2016, 04:01 PM
Global variables, just for further clarification, start with "$"
like $script_dir (i believe, or similar) is the directory of your scripts.
Gnomad
07-13-2016, 04:44 PM
Haha, total brain fart... of course they're classes. Thanks for clarifying. Never coded in Ruby until downloading Lich. Logic and syntax is similar enough to other languages I've worked with. This is going to be a lot of fun.
Thank you again.No problem.
If your background is the C family or Java, then you should be aware that Ruby is a little more OO than them. Everything is an object. Classes are just special objects, and so are your literals; that's why you can do stuff like 5.times or 3.1415.ceil
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.