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.

Designing an Actor Storage system

Alright so here is the basic concept, I want to be able to infinitely add actors to a game. I will lay out the system I want to build and what I am having issues with. For the most part this will end up being a massive rebuild of the party, actor, and battle systems into something quite a bit different than anything I have seen.

The system as a whole:

The player uses $game_player only for his/her character, I have already added new properties to Game_Player such as name, and will continue to add as needed.

Game_Actor will be where all of my party members are stored, however I wish to be able to create new actors using script. I will give an example
Code:
 

Game is started, you reach the point where you choose your first battler.

  Battler information including name, graphics etc are loaded from a text file or an alternate database.

    Battler information is written to Actor 001-006 depending on a slot chosen by a menu. Given unique ID

    (This is because I want to create unique actors, so I could have 10 of the same actors with different stats, skills, exp curves, etc)

 
This is where my problem is, I am unsure how to go about the process of overwriting an entire actor. Any tutorials I can find on RGSS do not really go into inheritance in any sort of minimalistic detail that could be useful.

My theory is that I would use $game_actors[001] = [Array of properties] but could someone clarify and maybe give me some guidance? Taking in all of the RGSS is a little much, but I really don't want to wait to get this system started.

So continuing on, to complete my description of the system. When you loadout a character, removing them from the party, they are actually removed from the actors list and placed into a new database such as Owned_Actors.

I have plenty of ideas how to do all of this with text files or .rb files, but I would like to keep as much as possible INSIDE the save file. Please, any pointers are helpful.

Charlie Fleed apparently HAD a script for cloning actors but I am unable to find it on Planet Fleed.

