RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
New here, hope to make friends, get tips.

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 46
Overlord in Training
Just wanted to see if I could say hi, and not hear a dismally lonely echo... Actually, this Rpg maker forum seems a bit more active then others I've come across. So out of some hope I decided to sign up. Why am I late to everything?

Actually I'm not totally new to RPG maker, I am new to the community however, whatever remains. I suppose the plus side is that natural selection has 'hopefully' refined the community into hardcore experts.

As an introductory questions, what other forums would you recommend?

Also, I'm frustrated with the limited number of local switches in RMXP. I don't script, so is there a way to event them in?

I.E: A tactical system has multiple characters on screen. A common event, which they all use, provides the move command. But the move command will make them all move at once unless a create a conditional branch that uses local switches. If a local switch is on, then the move common event is inactive.

So you can see why I would want more local switches. Especially since I haven't even programmed the attack system.

I wonder if their is at least a script that allows me more local switches.

But I'm interested at least in the logical steps required to make one.

Hope my question makes sense. I appreciate any reply, thanks in advance.


**
Rep:
Level 46
Overlord in Training
THis is similar to the question I'm asking: But without scripting:

http://www.gdunlimited.net/forums/topic/6342-possible-to-make-event-local-variables/

As it is, I have to keep track of alot of coordinates as well, so I have Character1x, Character1y, Character2x, Character2y, etc. Coordinates for all these units each create a variable.


*******
RMRK's Mom
Rep:
Level 88
I intend to live forever - so far so good.
2014 Most Missed Member2013 Most Mature Member2013 Kindest Member2013 Best Counsel2013 Queen of RMRKBronze SS AuthorBronze Writing Reviewer2012 Kindest Member2012 Best Counselluv u bb <3Secret Santa 2012 ParticipantFor taking a crack at the RMRK Wiki2010 Kindest Member
Hey, welcome.  I don't make games so I can't help you. I just hang around to keep the kiddos in line.  But feel free to use the search, you may find the answer there?  If not someone with more experience should be along shortly. 

And welcome again
 :)   
* Jules waves hello

*
*crack*
Rep:
Level 64
2012 Most Unsung Member2012 Best NewbieFor frequently finding and reporting spam and spam bots
Welcome to the pack, buddy :)
Since you've made it known you're interested in RMXP, there's actually very few other RM Forums I can recommend.
You've got:
RRR
The Official RM Website
Chaos Project

I don't think there are any XP scripters on this forum, but you're welcome to make contact with 'The Law G14' on RRR who still scripts for that engine.
Local Switches for eventing sounds kind of difficult (I don't think XP used Self_Switches?), but one method would be to use variables (set them to a number, use a check to see what number it is... that 'switch' is now on).
All of my scripts are totally free to use for commercial use. You don't need to ask me for permission. I'm too lazy to update every single script post I ever made with this addendum. So ignore whatever "rule" I posted there. :)

All scripts can be found at: https://pastebin.com/u/diamondandplatinum3

**
Rep:
Level 46
Overlord in Training
First, Thankyou Jules for your welcome. I hesitate to use the search, but I may attempt it anyway. The primary reason is that I know the search term will come up a billion times, as the words "Create local switch" Are very common.

Also, Thankyou for your welcome D&P3, as well as the links  you provided. I will possibly contact The Law, if I do not find a solution soon.

I will think about the solution you suggested. And I believe I had a thought similar to that.

The problem is really clutter with conditional branches. A concise description would be that the MOVECOMMAND is a common event I paste in the character event on the map. I need each character to use this. In order to identify which character is using it at the time, they need a personalized trigger which lets them know its ok to use it.

Local Switches do just that, I can use them over and over again, within each event, without effecting any other event.

Now if I use a variable, correct me if I'm not grasping the implications your suggestion provides, I will have to create conditional branches for each character.

For example, if x=1, then move is active. Obviously as is, this will trigger the move command in every event which has the MOVECOMMAND common event. So in each character event I would specify if X=2, for character 2, if x=3, for character 3.

With local switches it is simply copy, paste.

This seems to take more lines of code as well as effort over local switches. However, I will experiment with it. As it also provides an alternative solution, if I cannot discover how to create additional local switches.

*
Rep:
Level 82
Welcome to the forum, Razma.

I'm not sure if you managed to get hold of the person that D&P3 suggested. XP does use self switches, which are local swtiches but there are only 4 of them: A, B, C and D, which leaves you very little room to do much in a single event.

Our resident Ace Scripter, modern algebra, made a script for RPG Maker VX that allowed you to have any number of these self switches which may be what you need. With a bit of tweaking to make it compatible with XP, of course. It's a little late for me at the minute, but I do need a last drink so I may just get that done for you within the next few minutes. Hopefully. If not, I will sort it as soon as possible.

The alternative method I had in mind, was like D&P3 had, and use variables. You can use a single variable to hold a quite a bit of data if you know how to use them like that. But the code for self switches in XP isn't too far off VX, so it shouldn't be hard to rework the script.

Edit:

