Version Control + RPG Maker = Boom

Apologies for jumping in, but I'm trying to do the same sort of source-control operation.

I've got the 'Import' section working thanks to the examples here, but I'm having a right time with the export (converting the Ruby data files to text).

I try this:

actors_array = load_data('Data/Actors.rvdata2')

actors = File.open('Actors.txt', 'w')

actors_array.each do | actor |

actors.write("ID = ")

actors.write(actor.id)

end

actors.close

Which looks to me like the opposite of the loading code, but it explodes quite nastily trying to write the 'actor.id', with the error message 'undefined method 'id' for nil:NilClass.'

I'm assuming load_data() loads an array of RPG::actors, of which there should be two, but it's not responding in that way.

However, if I just print out the string literal "ID =" then I get three (for some reason) copies of it in the output file.

Clearly it's an array of something, but it doesn't seem to like responding to the 'id' request.

Can anyone help here, please? Ta.

*Update* I suspect that load_data() just loads an array of... something, as it's used for loading several different things.

It doesn't know it's supposed to be an array of RPG::actors.

Adding the following inside the loop doesn't help though:

actor_object = RPG::actor new

actor_object = actor
Thanks.

Seriously, you guys use dropbox? Isn't there some option to convert the data files into a text format?

I now have three, possibly four people working on a project together (including me). This is a killer -- almost any change, other than an actual map change, affects files that are shared; you end up wiping over other people's changes.
This is where the project manager needs to manage the project.

If a scripter does something that requires a change on a map, he should write up a detailed description of what he needs and send it through the project manager to whoever is in charge of maintaining the maps. Same goes for any other change that affects multiple game components. Everyone should have their own responsibilities and the means to communicate tasks so that no one ever steps on any one else's toes.

If you do that, you won't have to worry about digging into the file formats and all that other crazy talk. Make everyone do their own jobs, and you (or whoever is project lead) keep people on task and make sure that all the cross-requests go through you so you know when (not if) people are requesting mutually exclusive features.
Which looks to me like the opposite of the loading code, but it explodes quite nastily trying to write the 'actor.id', with the error message 'undefined method 'id' for nil:NilClass.'
All arrays have a nil as the zero index. That's because they normalized everything to be one-based index rather than 0.

So you need to say



Code:
actors.each {|actor|
   next unless actor
   ...
}
or something to make sure you actually have an object.

I'm assuming load_data() loads an array of RPG::actors, of which there should be two, but it's not responding in that way.
load_data simply calls Marshal.load, but also provides support for their encrypted archive.
I really don't understand why you don't have multiple people working on multiple different parts of the game via dropbox?

I have one other guy and that is what we do and it works fine. You just say to one another... "I'm working on Classes, so don't touch them for the next few hours while I finish up."

Making an entirely new program seems overkill (to me at least).
@CdrJameson: this is thread hijacking and necro-posting. Please create your own thread for this.

Original thread: https://forums.rpgmakerweb.com/threads/version-control-rpg-maker-boom.2166/