Edit: Also please do not point me towards pokestarter, it is absolutely attrocious for learning, it is great for making pokemon games though. Another note, if anyone has PSP (pokemon script project) in english, I would love to get my hands on it, it uses more of a system I would be interested in. (I know its based on pokestarter but it is better organized and not everything is called Pokemon this and that (gets confusing using all the same naming)

Edit2: From my research I have found that the Actors are not so easily changed and I will have to create some sort of temporary variable to handle the new actors I create if I intend for them to be unique, it seems as though I may very well have to use external files to deal with this, I can use Marshal.dump to save out a $game_owned_actors list with all the information, then I can load it up for additonal tweaking on the next load, but for the most part it seems I am not going to be able to actually overwrite Actors.
 
Tbh, I'm not entirely sure what you're trying to do here... sounds like you want to recreate the default system in a complicated manner really...

First of all, let's talk about Game_Player. This class is not the player's actor or whatever, but simply the avatar, meaning the moving pixel representation of the player in the game. It will be displayed with the graphic of the first actor in your party.
Doing what you suggested would cause a massive amount of trouble, such as
• no compatibility to ANYTHING anymore
• the need to rewrite a bunch of scripts for nothing
• a new way to handle the actor on the map
and a few more really. I can't even tell you how to change it so it makes sense again... you're best of staying with the current seperation of avatar and actor.

If you're talking modifIng actor's values, just add them to your party and modify their stuff by $game_actor.name, for example. You can read those values from your text file or whereever really, so... I'm a bit lost on what you need a big system for.

Now to your idea of cloning actors, or something of the sort. As far as I'm aware, nothing's keeping you from adding the same character to your party twice as of now, but the add_actor method's contents. If you modify that, you should be able to get what you want.

Make sure to correct me on whatever.
 
As far as the player, I am just looking for an easy way to give the player its own name using NameEdit, I suck at making windows I have learned lol. I have ways around that though, so it is not a big deal, the more important part is the actor bit. The only thing I mean as far as a connection between the first actor and the player avatar is that is where the player avatar gets its initial information for the character_name, hue etc. I have a working character selection now that ignores Actors all together, so that is not a problem anymore.


So add_actor, let me take a look here...
Code:
 

 def add_actor(actor_id)

    # Get actor

    actor = $game_actors[actor_id]

    # If the party has less than 4 members and this actor is not in the party

    if @actors.size < 4 and not @actors.include?(actor)

      # Add actor

      @actors.push(actor)

      # Refresh player

      $game_player.refresh

    end

  end

 

This is the piece of code you are talking about? Basically "@actors.include?(actor)" is preventing me from adding the same actor twice? Will I be able to give both actors different stats etc? The most important part of this is being able to have two of the same actors who have different skills, stats etc. Well, that and also being able to switch the actors out of my party into some sort of a reserve where their stats will still be retained. I assume once an actor is initialized and setup though, that they will retain their info as long as I do not re-initialize them right?

I just want to emphasize that all I am really looking for is a way to have two Aluxes in my party, rename one Fred the other Bob, give one magical abilities and the other technical abilities and differing statistics.

I have been looking all over for someone doing something similar but I can't really find anything, I find the pokemon system to be a little more complex than what I really need. I personally just do not have the experience yet with RMXP and RGSS to know the ins and outs of the built-in functions, sure I have read the help file, but memorizing an API almost never leads to mastering it ya still need practice heh.
 
As you said, the include?-bit is what keeps you from adding the same actor twice. It doesn't end there though... lemme give you an example, for which we'll need a single database actor:
Code:
[@name="Arshes", @strength=50, @magic=50]
Removing the check if the actor is already in your party and adding him twice, this will be your party:
Code:
[[@name="Arshes", @strength=50, @magic=50], [@name="Arshes", @strength=50, @magic=50]]
Now what you can do is set whichever value you feel like, depending on the actor's position in the party... such as this:
Code:
$game_party.actors[0].magic = 75

$game_party.actors[1].strength = 75
Note that this is only somewhat true, as you'd need to define the respective methods to change stats like that... it will work with default stats such as 'str' or 'int' though. Also, note that you need to use $game_party.members[] if you're using RMVX. Either way, that would give you the following party:
Code:
[[@name="Arshes", @strength=50, @magic=75], [@name="Arshes", @strength=75, @magic=50]]
Note that you'll have trouble upon removing an actor now, because the event command designated to do that will remove whoever at this point. Your best bet is to remove an actor by id of the array, but note that you need some kind of unique identifier for the actors in your party, because if you try to use the database IDs, you'll soon have duplicates of those using multiples of the same actors. Using the name wouldn't be the best either, since you can never exclude that there'll be duplicates here. What you would need is a unique ID that's created upon creating your character, but that method still has the flaw that you could end up with two identical characters that just have different UIDs.

In general, I'm still not sure what exactly you need duplicate actors for. Following your Fred and Bob example, just create those as actors, give them the respective values and be happy?
 
Since you're relatively new at this scripting thing, what would be really helpful is, if you described your problem/opportunity without using any scripting/programming terminology. i.e. "Business" requirements. Describe the problem, not what you think the solution might be.

Example: In my game, I would like to implement a time travel system where the player frequently/occasionally travels to the future or past to accomplish his goals. In these travels, the player can encounter a future/past version of himself. But since that other version has either been around longer/shorter, his experience would be different that the main player's. I need to be able to create a 'clone' of the player, but with different stats. I also need to be able to add the cloned player to the party, so they can work together to solve the current quest.

Coincidentally, this is called a "Problem/Opportunity Statement". The concept will come in handy IRL in just about any career you choose.
The customer (you) describes the problem without speculating on the technical solution. Then you let the experts (us), with a much broader view of possible technologies to apply to the solution make suggestions on how to solve the problem.

Give it a try.
 
No sadly Blue not happy lol. But you have answered all of my questions, creating a unique ID will be a simple task, I was just hoping I would not have to create a whole new actor database. "but that method still has the flaw that you could end up with two identical characters that just have different UIDs." That in essence isn't a flaw but the very foundation of the system I am creating. I want you to be able to stockpile characters and raise them in different fashions to create very unique characters, so when I do eventually implement online play, players will have incredibly varied characters and can trade based on stats etc to "perfect" their party. Last thing I want is for 8 ppl to have chars the same level, with the same gear and skills...and Everything relies upon the perfect choice of attack sequence, boring.

Brew thank you for the suggestion, but I am trying to look for a solution myself as well. I don't know where you get the idea that I am new to scripting, I have been scripting for quite a while but Ruby isn't every other language and RGSS is even farther from that. Most of my problems with RMXP lie in the RTP specific bits and my uber level of laziness in actually reading through the pre-existing script.


Even so, I really feel insulted by the your statement, I am not a budding tween I am a working professional, I already know how the world works, but this is a forum and I am only looking for more experienced help. This is the first forum I have ever joined where I was told how I should be when asking for help...I would just much rather not get any help.
 
dagarath":2z3c85ra said:
...I personally just do not have the experience yet with RMXP and RGSS to know the ins and outs of the built-in functions,

I dunno, for some reason I had it in my head you were pretty young. Sorry, I didn't mean to insult you.
I was just trying another way to get out of you what you were trying to achieve.

I couldn't imagine, for the life of me, why you would need an infinite amount of actors, and why just using the database wouldn't suffice.
Now that you mention, " eventually implement online play, ...." it makes more sense.
You want to use the database as a 'library' of stock characters for multiple users to base their characters on, but still be able to modify them, either randomly or through user intervention.

NOW I GET IT!!!! :scruff:

I would still use Game_Actor as the prototype for each actor.

If you won't have parties, you could retool Game_Actors to store an array of each instance of Game_Actor, as well as any methods that would apply to all actors. (only referring to $data_actors when instantiating a new actor).

For the most part this will end up being a massive rebuild of the party, actor, and battle systems...

You got that right!!! The whole system was designed around a "single player" framework.

Honestly, if you're shooting for an online / multi-player system, RMXP is probably not the most efficient way to go. I've only seen a couple of client/server implementations using RPG maker, and although I haven't tried them out, the comments seem to suggest that they are not very efficient at it. I expect it's a limitation of using RGSS, an interpreted language to do something to which a low-level language is more suited.

I'm not saying not to do it, as it would certainly be a great learning experience.

You should chat with Wyatt (Amy Pond), he has/had an online RPG game running, I think using RMXP.

Sorry again if I offended you. I'll tell you what I told my wife.... "If I say something that can taken more than one way, and if one of those ways pisses you off.... I meant it the other way." :)

Be Well
 
Lol np Brewmeister, you have helped me a lot getting my sea legs with RMXP so I can't hold it against ya even if I wanted to =P

You are trying to help and I am glad for it, most of what I am trying to accomplish is in my concept development post if you are interested in more info.

I agree that RGSS is not well suited to online games, but the core of RMXP is a great little toolkit, and has a large enough community, in very few places, that I can actually give something back to. Sure I could use an MMO middleware, or build my own project in XNA or even from the ground up but that isn't really what I am looking to do.

I am trying to get out of my comfort zone and do something I am not used to, maybe learn something new hehe. Using RMXP a lot of the systems I would like in my game are already done, it is mostly a matter of tweaking...except for most of the above, and the learning curve of working with windows (it is simple, i know it is, but I am just not getting it lol)

My hope is that ARGSS (which perfoms much better than RGSS player) will enter beta or further by the time this game is ready for any online play, in which case either I or someone I am sure will develop a connectivity kit for it. I already have a great server backend for the actual serverside part of the game.

I just got my hands on an in game console made by Jaber so hopefully using this I will be able to get over the hump of learning how to use windows effectively, and efficiently.

Edit: Also, I just got my hands on Charlie Fleed's actor cloning system, which can now be found at planet fleed (yesterday it couldn't). The way it creates new actors from actors in the database is so clean and efficient, if I use this system all I have to do is create commands to remove the actor from the party and store them, and also replace them(replace one actor with another that has already been stored). There are plenty of party switcher systems, which I will look at, but I most likely will end up just making something really simple from scratch so that it does exactly what I need and nothing more or less than that.
 

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