Code: [Select]
#==============================================================================
#    Extra Self Switches Wrapper
#    Version: 1.0
#    Author: modern algebra (rmrk.net)
#        Ported to RPG Maker XP by Logan FOrrests (14 Dec 2013)
#    Date: April 6, 2010
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Description:
#    This is just a simple wrapper for making and checking self switches beyond
#   the default four. They will only be accessible through the script event
#   command and conditional branch Script field, however. They will not be able
#   to be controlled through the Control Self Switch event command, or as page
#   conditions
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Instructions:
#    To control the value of any special self switch, you can use this command:
#      control_self_switch ("key", value)
#        key : the object that you want to use to identify the self switch you
#          are altering. For the sake of consistency, probably better to use
#          capital letters ("E", "F"), but can be anything, even numbers (1, 2)
#        value : The easiest way is to use the symbols, :on or :off. You can
#          also use true, to turn ON, or false, to turn OFF.
#
#    To later check what the value of a self switch is, use the code:
#      self_switch ("key")
#        key : the identifier for that self-switch. See line 17.
#      That will evaluate as the expression Self Switch Key == ON. If you want
#     to check if it is OFF, simply use the code:
#      !self_switch ("key")
#==============================================================================

#==============================================================================
# ** Game Interpreter
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    new method - control_self_switch
#==============================================================================

class Interpreter
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Control Self Switch
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def control_self_switch (key, value)
    if value.is_a? (Symbol)
      value = value != :off ? 0 : 1
    elsif value
      value = 0
    end
    @parameters = [key, value]
    return command_123
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Check Self-Switch
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def self_switch (key)
    return @event_id > 0 ? $game_self_switches[[@map_id, @event_id, key]] : false
  end
end

Just copy and paste that into it's own slot in the script editor as you would any other scripts (somewhere below Scene_Debug and above Main). The instructions provided in the script can be followed exactly to use it.

The original thread can be found here: http://rmrk.net/index.php/topic,38042.0.html Details of the licence used to protect the script can also be found there. If your game is commercial, please get in touch with him directly before you use it.

If there are any issues with using it, feel free to PM me directly and I'll sort them out for you as best as I can. Please do not forget to credit modern algebra for the script should you use (you do not need to do the same for me as I merely ported it and the code is almost identical to the original).
« Last Edit: January 14, 2013, 11:58:08 PM by LoganF »
(Why do I always feel like it's the end of the world and I'm the last man standing?)

*
Rep:
Level 85
I solve practical problems.
For taking arms in the name of your breakfast.
Welcome to RMRK! Another XP user :D hooray!

**
Rep:
Level 46
Overlord in Training
Thankyou very much for taking the time to help me LoganF. This script will be extremely useful.  Do you usually drink and script? That's really nice of you.  :o Also, thankyou IAMFORTE, for your welcome as well.

The game is not commercial, but something done for fun, satisfaction, and my own growth. I will be sure to give credit, where credit is due.

Having unlimited local switches will go a very very long way. Because I haven't even approached building an attack system, and I'm already out of local switches. :p

I really wonder if I'm missing something about variables then. I understand that a variable can act like many switches, but can I use them as a copy paste solution to create local switches? I'm just wondering out of curiosity, because I've been wracking my brain for the solution and haven't found any answers.

Perhaps posting an example would be best. The first three images http://s1118.beta.photobucket.com/user/gdane1989/media/Movevariation1page1_zpsd42efabe.png.html?sort=3&o=8 (from erm..right to left) show a copy paste event which can be moved as in a tactical game. However, the next two images show my current failed attempt to translate that into a common event, which does not require multiple switches and variables. It should copy paste into any event freely, and allow it to move around without effecting other events. It should be as the first example..Sorry if I'm asking too much. The last 4 images show a successful variation, but requires new coordinates and switches for each unit.

I appreciate your help so far, and you don't have to answer all this. I'm positive it'll click eventually. Actually, I'm enjoying the mind-bender. SO I don't want TOO much help, just need to figure out how to make more local switches (problem solved, thanks to you.) And Local variables, or simply recreate the first map event, into a better common event that I can copy paste.

The perfect solution obviously would be if rmxp had a conditional branch option that said This event xtile = player x tile, this event ytile= player y tile.
Instead I bounce it off variables, Unit1x=this event xtile

I have tried
Page 1 collision=Localswitch d on
Page 2 (D must be on.) Common Event: Localvariabletest


*
Rep:
Level 82
Thankyou very much for taking the time to help me LoganF. This script will be extremely useful.  Do you usually drink and script? That's really nice of you.  :o Also, thankyou IAMFORTE, for your welcome as well.

I find that a good cup o' tea works wonders whilst scripting.

Also, no problem on the script translation. It didn't seem like it would be a difficult task to do, and it took all of a few minutes.

I'll work on something else for you: allowing any number of variables to be created that are tied to the events themselves. This will free up your actual database variables for more important things that aren't specifically relating to a particular event.

