Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Hex Flags

Please be more specific, is it something in RPG Maker or in real world? If it is in RM you want to code it? Or if it isn't tell us what it is! Youre not specific enough. Sorry
 
In RPG Maker, specifically XP. I have a skill tree for my class system (it is the class system, kinda like the License Grid from FFXII and the Sphere Grid from FFX had a beautiful baby) and I have +50 characters (recruiting system) and it made me realize I would have to use a bucketload of switches. Someone told me that I could use hex flags to store multiple switches, call them and turn them on/off; and probably by extension do a con branch check for a on/off switch in the hex flag.
 

Zeriab

Sponsor

I suggest keeping it simple and focus on a solution to easily manage the characters rather than trying to encode flags in hex.
It sounds like whoever suggested it doesn't really know what they are talking about or did not understand your problem.

Completely disregard the notion of "hex flags" for a moment.
How would you use normal switches to do the job?
Can you elaborate on how you want it to work? (What are you doing for getting it to work?)

*hugs*
 
You might of seen my other topic about the skill tree, if not here:
http://www.rpgrevolution.com/forums/ind ... ntry382110

The way I originally built the beta version of my evented skill tree as provided from above was that the switches where used to turn the events off when the stat or ability squares where activated in the skill tree, preventing the player abusing it. The switches where also used for unlocking paths around the squares when a square was activated...grey ones where ones you couldn't even go across (solid) and red ones where though meaning you could make progress.

Well, I wouldn't mind resorting to self-switches to turn off the events when a square is activated, but that gets rid of the function of unlockable paths. I just needed a easier/less wasting way of handling the turning off function for activated squares, but I figured I could do without the unlockable paths.
 
[rgss]module Switches
  def self.turn(state,*values)
    state = true  if state == :eek:n
    state = false if state == :eek:ff
    values.each {|v| $game_switches[v] = state}
    return
  end
end
[/rgss]

Switches.turn(true,1,2,3,10) or Switches.turn:)on,1,2,3,10)
(All those switches will be turned on)

Switches.turn(false,1,2,3,10) or Switches.turn:)off,1,2,3,10)
(All those switches will be turned off)

This only works with $game_switches, but can be edited to it also works with other kinds of switches.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top