Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - CodeMoose

Pages: [1]
1
Modifications / Re: Modding RA3
« on: June 20, 2016, 12:42:36 PM »
Perhaps it was used for testing before they had new models and left the code in there?

2
Discussion / Re: Robot Arena 3
« on: June 20, 2016, 12:37:30 PM »
I have to admit, I've not even played the game all that much, I've been having too much fun poking around in the code to see how it all works.

But I do think the devs have been making a decent effort to fix the major flaws that it started with.

3
Modifications / Re: Modding RA3
« on: June 20, 2016, 12:30:02 PM »
It is not obfuscated, which I am very thankful for. You would need to flesh out the rough component importing system somewhat before attempting to convert any RA2 modded components. Static weapons like blades and spikes might be easy, but it can't do wheels or motors... yet(?)

As an interesting side note, the components.json format that the RA3 game uses, contains entries for RA2 model names, and they have code to convert the metadata from the old format (though I don't see it getting called anywhere). I think they must have manually converted the model meshes though, since I don't see code to read in gmf formats.

4
Modifications / Re: Modding RA3
« on: June 19, 2016, 11:34:10 PM »
My original idea was to design a system where you can just add small tweaks to methods in the original game to fix issues. For instance I just updated the GitHub repo with a small tweak that now draws a line between the last vertex and the mouse cursor when building the chassis baseplate (just like RA2 used to have).



That being said, I also added code to tweak the methods that load up components like seen in the first post. Essentially there are 2 that I changed. The first loads up the list of all components in the game (from a JSON file). I hooked into this function and made it append a second set of json to the end that describes the new components I want to add (just the dagger shown in the first post). That json file has an entry that says what Unity prefab to load when you add the component. So the second method I hooked is the one that loads the prefabs. I check to see if the prefab it is looking for is one I've added and if it is, I load it up from a Unity asset bundle I created (if not I just let it load as normal).

So to create the new components, you have to use Unity (free personal version works fine - its what I have) to create a new gameObject and pack it into an asset bundle.

To do that you basically create a new Unity gameobject that has a child gameobject containing the model mesh, and the physics collider (if you've ever used Unity you'd know this is just a normal sort of thing you would do). You also add a child gameobject called 'AttachPoint' that gets converted into an object where RA3 should attach the component when you add it. Then you put it into an asset bundle using the Unity asset bundle option, and then build the bundle (I included an editor script in the GitHub Unity project that will build it for you from the Assets menu). The components.json file is also included in that asset bundle. That probably all sounds like nonsense, but its actually pretty straight forward once you see it in action.

The system could be improved to use multiple asset bundles or something, and there is no way to specify the type of attach point right now (fixed, motor, wheel, swing, socket, plug, etc). But it is just a proof of concept right now.

5
Modifications / Re: Modding RA3
« on: June 19, 2016, 04:03:19 PM »
Good question. I imagine if only one person has the component it might crash. If both have the same modded code running though it would probably work. But you are right in that there are no checks (at least as far as I know).

6
Modifications / Modding RA3
« on: June 19, 2016, 03:48:40 PM »
Since RA3 is built on Unity and I'm pretty familiar with how that works (sort of), I thought I would take a look at how difficult it would be to mod the game. Also considering the second Q&A post by the developers contained the following:

 > I'd also like to ask if any modding tools will be supplied by Octopus Tree
Not at initial release. Between us, Unity games are HIGHLY MODDABLE without any support required on the Dev side. Clever folks can actually hook right into the C# mono code.

I thought they wouldn't mind if I took a look.

So I spent a few days investigating and coming up with a way to modify the C# IL (similar to how other Unity game mods do it - with Mono.Cecil). Then I coded up a few examples of how you could alter the code, by adding a couple of export buttons and a new component.

The code isn't much more than a proof of concept (so expect issues if you try to use it) but I'm hoping it might serve as a useful resource for other people to start modding RA3, or even for fixing issues. I put it up on GitHub over at: https://github.com/CodeMooseUS/ra3-tweaks.

Here is a picture of the example weapon I added to my bot (I call him 'ChopSalad'):


7
Game Development / Re: Robot Combat prototype in progress
« on: July 28, 2015, 12:40:24 AM »
Looks cool. Any thoughts on making it open source on github (or similar)? I'm sure quite a few people would be interested in issuing contributions.

8
Game Development / Re: Scrapmatch
« on: August 19, 2014, 07:14:45 PM »
This looks great so far!

Any chance you are going to open source it on Github (or similar)? I bet I'm not the only one that would love to help out.

Pages: [1]