It's not often I do requests, nor do I usually work outside of VX Ace, but this is something that might be useful so why not. It also shouldn't take a long time to write.
(Why do I always feel like it's the end of the world and I'm the last man standing?)

*****
RMRK's dad-in-training
Rep:
Level 72
Busy Husband, Dad, and Youth Minister
GIAW 14: 2nd Place (Easy Mode)2014 Best WriterBronze - GIAW 11 (Normal)Secret Santa 2013 ParticipantFor taking arms in the name of your breakfast.2012 Best NewbieContestant - GIAW 9
Welcome! Hope you enjoy your stay and find what you're looking for!

**
Rep:
Level 46
Overlord in Training
Tea eh? You made me imagine something different. Are you perchance English?

I enjoy a cup of peppermint, as I recently abandoned caffeine. It's been difficult to think since, but peppermint helps poke the neurons into action, somewhat.

Greetings bluntsword, thank you for welcoming me. It seems I may have found what I'm looking for already.

That is exactly what I need! And I agree that it will be useful for anyone. RMXP should have had unlimited local switches and local variables in the first place, imho. I will have to learn to script here soon though. I believe that more and more lately. I appreciate your helpfulness, thank you LoganF  :D It's going to be super-useful.

The attachment images goofed,and are incomplete, which is why I posted the link to photobucket.

What makes local variables so darn useful is that I'm going to be keeping track of a lot of coordinates...among other things.

It appears my intuition, and my compulsion to join this forum was valuable. I'm glad to see there is still an active community.  :lol:

On another note, to make my previous question concise, does anyone know if there is there anyway to convert that three page map event, (In the photobucket link, the last 3 images. (The images run right to left) (the custom move in page 2 is move towards player)) Into a single page common event?

Edit: In case you haven't yet noticed the thread: I made a very concise move system. Here: http://rmrk.net/index.php/topic,47530.0.html
« Last Edit: January 15, 2013, 09:17:13 PM by Razma »

**
Rep:
Level 46
Overlord in Training
I'm having a bit of difficulty putting the script to use. I've never used them like this before. Would you please provide an example on how to use it?


My event looked like this
Parallel Process
Script: Control_self_Switch (E, :On)

I got an error:
?????NameError????????
Uninitialized constant interpreter: E

Never mind
control_self_switch ("E", :On) didn't mess anything up. But I'm stumped as to what I do next.

I tried
Conditional Branch:Script:Self_Switch ("E)
<>Display Message: Ppp

Got a return error
????????NOMETHODERROR?????????
Undefined Method 'Self_Switch' for #<Interpreter:0x4755530>

THis was with the first event on parallel process, and the next as action key

Haha I'm a moron, let me try that again. I forgot I was playing with selfswitches LOL.

Well it still didnt work when I put it into a single event. :/

Here is a photo.
« Last Edit: January 15, 2013, 08:07:01 PM by Razma »

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Most Mature Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2011 Favourite Staff Member2010 Best RPG Maker User (Scripting)2010 Most Mature Member
Capitalization matters when calling methods of a script, so you shouldn't be capitalizing anything except the letter itself. In other words, use :on, not :On, and:

Code: [Select]
self_switch("E")

Not:

Code: [Select]
Self_Switch("E")

*
The Hero of Rhyme
Rep:
Level 83
( ͡° ͜ʖ ͡°)
2014 Best RPG Maker User - StoryProject of the Year 20142014 Queen of RMRK2011 Best Newbie2014 Kindest Member2014 Best RPG Maker User - Creativity2013 Queen of RMRKBronze SS AuthorBronze Writing ReviewerSecret Santa 2013 ParticipantFor taking arms in the name of your breakfast.GOOD!For frequently finding and reporting spam and spam bots2012 Best RPG Maker User (Creativity)2012 Best Yuyubabe Smiley;o
Welcome! :D I can't answer many of your questions, because I'm not scripter, nor do I use xp. D:

But I can say that RMRK is the best around, if you can take jokes, be nice to the others, and not go near the sewers. ;p You seem nice, so that's good! :) I won't recommend any other places, because I love RMRK too much. ;o;
Spoiler for My Games and Art:
ℒℴѵℯ❤


My Artwork Thread

The Lhuvia Tales [Current]

Ambassador [Complete]

The Postman [Complete]

The Wyvern [Complete]

Phoenix Wright: Haunted Turnabout [Complete]

Major Arcana [Cancelled]


**
Rep:
Level 46
Overlord in Training
Well it's the father of the script himself, Modern Algebra. Thankyou for pointing that out, It works perfectly now. :D I'm really happy about that. I suppose the cat's out of the bag, I'm an aggravated newbie when it comes to scripts. I was amazed that was all I got wrong. Pigs will fly intergalactic carriers when I have no more troubles trying to use scripts. It's nice to meet you.

Hello Yuyubabe, it's good to meet you as well. Yes, I'm liking this forum a lot already, the helpfulness has exceeded my expectations in a short time. I think I can take jokes, not sure. Are they good jokes or mean ones? I can never understand the former and the latter I use relentlessly in RL. And now I'm definitely going near the sewers.