News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Question on how to make non-playable characters playable?  (Read 880 times)

Skull Kid

  • Newbie
  • *
  • Posts: 4
    • View Profile
Question on how to make non-playable characters playable?
« on: July 13, 2018, 03:24:39 pm »
Hello to one and all!

I just had a quick question on how I can make non-playable characters playable? The platform is Game Boy Advance, and the game is not very well known. The game is called "Robot Wars Extreme Destruction" and was released to the Game Boy Advance back in 2002.


My goal is to make the gladiatoral-like house robots playable, but as they are programmed to be unplayable in this particular game (there is another Robot Wars game, called Robot Wars Advanced Destruction, which is also for the Game Boy Advance, released in 2001 where the house robots can indeed be unlocked).


So, that's basically my question. I certainly hope this can be accomplished without being a programmer. I have been modding the Robot Wars games for the PC (Robot Wars Arenas of Destruction from 2001, and Robot Wars Extreme Destruction from 2002) and been able to unlock the house robots. But the PC is one thing, the Game Boy Advance is another.

Kind Regards,

Skull Kid.
Kind Regards,

Skull Kid

FAST6191

  • Hero Member
  • *****
  • Posts: 2381
    • View Profile
Re: Question on how to make non-playable characters playable?
« Reply #1 on: July 15, 2018, 05:43:00 am »
Being an assembly capable hacker would all but guarantee this being possible. Without it... you possibly have some options.

1) Character selection cheats. Normally seen in a fighting game or racing game but generally people making games will not code something special for boss/hidden characters and just deny you a chance to select them at the menu and thus use them in the game. As your selection is just a number then if you can force this number (like with a cheat) to be something else then you get said hidden character.
I can see it going both ways here and said house bots being effective unselectable characters, and I can see them being NPCs with their own code just as happily.

2) Cosmetic.
If you wanted to play final fantasy overworld as a NPC then find the graphical tile data and do some copy-paste action (maybe also sorting any palette issues). Battles for a 2d game are harder as it is unlikely the devs coded full battle animations for npcs. If you want to have some fun with a tile editor and play pixel artist though...
In this case however the house bots likely will have all the necessary angles and attack animations if they operate within the same plane.
Possible issue. I never saw the version of robot wars this was based on but the UK one did have rather larger bots than competitors were allowed, if this is the case here then the sprites might be bigger than normal player bots and thus not work, or take a bit of fiddling to fit.
Possible second issue deals with hitboxes, especially if they are bigger, but cross that bridge as and when.

For 3d games then if the NPCs are similar to the PCs (and if they are all essentially the same character that is a distinct possibility) you can usually twist the 3d animations to your ends (or indeed just overwrite the model and texture and leave 3d animations alone). Looking at a video of this then the jerky turning animations would have me believe it is actually an isometric game rather than proper 3d (the GBA did have some games doing this) and thus you are back at sprites.

3) Functional replacement.
Again more for 3d or for something that might be a hidden extra mode where you can play as a boss or something. Easier if there is a file system involved (not likely on the GBA, is on the DS, hence all sorts of mods like this there for various RPGS and whatever else) but much like character selection here you find all the data controlling the character and either point the game at it or overwrite the original. No need to understand anything, just need to know where all the relevant parts are.


With the possible exception of the cheat thing and some of the things with file systems then none of those are necessarily trivial if you are coming in completely cold to hacking. At the same time while all will be able to benefit from a knowledge of assembly hacking there are countless examples of it being done by people with fairly minimal skills.
If you did have some assembly skills then as you are effectively doing things the game expects to see* then it is not so bad as completely altering behaviours often is where you are compelled to code your own stuff.

*this said one of the most well known examples of this would be Crash Team Racing where you play as a boss character. Apparently it causes the system to run out of memory on some tracks and thus crash the game.
https://www.youtube.com/watch?v=-r-oaaWsPE8

Skull Kid

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Question on how to make non-playable characters playable?
« Reply #2 on: July 15, 2018, 12:14:53 pm »
Hi FAST6191,

I'm quite a newbie to programming and everything programming-related. My strength lies in simple hacking and scripting if I'm using the right words (English is not my first language, as I'm Swedish) but I have indeed made the house robots playable in the game Robot Wars Arenas of Destruction, the version for the PC. The PS2 (PlayStation 2) is a different story. I have only modded PC games thus far.

Also, I'm currently running Linux Mint 19 (Cinnamon Edition 64-bit) but I guess it doesn't really matter what computer operating system I run, as emulators exists for many platforms.

But to get to the point. To simply try and change an entry at the robot selection screen, to, say, Sir Killalot. How would I go about doing that?

Kind Regards,

Skull Kid
Kind Regards,

Skull Kid

FAST6191

  • Hero Member
  • *****
  • Posts: 2381
    • View Profile
Re: Question on how to make non-playable characters playable?
« Reply #3 on: July 15, 2018, 03:53:01 pm »
Emulators exist but the debug options might not always be there. VBA lacked many of them last time I tested it on Linux. A windows machine or VM is something you would do well to have around for this -- if your only interest right now is the GBA then it is not going to require a lot of grunt in your computer.

Scripting around here tends to be concerned with in game events, some people use different definitions though (several in pokemon hacking circles refer to different things). Also confusingly the game text is called a script so script editing tends to refer to altering that around here.

Anyway character selection cheats. Like most things there will be something in the memory that refers to the thing you are using. In classic my first cheat guides you will be guided through making a infinite health, ammo, mana, items... cheats but doing as little as you can but changing that one thing (say firing a shot into nothing), searching and repeating* that. Similar story here but with characters in either the selection screen itself or the events/main game mode. Some games will do it from the menu, other games the menu is just a selection thing (though it might still work/pass the relevant value) and the final selection is then what gets passed to the next part of the game. Changing a character in game might not work or might cause strange behaviours.
Most times the hidden characters will be numbers immediately following the last selectable character but other times they might use far higher numbers, sadly no way to easily tell if you don't want to look at what the game's code is doing.

*if changing each time is not getting you anywhere you can try selecting the same character and searching for values that remained the same.

In any case it is likely not as clean cut as infinite health/ammo/potions/... but not a massively complex endeavour. Most annoying part is where you can waste resources fairly quickly and easily then full character selection (if you are going that way) takes a few seconds and resetting back to base (or using a savestate) means it takes a little bit longer than said easy to waste resources.


Skull Kid

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Question on how to make non-playable characters playable?
« Reply #4 on: July 15, 2018, 04:17:37 pm »
Alright. I will see if I can install some form of Game Boy emulator.
Kind Regards,

Skull Kid

Skull Kid

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Question on how to make non-playable characters playable?
« Reply #5 on: August 06, 2018, 03:14:59 pm »
I'm back in Windows 7. I remember trying to edit the number of robots in the game from the default number plus five (as the five house robots are: Matilda, Sergeant Bash, Shunt, Dead Metal and Sir Killalot). But I have no clue on how to make it working...
Kind Regards,

Skull Kid

yetisyny

  • Jr. Member
  • **
  • Posts: 38
  • yetisyny a.k.a. General Public
    • View Profile
Re: Question on how to make non-playable characters playable?
« Reply #6 on: August 14, 2018, 05:56:15 pm »
I looked this up, OK so I played GBA games for years on VisualBoyAdvance-M, great emulator with a lot of features including a debugger and everything, been around a long time. But apparently one called NO$GBA is better for programming and debugging purposes if you don’t just want to play games, in fact it seems it originally started out as a debugger and later had emulation added too, but it is not quite as popular for playing games. Also there is a newer emulator called mGBA which is more accurate and faster but does not have as many features yet, but people really like it. You should probably try all 3.

There are other emulators too for GBA but they are not as good, at least according to what I read, those 3 are the only 3 you should bother trying.

OK so here are official download links for all 3 of them to get the latest versions:
NO$GBA (currently version 2.9a, get the debug version for programmers)
VisualBoyAdvance-M (currently version 2.1.0 Security Fix)
mGBA (currently version 0.6.3)

VisualBoyAdvance-M and mGBA are both cross-platform while NO$GBA seems to be Windows-and-DOS-only, all 3 should be fine for you in Windows 7, but in Linux Mint, well you can use 2 out of the 3 but NO$GBA supposedly is the best for programming and debugging. And emulators have different interfaces and feature sets on different operating systems, I know VisualBoyAdvance-M for instance is definitely different on Windows and Linux. You might be able to use Wine to run the Windows version of NO$GBA in Linux but Wine is rather a pain to get working.

The easiest one to install on Linux Mint is mGBA, there are prebuilt binaries for Ubuntu there and you just need to pick the one for the Ubuntu version that matches your Linux Mint version. VisualBoyAdvace-M has WxWidgets, SDL, and GTK+ versions, not sure which one is best, they currently have the WxWidgets as the default version but I have found on Windows that the SDL version of VisualBoyAdvance-M is the best on Windows, at least the last time I checked. NO$GBA is supposed to be the best one for programming and debugging though and for that one, running it from Windows is best, unless you are really good at using Wine. Don’t even bother with the DOS version of NO$GBA since it lacks programming and debugging features.